grammars-v4
grammars-v4 copied to clipboard
#3027 creating a variant of the TSQL to support Sybase
(!) not ready for merge. The test is still failing. (!)
Hi @KvanTTT
I'd love to avoid the duplication. Reading up online i was not finding ways to import other grammars from other directories. If there is a way to do this cleanly, then please let me know. I also had to disable the tokenVocab added in TSqlParser to avoid warnings as a variant was already imported by SybaseParser.g4. If I leave the warning, then generating code from the grammar requires more explicit steps.
Both issues might be worthwhile changes on ANTLR itself.
Hi @KvanTTT, I ran out of ideas on how to avoid the copy of the tsql grammar files. Two issues:
- Imports are only working within the same directory.
- Even with imports i had to disable the import of the TSqlLexer in the TSqlParser grammer.
I see only two possible solutions:
- accept duplication, or
- merge my changes into the existing TSQL grammar, meaning that code that might be rejected by SQL Server gets accepted by the grammar.
My first thought was to actually merge it into the TSQL grammar, but given the wide consequences I'm not sure every user of that grammar would appreciate the consequences.
If you see an alternative, then please let me know.