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
I noticed a bug.
I've 2 *.g4 files, one with the grammar and one with just the lexer.
I generated my parser with anltr4 -Dlanguage=Go *.g4
The lexer is imported with import MyLexer; in the grammar file
So i got all the files but when i tried the code (cut and paste) from the example in the README the golang console says that a lot of variables are redeclared.
How to fix: delete the generated files that is about the MyLexer.g4
The text was updated successfully, but these errors were encountered:
I have a similar issue #3452 for grammars-v4/csharp/. This grammar has two parser grammars (CSharpParser and CSharpPreprocessorParser) with one shared lexer grammar (CSharpLexer). The only reasonable workaround I found was to generate each parser into a separate directory/package and duplicate the generated code for the lexer into each of these separate directories. In addition, because the parser and lexer are implemented as nested structs rather than a pointer to a superclass (implemented as an object), there is no way to create and call a "constructor" (implemented as a "New..."-named func) except by calling some initializer at the top-level fro the parser. #3446
I noticed a bug.
I've 2 *.g4 files, one with the grammar and one with just the lexer.
I generated my parser with
anltr4 -Dlanguage=Go *.g4
The lexer is imported with
import MyLexer;
in the grammar fileSo i got all the files but when i tried the code (cut and paste) from the example in the README the golang console says that a lot of variables are redeclared.
How to fix: delete the generated files that is about the MyLexer.g4
The text was updated successfully, but these errors were encountered: