From b526ee6116d3a769d1af313163ad4eaa910b1037 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Thu, 24 Oct 2002 11:40:27 +0000 Subject: [PATCH] * src/output.c (output_skeleton): Don't disable M4sugar comments too soon: it results in comments being expanded. * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the first output. --- ChangeLog | 7 +++++++ data/glr.c | 2 ++ data/lalr1.cc | 2 ++ data/yacc.c | 3 ++- src/output.c | 4 ---- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc9da64..b31ebd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2002-10-24 Akim Demaille + * src/output.c (output_skeleton): Don't disable M4sugar comments + too soon: it results in comments being expanded. + * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the + first output. + +2002-10-24 Akim Demaille + * data/yacc.c (m4_int_type): New. * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed char' as only yacc.c wants K&R portability. diff --git a/data/glr.c b/data/glr.c index 77a35af..4d34e5f 100644 --- a/data/glr.c +++ b/data/glr.c @@ -111,6 +111,8 @@ m4_define_default([b4_header_guard], [[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])]) +# We do want M4 expansion after # for CPP macros. +m4_changecom() m4_divert(0)dnl #output "b4_output_parser_name" b4_copyright([Skeleton parser for GLR parsing with Bison], [2002]) diff --git a/data/lalr1.cc b/data/lalr1.cc index b7b64c3..8f3ebad 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -105,6 +105,8 @@ m4_define([b4_constructor], [])]) +# We do want M4 expansion after # for CPP macros. +m4_changecom() m4_divert(0)dnl #output "b4_output_header_name" b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison], diff --git a/data/yacc.c b/data/yacc.c index 11edba3..0bbd482 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -156,7 +156,8 @@ m4_popdef([b4_dollar_dollar])dnl ]) - +# We do want M4 expansion after # for CPP macros. +m4_changecom() m4_divert(0)dnl #output "b4_output_parser_name" b4_copyright([Skeleton parser for Yacc-like parsing with Bison], diff --git a/src/output.c b/src/output.c index 1edf854..6395d6d 100644 --- a/src/output.c +++ b/src/output.c @@ -527,10 +527,6 @@ output_skeleton (void) error (EXIT_FAILURE, errno, "fdopen"); /* Output the definitions of all the muscles. */ - - /* There are no comments, especially not `#': we do want M4 expansion - after `#': think of CPP macros! */ - fputs ("m4_changecom()\n", out); fputs ("m4_init()\n", out); user_actions_output (out); -- 2.7.4