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

Diff of /bison/src/output.c

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

revision 1.166 by akim, Tue Jun 18 09:55:35 2002 UTC revision 1.167 by akim, Thu Jun 20 09:08:37 2002 UTC
# Line 639  symbol_destructors_output (FILE *out) Line 639  symbol_destructors_output (FILE *out)
639  }  }
640    
641    
642    /*-------------------------------------.
643    | Output the symbol printers to OOUT.  |
644    `-------------------------------------*/
645    
646    static void
647    symbol_printers_output (FILE *out)
648    {
649      int i;
650      int first = 1;
651    
652      fputs ("m4_define([b4_symbol_printers], \n[", out);
653      for (i = 0; i < nsyms; ++i)
654        if (symbols[i]->destructor)
655          {
656            symbol_t *symbol = symbols[i];
657    
658            /* Filename, lineno,
659               Symbol-name, Symbol-number,
660               destructor, typename. */
661            fprintf (out, "%s[[[%s]], [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]",
662                     first ? "" : ",\n",
663                     infile, symbol->printer_location.first_line,
664                     symbol_tag_get (symbol),
665                     symbol->number,
666                     symbol->printer,
667                     symbol->type_name);
668    
669            first = 0;
670          }
671      fputs ("])\n\n", out);
672    }
673    
674    
675  static void  static void
676  save_column (int symbol, int default_state)  save_column (int symbol, int default_state)
677  {  {
# Line 1053  output_skeleton (void) Line 1086  output_skeleton (void)
1086    actions_output (out);    actions_output (out);
1087    token_definitions_output (out);    token_definitions_output (out);
1088    symbol_destructors_output (out);    symbol_destructors_output (out);
1089      symbol_printers_output (out);
1090    
1091    muscles_m4_output (out);    muscles_m4_output (out);
1092    

Legend:
Removed from v.1.166  
changed lines
  Added in v.1.167

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