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

wgsteven@undergrad.math.uwaterloo.ca (Warren Stevens)
Thu, 29 Sep 1994 16:42:29 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)
LL/LR error correction parrt@everest.ee.umn.edu (Terence Parr) (1994-10-03)
Re: Is there an error correcting parser generator out there? adrian@platon.cs.rhbnc.ac.uk (1994-10-04)
[6 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: wgsteven@undergrad.math.uwaterloo.ca (Warren Stevens)
Keywords: errors, parse, tools
Organization: University of Waterloo, Pure Math and C&O Club
References: 94-09-142 94-09-180
Date: Thu, 29 Sep 1994 16:42:29 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...


Well, my compiler prof went to great lengths to tell us this was hogwash.
His argument: once a LL parser has choosen a path, it's doomed to go along
that path, regardless of what it may find along the way. It would be
possible to back up a few steps, but that's not easy.


On the other hand, in LR parsing, the parser has a choice of a number of
rules that it can reduce, and so can make a better guess as to the type of
error the programmer has written and the best strategy to fix it. Errors
such as a missing 'if' in a if-then-else clause in Pascal are hard to fix
with a LL parser, because you get so far along in the parsing before you
realise what's happened, while in a LR parser, it's not nearly as hard,
because you can pick the rule you think the programmer meant and use it
instead of another, incorrect, rule.


Warren
--
Warren Stevens <wgstevens@undergrad.math.uwaterloo.ca>
PGP public key availible via finger. Use it.
--


Post a followup to this message

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