/[bison]/bison/src/files.c
ViewVC logotype

Diff of /bison/src/files.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by akim, Mon Dec 10 09:07:41 2001 UTC revision 1.57 by akim, Sat Dec 15 14:35:57 2001 UTC
# Line 30  FILE *finput = NULL; Line 30  FILE *finput = NULL;
30    
31  struct obstack action_obstack;  struct obstack action_obstack;
32  struct obstack attrs_obstack;  struct obstack attrs_obstack;
 struct obstack table_obstack;  
33  struct obstack defines_obstack;  struct obstack defines_obstack;
34  struct obstack guard_obstack;  struct obstack guard_obstack;
35  struct obstack output_obstack;  struct obstack output_obstack;
# Line 41  const char *spec_name_prefix = "yy";   /* Line 40  const char *spec_name_prefix = "yy";   /*
40  char *spec_verbose_file = NULL;   /* for --verbose. */  char *spec_verbose_file = NULL;   /* for --verbose. */
41  char *spec_graph_file = NULL;   /* for -g. */  char *spec_graph_file = NULL;   /* for -g. */
42  char *spec_defines_file = NULL; /* for --defines. */  char *spec_defines_file = NULL; /* for --defines. */
43    char *parser_file_name = NULL;
44    
45  char *infile = NULL;  char *infile = NULL;
46  char *attrsfile = NULL;  char *attrsfile = NULL;
# Line 433  compute_output_file_names (void) Line 433  compute_output_file_names (void)
433  {  {
434    compute_base_names ();    compute_base_names ();
435    
436      parser_file_name =
437        spec_outfile ? spec_outfile : stringappend (base_name, src_extension);
438    
439    /* If not yet done. */    /* If not yet done. */
440    if (!src_extension)    if (!src_extension)
441      src_extension = ".c";      src_extension = ".c";
# Line 453  compute_output_file_names (void) Line 456  compute_output_file_names (void)
456  #ifndef MSDOS  #ifndef MSDOS
457    attrsfile = stringappend (attrsfile, header_extension);    attrsfile = stringappend (attrsfile, header_extension);
458  #endif /* MSDOS */  #endif /* MSDOS */
   
459  }  }
460    
461  /*-----------------------------------------------------------------.  /*-----------------------------------------------------------------.
# Line 469  open_files (void) Line 471  open_files (void)
471    /* Initialize the obstacks. */    /* Initialize the obstacks. */
472    obstack_init (&action_obstack);    obstack_init (&action_obstack);
473    obstack_init (&attrs_obstack);    obstack_init (&attrs_obstack);
   obstack_init (&table_obstack);  
474    obstack_init (&defines_obstack);    obstack_init (&defines_obstack);
475    obstack_init (&guard_obstack);    obstack_init (&guard_obstack);
476    obstack_init (&output_obstack);    obstack_init (&output_obstack);
# Line 494  close_files (void) Line 495  close_files (void)
495  void  void
496  output_files (void)  output_files (void)
497  {  {
   /* Output the main file.  */  
   if (spec_outfile)  
     obstack_save (&table_obstack, spec_outfile);  
   else  
     obstack_save (&table_obstack, stringappend (base_name, src_extension));  
   obstack_free (&table_obstack, NULL);  
   
498    /* Output the header file if wanted. */    /* Output the header file if wanted. */
499    if (defines_flag)    if (defines_flag)
500      defines_obstack_save (spec_defines_file);      defines_obstack_save (spec_defines_file);

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26