Re: parsing ISO C++(1998/2003)

"Aaron Gray" <ang.usenet@gmail.com>
18 Apr 2007 13:46:14 -0400

          From comp.compilers

Related articles
parsing ISO C++(1998/2003) parthaspanda2005@yahoo.com (2007-04-14)
Re: parsing ISO C++(1998/2003) ang.usenet@gmail.com (Aaron Gray) (2007-04-18)
Re: parsing ISO C++(1998/2003) parthaspanda2005@yahoo.com (2007-04-19)
Re: parsing ISO C++(1998/2003) ang.usenet@gmail.com (Aaron Gray) (2007-04-23)
Re: parsing ISO C++(1998/2003) haberg@math.su.se (2007-04-23)
Re: parsing ISO C++(1998/2003) idbaxter@semdesigns.com (Ira Baxter) (2007-04-26)
Re: parsing ISO C++(1998/2003) torbenm@app-7.diku.dk (2007-04-26)
Re: parsing ISO C++(1998/2003) ang.usenet@gmail.com (Aaron Gray) (2007-04-27)
[4 later articles]
| List of all articles for this month |

From: "Aaron Gray" <ang.usenet@gmail.com>
Newsgroups: comp.compilers
Date: 18 Apr 2007 13:46:14 -0400
Organization: Compilers Central
References: 07-04-052
Keywords: C++, parse

<parthaspanda2005@yahoo.com> wrote in message
> No matter how many shots at it, I havent been
> able to get bison/yacc to parse the C++ grammar
> specified in the reference manual.
>
> Factoring and other smart tricks leave the grammar
> as much different from the original grammar
> and no matter what, shift/reduce and reduce/reduce
> conflicts run galore.


Its needs/is an ambigous grammar.


> Is there any trick that I may be missing?


GLR (Bison has GLR) was ment to be the answer, although it is slow compared
to other techniques.


Elkhound and Elsa tried GLR approach and failed.


All the major C++ parsers are hand coded, recursive decent and precedance
based binary ops.


> How do I get the grammar in the manual
> not to change much as well as pass under
> bison/yacc?


Thats probably impossible.


Aaron



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.