[antlr-interest] Operator tree construction in rewrite syntax
Marko Simovic
markobarko at gmail.com
Mon Apr 14 13:07:07 PDT 2008
i apologize...i meant there to be a zero-or-more:
sum: something (Plus^ something)*;
Thanks
-----Original Message-----
From: Guntis Ozols <guntiso at latnet.lv>
To: Marko Simovic <markobarko at gmail.com>
Cc: antlr-interest <antlr-interest at antlr.org>
Subject: Re: [antlr-interest] Operator tree construction in rewrite
syntax
Date: Mon, 14 Apr 2008 23:00:45 +0300
> Quick question (i hope). What is the equivalent to the following using
> the rewrite (->) syntax:
>
> sum: something (Plus^ something);
>
> Thanks,
> Marko
1. try: something (Plus something) -> ^(Plus something+);
2. how about '*', did you mean: something (Plus^ something)*; ?
3. do not use ^ on both sides
Guntis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080414/dea2be6c/attachment.html
More information about the antlr-interest
mailing list