@XzuluX
Direct-left recursion is handled by Antlr, but I suspect that it is inefficient to use. I updated trgen/trperf to create a heat map of LT() along with a pop-up containing all the call stacks at the time of the call for that token. cover.zip What I found were problems for expressions--not surprising--involving rule name.
That's when I notice the rule name involves direct-left recursion. So, I ran the grammar over my script to find all direct-left recursion.
$ bash /c/Users/Kenne/Documents/GitHub/g4-scripts/find-direct-left-recursion.sh ONEParser.g4
Finding direct left recursive symbols in grammars...
L46: name
^
L805: type
^
I would recommend that rules name and type be rewritten using *-operators.
@XzuluX
Direct-left recursion is handled by Antlr, but I suspect that it is inefficient to use. I updated trgen/trperf to create a heat map of LT() along with a pop-up containing all the call stacks at the time of the call for that token. cover.zip What I found were problems for expressions--not surprising--involving rule
name.That's when I notice the rule
nameinvolves direct-left recursion. So, I ran the grammar over my script to find all direct-left recursion.I would recommend that rules
nameandtypebe rewritten using*-operators.