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

Diff of /bison/src/symtab.c

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

revision 1.31 by akim, Sat Jun 15 18:21:46 2002 UTC revision 1.32 by akim, Sat Jun 15 18:23:12 2002 UTC
# Line 20  Line 20 
20    
21    
22  #include "system.h"  #include "system.h"
23    #include "quotearg.h"
24  #include "hash.h"  #include "hash.h"
25  #include "complain.h"  #include "complain.h"
26  #include "symtab.h"  #include "symtab.h"
# Line 60  symbol_new (const char *tag, location_t Line 61  symbol_new (const char *tag, location_t
61  }  }
62    
63    
64    /*-----------------------------------------------------------------.
65    | Return the tag of this SYMBOL in a printable form.  Warning: use |
66    | the first QUOTEARG slot: 0.                                      |
67    `-----------------------------------------------------------------*/
68    
69    const char *
70    symbol_tag_get (symbol_t *symbol)
71    {
72      return quotearg_style (escape_quoting_style, symbol->tag);
73    }
74    
75    
76    /*------------------------------------------------------------.
77    | Return the tag of this SYMBOL in a printable form.  Use the |
78    | QUOTEARG slot number N.                                     |
79    `------------------------------------------------------------*/
80    
81    const char *
82    symbol_tag_get_n (symbol_t *symbol, int n)
83    {
84      return quotearg_n_style (n, escape_quoting_style, symbol->tag);
85    }
86    
87    
88    /*-------------------------------.
89    | Print the tag of this SYMBOL.  |
90    `-------------------------------*/
91    
92    void
93    symbol_tag_print (symbol_t *symbol, FILE *out)
94    {
95      fputs (symbol_tag_get (symbol), out);
96    }
97    
98    
99  /*------------------------------------------------------------------.  /*------------------------------------------------------------------.
100  | Set the TYPE_NAME associated to SYMBOL.  Does nothing if passed 0 |  | Set the TYPE_NAME associated to SYMBOL.  Does nothing if passed 0 |
101  | as TYPE_NAME.                                                     |  | as TYPE_NAME.                                                     |

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

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