javac lexer parser rewrite
leszekp at Safe-mail.net
leszekp at Safe-mail.net
Tue Feb 7 01:57:30 PST 2012
Hello
Javac scanner and parser now are handwritten. The code, especially in parser is quite messy and
hard to read and modify.
It is possible to rewrite lexer and parser using some kind of java parser generator.
It would improve readability and allows for easier modifications.
There is a project 'compiler grammar' (which seems dormant). Java lexer and parser were rewritten
using antlr. But antrl generated parsers are very slow.
Many lexer and parser generators exists which are able to process 'classic' regular expressions for lexer or
context free grammars for parser and produce fast code (ie. jflex, beaver, jikes parser generator and more)
What do you think about it? Is there a need for such thing? Is it worth the effort?
Regards
Leszek Piotrowicz
More information about the compiler-dev
mailing list