[antlr-interest] Rewriting Repeatable Prefix Operators To Nested AST Structure
Randall R Schulz
rschulz at sonic.net
Thu Oct 2 13:49:01 PDT 2008
On Thursday 02 October 2008 12:31, Jim Idle wrote:
> On Thu, 2008-10-02 at 12:24 -0700, Randall R Schulz wrote:
> > Hi,
> >
> > I have a couple of productions that use a prefix operator that may
> > be repeated arbitrarily. One of them (negation) just has the
> > operator symbol. The other has a keyword (two different keywords,
> > actually) followed by an identifier.
> >
> > For example, with the negation operator, this:
> >
> > ---p
>
> rule : NEG^ rule
>
> | next_expr_in_precedence_stack
>
> ;
>
> See things like the ^ operator in example grammars for right
> associative things.
>
> Jim
Thanks, Jim. I knew it couldn't be as hard as I was making it.
Randall Schulz
More information about the antlr-interest
mailing list