diff options
author | Demi Obenour <demiobenour@gmail.com> | 2016-09-27 10:54:16 -0400 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2016-10-19 20:39:06 -0400 |
commit | 4bffa41e4ed434f1e2ba64ac5a8fe661fa089cfb (patch) | |
tree | 378e886700ac96e8c316f354f10e1e9a622144ea /src/parse.y | |
parent | 7dcb10c048744192ab873ee10fb6a5d8b1640434 (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 'src/parse.y')
-rw-r--r-- | src/parse.y | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y index 908361b..4de4151 100644 --- a/src/parse.y +++ b/src/parse.y @@ -140,7 +140,7 @@ goal : initlex sect1 sect1end sect2 initforrule else add_action( "ECHO" ); - add_action( ";\n\tYY_BREAK\n" ); + add_action( ";\n\tYY_BREAK]]\n" ); } ; @@ -977,6 +977,7 @@ void build_eof_action(void) } line_directive_out(NULL, 1); + add_action("[["); /* This isn't a normal rule after all - don't count it as * such, so we don't have any holes in the rule numbering |