Yacc error reporting

niels@ifad.dk (Niels S|e)
Fri, 18 Aug 89 13:16:45 +0200

          From comp.compilers

Related articles
Yacc error reporting niels@ifad.dk (1989-08-18)
| List of all articles for this month |
Date: Fri, 18 Aug 89 13:16:45 +0200
From: niels@ifad.dk (Niels S|e)

We started this discussion about error reporting by asking how to
achieve error messages that could indicate which terminal symbols
that where expected in the current state. We are grateful for the
fruitful discussion that has been raised from this question and we
thank everybody who has given input to this discussion.


We think that a conclusion on this discussion must be that an
automatic generated LALR parser cannot be used for the kind of
error messages we requested. The first problem is the default
reductions which YACC makes. However, this problem can be solved
as it has been illustrated during this discussion. The next more
serious problem is that LALR parsers combine states containing
identical sets of items. As we see it there is no way to solve
this problem.


We have currently implemented our parser with error reporting
based on the input from Mr. Theo Omtzigt. We are aware of that
this does not gives of 100 % correct error messages. However,
we are interested in whether we can get another automatic LR
parser generator where it is possible to give the requested
kind of error messages. Does anybody know if such a generator
is available (also commercial); please let us know.
  [From niels@ifad.dk (Niels S|e)]





Post a followup to this message

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