public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* C++ grammar issue
@ 2004-04-07 23:19 Yu Yang
  2004-04-07 23:22 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Yu Yang @ 2004-04-07 23:19 UTC (permalink / raw)
  To: gcc

Hi,

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?

Thanks!

Yu

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: C++ grammar issue
  2004-04-07 23:19 C++ grammar issue Yu Yang
@ 2004-04-07 23:22 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2004-04-07 23:22 UTC (permalink / raw)
  To: Yu Yang; +Cc: gcc

"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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-07 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-07 23:19 C++ grammar issue Yu Yang
2004-04-07 23:22 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).