[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
yyerror() with %pure_parser
From: |
Matt Carter |
Subject: |
yyerror() with %pure_parser |
Date: |
Fri, 9 Nov 2001 13:46:31 -0500 |
Hi,
I'm using %pure_parser to generate a thread-safe parser.
This lets me pass an extra parameter to yyparse() to maintain state (rather
than using global variables).
The problem is that yyerror() does not have access to this state parameter
as all the actions do. yyerror() only gets passed a char * as with a normal
non-reentrant parser. I need the state information to generate a useful
error message in yyerror().
Does anyone disagree that this is a shortcoming in bison? Can anyone
suggest a work-around?
Thank you very much.
-Matt Carter
- yyerror() with %pure_parser,
Matt Carter <=