Replies: 1 comment 1 reply
-
What grammar is this? Grammars-v4 is a repo of Antlr4 grammars, not the tools per se. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I run the command "antlr4 -Dlanguage=Python3 (the path where the grammar is located) -o (the folder where we save it) -visitor" in the command line, I get an error:
Exception in thread "main" java.lang.IllegalArgumentException: newLimit > capacity: (88581596 > 33554432)
at java.base/java.nio.Buffer.createLimitException(Unknown Source)
at java.base/java.nio.Buffer.limit(Unknown Source)
at java.base/java.nio.ByteBuffer.limit(Unknown Source)
at java.base/java.nio.MappedByteBuffer.limit(Unknown Source)
at java.base/java.nio.MappedByteBuffer.limit(Unknown Source)
at java.base/jdk.internal.jimage.BasicImageReader.slice(Unknown Source)
at java.base/jdk.internal.jimage.BasicImageReader.readBuffer(Unknown Source)
at java.base/jdk.internal.jimage.BasicImageReader.getResourceBuffer(Unknown Source)
at java.base/jdk.internal.jimage.ImageReader.getResourceBuffer(Unknown Source)
at java.base/jdk.internal.module.SystemModuleFinders$SystemModuleReader.read(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.forName(Unknown Source)
at java.base/java.util.ServiceLoader.loadProvider(Unknown Source)
at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(Unknown Source)
at java.base/java.util.ServiceLoader$2.hasNext(Unknown Source)
at java.base/java.util.ServiceLoader$3.hasNext(Unknown Source)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(Unknown Source)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.(Unknown Source)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.base/java.lang.Class.newInstance(Unknown Source)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(Unknown Source)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(Unknown Source)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(Unknown Source)
at java.base/java.text.DecimalFormatSymbols.getInstance(Unknown Source)
at java.base/java.util.Formatter.getZero(Unknown Source)
at java.base/java.util.Formatter.(Unknown Source)
at java.base/java.util.Formatter.(Unknown Source)
at java.base/java.lang.String.format(Unknown Source)
at org.antlr.v4.misc.CharSupport.getANTLRCharLiteralForChar(CharSupport.java:69)
at org.antlr.v4.tool.Grammar.getTokenDisplayName(Grammar.java:661)
at org.antlr.v4.tool.Grammar.getTokenDisplayNames(Grammar.java:786)
at org.antlr.v4.codegen.model.Recognizer.(Recognizer.java:81)
at org.antlr.v4.codegen.model.Lexer.(Lexer.java:28)
at org.antlr.v4.codegen.OutputModelController.lexer(OutputModelController.java:151)
at org.antlr.v4.codegen.OutputModelController.buildLexerOutputModel(OutputModelController.java:104)
at org.antlr.v4.codegen.CodeGenerator.generateLexer(CodeGenerator.java:92)
at org.antlr.v4.codegen.CodeGenPipeline.process(CodeGenPipeline.java:36)
at org.antlr.v4.Tool.processNonCombinedGrammar(Tool.java:409)
at org.antlr.v4.Tool.process(Tool.java:351)
at org.antlr.v4.Tool.processGrammarsOnCommandLine(Tool.java:318)
at org.antlr.v4.Tool.main(Tool.java:162)
How can I solve this problem?
Beta Was this translation helpful? Give feedback.
All reactions