[antlr-interest] Re: ACE C preprocessor by Gosling
Terence Parr
parrt at jguru.com
Wed May 29 13:29:45 PDT 2002
On Wednesday, May 29, 2002, at 11:44 AM, jsrs701 wrote:
> --- In antlr-interest at y..., "clinton_olsen" <clinton_olsen at y...>
> wrote:
>> I'd like to qualify this with the fact that _any_ parser is
>> typically not suited to to do a pre-processor. This needs to be
>> done in the lexer for the reasons stated by Greg.
>
> Well, that does depend on what kind of preprocessor you're doing.
>
> One of these days, I'm gonna take a crack at rebuilding James
> Gosling's ACE preprocessor using ANTLR. ACE is not a character-
> stream preprocessor (the way the original cpp is), but a syntax tree
> preprocessor. (You can get more info on it at his homepage,
> http://java.sun.com/people/jag/ . I HIGHLY recommend EVERYONE on
> this list read the paper; it is HIGHLY relevant to ANTLR. After
> seeing this, you'll want all of your preprocessors to operate on
> syntax trees instead of character streams!)
Heh, that's pretty slick. Reminds me of some stuff I'm thinking about
for the "emitter" stage of translation.
Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list