summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDemi Obenour <demiobenour@gmail.com>2016-09-27 10:54:16 -0400
committerWill Estes <westes575@gmail.com>2016-10-19 20:39:06 -0400
commit4bffa41e4ed434f1e2ba64ac5a8fe661fa089cfb (patch)
tree378e886700ac96e8c316f354f10e1e9a622144ea /tests
parent7dcb10c048744192ab873ee10fb6a5d8b1640434 (diff)
Improved M4 quotation
This fixes M4 quotation of certain strings beginning with `yy` (in section 3 of the input file only) and character literals. The new quotation method is also less brittle and faster. Tests that relied on the old behavior were fixed. Also, `yyconst` is no longer defined; use `const` (which it unconditionally was defined to) instead.
Diffstat (limited to 'tests')
-rw-r--r--tests/bison_yylval_scanner.l2
-rw-r--r--tests/include_by_push.direct.l4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/bison_yylval_scanner.l b/tests/bison_yylval_scanner.l
index 1e93fc1..3aa7ea9 100644
--- a/tests/bison_yylval_scanner.l
+++ b/tests/bison_yylval_scanner.l
@@ -52,7 +52,7 @@ enum yesno_t { no=0, yes=1 };
"</" { NEED_TAG_NAME= yes; yy_push_state( IN_TAG, yyscanner); return LTSLASH;}
"<"[^[:alpha:]] { yy_push_state(DISCARD_THRU_GT,yyscanner); }
"<" { NEED_TAG_NAME= yes; yy_push_state( IN_TAG, yyscanner); return LT; }
-[^<]{1,512} { yyget_lval(yyscanner)->str = STRDUP(yytext); return TEXT;}
+[^<]{1,512} { testget_lval(yyscanner)->str = STRDUP(yytext); return TEXT;}
}
<IN_TAG>{
">" { yy_pop_state( yyscanner ); return GT; }
diff --git a/tests/include_by_push.direct.l b/tests/include_by_push.direct.l
index 345e02f..8aaea69 100644
--- a/tests/include_by_push.direct.l
+++ b/tests/include_by_push.direct.l
@@ -55,7 +55,7 @@ int error = 0;
error = 1;
yyterminate();
}
- yypush_buffer_state( yy_create_buffer( yyin, YY_BUF_SIZE ));
+ testpush_buffer_state( yy_create_buffer( yyin, YY_BUF_SIZE ));
BEGIN(0);
}
.|\n {
@@ -67,7 +67,7 @@ int error = 0;
<<EOF>> {
fclose(yyin);
- yypop_buffer_state();
+ testpop_buffer_state();
if(!YY_CURRENT_BUFFER)
yyterminate();
}