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

jon@mauney.com (Jon Mauney)
Thu, 29 Sep 1994 18:24:47 GMT

          From comp.compilers

Related articles
Is there an error correcting parser generator out there? hallmann@shiva.informatik.uni-dortmund.de (1994-09-26)
Re: Is there an error correcting parser generator out there? wjw@wjw.iaehv.nl (1994-09-28)
Re: Is there an error correcting parser generator out there? johnm@po.EECS.Berkeley.EDU (1994-09-28)
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)
[4 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: jon@mauney.com (Jon Mauney)
Keywords: errors, parse, tools
Organization: Interpath -- Providing Internet access to North Carolina
References: 94-09-142 94-09-180
Date: Thu, 29 Sep 1994 18:24:47 GMT

johnm@po.EECS.Berkeley.EDU (John D. Mitchell) writes:
>... It is generally the
>case that LR generators are much harder to get good error recovery out of.
>LL generators tend to make this a good bit easier...


rfg@netcom.com (Ronald F. Guilmette) writes:
>This seems to be the current `conventional wisdom' (among a lot of folks I
>know anyway), but is it really true?
>... These
>days however, everyone seems to be saying that recursive descent is better
>for error recovery, and that's rather disconcerting to me.


A) LL parsers have a very simple method of operation, which makes it
      easy to extract the information needed for high-quality error
      recovery. LL parsers predict what symbols are upcoming in
      the left context, and push the prediction onto a stack,
      from which it is quite easy to extract.
      LR parsers have parsing information cleverly encoded
      in CFSM states; error recovery needs to cleverly extract that
      information again. So an error recovery algorithm for an LR parser
      needs more code or more auxiliary tables than an equivalent algorithm
      for an LL parser.


2) LL(1) is not equivalent to recursive descent. LL parsers can
      (and should) be table-driven. Recursive descent takes the very
      simple predictions of upcoming context, and encodes it into
      the procedure call stack, which again requires code and/or
      auxiliary data to extract.


--
Jon Mauney jon@mauney.com
Mauney Computer Consulting (919) 828-8053
Raleigh NC
--


Post a followup to this message

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