[antlr-interest] ANTLR 3.0 tree construction proposal

John D. Mitchell johnm-antlr at non.net
Tue Feb 1 19:16:53 PST 2005


>>>>> "Loring" == Loring Craymer <Loring.G.Craymer at jpl.nasa.gov> writes:
>>>>>> At 03:24 PM 2/1/2005, John D. Mitchell wrote:
[...]

> (C) Tree surgery

>> Moving beyond the simplistic cases in (A), all of the interesting work
>> being done in tree tranforms is real surgery of the tree.  I.e.,
>> transformations which take place across a number of rules working in
>> conjunction.

> I have support for that hidden in 2.8--I haven't tested it (at the
> grammar level; I used JUnit when developing the support classes), but am
> not happy with my current syntax.  We talked about using attributes for
> that at the cabal, and that has possibilities.  One of the big problems
> is that this adds to the complexity of analysis for tree grammar
> generation--does the calling chain go through ()?, ()*, ()+, and is a
> tree fragment always passed into an insertion point?  That can be messy.

Sorry for being dense (it's been a long week :-) but... If the fragments
are in dynamic attributes, what's the analysis problem?


>> (D) Error handling

>> You haven't gone into how the error handling would work with this.

> Eewwww.  You would open _that_ can of worms!

:-)

AFAIAC, if we can't do high-quality error handling (detection,
logging/notification, and recovery) then whatever we're doing is wrong.

Thanks,
	John


More information about the antlr-interest mailing list