Hello! This is a public repository of compiler design lab codes. following are the details of the creator and purpose of this repository.
| Tags | Information |
|---|---|
| Name | Amardeep Saha |
| Roll Number | 2019UGCS029R |
| Branch | C.S.E. |
| Subject | Compiler Design Lab |
| Faculty Incharge | Dr. Bhaskar Mondal |
| Institution | Indian Institute of Information Technology, Ranchi |
The codes in this repository uses Flex as lexical analyzer to convert the respective lex files into c files. The file system in this repo contains:-
- Lex file with
myfile.lformat. - Lexically analyzed
lex.yy.cc file. - GCC compiled
a.outfile.
- Flex (the Lexical Analyzer):-
For Ubuntu (v 20.04 LTS) :-
Open terminal.
Type
sudo apt install flex.Flex will be installed.
For Windows (10 home) :-
Go to google and search Flex.
Open the first link showing flex-GnuWin32 .
Downoload the Flex file and install it in your system (Make sure to note the PATH of the installed Flex program).
Change add a system PATH to the file directory of the installed flex program.
- C Compiler (the compiler for compiling lex.yy.c file) :-
For Ubuntu (v 20.04 LTS) :-
Open terminal.
Type
sudo apt install gcc.Flex will be installed.
For Windows (10 home) :-
Go to google and search GNU-GCC.
Open the first link and Download the required version of the compiler.
Install the downloaded file in your system.
Check whether the GCC compiler is installed by running
gcc -versioncode in cmd.
- Any code editor can be installed for writing lex programs (Notepad can also do the work).
