Left Recursion

TatSu supports direct and indirect left recursion in grammar rules using the the algorithm described by Nicolas Laurent and Kim Mens in their 2015 paper Parsing Expression Grammars Made Practical.

Left recursive rules produce left-associative parse trees (AST), as most users would expect.

Left recursion support is enabled by default in 竜 TatSu. To disable it for a particular grammar, use the @@left_recursion directive:

@@left_recursion :: False