A project to design a programming language using lex and yacc
- sudo apt-get install flex
- sudo apt-get install bison
First, we need to specify all pattern matching rules for lex (bas.l) and grammar rules for yacc (bas.y)
Commands to create our compiler, bas.exe:
- yacc -d bas.y
- lex bas.l
- cc number.c lex.yy.c y.tab.c -ly -ll -lm