Re: C and LL (1)

Martin von Loewis <loewis@informatik.hu-berlin.de>
27 Oct 2001 18:35:58 -0400

          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)
[1 later articles]
| List of all articles for this month |
From: Martin von Loewis <loewis@informatik.hu-berlin.de>
Newsgroups: comp.compilers
Date: 27 Oct 2001 18:35:58 -0400
Organization: Humboldt University Berlin, Department of Computer Science
References: 01-10-121
Keywords: C, LL(1)
Posted-Date: 27 Oct 2001 18:35:58 EDT

Pedro Pereira <pjbp@netc.pt> writes:


>> Can C be parsed by a LL (1) parser? I've serached in the web a lot,
>> but i couldn't find the anwser!


> [Yes, give or take typedef. -John]


Really? Even considering typedef, isn't there also the problem with
labels? Seeing


      foo


(and knowing it is not a typename) it could continue either


      foo: return;


or


      foo = 1;


So it seems you need atleast two tokens lookahead to tell apart labels
and expressions.


Regards,
Martin


Post a followup to this message

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