Open
Description
For some grammars, javacc appears to detect a choice conflict if Kleene-* is used but fails to detect the same conflict if an auxiliary non-terminal is used instead of Kleene-*.
The conflict is detected in this version:
A ::= "new" T "[" "0" "]"
T ::= "int" ( "[" "]" )*
But not in this one:
A ::= "new" T "[" "0" "]"
T ::= "int" Q
Q ::= "[" "]" Q
Q ::=
Since follow(Q) = follow(T) = { "[" } I think the conflict should be detected.
(Javacc source attached.)
choice-conflict.txt
Metadata
Metadata
Assignees
Labels
No labels