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
So... C++, right? Has a macro somewhere called NULL. And when tokens are generated in the source code of the parser they use the token itself as name. Now, SQL has a NULL keyword so trying to generate a grammar for any flavor of it fails because NULL is already defined.
For instance, take the Trino's (formerly PrestoSQL) grammar definition. This will fail to compile the generated .h/.cpp files.
Expected behaviour:
It compiles normally.
The text was updated successfully, but these errors were encountered:
Hey @jacobobq, thanks for bringing this up. Symbol clashes like this are a known class of problem with ANTLR that is unlikely to be addressed. Here's a very similar issue to the one you brought up. As suggested, you might try adding an underscore to the end, eg. NULL_.
So... C++, right? Has a macro somewhere called
NULL
. And when tokens are generated in the source code of the parser they use the token itself as name. Now, SQL has aNULL
keyword so trying to generate a grammar for any flavor of it fails becauseNULL
is already defined.For instance, take the Trino's (formerly PrestoSQL) grammar definition. This will fail to compile the generated
.h/.cpp
files.Expected behaviour:
It compiles normally.
The text was updated successfully, but these errors were encountered: