Error handling in yacc question

vera@fanaraaken.Stanford.EDU (James S. Vera)
Wed, 23 Sep 1992 04:55:04 GMT

          From comp.compilers

Related articles
Error handling in yacc question vera@fanaraaken.Stanford.EDU (1992-09-23)
Re: Error handling in yacc question olson@antares.mcs.anl.gov (1992-09-23)
Re: Error handling in yacc question elliot@wellspring.com (Elliot H. Mednick) (1992-09-26)
| List of all articles for this month |

Newsgroups: comp.compilers
From: vera@fanaraaken.Stanford.EDU (James S. Vera)
Organization: Program Analysis and Verification Group, Stanford University
Date: Wed, 23 Sep 1992 04:55:04 GMT
Keywords: yacc, errors, comment

Speaking of yacc error handling, its easy enough to put out a message
saying token "x" was unexpected. How does one find out what set of
tokens was expected? That info must be in there somewhere...


James S. Vera | Internet
Stanford University| vera@anna.stanford.edu
+1.415.723.1089 | FAX +1.415.725.7398
[This question came up in the early days of comp.compilers. It turns out to
be surprisingly difficult to figure out what tokens are legal when because of
yacc's default reductions which put the parser in a different state from what
you might expect by the time the error is detected. -John]
--


Post a followup to this message

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