bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: [Main] Use muscles with #line.


From: Pascal Bart
Subject: FYI: [Main] Use muscles with #line.
Date: Fri, 31 Aug 2001 20:52:07 +0000 (GMT)

Re-Hello

        Patch harmonizes the filename specification to #line.

Index: ChangeLog
===================================================================
RCS file: /cvsroot/bison/bison/ChangeLog,v
retrieving revision 1.203
diff -u -u -r1.203 ChangeLog
--- ChangeLog   2001/08/31 18:30:21     1.203
+++ ChangeLog   2001/08/31 18:46:30
@@ -1,3 +1,10 @@
+2001-08-31  Pascal Bart  <address@hidden>
+
+       * src/output.c (prepare): Delete the `filename' muscule insertion.
+       * src/reader.c (copy_action): Use `filename' muscule with `#line'.
+       (parse_union_decl): Likewise.
+       * src/macrotab.c (macro_init): Initialize filename by infile.
+
 2001-08-31  Marc Autret  <address@hidden>

        * src/bison.simple (YYLSP_NEEDED): New definition.
Index: src/macrotab.c
===================================================================
RCS file: /cvsroot/bison/bison/src/macrotab.c,v
retrieving revision 1.6
diff -u -u -r1.6 macrotab.c
--- src/macrotab.c      2001/08/31 18:22:54     1.6
+++ src/macrotab.c      2001/08/31 18:46:30
@@ -53,7 +53,7 @@

   /* Version and input file.  */
   macro_insert ("version", VERSION);
-  macro_insert ("filename", "a.y");
+  macro_insert ("filename", infile);

   /* Types.  */
   macro_insert ("stype", "int");
Index: src/output.c
===================================================================
RCS file: /cvsroot/bison/bison/src/output.c,v
retrieving revision 1.53
diff -u -u -r1.53 output.c
--- src/output.c        2001/08/31 18:30:21     1.53
+++ src/output.c        2001/08/31 18:46:31
@@ -1067,8 +1067,6 @@
   MACRO_INSERT_INT ("ntbase", ntokens);
   MACRO_INSERT_INT ("verbose", 0);

-  MACRO_INSERT_STRING ("filename", infile);
-
   MACRO_INSERT_INT ("nnts", nvars);
   MACRO_INSERT_INT ("nrules", nrules);
   MACRO_INSERT_INT ("nstates", nstates);
Index: src/reader.c
===================================================================
RCS file: /cvsroot/bison/bison/src/reader.c,v
retrieving revision 1.82
diff -u -u -r1.82 reader.c
--- src/reader.c        2001/08/31 16:01:53     1.82
+++ src/reader.c        2001/08/31 18:46:34
@@ -749,7 +749,8 @@

   if (!no_lines_flag)
     obstack_fgrow2 (&attrs_obstack, "\n#line %d %s\n",
-                   lineno, quotearg_style (c_quoting_style, infile));
+                   lineno, quotearg_style (c_quoting_style,
+                                           macro_find("filename")));
   else
     obstack_1grow (&attrs_obstack, '\n');

@@ -1111,7 +1112,8 @@
   if (!no_lines_flag)
     {
       sprintf (buf, "#line %d %s\n",
-              lineno, quotearg_style (c_quoting_style, infile));
+              lineno, quotearg_style (c_quoting_style,
+                                      macro_find ("filename")));
       obstack_grow (&action_obstack, buf, strlen (buf));
     }
   obstack_1grow (&action_obstack, '{');

Pascal Bart (address@hidden)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]