Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!spdcc!ima!esegue!compilers-sender From: firth@sei.cmu.edu (Robert Firth) Newsgroups: comp.compilers Subject: Re: Can Pascal be parsed by LR(1) parsing algorithm? Keywords: pascal, parse Message-ID: <9094@fy.sei.cmu.edu> Date: 17 Oct 90 19:10:36 GMT References: <9010091533.AA02386@apple.com> <1990Oct10.133752.14930@ncsuvx.ncsu.edu> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: firth@sei.cmu.edu (Robert Firth) Organization: Software Engineering Institute, Pittsburgh, PA Lines: 16 Approved: compilers@esegue.segue.boston.ma.us In article <1990Oct10.133752.14930@ncsuvx.ncsu.edu> mauney@eos.ncsu.edu (Jon Mauney) writes: >Berkeley Pascal was, for some time, unable to accept a null >statement in the "then" clause: > > if i<0 then else foo(i); But that is not legal Pascal. The relevant syntax (Wirth, section 9.2.2.1) reads ::= IF THEN | IF THEN ELSE and there is no production from that yields . -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.