|A few questions about parsing firstname.lastname@example.org (Chariton Karamitas) (2009-08-31)|
|Re: A few questions about parsing email@example.com (Hans Aberg) (2009-08-31)|
|Re: A few questions about parsing firstname.lastname@example.org (Ira Baxter) (2009-09-02)|
|From:||"Ira Baxter" <email@example.com>|
|Date:||Wed, 2 Sep 2009 14:32:53 -0500|
|Posted-Date:||05 Sep 2009 00:06:05 EDT|
"Hans Aberg" <firstname.lastname@example.org> wrote in message
> Chariton Karamitas wrote:
>> 1. I've been able to parse the C BNF syntax given in K&R 2nd edition
>> 2. What parser can parse this grammar? An LR? LALR? LL?
> You find Yaccable (LALR(1)) grammars for C and C++ here:
Unless you're a glutton for punishment, you really don't want to go
down "roll your own (or even patch up Willink's) C++ parser route".
As an undergrad, the OP will be very well served to stick with trying
to parse C, learning about disambiguating syntax forms using type
information, and building symbol tables for that with the agreement
that C++ is just worse. Reading Willink's thesis is probably a good
way to get a faint sense of how much worse.
To go anywhere with C++, you not only need to parse, but you have to get
the symbol table and name/type resolution right, and that's about 400 pages
of reference manual worse.
If he wants to study a working version of a C++ front end, the EDG one is
available for academics, and so is Elsa.
Return to the
Search the comp.compilers archives again.