Allow YY_NO_UNPUT to disable unput() for backward compatibility.

This commit is contained in:
Jung-uk Kim 2013-05-21 19:22:42 +00:00
parent 5ad5113ebd
commit a994b2242d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=250878

View file

@ -1032,7 +1032,9 @@ extern int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
%not-for-header
m4_ifdef( [[M4_YY_NO_UNPUT]],,
[[
#ifndef YY_NO_UNPUT
static void yyunput M4_YY_PARAMS( int c, char *buf_ptr M4_YY_PROTO_LAST_ARG);
#endif
]])
%ok-for-header
%endif
@ -1808,9 +1810,11 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
%if-c-only
m4_ifdef( [[M4_YY_NO_UNPUT]],,
[[
#ifndef YY_NO_UNPUT
static void yyunput YYFARGS2( int,c, char *,yy_bp)
%endif
%if-c++-only
#ifndef YY_NO_UNPUT
void yyFlexLexer::yyunput( int c, char* yy_bp)
%endif
{
@ -1857,6 +1861,7 @@ m4_ifdef( [[M4_YY_USE_LINENO]],
YY_G(yy_hold_char) = *yy_cp;
YY_G(yy_c_buf_p) = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
%if-c-only
]])
%endif