for consistency with the rest of the code.
* src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
Add separators.
+2005-07-12 Akim Demaille <akim@epita.fr>
+
+ * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
+ for consistency with the rest of the code.
+ * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
+ Add separators.
+
2005-07-12 Akim Demaille <akim@epita.fr>
* src/parse-gram.y: Use %printer instead of YYPRINT.
`------------------*/
void
-symbol_list_print (FILE *f, symbol_list *l)
+symbol_list_print (symbol_list *l, FILE *f)
{
- for (/* Nothing. */; l; l = l->next)
- symbol_print (f, l->sym);
+ for (/* Nothing. */; l && l->sym; l = l->next)
+ {
+ symbol_print (l->sym, f);
+ if (l && l->sym)
+ fputc (' ', f);
+ }
}
symbol_list *symbol_list_new (symbol *sym, location loc);
/* Print it. */
-void symbol_list_print (FILE *f, symbol_list *l);
+void symbol_list_print (symbol_list *l, FILE *f);
/* Prepend SYM at LOC to the LIST. */
symbol_list *symbol_list_prepend (symbol_list *list,
fprintf (stderr, " %s { %s }", #Attr, s->Attr)
void
-symbol_print (FILE *f, symbol *s)
+symbol_print (symbol *s, FILE *f)
{
fprintf (stderr, "\"%s\"", s->tag);
SYMBOL_ATTR_PRINT (type_name);
#define NUMBER_UNDEFINED (-1)
/* Print a symbol (for debugging). */
-void symbol_print (FILE *f, symbol *s);
+void symbol_print (symbol *s, FILE *f);
/* Fetch (or create) the symbol associated to KEY. */
symbol *symbol_get (const char *key, location loc);