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

Automatic left factoring does not support labels #17

Open
sharwell opened this issue Oct 12, 2014 · 0 comments
Open

Automatic left factoring does not support labels #17

sharwell opened this issue Oct 12, 2014 · 0 comments

Comments

@sharwell
Copy link
Owner

The following grammar results in a NullPointerException, due to the use the label op in the incDecStmt rule.

https://github.com/tunnelvisionlabs/goworks/blob/a9549d56969d7d7bcf49816fd1faaed37bfd0e2d/goworks.editor/src/org/tvl/goworks/editor/go/parser/GoParser.g4

Exception in thread "main" java.lang.NullPointerException
    at org.antlr.v4.codegen.model.RuleFunction.addContextDecl(RuleFunction.java:331)
    at org.antlr.v4.codegen.ParserFactory.tokenRef(ParserFactory.java:160)
    at org.antlr.v4.codegen.BlankOutputModelFactory.stringRef(BlankOutputModelFactory.java:88)
    at org.antlr.v4.codegen.OutputModelController.stringRef(OutputModelController.java:403)
    at org.antlr.v4.codegen.SourceGenTriggers.terminal(SourceGenTriggers.java:1581)
    at org.antlr.v4.codegen.SourceGenTriggers.atom(SourceGenTriggers.java:1307)
    at org.antlr.v4.codegen.SourceGenTriggers.blockSet(SourceGenTriggers.java:1066)
    at org.antlr.v4.codegen.SourceGenTriggers.atom(SourceGenTriggers.java:1327)
    at org.antlr.v4.codegen.SourceGenTriggers.labeledElement(SourceGenTriggers.java:828)
    at org.antlr.v4.codegen.SourceGenTriggers.element(SourceGenTriggers.java:594)
    at org.antlr.v4.codegen.SourceGenTriggers.alt(SourceGenTriggers.java:427)
    at org.antlr.v4.codegen.SourceGenTriggers.alternative(SourceGenTriggers.java:335)
    at org.antlr.v4.codegen.SourceGenTriggers.block(SourceGenTriggers.java:270)
    at org.antlr.v4.codegen.OutputModelController.buildNormalRuleFunction(OutputModelController.java:306)
    at org.antlr.v4.codegen.OutputModelController.buildRuleFunction(OutputModelController.java:193)
    at org.antlr.v4.codegen.OutputModelController.buildParserOutputModel(OutputModelController.java:119)
    at org.antlr.v4.codegen.CodeGenerator.generateParser(CodeGenerator.java:156)
    at org.antlr.v4.codegen.CodeGenPipeline.process(CodeGenPipeline.java:82)
    at org.antlr.v4.Tool.processNonCombinedGrammar(Tool.java:426)
    at org.antlr.v4.Tool.process(Tool.java:390)
    at org.antlr.v4.Tool.processGrammarsOnCommandLine(Tool.java:343)
    at org.antlr.v4.Tool.main(Tool.java:190)
@sharwell sharwell self-assigned this Oct 12, 2014
@sharwell sharwell removed their assignment Feb 20, 2015
sharwell pushed a commit that referenced this issue Nov 23, 2016
sharwell pushed a commit that referenced this issue Nov 23, 2016
Added lexer channels enum to match Java target
sharwell added a commit that referenced this issue Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant