Re: Re: Re: [antlr-interest] Could anyone give an example fo making a linked list using antlr?
Kay Roepke
kroepke at dolphin-services.de
Mon Feb 20 18:05:49 PST 2006
On 21. Feb 2006, at 2:07 Uhr, 孙纪刚 Jigang (Robert) Sun wrote:
> Thank you Bryan.
>
> Your solution works. But I could not find explanation
> for ## in Tree Construction section of Antlr 2.7.6
> manual. Could anyone tell me the reference address?
>
> Jigang
Hi!
Take a look at this posting from Bryan (posted on October 29th,2005)
Thread starts at: http://www.antlr.org/pipermail/antlr-interest/
2005-October/014144.html
HTH,
Kay
On 10/29/05, Suman Karumuri <mansuk at gmail.com> wrote:
> Hi ,
>
> 1) Can anyone explain me what this action does. I have taken this
> example from the calc.g file in antlr examples.
>
> expr : expr1 { ## = #(#[EXPR,"expr"],##); } ;
>
This means
(1) Create a new EXPR node
(2) Place the current version of the output tree for this rule
as the only child of that node
(3) Use that new tree as the output tree for this rule
More information about the antlr-interest
mailing list