[antlr-interest] Why cant += be used without an "output=" option (and other Q's)
Jim Idle
jimi at temporal-wave.com
Sun Feb 17 19:35:38 PST 2008
> -----Original Message-----
> From: Benjamin Shropshire [mailto:shro8822 at vandals.uidaho.edu]
> Sent: Sunday, February 17, 2008 3:15 PM
> To: Thomas Brandon
> Cc: Antlr Interest
> Subject: Re: [antlr-interest] Why cant += be used without an "output="
> option (and other Q's)
>
> Thomas Brandon wrote:
> > On Feb 17, 2008 6:25 AM, Benjamin Shropshire
> > <shro8822 at vandals.uidaho.edu> wrote:
> >
> >>
> > Given ANTLRs very good inbuilt AST support I can't see many reasons
> to
> > not use this if you are building an AST. You can produce any sort of
> > output tree you want. And can still use custom AST building code
with
> > output=AST. Though ANTLRs tree construction operators and rewrite
> > rules mean this is rarely difficult.
> >
> One cases (abet not common) would be where the programmer is trying to
> generate faster (or less memory intensive) code. By taking total
> control
> of the AST I can build the final AST that /I/ want
That is what the tree adaptor is for. It will build anything you like,
all you do is supply a class that supplies that interface so that the
rewrite rules have something to call, what you do after that is up to
you. You are trying to solve problems that have already been solved and
I think you need to gather a little more knowledge before you run off at
tangents and telling people how to write the tool and web site.
> > impression that ANTLR was suitable for what you wanted.
> From what you said, ANTLR is suitable for what I want, in theory just
> not in practices. But saying that the major use profile is something
> else would have bean a huge hit as to my problems. I tend to be a
> minimalist when learning things. I learn the absolute minimum I can to
> get started and then learn stuff as I need it to do what I need. If
> something about ANTLR being designed to generate AST building code had
> bean on the front page (or there abouts) I would have gone and looked
> for that info rather than skip it because I didn't see how I needed
it.
Well, that's fine, but if the tool does not seem to do what you want
because you have not read something yet, then you should neither
complain too vehemently, nor assume that you are correct in your
assumptions, until you have looked further than the front page of the
web site. The front page of the web site would have to be very large
indeed to cover everything that everyone thinks should be on it, hence
the search box is on the front page.
I presume, from scanning your posts, that this minimalist philosophy
also applies, to your spilling, grammer, dickshun and mannurs :-) ? In
this case I think that what you have assumed to be the minimal knowledge
is not quite enough.
Jim
More information about the antlr-interest
mailing list