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

Diff of /bison/src/symtab.h

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

revision 1.45 by eggert, Sat Oct 5 05:47:14 2002 UTC revision 1.46 by eggert, Mon Oct 21 05:30:50 2002 UTC
# Line 84  struct symbol_s Line 84  struct symbol_s
84    
85    
86  /* Fetch (or create) the symbol associated to KEY.  */  /* Fetch (or create) the symbol associated to KEY.  */
87  symbol_t *symbol_get PARAMS ((const char *key, location_t location));  symbol_t *symbol_get (const char *key, location_t location);
88    
89  /* Generate a dummy nonterminal, whose name cannot conflict with the  /* Generate a dummy nonterminal, whose name cannot conflict with the
90     user's names.  */     user's names.  */
91  symbol_t *dummy_symbol_get PARAMS ((location_t location));  symbol_t *dummy_symbol_get (location_t location);
92    
93  /* Declare the new SYMBOL.  Make it an alias of SYMVAL.  */  /* Declare the new SYMBOL.  Make it an alias of SYMVAL.  */
94  void symbol_make_alias PARAMS ((symbol_t *symbol, symbol_t *symval,  void symbol_make_alias (symbol_t *symbol, symbol_t *symval,
95                                  location_t location));                          location_t location);
96    
97  /* Set the TYPE_NAME associated to SYMBOL. Does nothing if passed 0 as  /* Set the TYPE_NAME associated to SYMBOL. Does nothing if passed 0 as
98     TYPE_NAME.  */     TYPE_NAME.  */
99  void symbol_type_set PARAMS ((symbol_t *symbol,  void symbol_type_set (symbol_t *symbol,
100                                char *type_name, location_t location));                        char *type_name, location_t location);
101    
102  /* Set the DESTRUCTOR associated to SYMBOL.  */  /* Set the DESTRUCTOR associated to SYMBOL.  */
103  void symbol_destructor_set PARAMS ((symbol_t *symbol,  void symbol_destructor_set (symbol_t *symbol,
104                                      char *destructor, location_t location));                              char *destructor, location_t location);
105    
106  /* Set the PRINTER associated to SYMBOL.  */  /* Set the PRINTER associated to SYMBOL.  */
107  void symbol_printer_set PARAMS ((symbol_t *symbol,  void symbol_printer_set (symbol_t *symbol,
108                                   char *printer, location_t location));                           char *printer, location_t location);
109    
110  /* Set the PRECEDENCE associated to SYMBOL.  Ensures that SYMBOL is a  /* Set the PRECEDENCE associated to SYMBOL.  Ensures that SYMBOL is a
111     terminal.  Does nothing if invoked with UNDEF_ASSOC as ASSOC.  */     terminal.  Does nothing if invoked with UNDEF_ASSOC as ASSOC.  */
112  void symbol_precedence_set PARAMS ((symbol_t *symbol,  void symbol_precedence_set (symbol_t *symbol,
113                                      int prec, assoc_t assoc,                              int prec, assoc_t assoc, location_t location);
                                     location_t location));  
114    
115  /* Set the CLASS associated to SYMBOL.  */  /* Set the CLASS associated to SYMBOL.  */
116  void symbol_class_set PARAMS ((symbol_t *symbol,  void symbol_class_set (symbol_t *symbol,
117                                 symbol_class class, location_t location));                         symbol_class class, location_t location);
118    
119  /* Set the USER_TOKEN_NUMBER associated to SYMBOL.  */  /* Set the USER_TOKEN_NUMBER associated to SYMBOL.  */
120  void symbol_user_token_number_set PARAMS ((symbol_t *symbol,  void symbol_user_token_number_set (symbol_t *symbol,
121                                             int user_number,                                     int user_number, location_t location);
                                            location_t location));  
122    
123    
124  /* Distinguished symbols.  AXIOM is the real start symbol, that used  /* Distinguished symbols.  AXIOM is the real start symbol, that used
# Line 140  extern location_t startsymbol_location; Line 138  extern location_t startsymbol_location;
138    
139    
140  /* Create the symbol table.  */  /* Create the symbol table.  */
141  void symbols_new PARAMS ((void));  void symbols_new (void);
142    
143  /* A function to apply to each symbol. */  /* A function to apply to each symbol. */
144  typedef bool (*symbol_processor) PARAMS ((symbol_t *));  typedef bool (*symbol_processor) (symbol_t *);
145    
146  /* Apply PROCESSOR to all the symbols.  PROCESSOR must return TRUE: on  /* Apply PROCESSOR to all the symbols.  PROCESSOR must return TRUE: on
147     FALSE, the processing stops.  */     FALSE, the processing stops.  */
148  void symbols_do PARAMS ((symbol_processor processor, void *processor_data));  void symbols_do (symbol_processor processor, void *processor_data);
149    
150  /* Free all the memory allocated for symbols.  */  /* Free all the memory allocated for symbols.  */
151  void symbols_free PARAMS ((void));  void symbols_free (void);
152    
153  /* Check that all the symbols are defined.  Report any undefined  /* Check that all the symbols are defined.  Report any undefined
154     symbols and consider them nonterminals.  */     symbols and consider them nonterminals.  */
155  void symbols_check_defined PARAMS ((void));  void symbols_check_defined (void);
156    
157  /* Perform various sanity checks, assign symbol numbers, and set up  /* Perform various sanity checks, assign symbol numbers, and set up
158     TOKEN_TRANSLATIONS.  */     TOKEN_TRANSLATIONS.  */
159  void symbols_pack PARAMS ((void));  void symbols_pack (void);
160    
161  #endif /* !SYMTAB_H_ */  #endif /* !SYMTAB_H_ */

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

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