Hi, using YYERROR_VERBOSE in a bison grammar to get a verbose error message at yyerror() it is not mentioned how large the error message string may be in the manual or source http://www.gnu.org/software/bison/manual/bison.html#Error-Reporting reading in the generated yacc y.tab.c the string looks to be generated with: static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yystate, int yytoken) which has a limit om max. 5 args with enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; and resulting longest string is like this: YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); is this correct ? then the longest yyerror string depends on the token names lenght ? passing the yyerror string in a gui program to a window and need to estimate how long the yyerror string may be. Thanks, Tys lefering
_______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison