Re: C and LL (1)

Geoff Wozniak <gzw@home.com>
8 Nov 2001 23:20:21 -0500

          From comp.compilers

Related articles
C and LL (1) pjbp@netc.pt (Pedro Pereira) (2001-10-23)
Re: C and LL (1) loewis@informatik.hu-berlin.de (Martin von Loewis) (2001-10-27)
Re: C and LL (1) andrew@blueoffice.com (Andrew Wilson) (2001-10-27)
Re: C and LL (1) frigot_e@epita.fr (2001-10-27)
Re: C and LL (1) loewis@informatik.hu-berlin.de (Martin von Loewis) (2001-10-28)
Re: C and LL (1) dr_feriozi@prodigy.net (2001-11-04)
Re: C and LL (1) GOLDParser@DevinCook.com (2001-11-05)
Re: C and LL (1) gzw@home.com (Geoff Wozniak) (2001-11-08)
Re: C and LL (1) joachim_d@gmx.de (Joachim Durchholz) (2001-11-11)
| List of all articles for this month |

From: Geoff Wozniak <gzw@home.com>
Newsgroups: comp.compilers
Date: 8 Nov 2001 23:20:21 -0500
Organization: Excite@Home - The Leader in Broadband http://home.com/faster
References: 01-10-121 01-10-134
Keywords: C, parse
Posted-Date: 08 Nov 2001 23:20:21 EST

frigot_e@epita.fr (frigot eric) writes:
>
> I think you can't parse C with a LL(1) grammar because there is a lot
> of ambiguity in C (30-40 shift reduce with Bison, for exemple).


Do you mean 30-40 s/r conflicts with an LALR parser? If so, I must
have done something stellar because I essentially copied the grammar
from the C99 standard and got 1 s/r conflict (the if-then-else
problem).


I had to make a few adjustments with respect to <identifer> and where
it appears, but that was it.


--
Geoff(rey) Wozniak, Limited Duties Instructor
University of Western Ontario
Computer Science Department
London, Ontario, Canada
http://woz.killdash9.org/


GPG Key: http://woz.killdash9.org/misc/woz.gpg


Post a followup to this message

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