From: John Millaway Date: Fri, 29 Nov 2002 03:29:10 +0000 (+0000) Subject: Fixed bug in yyless definition where argument was not enclosed in parentheses. X-Git-Tag: flex-2-5-25~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c18c5a7a8fc70f1bb12119997641208caecaed8;p=flex Fixed bug in yyless definition where argument was not enclosed in parentheses. --- diff --git a/flex.skl b/flex.skl index d2689be..874f635 100644 --- a/flex.skl +++ b/flex.skl @@ -299,10 +299,11 @@ extern FILE *yyin, *yyout; do \ { \ /* Undo effects of setting up yytext. */ \ - YY_LESS_LINENO(n);\ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = YY_G(yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ - YY_G(yy_c_buf_p) = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_G(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 )