Parser Generator is the second phase of my compiler (Genepiler). It's planned to join my 'Oh My Compiler' project!
This phase takes the tokens from the first phase along with the CFG rules and consequently produces actions file to be processed later in the third phase - Intermediate Code Generator
- interface for LR:
- convert CFG file into lines. Each is a statement
- put the statement into a dict [key, value]
- build another dict to replace terminals and non-terminals by one char(no need)
- left Recursion
- left Factoring
- get first
- get follow
- build parsing table
- walk through the parsing table
- build a parsing tree (see phase 3)
- add arguments (argparse)
- consider module file to add your modules in
- consider adding directory for input and directory for output
- report
- Today: 1 May 2020
- Deadline: 5 May 2020
3 days to just implement this
1 day for the report