Re: Is there an error correcting parser generator out there?

adrian@platon.cs.rhbnc.ac.uk (A Johnstone)
Tue, 4 Oct 1994 08:28:29 GMT

          From comp.compilers

Related articles
[3 earlier articles]
Re: Is there an error correcting parser generator out there? rfg@netcom.com (1994-09-29)
Re: Is there an error correcting parser generator out there? wgsteven@undergrad.math.uwaterloo.ca (1994-09-29)
Re: Is there an error correcting parser generator out there? jon@mauney.com (1994-09-29)
Re: Is there an error correcting parser generator out there? dtarditi@cs.cmu.edu (David Tarditi) (1994-09-29)
Re: Is there an error correcting parser generator out there? parrt@everest.ee.umn.edu (Terence Parr) (1994-09-30)
Re: Is there an error correcting parser generator out there? johnm@po.EECS.Berkeley.EDU (1994-10-01)
Re: Is there an error correcting parser generator out there? adrian@platon.cs.rhbnc.ac.uk (1994-10-04)
Re: Is there an error correcting parser generator out there? andrew@bugalugs (1994-10-05)
Re: Is there an error correcting parser generator out there? rockwell@nova.umd.edu (1994-10-05)
Re: Is there an error correcting parser generator out there? rfg@netcom.com (1994-10-05)
Re: Is there an error correcting parser generator out there? thoni@softlab.se (1994-10-05)
Re: Is there an error correcting parser generator out there? clark@quarry.zk3.dec.com (1994-10-05)
Re: Is there an error correcting parser generator out there? johnm@po.EECS.Berkeley.EDU (1994-10-06)
| List of all articles for this month |
Newsgroups: comp.compilers
From: adrian@platon.cs.rhbnc.ac.uk (A Johnstone)
Keywords: parse, errors, LL(1), LR(1)
Organization: Univ. of London, Royal Holloway College.
References: 94-09-142 94-09-180
Date: Tue, 4 Oct 1994 08:28:29 GMT

: (You'll have to excuse me, but I'm an unabashed believer in both automated
: techniques, e.g. LALR parser generators, and in formality when it comes
: to grammar specifications... and I have been for a long long time. These
: days however, everyone seems to be saying that recursive descent is better
: for error recovery, and that's rather disconcerting to me. I mean... I mean...


I just wanted to comment on the implied suggestion that RD parsers
militate against formality. Just because RD parsers are simple enough
to write by hand doesn't mean that ll(1) and ll(k) parser generators
don't exist (cf RDP and especially PCCTS). Personally I have always
been an RD convert for the very simple reason that debugging output
from LALR generators is a nightmare. When you are developing a new
language, as opposed to hacking in someone else's C grammar this is a
real issue.


IMHO LALR was originally justified because LALR grammars are `easier'
to write, not requiring left factoring. However, the advantages
disappear PDQ when you need to start adding semantic actions, which
often ends up requiring factoring... In addition, error recovery
certainly is a whole lot easier in RD parsers. On top of all that,
YACC's basic BNF syntax makes grammars much larger than they need to
be anyway.


Perhaps LALR became so popular simply because YACC was always there, free
with Unix, itself a free (once, to academia) operating system. My motto
has always been `beware de facto standards'.


                                          Adrian (biased author of an RD parser generator)


--
Dr Adrian Johnstone, Computer Science Dept, Royal Holloway, University of London
Email: adrian@dcs.rhbnc.ac.uk Tel: +44 (0)784 443425 Fax: +44 (0)784 443420
--


Post a followup to this message

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