[antlr-interest] SQL grammar tree construction problem

Gustav Boström i93gusbo at hotmail.com
Tue Nov 4 09:28:06 PST 2003


Hello!

I'm trying to use Lubos Vnuk's (Thanks for doing all the work!) SQL-
grammar in order to do some 
processing on SQL-statments. I would for example like to find out 
which columns are affected by a DML-statement and which parameters 
correspond to which columns.

I'm doing this is in Java , so I've changed the grammar slightly.
I've removed the C++ actions or replaced them with Java versions.

My thought was to add AST-construction and then navigate the tree to 
find out the stuff I need. This is where I run into problems.
I tried to annotate the rules with ^ to construct my tree, but it 
keeps giving me "unexpected token:^" when I try to dothis for example:
sql_stmt : 
	  sql_data_stmt^ 
;

I've set the options to buildAST=true;
I'm using version 2.7.2.

Any ideas on what can be wrong?

Cheers,

Gustav Boström







 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list