d-u-d-e / c-compiler

GNU General Public License v3.0
3 stars 0 forks source link

Flexible parser with recursive descent parsing #8

Open d-u-d-e opened 2 weeks ago

d-u-d-e commented 2 weeks ago

From page 15-16:

Now that you have an AST definition and a formal grammar, let’s talk about how to actually write the parser. We’ll use a straightforward technique called recursive descent parsing, which uses a different function to parse each non-terminal symbol and return the corresponding AST node.

d-u-d-e commented 2 weeks ago

The AST class is required in order to develop this feature.

albertoursino commented 2 weeks ago

The AST class is required in order to develop this feature.

Right, I was planning to create a branch from feature/ast tho. Do you think it's better to focus on AST anyway?

albertoursino commented 1 week ago

All the parsers implemented for the Recursive descent parsing algorithm are at compiler/parser/parsers.py