]> git.saurik.com Git - bison.git/blobdiff - src/symtab.h
Regenerate.
[bison.git] / src / symtab.h
index 6433efcd527a7058df7910e5e1b18cd0c1018b69..0f852b7aa7dd9bb22d9aec905fa817c224de4d46 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions for symtab.c and callers, part of Bison.
 
 /* Definitions for symtab.c and callers, part of Bison.
 
-   Copyright (C) 1984, 1989, 1992, 2000, 2001, 2002, 2004
+   Copyright (C) 1984, 1989, 1992, 2000, 2001, 2002, 2004, 2005, 2006
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
@@ -17,8 +17,8 @@
 
    You should have received a copy of the GNU General Public License
    along with Bison; see the file COPYING.  If not, write to
 
    You should have received a copy of the GNU General Public License
    along with Bison; see the file COPYING.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #ifndef SYMTAB_H_
 # define SYMTAB_H_
 
 #ifndef SYMTAB_H_
 # define SYMTAB_H_
@@ -60,10 +60,12 @@ struct symbol
   uniqstr type_name;
   location type_location;
 
   uniqstr type_name;
   location type_location;
 
-  char *destructor;
+  /* Does not own the memory. */
+  const char *destructor;
   location destructor_location;
 
   location destructor_location;
 
-  char *printer;
+  /* Does not own the memory. */
+  const char *printer;
   location printer_location;
 
   symbol_number number;
   location printer_location;
 
   symbol_number number;
@@ -77,6 +79,7 @@ struct symbol
      identifier-symbol pair for an alias.  */
   symbol *alias;
   symbol_class class;
      identifier-symbol pair for an alias.  */
   symbol *alias;
   symbol_class class;
+  bool declared;
 };
 
 /* Undefined user number.  */
 };
 
 /* Undefined user number.  */
@@ -91,6 +94,8 @@ struct symbol
 /* Undefined internal token number.  */
 #define NUMBER_UNDEFINED (-1)
 
 /* Undefined internal token number.  */
 #define NUMBER_UNDEFINED (-1)
 
+/* Print a symbol (for debugging). */
+void symbol_print (symbol *s, FILE *f);
 
 /* Fetch (or create) the symbol associated to KEY.  */
 symbol *symbol_get (const char *key, location loc);
 
 /* Fetch (or create) the symbol associated to KEY.  */
 symbol *symbol_get (const char *key, location loc);
@@ -107,17 +112,18 @@ void symbol_make_alias (symbol *sym, symbol *symval, location loc);
 void symbol_type_set (symbol *sym, uniqstr type_name, location loc);
 
 /* Set the DESTRUCTOR associated with SYM.  */
 void symbol_type_set (symbol *sym, uniqstr type_name, location loc);
 
 /* Set the DESTRUCTOR associated with SYM.  */
-void symbol_destructor_set (symbol *sym, char *destructor, location loc);
+void symbol_destructor_set (symbol *sym, const char *destructor, location loc);
 
 /* Set the PRINTER associated with SYM.  */
 
 /* Set the PRINTER associated with SYM.  */
-void symbol_printer_set (symbol *sym, char *printer, location loc);
+void symbol_printer_set (symbol *sym, const char *printer, location loc);
 
 /* Set the PRECEDENCE associated with SYM.  Ensure that SYMBOL is a
    terminal.  Do nothing if invoked with UNDEF_ASSOC as ASSOC.  */
 void symbol_precedence_set (symbol *sym, int prec, assoc a, location loc);
 
 /* Set the CLASS associated with SYM.  */
 
 /* Set the PRECEDENCE associated with SYM.  Ensure that SYMBOL is a
    terminal.  Do nothing if invoked with UNDEF_ASSOC as ASSOC.  */
 void symbol_precedence_set (symbol *sym, int prec, assoc a, location loc);
 
 /* Set the CLASS associated with SYM.  */
-void symbol_class_set (symbol *sym, symbol_class class, location loc);
+void symbol_class_set (symbol *sym, symbol_class class, location loc,
+                      bool declaring);
 
 /* Set the USER_TOKEN_NUMBER associated with SYM.  */
 void symbol_user_token_number_set (symbol *sym, int user_number, location loc);
 
 /* Set the USER_TOKEN_NUMBER associated with SYM.  */
 void symbol_user_token_number_set (symbol *sym, int user_number, location loc);