]> git.saurik.com Git - bison.git/commitdiff
* src/output.c (prepare): Delete the `filename' muscule insertion.
authorPascal Bart <pascal.bart@epita.fr>
Fri, 31 Aug 2001 18:51:06 +0000 (18:51 +0000)
committerPascal Bart <pascal.bart@epita.fr>
Fri, 31 Aug 2001 18:51:06 +0000 (18:51 +0000)
* src/reader.c (copy_action): Use `filename' muscule with `#line'.
(parse_union_decl): Likewise.
* src/macrotab.c (macro_init): Initialize filename by infile.

ChangeLog
src/macrotab.c
src/output.c
src/reader.c

index 2ac2876bfbb454c6380be6eea1972a7b2fc89b28..c9a3fece83356e015f5c3247e8cc8505d61e1380 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-31  Pascal Bart  <pascal.bart@epita.fr>
+
+       * 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  <autret_m@epita.fr>
 
        * src/bison.simple (YYLSP_NEEDED): New definition.
index b3693214e661e382c759aff8e7e5328eefc8ebbd..137ba8dccf675f3cc86b3a4b945457de92c57740 100644 (file)
@@ -53,7 +53,7 @@ macro_init (void)
 
   /* Version and input file.  */
   macro_insert ("version", VERSION);
-  macro_insert ("filename", "a.y");
+  macro_insert ("filename", infile);
 
   /* Types.  */
   macro_insert ("stype", "int");
index 06c7090f89ec55b151ad6443c2ff40726eae5d53..eecb8c68cf44dc5f02309d62c21b96bb236dcc3c 100644 (file)
@@ -1067,8 +1067,6 @@ prepare (void)
   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 22eedc80f0a40f3e9c542f6a2efb475d40cae3a2..feaa3b67439c96310f03e81b6ff14a6e6dbebe9c 100644 (file)
@@ -749,7 +749,8 @@ parse_union_decl (void)
 
   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 @@ copy_action (symbol_list *rule, int stack_offset)
   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, '{');