[antlr-interest] Clarification on Attribute Reference in Actions

Randall R Schulz rschulz at sonic.net
Wed Jul 4 15:57:21 PDT 2007


On Wednesday 04 July 2007 15:44, Kay Roepke wrote:
> On Jul 4, 2007, at 11:21 PM, Randall R Schulz wrote:
> > So was ANTLR mistaken by the recursive use of the "term" rule, or
> > was I mistaken in expecting the reference to $term.t to refer to the
> > most closely enclosing (recursive) right-hand-side use of the "term"
> > rule?
>
> mmmh. For a parser (not tree parser) I can explain the situation,
> sort of, I think...
> Could you post (or send privately) your grammar?

Is there more to it than what I showed? It seems pretty self-contained 
to me.

The only rule referred to there but not included in my excerpt has this 
intro:

termSequence
returns [ List<Term> ts ]


Everything else is either an application type (Term, Function) or a 
token (ComplexType).


> ...
> -k


Randall Schulz


More information about the antlr-interest mailing list