Designing a C like compiler
cmd
- All commands. Must be run from root onlygrammar
- Grammar rules and descriptionslexer
- Lex file. Reads the input and writes the tokens toout/lex/<input filename>.tkl
parser
- Parser program filesresults
- Parsing table, Transition graph, Graph visualizationsymbol table
- Symbol table generating program and writes the tokens toout/symbol table/<input filename>.csv
util
- Utility Cpp program to prepare for read and write to filesout
- Output files from the lexer, parser, and symbol table
- Use a bash like shell
- Run
./run.sh
- Individual commands may be run as
./cmd/<command>.sh
lex.sh
- Must be supplied with a file to lexsymboltable.sh
- Must be supplied with a file to generate the symbol tableparse.sh
- Run the parservisualize.sh
- Visualize the transition graph (saved inresults/graph.svg
)