factor the handling of m4 escaping

The conversion from @ to @@ and so forth is coded is too many
different places.  Factor, a bit.

* src/scan-code.l: Instead of duplicating the logic of obstack_escape,
use it.
It sure is less efficient, but the cost is negligible.
This allows to factor rules that are alike.
And to factor some start-condition clauses.
* tests/input.at (Stray $ or @): New.
* NEWS: Document it.
This commit is contained in:
Akim Demaille
2012-07-27 11:22:22 +02:00
parent e20e6a50d5
commit 263137264f
3 changed files with 57 additions and 39 deletions

6
NEWS
View File

@@ -22,6 +22,12 @@ GNU Bison NEWS
*** glr.cc: set_debug_level and debug_level work as expected.
*** Stray @ or $ in actions
While Bison used to warn about stray $ or @ in action rules, it did not
for other actions such as printers, destructors, or initial actions. It
now does.
** Type names in printers and destructors
For consistency with rule actions, it is now possible to qualify $$ by a