[antlr-interest] Rewriting Repeatable Prefix Operators To Nested AST Structure

Jim Idle jimi at temporal-wave.com
Thu Oct 2 12:31:06 PDT 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081002/15beae4a/attachment.html 


More information about the antlr-interest mailing list