[antlr-interest] Re: How do I specify start-of-line (^ in [F] Lex in ANTLR Lexers?
jsrs701
jsrs701 at yahoo.com
Wed May 29 12:15:16 PDT 2002
To this list add the Moka Java-to-Java Extensible Compiler.
http://mozart-dev.sourceforge.net/moka.html
Dr. Dobbs did an article on it in their July, 2001 issue, for those
that have it. Really neat, has a great plug-in architecture that
allows you to arbitrarily add to the language. Also allows some
aspect-oriented programming tricks.
--- In antlr-interest at y..., mzukowski at y... wrote:
> For syntax aware preprocessors for java that are in development see
> www.brics.dk/metafront and one using antlr
> http://www.ai.mit.edu/~jrb/jse/index.htm. I don't think either are
released
> yet but they look promising.
>
> Monty
>
> > -----Original Message-----
> > From: jsrs701 [mailto:jsrs701 at y...]
> > Sent: Wednesday, May 29, 2002 11:45 AM
> > To: antlr-interest at y...
> > Subject: [antlr-interest] Re: How do I specify start-of-line (^ in
> > [F]Lex in ANTLR Lexers?
> >
> >
> > --- 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!)
> >
> > > Besides, you need
> > > the replaced input to be lexed before it can be passed to the
> > > parser.
> >
> > It seems that that you're intending for the preprocessor to be
> > running in the same process as the final parser? Why not just
build
> > a separate preprocessor application, and shell out to it, the way
cc
> > calls cpp?
> >
> > And really, for a character-stream preprocessor, ANTLR is
probably
> > overkill. Or is your preprocessor significantly more complex
than
> > cpp?
> >
> > (Please note, C++ afficionados, that I'm referring to the C
> > PreProcessor when I say "cpp".)
> >
> >
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list