|[4 earlier articles]|
|Re: Advice on Writing a Parser Generator firstname.lastname@example.org (Mykola Rabchevskiy) (2003-08-15)|
|Re: Advice on Writing a Parser Generator email@example.com (Rob Arthan) (2003-08-15)|
|Re: Advice on Writing a Parser Generator firstname.lastname@example.org (2003-08-15)|
|Re: Advice on Writing a Parser Generator email@example.com (Joachim Durchholz) (2003-08-20)|
|RE: Advice on Writing a Parser Generator firstname.lastname@example.org (Don Yessick) (2003-08-20)|
|Re: Advice on Writing a Parser Generator cfc@shell01.TheWorld.com (Chris F Clark) (2003-08-23)|
|Re: Advice on Writing a Parser Generator email@example.com (Lex Spoon) (2003-08-23)|
|Re: Advice on Writing a Parser Generator firstname.lastname@example.org (2003-08-23)|
|Re: Advice on Writing a Parser Generator email@example.com (Thomas Skora) (2003-09-04)|
|Re: Advice on Writing a Parser Generator firstname.lastname@example.org (Rob Thorpe) (2003-09-04)|
|From:||Lex Spoon <email@example.com>|
|Date:||23 Aug 2003 23:11:11 -0400|
|Organization:||Georgia Institute of Technology|
|References:||03-08-027 03-08-046 03-08-065|
|Keywords:||parse, tools, practice|
|Posted-Date:||23 Aug 2003 23:11:10 EDT|
"Don Yessick" <firstname.lastname@example.org> writes:
>>> I plan to write a parser generator, very similar to YACC, for Java.
>>You do know about JavaCC, right?
>>(I haven't used it myself, but a colleague has, so I know it "works".
>>On t'other hand, having been stung badly by trying to use flex and
>>bison to generate lexers/parsers for a couple of languages, at the
>>moment I'm in the "we don't need no adjectiving parser generators!"
>>camp. "The wheel turns, does it not, Ambassador?")
> JavaCC generates recursive descent compilers and doesn't really look
> much like YACC either.
If you are interested in different--which is a good thing if you are
writing a new parser generator--it may be worth perusing SmaCC. Even
if you can't read Smalltalk, it should be interesting to look through
the tutorial and, if you spend the time to get it running on your
machine, to flip through the UI and see what's there.
In general, SmaCC has you developing your parser interactively. You
can put test input in one of the windows, and then whenever you like
ask for it to tokenize, parse, or parse-with-actions your test data
and inspect the result in a debugger.
Also, one of the neat little things it does (or at least, used to do,
the last time I tried it) was to give you a choice of parsing
algorithms to try. You can try for an LL parser, and if that fails
move on to more complex ones. I dunno how useful this is in practice,
but it's kinda neat to just switch a menu choice and get a new parsing
Overall, a SmaCC-like UI would be difficult in C (or equivalently,
less featureful in C), but it might work well in Java due to the
reflection and loadable classes.
Return to the
Search the comp.compilers archives again.