* 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.
This commit is contained in:
Akim Demaille
2005-07-12 15:58:49 +00:00
parent 82b248ada6
commit 22dda0f004
5 changed files with 17 additions and 6 deletions

View File

@@ -1,3 +1,10 @@
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.

View File

@@ -49,10 +49,14 @@ symbol_list_new (symbol *sym, location loc)
`------------------*/
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);
}
}

View File

@@ -45,7 +45,7 @@ typedef struct symbol_list
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,

View File

@@ -83,7 +83,7 @@ symbol_new (uniqstr tag, location loc)
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);

View File

@@ -92,7 +92,7 @@ struct symbol
#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);