--
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.
My 2 pence - you could either- use the Lexer modes and have a Uber Grammar for all your languages (cunning), or- link the node in the parent tree to the root of a child tree (e.g. by using a hashmap) - that's how I handle includes.A
On Fri, 12 Apr 2019 at 15:19, Bill Dickenson <b50...@gmail.com> wrote:
--Relatively new to ANTLR4When I have an application that has both Java and SQL or for that matter, any mixed language application, how do I link the AST so when I run consistency and error checks, I can follow a data element from the database all the way through the program ? The goal is to be able to identify a column and see where its used and how. That will include the size and type of the data element. Is there a clever option I am just not seeing ?Thank you
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-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
No probsI am working on an ancient language which has embedded SQL; it basically builds up the SQL string, including any string values (concatenated) and then calls executesql; the usual antipattern.So if I wanted to parse the SQL (which I might have to for dull reasons to do with its weird pre. SQL data design), I would have to create the string by adding dummy values (or ":field") and then parse it, and build up its symbol table, cross reference to the main symbol table etc etc. Hope I managed to explain this!What I am saying is that you may not be able to do what you want with an uber grammar ...Llvm is awesome, but emitting c++ (or whatever) is much easier (read less work)!
AOn Wed, 17 Apr 2019, 01:50 Bill Dickenson, <b50...@gmail.com> wrote:I was afraid of that. I was probably going to have to define an uber output form anyway ( LLVMs IR ?) or KDM. Thanks--
On Tuesday, April 16, 2019 at 1:26:51 PM UTC-5, Adrian Sutherland wrote:My 2 pence - you could either- use the Lexer modes and have a Uber Grammar for all your languages (cunning), or- link the node in the parent tree to the root of a child tree (e.g. by using a hashmap) - that's how I handle includes.AOn Fri, 12 Apr 2019 at 15:19, Bill Dickenson <b50...@gmail.com> wrote:--Relatively new to ANTLR4When I have an application that has both Java and SQL or for that matter, any mixed language application, how do I link the AST so when I run consistency and error checks, I can follow a data element from the database all the way through the program ? The goal is to be able to identify a column and see where its used and how. That will include the size and type of the data element. Is there a clever option I am just not seeing ?Thank you
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-di...@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-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.