1 /* Symbol table manager for Bison.
3 Copyright (C) 1984, 1989, 2000, 2001, 2002, 2004, 2005, 2006, 2007,
5 Free Software Foundation, Inc.
7 This file is part of Bison, the GNU Compiler Compiler.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
32 /*------------------------.
33 | Distinguished symbols. |
34 `------------------------*/
36 symbol
*errtoken
= NULL
;
37 symbol
*undeftoken
= NULL
;
38 symbol
*endtoken
= NULL
;
39 symbol
*accept
= NULL
;
40 symbol
*startsymbol
= NULL
;
41 location startsymbol_location
;
43 /*---------------------------------------.
44 | Default %destructor's and %printer's. |
45 `---------------------------------------*/
47 static code_props default_tagged_destructor
= CODE_PROPS_NONE_INIT
;
48 static code_props default_tagless_destructor
= CODE_PROPS_NONE_INIT
;
49 static code_props default_tagged_printer
= CODE_PROPS_NONE_INIT
;
50 static code_props default_tagless_printer
= CODE_PROPS_NONE_INIT
;
52 /*---------------------------------.
53 | Create a new symbol, named TAG. |
54 `---------------------------------*/
57 symbol_new (uniqstr tag
, location loc
)
59 symbol
*res
= xmalloc (sizeof *res
);
63 /* If the tag is not a string (starts with a double quote), check
64 that it is valid for Yacc. */
65 if (tag
[0] != '\"' && tag
[0] != '\'' && strchr (tag
, '-'))
66 yacc_at (loc
, _("POSIX Yacc forbids dashes in symbol names: %s"),
72 res
->type_name
= NULL
;
73 code_props_none_init (&res
->destructor
);
74 code_props_none_init (&res
->printer
);
76 res
->number
= NUMBER_UNDEFINED
;
78 res
->assoc
= undef_assoc
;
79 res
->user_token_number
= USER_NUMBER_UNDEFINED
;
82 res
->class = unknown_sym
;
83 res
->declared
= false;
85 if (nsyms
== SYMBOL_NUMBER_MAXIMUM
)
86 fatal (_("too many symbols in input grammar (limit is %d)"),
87 SYMBOL_NUMBER_MAXIMUM
);
92 /*----------------------------------------.
93 | Create a new semantic type, named TAG. |
94 `----------------------------------------*/
96 static semantic_type
*
97 semantic_type_new (uniqstr tag
)
99 semantic_type
*res
= xmalloc (sizeof *res
);
101 uniqstr_assert (tag
);
103 code_props_none_init (&res
->destructor
);
104 code_props_none_init (&res
->printer
);
114 #define SYMBOL_ATTR_PRINT(Attr) \
116 fprintf (f, " %s { %s }", #Attr, s->Attr)
118 #define SYMBOL_CODE_PRINT(Attr) \
120 fprintf (f, " %s { %s }", #Attr, s->Attr.code)
123 symbol_print (symbol
*s
, FILE *f
)
127 fprintf (f
, "\"%s\"", s
->tag
);
128 SYMBOL_ATTR_PRINT (type_name
);
129 SYMBOL_CODE_PRINT (destructor
);
130 SYMBOL_CODE_PRINT (printer
);
133 fprintf (f
, "<NULL>");
136 #undef SYMBOL_ATTR_PRINT
137 #undef SYMBOL_CODE_PRINT
140 /*----------------------------------.
141 | Whether S is a valid identifier. |
142 `----------------------------------*/
145 is_identifier (uniqstr s
)
147 static char const alphanum
[26 + 26 + 1 + 10] =
148 "abcdefghijklmnopqrstuvwxyz"
149 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
152 if (!s
|| ! memchr (alphanum
, *s
, sizeof alphanum
- 10))
155 if (! memchr (alphanum
, *s
, sizeof alphanum
))
161 /*-----------------------------------------------.
162 | Get the identifier associated to this symbol. |
163 `-----------------------------------------------*/
165 symbol_id_get (symbol
const *sym
)
167 aver (sym
->user_token_number
!= USER_NUMBER_HAS_STRING_ALIAS
);
170 return is_identifier (sym
->tag
) ? sym
->tag
: 0;
174 /*------------------------------------------------------------------.
175 | Complain that S's WHAT is redeclared at SECOND, and was first set |
177 `------------------------------------------------------------------*/
180 symbol_redeclaration (symbol
*s
, const char *what
, location first
,
183 complain_at (second
, _("%s redeclaration for %s"), what
, s
->tag
);
184 complain_at (first
, _("previous declaration"));
188 semantic_type_redeclaration (semantic_type
*s
, const char *what
, location first
,
191 complain_at (second
, _("%s redeclaration for <%s>"), what
, s
->tag
);
192 complain_at (first
, _("previous declaration"));
197 /*-----------------------------------------------------------------.
198 | Set the TYPE_NAME associated with SYM. Does nothing if passed 0 |
200 `-----------------------------------------------------------------*/
203 symbol_type_set (symbol
*sym
, uniqstr type_name
, location loc
)
208 symbol_redeclaration (sym
, "%type", sym
->type_location
, loc
);
209 uniqstr_assert (type_name
);
210 sym
->type_name
= type_name
;
211 sym
->type_location
= loc
;
215 /*-----------------------------------.
216 | Get the CLASS associated with SYM. |
217 `-----------------------------------*/
220 symbol_class_get_string (symbol
*sym
)
224 if (sym
->class == token_sym
)
226 else if (sym
->class == nterm_sym
)
227 return "nonterminal";
233 /*-----------------------------------------.
234 | Set the DESTRUCTOR associated with SYM. |
235 `-----------------------------------------*/
238 symbol_destructor_set (symbol
*sym
, code_props
const *destructor
)
240 if (sym
->destructor
.code
)
241 symbol_redeclaration (sym
, "%destructor", sym
->destructor
.location
,
242 destructor
->location
);
243 sym
->destructor
= *destructor
;
246 /*------------------------------------------.
247 | Set the DESTRUCTOR associated with TYPE. |
248 `------------------------------------------*/
251 semantic_type_destructor_set (semantic_type
*type
,
252 code_props
const *destructor
)
254 if (type
->destructor
.code
)
255 semantic_type_redeclaration (type
, "%destructor",
256 type
->destructor
.location
,
257 destructor
->location
);
258 type
->destructor
= *destructor
;
261 /*---------------------------------------.
262 | Get the computed %destructor for SYM. |
263 `---------------------------------------*/
266 symbol_destructor_get (symbol
const *sym
)
268 /* Per-symbol %destructor. */
269 if (sym
->destructor
.code
)
270 return &sym
->destructor
;
272 /* Per-type %destructor. */
275 code_props
const *destructor
=
276 &semantic_type_get (sym
->type_name
)->destructor
;
277 if (destructor
->code
)
281 /* Apply default %destructor's only to user-defined symbols. */
282 if (sym
->tag
[0] == '$' || sym
== errtoken
)
283 return &code_props_none
;
286 return &default_tagged_destructor
;
287 return &default_tagless_destructor
;
290 /*--------------------------------------.
291 | Set the PRINTER associated with SYM. |
292 `--------------------------------------*/
295 symbol_printer_set (symbol
*sym
, code_props
const *printer
)
297 if (sym
->printer
.code
)
298 symbol_redeclaration (sym
, "%printer",
299 sym
->printer
.location
, printer
->location
);
300 sym
->printer
= *printer
;
303 /*---------------------------------------.
304 | Set the PRINTER associated with TYPE. |
305 `---------------------------------------*/
308 semantic_type_printer_set (semantic_type
*type
, code_props
const *printer
)
310 if (type
->printer
.code
)
311 semantic_type_redeclaration (type
, "%printer",
312 type
->printer
.location
, printer
->location
);
313 type
->printer
= *printer
;
316 /*------------------------------------.
317 | Get the computed %printer for SYM. |
318 `------------------------------------*/
321 symbol_printer_get (symbol
const *sym
)
323 /* Per-symbol %printer. */
324 if (sym
->printer
.code
)
325 return &sym
->printer
;
327 /* Per-type %printer. */
330 code_props
const *printer
= &semantic_type_get (sym
->type_name
)->printer
;
335 /* Apply the default %printer only to user-defined symbols. */
336 if (sym
->tag
[0] == '$' || sym
== errtoken
)
337 return &code_props_none
;
340 return &default_tagged_printer
;
341 return &default_tagless_printer
;
344 /*-----------------------------------------------------------------.
345 | Set the PRECEDENCE associated with SYM. Does nothing if invoked |
346 | with UNDEF_ASSOC as ASSOC. |
347 `-----------------------------------------------------------------*/
350 symbol_precedence_set (symbol
*sym
, int prec
, assoc a
, location loc
)
352 if (a
!= undef_assoc
)
355 symbol_redeclaration (sym
, assoc_to_string (a
), sym
->prec_location
,
359 sym
->prec_location
= loc
;
362 /* Only terminals have a precedence. */
363 symbol_class_set (sym
, token_sym
, loc
, false);
367 /*------------------------------------.
368 | Set the CLASS associated with SYM. |
369 `------------------------------------*/
372 symbol_class_set (symbol
*sym
, symbol_class
class, location loc
, bool declaring
)
374 if (sym
->class != unknown_sym
&& sym
->class != class)
376 complain_at (loc
, _("symbol %s redefined"), sym
->tag
);
377 sym
->declared
= false;
380 if (class == nterm_sym
&& sym
->class != nterm_sym
)
381 sym
->number
= nvars
++;
382 else if (class == token_sym
&& sym
->number
== NUMBER_UNDEFINED
)
383 sym
->number
= ntokens
++;
390 warn_at (loc
, _("symbol %s redeclared"), sym
->tag
);
391 sym
->declared
= true;
396 /*------------------------------------------------.
397 | Set the USER_TOKEN_NUMBER associated with SYM. |
398 `------------------------------------------------*/
401 symbol_user_token_number_set (symbol
*sym
, int user_token_number
, location loc
)
403 int *user_token_numberp
;
405 if (sym
->user_token_number
!= USER_NUMBER_HAS_STRING_ALIAS
)
406 user_token_numberp
= &sym
->user_token_number
;
408 user_token_numberp
= &sym
->alias
->user_token_number
;
409 if (*user_token_numberp
!= USER_NUMBER_UNDEFINED
410 && *user_token_numberp
!= user_token_number
)
411 complain_at (loc
, _("redefining user token number of %s"), sym
->tag
);
413 *user_token_numberp
= user_token_number
;
414 /* User defined $end token? */
415 if (user_token_number
== 0)
418 endtoken
->number
= 0;
419 /* It is always mapped to 0, so it was already counted in
426 /*----------------------------------------------------------.
427 | If SYM is not defined, report an error, and consider it a |
429 `----------------------------------------------------------*/
432 symbol_check_defined (symbol
*sym
)
434 if (sym
->class == unknown_sym
)
438 _("symbol %s is used, but is not defined as a token and has no rules"),
440 sym
->class = nterm_sym
;
441 sym
->number
= nvars
++;
448 symbol_check_defined_processor (void *sym
, void *null ATTRIBUTE_UNUSED
)
450 return symbol_check_defined (sym
);
455 symbol_make_alias (symbol
*sym
, symbol
*str
, location loc
)
458 warn_at (loc
, _("symbol `%s' used more than once as a literal string"),
461 warn_at (loc
, _("symbol `%s' given more than one literal string"),
465 str
->class = token_sym
;
466 str
->user_token_number
= sym
->user_token_number
;
467 sym
->user_token_number
= USER_NUMBER_HAS_STRING_ALIAS
;
470 str
->number
= sym
->number
;
471 symbol_type_set (str
, sym
->type_name
, loc
);
476 /*---------------------------------------------------------.
477 | Check that THIS, and its alias, have same precedence and |
479 `---------------------------------------------------------*/
482 symbol_check_alias_consistency (symbol
*this)
485 symbol
*str
= this->alias
;
487 /* Check only the symbol in the symbol-string pair. */
489 && this->user_token_number
== USER_NUMBER_HAS_STRING_ALIAS
))
492 if (str
->type_name
!= sym
->type_name
)
495 symbol_type_set (sym
, str
->type_name
, str
->type_location
);
497 symbol_type_set (str
, sym
->type_name
, sym
->type_location
);
501 if (str
->destructor
.code
|| sym
->destructor
.code
)
503 if (str
->destructor
.code
)
504 symbol_destructor_set (sym
, &str
->destructor
);
506 symbol_destructor_set (str
, &sym
->destructor
);
509 if (str
->printer
.code
|| sym
->printer
.code
)
511 if (str
->printer
.code
)
512 symbol_printer_set (sym
, &str
->printer
);
514 symbol_printer_set (str
, &sym
->printer
);
517 if (sym
->prec
|| str
->prec
)
520 symbol_precedence_set (sym
, str
->prec
, str
->assoc
,
523 symbol_precedence_set (str
, sym
->prec
, sym
->assoc
,
529 symbol_check_alias_consistency_processor (void *this,
530 void *null ATTRIBUTE_UNUSED
)
532 symbol_check_alias_consistency (this);
537 /*-------------------------------------------------------------------.
538 | Assign a symbol number, and write the definition of the token name |
539 | into FDEFINES. Put in SYMBOLS. |
540 `-------------------------------------------------------------------*/
543 symbol_pack (symbol
*this)
545 if (this->class == nterm_sym
)
547 this->number
+= ntokens
;
549 else if (this->alias
)
551 /* This symbol and its alias are a single token defn.
552 Allocate a tokno, and assign to both check agreement of
553 prec and assoc fields and make both the same */
554 if (this->number
== NUMBER_UNDEFINED
)
556 if (this == endtoken
|| this->alias
== endtoken
)
557 this->number
= this->alias
->number
= 0;
560 aver (this->alias
->number
!= NUMBER_UNDEFINED
);
561 this->number
= this->alias
->number
;
564 /* Do not do processing below for USER_NUMBER_HAS_STRING_ALIASes. */
565 if (this->user_token_number
== USER_NUMBER_HAS_STRING_ALIAS
)
568 else /* this->class == token_sym */
569 aver (this->number
!= NUMBER_UNDEFINED
);
571 symbols
[this->number
] = this;
576 symbol_pack_processor (void *this, void *null ATTRIBUTE_UNUSED
)
578 return symbol_pack (this);
583 user_token_number_redeclaration (int num
, symbol
*first
, symbol
*second
)
585 /* User token numbers are not assigned during the parsing, but in a
586 second step, via a (nondeterministic) traversal of the symbol
589 Make errors deterministic: keep the first declaration first. */
590 if (location_cmp (first
->location
, second
->location
) > 0)
596 complain_at (second
->location
,
597 _("user token number %d redeclaration for %s"),
599 complain_at (first
->location
, _("previous declaration for %s"),
603 /*--------------------------------------------------.
604 | Put THIS in TOKEN_TRANSLATIONS if it is a token. |
605 `--------------------------------------------------*/
608 symbol_translation (symbol
*this)
611 if (this->class == token_sym
612 && this->user_token_number
!= USER_NUMBER_HAS_STRING_ALIAS
)
614 /* A token which translation has already been set? */
615 if (token_translations
[this->user_token_number
] != undeftoken
->number
)
616 user_token_number_redeclaration
617 (this->user_token_number
,
618 symbols
[token_translations
[this->user_token_number
]],
621 token_translations
[this->user_token_number
] = this->number
;
628 symbol_translation_processor (void *this, void *null ATTRIBUTE_UNUSED
)
630 return symbol_translation (this);
634 /*---------------------------------------.
635 | Symbol and semantic type hash tables. |
636 `---------------------------------------*/
638 /* Initial capacity of symbol and semantic type hash table. */
639 #define HT_INITIAL_CAPACITY 257
641 static struct hash_table
*symbol_table
= NULL
;
642 static struct hash_table
*semantic_type_table
= NULL
;
645 hash_compare_symbol (const symbol
*m1
, const symbol
*m2
)
647 /* Since tags are unique, we can compare the pointers themselves. */
648 return UNIQSTR_EQ (m1
->tag
, m2
->tag
);
652 hash_compare_semantic_type (const semantic_type
*m1
, const semantic_type
*m2
)
654 /* Since names are unique, we can compare the pointers themselves. */
655 return UNIQSTR_EQ (m1
->tag
, m2
->tag
);
659 hash_symbol_comparator (void const *m1
, void const *m2
)
661 return hash_compare_symbol (m1
, m2
);
665 hash_semantic_type_comparator (void const *m1
, void const *m2
)
667 return hash_compare_semantic_type (m1
, m2
);
671 hash_symbol (const symbol
*m
, size_t tablesize
)
673 /* Since tags are unique, we can hash the pointer itself. */
674 return ((uintptr_t) m
->tag
) % tablesize
;
678 hash_semantic_type (const semantic_type
*m
, size_t tablesize
)
680 /* Since names are unique, we can hash the pointer itself. */
681 return ((uintptr_t) m
->tag
) % tablesize
;
685 hash_symbol_hasher (void const *m
, size_t tablesize
)
687 return hash_symbol (m
, tablesize
);
691 hash_semantic_type_hasher (void const *m
, size_t tablesize
)
693 return hash_semantic_type (m
, tablesize
);
696 /*-------------------------------.
697 | Create the symbol hash table. |
698 `-------------------------------*/
703 symbol_table
= hash_initialize (HT_INITIAL_CAPACITY
,
706 hash_symbol_comparator
,
708 semantic_type_table
= hash_initialize (HT_INITIAL_CAPACITY
,
710 hash_semantic_type_hasher
,
711 hash_semantic_type_comparator
,
716 /*----------------------------------------------------------------.
717 | Find the symbol named KEY, and return it. If it does not exist |
719 `----------------------------------------------------------------*/
722 symbol_from_uniqstr (const uniqstr key
, location loc
)
728 entry
= hash_lookup (symbol_table
, &probe
);
732 /* First insertion in the hash. */
733 entry
= symbol_new (key
, loc
);
734 if (!hash_insert (symbol_table
, entry
))
741 /*-----------------------------------------------------------------------.
742 | Find the semantic type named KEY, and return it. If it does not exist |
744 `-----------------------------------------------------------------------*/
747 semantic_type_from_uniqstr (const uniqstr key
)
750 semantic_type
*entry
;
753 entry
= hash_lookup (semantic_type_table
, &probe
);
757 /* First insertion in the hash. */
758 entry
= semantic_type_new (key
);
759 if (!hash_insert (semantic_type_table
, entry
))
766 /*----------------------------------------------------------------.
767 | Find the symbol named KEY, and return it. If it does not exist |
769 `----------------------------------------------------------------*/
772 symbol_get (const char *key
, location loc
)
774 return symbol_from_uniqstr (uniqstr_new (key
), loc
);
778 /*-----------------------------------------------------------------------.
779 | Find the semantic type named KEY, and return it. If it does not exist |
781 `-----------------------------------------------------------------------*/
784 semantic_type_get (const char *key
)
786 return semantic_type_from_uniqstr (uniqstr_new (key
));
790 /*------------------------------------------------------------------.
791 | Generate a dummy nonterminal, whose name cannot conflict with the |
793 `------------------------------------------------------------------*/
796 dummy_symbol_get (location loc
)
798 /* Incremented for each generated symbol. */
799 static int dummy_count
= 0;
800 static char buf
[256];
804 sprintf (buf
, "$@%d", ++dummy_count
);
805 sym
= symbol_get (buf
, loc
);
806 sym
->class = nterm_sym
;
807 sym
->number
= nvars
++;
812 symbol_is_dummy (const symbol
*sym
)
814 return sym
->tag
[0] == '@' || (sym
->tag
[0] == '$' && sym
->tag
[1] == '@');
817 /*-------------------.
818 | Free the symbols. |
819 `-------------------*/
824 hash_free (symbol_table
);
825 hash_free (semantic_type_table
);
830 /*---------------------------------------------------------------.
831 | Look for undefined symbols, report an error, and consider them |
833 `---------------------------------------------------------------*/
836 symbols_do (Hash_processor processor
, void *processor_data
)
838 hash_do_for_each (symbol_table
, processor
, processor_data
);
842 /*--------------------------------------------------------------.
843 | Check that all the symbols are defined. Report any undefined |
844 | symbols and consider them nonterminals. |
845 `--------------------------------------------------------------*/
848 symbols_check_defined (void)
850 symbols_do (symbol_check_defined_processor
, NULL
);
853 /*------------------------------------------------------------------.
854 | Set TOKEN_TRANSLATIONS. Check that no two symbols share the same |
856 `------------------------------------------------------------------*/
859 symbols_token_translations_init (void)
861 bool num_256_available_p
= true;
864 /* Find the highest user token number, and whether 256, the POSIX
865 preferred user token number for the error token, is used. */
866 max_user_token_number
= 0;
867 for (i
= 0; i
< ntokens
; ++i
)
869 symbol
*this = symbols
[i
];
870 if (this->user_token_number
!= USER_NUMBER_UNDEFINED
)
872 if (this->user_token_number
> max_user_token_number
)
873 max_user_token_number
= this->user_token_number
;
874 if (this->user_token_number
== 256)
875 num_256_available_p
= false;
879 /* If 256 is not used, assign it to error, to follow POSIX. */
880 if (num_256_available_p
881 && errtoken
->user_token_number
== USER_NUMBER_UNDEFINED
)
882 errtoken
->user_token_number
= 256;
884 /* Set the missing user numbers. */
885 if (max_user_token_number
< 256)
886 max_user_token_number
= 256;
888 for (i
= 0; i
< ntokens
; ++i
)
890 symbol
*this = symbols
[i
];
891 if (this->user_token_number
== USER_NUMBER_UNDEFINED
)
892 this->user_token_number
= ++max_user_token_number
;
893 if (this->user_token_number
> max_user_token_number
)
894 max_user_token_number
= this->user_token_number
;
897 token_translations
= xnmalloc (max_user_token_number
+ 1,
898 sizeof *token_translations
);
900 /* Initialize all entries for literal tokens to the internal token
901 number for $undefined, which represents all invalid inputs. */
902 for (i
= 0; i
< max_user_token_number
+ 1; i
++)
903 token_translations
[i
] = undeftoken
->number
;
904 symbols_do (symbol_translation_processor
, NULL
);
908 /*----------------------------------------------------------------.
909 | Assign symbol numbers, and write definition of token names into |
910 | FDEFINES. Set up vectors SYMBOL_TABLE, TAGS of symbols. |
911 `----------------------------------------------------------------*/
916 symbols_do (symbol_check_alias_consistency_processor
, NULL
);
918 symbols
= xcalloc (nsyms
, sizeof *symbols
);
919 symbols_do (symbol_pack_processor
, NULL
);
921 /* Aliases leave empty slots in symbols, so remove them. */
925 int nsyms_old
= nsyms
;
926 for (writei
= 0, readi
= 0; readi
< nsyms_old
; readi
+= 1)
928 if (symbols
[readi
] == NULL
)
935 symbols
[writei
] = symbols
[readi
];
936 symbols
[writei
]->number
= writei
;
937 if (symbols
[writei
]->alias
)
938 symbols
[writei
]->alias
->number
= writei
;
943 symbols
= xnrealloc (symbols
, nsyms
, sizeof *symbols
);
945 symbols_token_translations_init ();
947 if (startsymbol
->class == unknown_sym
)
948 fatal_at (startsymbol_location
,
949 _("the start symbol %s is undefined"),
951 else if (startsymbol
->class == token_sym
)
952 fatal_at (startsymbol_location
,
953 _("the start symbol %s is a token"),
958 /*--------------------------------------------------.
959 | Set default tagged/tagless %destructor/%printer. |
960 `--------------------------------------------------*/
963 default_tagged_destructor_set (code_props
const *destructor
)
965 if (default_tagged_destructor
.code
)
967 complain_at (destructor
->location
,
968 _("redeclaration for default tagged %%destructor"));
969 complain_at (default_tagged_destructor
.location
,
970 _("previous declaration"));
972 default_tagged_destructor
= *destructor
;
976 default_tagless_destructor_set (code_props
const *destructor
)
978 if (default_tagless_destructor
.code
)
980 complain_at (destructor
->location
,
981 _("redeclaration for default tagless %%destructor"));
982 complain_at (default_tagless_destructor
.location
,
983 _("previous declaration"));
985 default_tagless_destructor
= *destructor
;
989 default_tagged_printer_set (code_props
const *printer
)
991 if (default_tagged_printer
.code
)
993 complain_at (printer
->location
,
994 _("redeclaration for default tagged %%printer"));
995 complain_at (default_tagged_printer
.location
,
996 _("previous declaration"));
998 default_tagged_printer
= *printer
;
1002 default_tagless_printer_set (code_props
const *printer
)
1004 if (default_tagless_printer
.code
)
1006 complain_at (printer
->location
,
1007 _("redeclaration for default tagless %%printer"));
1008 complain_at (default_tagless_printer
.location
,
1009 _("previous declaration"));
1011 default_tagless_printer
= *printer
;