[antlr-interest] AST generation

mzukowski at yci.com mzukowski at yci.com
Tue Sep 3 09:38:01 PDT 2002


Something like this:

| (col ("not")? "like") => ( col (n:"not")? "like"^ value) 
	{if (n!=null) {##=#[#[n.getType(),n.getText()],##];}}

Monty

> -----Original Message-----
> From: Mark Davidson [mailto:markd at samsungcontact.com]
> Sent: Tuesday, September 03, 2002 9:35 AM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] AST generation
> 
> 
> Hi,
> 
> I have the following rule in my grammer:
> 
> factor: (col EQ) => (col EQ^ value)
>          | (col NE) => (col NE^ value)
>          | (col ("not")? "like") => ( col ("not")? "like" value) ;
> 
> For the last line I want to create a tree:
> 
>     not
>     |--like
>        |--col
>        |--value
> 
> But I cannot work out how.
> 
> Thanks
> Mark
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ 
> 
> 

 

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



More information about the antlr-interest mailing list