You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and I am reusing the resulting tokens file in another grammar like this
options{tokenVocab=OtherGrammar;}
Unfortunately, I get a NullPointerException when reusing it since the token is defined as follows in the tokens file
' \\' = 78
it should be defined as follows (then I get no NullPointerException any more):
'\\\\' = 78
Stackstrace
[13:17:57] java.lang.NullPointerException
at org.antlr.tool.AssignTokenTypesBehavior.aliasTokenIDsAndLiterals(AssignTokenTypesBehavior.java:288)
at org.antlr.tool.AssignTokenTypesBehavior.defineTokens(AssignTokenTypesBehavior.java:225)
at org.antlr.tool.CompositeGrammar.assignTokenTypes(CompositeGrammar.java:347)
at org.antlr.tool.Grammar.setGrammarContent(Grammar.java:649)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.createNewGrammar(ANTLRGrammarEngineImpl.java:192)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.createParserGrammar(ANTLRGrammarEngineImpl.java:225)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.createCombinedGrammar(ANTLRGrammarEngineImpl.java:203)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.createGrammars(ANTLRGrammarEngineImpl.java:165)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.analyze(ANTLRGrammarEngineImpl.java:272)
at org.antlr.works.grammar.engine.GrammarEngineImpl.analyze(GrammarEngineImpl.java:325)
at org.antlr.works.grammar.CheckGrammar.run(CheckGrammar.java:70)
at java.lang.Thread.run(Thread.java:745)
The text was updated successfully, but these errors were encountered:
I have defined a token as follows:
and I am reusing the resulting tokens file in another grammar like this
Unfortunately, I get a NullPointerException when reusing it since the token is defined as follows in the tokens file
it should be defined as follows (then I get no NullPointerException any more):
Stackstrace
The text was updated successfully, but these errors were encountered: