|
From: | Bob Smith |
Subject: | Re: Debugging Bison Under Windows |
Date: | Thu, 26 Oct 2006 11:58:20 -0400 |
User-agent: | Thunderbird 1.5.0.7 (Windows/20060909) |
Also, I see no reference to a global yytext in the C output file (perhaps you meant ctxt?).
Sorry, but I don't see how yyerror can be used to accomplish this. On 10/26/2006 2:50 AM, Ramaswamy R wrote:
You should be able to use the function yyerror to capture the debugmessages. The function prototype would be like this in a re-entrant parser -int yyerror(void *ctxt, const char *msg) { if ( 0 == yytext[0] ) return fprintf(stderr, "\n%s.", msg); else return fprintf(stderr, "\n%s at '%s'.", msg, asntext); } I believe the ctxt would not be there in a non re-entrant version (globalsbeing used if context information is required). You can use this function todo what you want with the message. Hope this helps. Regards Ramaswamy
-- _______________________________________________________________ Bob Smith - address@hidden - http://www.sudleyplace.com
smime.p7s
Description: S/MIME Cryptographic Signature
[Prev in Thread] | Current Thread | [Next in Thread] |