This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: generic type support
Ranjit Mathew wrote:
I wish we had a simpler, say a recursive-descent, parser for our
front-end.
It's not that difficult to take an existing yacc-based parser and
convert it to recursive-descent. I did it for Chill.
The current yacc/bison based parser makes it very
difficult for people like me to even start with the code trying to
figure out the cause of a problem
Yacc/bison parsers are easier to read - when the grammar is clean,
and when you aren't trying to track down some bug. Recursive
descent is much easier to debug, at least for most of us.
However, I'm not sure the existing parser is sufficiently broken
that fixing it is a priority. In any case, trying to retrofit
a parser frtom some other compiler seems like a waste of time.
The actual parser is one of the simplest parts of a compiler,
and it's not that hard to re-write. Much harder is taking a
parser written for some other compiler, and trying to retrofit
into a different framework.
In any case, this seems like a bad time for wholesale re-writing
of the front-end, until the jdk-1.5-timeframe language changes
appears closer to final. Though I won't object to replacing just
the parser by a hard-written recursive-descent parser.
--
--Per Bothner
per at bothner dot com http://www.bothner.com/per/