Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!world!esegue!compilers-sender From: amb@apple.com (A. Michael Burbidge) Newsgroups: comp.compilers Subject: Can Pascal be parsed by LR(1) parsing algorithm? Keywords: pascal, parse Message-ID: <9010091533.AA02386@apple.com> Date: 9 Oct 90 15:33:57 GMT Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: A. Michael Burbidge Organization: Compilers Central Lines: 15 Approved: compilers@esegue.segue.boston.ma.us After struggling for some time to write a yacc description for the Pascal language and after reading the description of the modifier yacc contained in the UCB Pascal source directory I am beginning to wonder if an LR(1) parsing algorithm can parse Pascal. The version of yacc used with the UCB Pascal claims to have additional lookahead sets. Can anyone shead any light on this subject. The optional semi-colons seem to be very difficult to deal with. Mike Burbidge amb@apple.com [In theory, any language that can be parsed by LR(k) can be parsed by LR(1), though the convolutions to do so can be unpleasant. -John] -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.