-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
UnsupportedOperationException while generating code for large grammars. #2732
Labels
Milestone
Comments
I noticed that there is a similar problem at #840. Perhaps we can refer to this issue to find more context about the bug. |
KvanTTT
added a commit
to KvanTTT/antlr4
that referenced
this issue
Jan 15, 2022
Refactor ATN serializer and deserializer, use ATNDataWriter, ATNDataReader Remove excess data cloning in deserializer fixes antlr#1863, fixes antlr#2732, fixes antlr#3338
KvanTTT
added a commit
to KvanTTT/antlr4
that referenced
this issue
Jan 16, 2022
Refactor ATN serializer and deserializer, use ATNDataWriter, ATNDataReader Remove excess data cloning in deserializer fixes antlr#1863, fixes antlr#2732, fixes antlr#3338
KvanTTT
added a commit
to KvanTTT/antlr4
that referenced
this issue
Jan 17, 2022
Refactor ATN serializer and deserializer, use ATNDataWriter, ATNDataReader Remove excess data cloning in deserializer fixes antlr#1863, fixes antlr#2732, fixes antlr#3338
KvanTTT
added a commit
to KvanTTT/antlr4
that referenced
this issue
Feb 20, 2022
…er.MAX_VALUE) fix antlr#840, fix antlr#1863, fix antlr#2732, fix antlr#3338
Fixed by #3591 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When generating code for large grammars we are getting this exception log. The code generation targets C#.
Exception in thread "main" java.lang.UnsupportedOperationException: Serialized ATN data element 85257 element 11 out of range 0..65535
at org.antlr.v4.runtime.atn.ATNSerializer.serialize(ATNSerializer.java:362)
at org.antlr.v4.runtime.atn.ATNSerializer.getSerialized(ATNSerializer.java:601)
at org.antlr.v4.Tool.generateInterpreterData(Tool.java:745)
at org.antlr.v4.Tool.processNonCombinedGrammar(Tool.java:400)
at org.antlr.v4.Tool.process(Tool.java:361)
at org.antlr.v4.Tool.processGrammarsOnCommandLine(Tool.java:328)
at org.antlr.v4.Tool.main(Tool.java:172)
UserGrammar.g4
The text was updated successfully, but these errors were encountered: