Path: utzoo!attcan!uunet!cs.utexas.edu!yale!mintaka!spdcc!ima!esegue!compilers-sender From: piet@cs.ruu.nl (Piet van Oostrum) Newsgroups: comp.compilers Subject: Re: Can Pascal be parsed by LR(1) parsing algorithm? Keywords: Pascal, LL(1) Message-ID: <4124@ruuinf.cs.ruu.nl> Date: 26 Oct 90 13:45:54 GMT References: <9112@fy.sei.cmu.edu) <9010232339.AA20860@Alliant.COM> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: piet@cs.ruu.nl (Piet van Oostrum) Organization: Dept of Computer Science, Utrecht University, The Netherlands Lines: 16 Approved: compilers@esegue.segue.boston.ma.us > 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') -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.