Forum Discussion
OleksiiKovalov
May 31, 2021Copper Contributor
Looking for Microsoft.SqlServer.TransactSql.ScriptDom grammar
Hi! I'm looking for any info/contact for antlr grammar used by Microsoft.SqlServer.TransactSql.ScriptDom assembly Looks like https://github.com/microsoft/ doesn't contains any useful info
OleksiiKovalov
May 31, 2021Copper Contributor
yes, ANother Tool for Language Recognition
Scriptdom is built using ANTLR (version/implementation is unknown to me) grammar.
And generated parser is very fast.
Now I'm working on a set of similar SQL parsers and I have some performance problems.
Some of the issues I've resolved by simplification, removing ambiguities, and extra LA in grammar/parser, but my implementation of SQL grammar still way too slow as compared to ScriptDOM parser.
I'm sure that I missed some simple, but important things when developing SQL grammar. I think it would be very useful to take a look/receive a consultation from developers of original ScriptDOM grammar.
Scriptdom is built using ANTLR (version/implementation is unknown to me) grammar.
And generated parser is very fast.
Now I'm working on a set of similar SQL parsers and I have some performance problems.
Some of the issues I've resolved by simplification, removing ambiguities, and extra LA in grammar/parser, but my implementation of SQL grammar still way too slow as compared to ScriptDOM parser.
I'm sure that I missed some simple, but important things when developing SQL grammar. I think it would be very useful to take a look/receive a consultation from developers of original ScriptDOM grammar.
olafhelper
Jun 01, 2021Bronze Contributor
Now I'm working on a set of similar SQL parsers
Why re-inventing the wheel, use the existing MS SqlScriptDom.
- OleksiiKovalovJun 01, 2021Copper Contributor
Now I'm working on pl/sql and pl/pgsql grammars, with MySQL in future plans.
For t-sql related tasks i'm using ScriptDOM, of course