Another parser than ANTLR
Yang Jiang
yang.jiang.z at gmail.com
Tue Oct 14 04:28:15 PDT 2008
Hi Remi,
Sorry for the late reply.
That seems an interesting parser generator. Is it public accessible?
And to answer your question: no, the compiler grammar is not open to
other implementations. It's build specifically for Antlr.
But, you can do your work in the langtools workspace, which has been
changed recently so that it is possible
to integrate other parsers into it. Just look at the
/com.sun.tools.javac.parser.Parser/. That's the interface you have to
implement for your own parser.
But the langtool workspace is still not friendly enough, there is still
more work you have to do yourself, like adding your own option so
when you run javac it's your parser actually do the job.
You can check out the compiler grammar workspace to see how it's done.
Yang
Rémi Forax wrote:
> Hi, jon, hi yang, hi all,
> Since 4 years, i have developed with two colleagues a LR parser
> generator,
> It has several good features among:
>
> * separate specifications for lexer (regular expression based
> rules), parser (grammar) and semantics (java interface
> implementation);
> * push analyzer: the characters are fed to the analyzer so it allows
> asynchronous usage (for instance with thread pool and selectors);
> * automated lexer rule selection according to tokens expected by the
> parser (this allows to let user name their variable as some
> keywords);
> * production of shared parser tables for different versions of the
> language to simplify backward compatibility or allow version
> change during parsing;
>
> I think it could be interresting to try to use it.
> So here is my question, is the compiler-grammar workspace open to
> other contribution than an ANTLR parser ?
>
> regards,
> Remi
>
More information about the compiler-grammar-dev
mailing list