Compiler construction using Flex and Bison
Clone this repository. You will need flex, bison, and gcc installed on your machine.
$ make
compiler:
flex -o lexer.c lexer.l
bison -d -o parser.c parser.y -d
gcc parser.c -o compiler
$ ./compiler
5
18
45
Results :
-- Success in lexical analysis ! --
-- Parse success! --
// Change code
$ rm compiler
$ make