TOOLS USED:
- lex – in order to find the tokens and lexemes
- yacc – for parsing and 3 address code generation
IMPLEMENTATION DETAILS:
We have implemented the program in Ubuntu Terminal.
For that, u must have flex and bison in it.
It can be installed by the following command.
- sudo apt-get update
- sudo apt-get install flex
- sudo apt-get install bison
Note : Make sure you must install C libraries in terminal.
Then paste the lex file(filename.l) and yacc file(filename.y) in the same directory. Run the code using following commands,
- lex filename.l
- yacc filename.y
- gcc y.tab.c –ll –ly
- ./a.out