Back: Implementing the Oil Expression Language
pgen2 is the LL parser generator borrowed from Python, used for recognizing the Oil expression language (which is based on Python). Caveat: it's a bit hard to use!!!
Tips:
print_parse_tree in frontend/parse_lib.py. The structured of the parse tree depends on the exact structure of the grammar's rules.oil_lang/expr_to_ast.py, make sure you copy the relevant productions into comments. That will make it easier to write the "transformer".opy/compiler2/transformer.py for "tips" on transforming rules to AST nodes. However, note that we have the "singleton-collapse" rule which OPy doesn't have. Ping me for details if you don't understand this.