Examples on how to construct compilers using lex, yacc and Pyhon Lex-Yacc
-
ex1 - a very simple calculator with support for addition, subtraction, multiplying, division and exponentiation, it also understands parentheses, order of operations and can work with basic alphanumeric variables
-
calc3 - includes loops support (simple WHILE without control statements) and simple conditionals, has 3 variations:
- interpreter
- compiler (to abstract ASM)
- grapher which builds a syntax tree