Hi Cameron,
The grammar that doesn’t generate a tree may actually work for you. ANTLR 4 doesn’t support ASTs like ANTLR 3 did; instead it automatically produces parse trees that match the shape defined by the rules in the grammar. During the conversion to ANTLR 4, it’s actually necessary to remove the AST operators and rewrite rules from ANTLR 3 grammars.
For example, consider commit aacf1d4 in my example conversion of an application from ANTLR 3 to ANTLR 4.
Thanks,
Sam
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I would love to have a working SQL grammar available and I would be willing to help, but it's a pretty big job I think. my biggest problem was I couldn't figure out where to get appropriate sample input for the dialect of SQL I was building a grammar for. Actually it would not be too bad if you had a reference manual for a particular SQL and valid sample inputs. The splintering of the SQL world is maddening.
unfortunately we do not have one as of yet...
Ter
On Mar 7, 2014, at 1:45 PM, cdu...@twitter.com wrote:
> Hey guys,
>
> Does anyone know if there's a working ANTLR 4 SQL grammar out there somewhere? I know of the antlr/grammars-v4 repository where all v4 grammars live, but I'm crossing my fingers and hoping someone else out there has come across one and is willing to share it. The particular flavor of SQL isn't that important - Postgres, MySQL, TransactSQL, it's all good.
>
> I've found a few v3 SQL grammars but they all fall short of what I need. One completely ignores JOINs, the other doesn't generate an actual tree, just a stream of tokens.
>
> Any help you can offer is much appreciated.
>
> -Cameron
>
> --
> You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "antlr-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/antlr-discussion/TSBqzfLsBQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to antlr-discussi...@googlegroups.com.