Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit label analysis only covers outer alts for list detection #28

Closed
sharwell opened this issue Feb 28, 2012 · 2 comments · Fixed by parrt/antlr4#122
Closed

Implicit label analysis only covers outer alts for list detection #28

sharwell opened this issue Feb 28, 2012 · 2 comments · Fixed by parrt/antlr4#122

Comments

@sharwell
Copy link
Member

In the code generated for the following rule, the VarSpecContext.expressionList() method returns a List<TerminalNode<Token>> when in reality the expressionList rule can be called at most 1 time.

varSpec
    :   identifierList
        (   type ('=' expressionList)?
        |   '=' expressionList
        )
    ;
@parrt
Copy link
Member

parrt commented Feb 28, 2012

weird.I thought that I fixed this one

Sam Harwell
mailto:reply@reply.github.com
February 28, 2012 12:44 PM
In the code generated for the following rule, the
VarSpecContext.expressionList() method returns a
List<TerminalNode<Token>> when in reality the expressionList rule
can be called at most 1 time.

varSpec
: identifierList
( type ('=' expressionList)?
| '=' expressionList
)
;

Reply to this email directly or view it on GitHub:
#28

@sharwell
Copy link
Member Author

I think this has to do with the fact that both occurrences of expressionList appear in the same outer alternative of the rule even though at most 1 lies on a path from rule start to stop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants