Related articles |
---|
[2 earlier articles] |
Re: Error reporting/recovery grosch@cocolab.de (2000-04-11) |
Re: Error reporting/recovery bourguet@my-deja.com (Jean-Marc Bourguet) (2000-04-14) |
Re: Error reporting/recovery bourguet@my-deja.com (Jean-Marc Bourguet) (2000-04-14) |
Re: Error reporting/recovery rod.bates@wichita.boeing.com (Rodney M. Bates) (2000-04-14) |
Re: Error reporting/recovery nr@labrador.eecs.harvard.edu (2000-04-16) |
Re: Error reporting/recovery j.coulmance@itecor-software.com (Jocelyn Coulmance) (2000-04-20) |
Re: Error reporting/recovery pnyq@my-deja.com (2000-05-08) |
From: | pnyq@my-deja.com |
Newsgroups: | comp.compilers |
Date: | 8 May 2000 00:43:40 -0400 |
Organization: | Deja.com - Before you buy. |
References: | 00-04-053 |
Keywords: | errors, yacc, question, comment |
This is a general question to all members of the thread!
It sounds on the answers in this thread that bison/yacc is totally
incapable when it comes to error reporting. I'm trying to generate
decent error messages from a compiler, and I'm really having trouble
getting the information I need.
I would like to get the following:
The token text of the read erroneous token (token id available in
yychar, but where is the text?).
The token that was expected.
The column where the error occurred.
Where do I get these?
Are these possible to get?
Is it true that you have to enter error rules for every thinkable
situation to give a meaningful error message??
Thanks!
/Peter
[It's straightforward to track the token text and the column in the lexer,
but getting the set of possible tokens is more of a pain. It's been
discussed in the past, see the archives. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.