Hi,
 
Perhaps this will sound like a rather stupid question, but I am wondering if 
there is a better way to approach the problem I am trying to solve.
 
I am interested in parsing SQL.  I have developed a grammar based on the 
(overly complex) SQL2003 specification for my corpus (something like 1GB+) of 
SQL statements. I've also built a treewalker that walks my AST.  
 
My application is currently converting my AST into a Java-based semantic object 
model that, for all intents and purposes, reflects the structure of the AST on 
a 1:1 basis.  For my application, I need an object model based representation 
of SQL.
 
Building the object model and matching stringtemplate library has been 
extremely time consuming- there are something like 1000 rules in the SQL2003 
spec and I have also built composite grammars that handle a superset of the 
spec such as DB specific constructs (old-school Oracle outer join syntax, for 
example) and procedural wrappers like PLSQL.   My treewalker has thus become 
intermingled with vast amounts of Java that builds my  sematic model and my 
Java object model has, of course, a large number of classes.  I am beginning to 
think that I have done this wrong.
 
After the horse has bolted, I am wondering- was there a better way to approach 
this?  I am particularly keen to encapsulate my semantic representation code 
and embed little or no Java in my TreeWalker (even if the 1:1 mapping remains). 
 I think I have missed a step somewhere.
 
Thanks for your input.

Regards,
 
Alex

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to