Overcoming infinite left recursion in TextX parser
问题 I am writing a parser for an existing language, using the TextX Python Library (based on the Arpeggio PEG parser) But when I try to use it to parse a file, I get the exception: RecursionError: maximum recursion depth exceeded while calling a Python object Here is a minimal example that raises this exception: #!/usr/bin/env python from textx import metamodel_from_str meta_model_string = "Expr: ( Expr '+' Expr ) | INT ;" model_string = "1 + 1" mm = metamodel_from_str(meta_model_string, debug