On Sun, January 17, 2010 22:37, Joel E. Denny wrote:
>> 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 ?
>
> For now, but 5 is an arbitrary limit, and I know of no guarantee that
> Bison won't evolve beyond it.
good to know it may be larger in future bison versions.> You can't use strlen? now using snprintf with a limit to create a new lenght limited string from yyerror string and put that in a window on screen. > As I posted earlier today, we have plans to provide an alternative to > yyerror. One feature we've discussed is the ability to iterate the > expected tokens and construct the error message yourself. That would > allow you to place whatever limit you like on the length. that would be even better, for now it is nice to have a better yyerror message then just 'parse error' maybe the bison manual could mention the verbose yyerror string has no length limit. Thanks. _______________________________________________ [email protected] http://lists.gnu.org/mailman/listinfo/help-bison
