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
The problem is that PartiQL.g4 is a combined grammar, but you also declare a split grammar for the lexer, PartiQLTokens.g4. If someone adds a lexer rule, or a string literal to PartiQL.g4, a second lexer class will be generated. A parser can only reference one token stream at a time, which means it may not work as intended. Since PartiQL.g4 only contains parser rules, it should be declared as a parser grammar.
The text was updated successfully, but these errors were encountered:
Description
I maintain grammar-g4, the large library of Antlr4 grammars. Someone mentioned a problem with using the PartiQL grammar with the Go target. After looking at this grammar carefully, I highly recommend that you change the declaration statement of PartiQL.g4 to be
parser grammar PartiQLParser;
, and rename the file PartiQLParser.g4.The problem is that PartiQL.g4 is a combined grammar, but you also declare a split grammar for the lexer, PartiQLTokens.g4. If someone adds a lexer rule, or a string literal to PartiQL.g4, a second lexer class will be generated. A parser can only reference one token stream at a time, which means it may not work as intended. Since PartiQL.g4 only contains parser rules, it should be declared as a parser grammar.
The text was updated successfully, but these errors were encountered: