* src/output.c (output_skeleton): Don't disable M4sugar comments
authorAkim Demaille <akim@epita.fr>
Thu, 24 Oct 2002 11:40:27 +0000 (11:40 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 24 Oct 2002 11:40:27 +0000 (11:40 +0000)
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
data/glr.c
data/lalr1.cc
data/yacc.c
src/output.c

index cc9da64..b31ebd3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2002-10-24  Akim Demaille  <akim@epita.fr>
 
+       * 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  <akim@epita.fr>
+
        * 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.
index 77a35af..4d34e5f 100644 (file)
@@ -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])
index b7b64c3..8f3ebad 100644 (file)
@@ -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],
index 11edba3..0bbd482 100644 (file)
@@ -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],
index 1edf854..6395d6d 100644 (file)
@@ -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);