Re: Can Pascal be parsed by LR(1) parsing algorithm?

piet@cs.ruu.nl (Piet van Oostrum)
26 Oct 90 13:45:54 GMT

          From comp.compilers

Related articles
[8 earlier articles]
Re: Can Pascal be parsed by LR(1) parsing algorithm? rekers@cwi.nl (1990-10-16)
Re: Can Pascal be parsed by LR(1) parsing algorithm? firth@sei.cmu.edu (1990-10-17)
Re: Can Pascal be parsed by LR(1) parsing algorithm? firth@sei.cmu.edu (1990-10-17)
Re: Can Pascal be parsed by LR(1) parsing algorithm? firth@sei.cmu.edu (1990-10-18)
Re: Can Pascal be parsed by LR(1) parsing algorithm? djones@megatest.uucp (1990-10-21)
Re: Can Pascal be parsed by LR(1) parsing algorithm? crocker@Alliant.COM (1990-10-23)
Re: Can Pascal be parsed by LR(1) parsing algorithm? piet@cs.ruu.nl (1990-10-26)
Re: Can Pascal be parsed by LR(1) parsing algorithm? andy@Theory.Stanford.EDU (1990-10-26)
Re: Can Pascal be parsed by LR(1) parsing algorithm? jas@Ingres.COM (1990-10-28)
Re: Can Pascal be parsed by LR(1) parsing algorithm? firth@sei.cmu.edu (1990-11-05)
| List of all articles for this month |
Newsgroups: comp.compilers
From: piet@cs.ruu.nl (Piet van Oostrum)
Keywords: Pascal, LL(1)
Organization: Dept of Computer Science, Utrecht University, The Netherlands
References: <9112@fy.sei.cmu.edu) <9010232339.AA20860@Alliant.COM>
Date: 26 Oct 90 13:45:54 GMT

> In article <9010232339.AA20860@Alliant.COM>, crocker@Alliant.COM (Ben
> Crocker) (BC) writes:
> Having written a Pascal compiler with an LL(1) parser generator, I can
> vouch for the proposition that Pascal is LL(1).


Pascal isn't LL(1). The IF THEN ELSE construction is impossible to do in
LL(1). However, most LL(1) parser generators let you pass this by choosing
the required branch (ELSE belonging to innermost THEN).
--
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31 30 531806 Uucp: uunet!mcsun!ruuinf!piet
Telefax: +31 30 513791 Internet: piet@cs.ruu.nl (*`Pete')
--


Post a followup to this message

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