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 |
{ |
{ |
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 |
|
|