C++ grammar issue
Ian Lance Taylor
ian@wasabisystems.com
Wed Apr 7 23:22:00 GMT 2004
"Yu Yang" <yuyang@cise.ufl.edu> writes:
> Just now I check C++'s grammar in gcc with bison/yacc.
> To my surprise, both tools report that there are 33 shift/reduce
> conflicts and 58 reduce/reduce conflicts in the C++ grammar that
> gcc support. How does gcc deal with so many conflicts?
gcc dealt with it by cunningly rewriting the parser for the 3.4
release to use recursive descent instead.
But in fact conflicts in the parser are not generally a serious
problem. They require attention, but they don't by themselves
indicate that the parser is broken.
Ian
More information about the Gcc
mailing list