X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/07c0db18b4a795a3a35a4d98b3d001bfc7d4e1c1..43ca804096bad13b12d0933d14499c142f451af9:/src/symtab.h diff --git a/src/symtab.h b/src/symtab.h index 882da710..7d8cf982 100644 --- a/src/symtab.h +++ b/src/symtab.h @@ -1,7 +1,7 @@ /* Definitions for symtab.c and callers, part of Bison. - Copyright (C) 1984, 1989, 1992, 2000, 2001, 2002, 2004, 2005, 2006, - 2007, 2009 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1992, 2000-2002, 2004-2007, 2009-2012 Free + Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -60,23 +60,30 @@ struct symbol /** The location of its first occurrence. */ location location; - /** Its \c \%type. */ + /** Its \c \%type. + + Beware that this is the type_name as was entered by the user, + including silly things such as "]" if she entered "%token <]> t". + Therefore, when outputting type_name to M4, be sure to escape it + into "@}". See quoted_output for instance. */ uniqstr type_name; + /** Its \c \%type's location. */ location type_location; /** Any \c \%destructor declared specifically for this symbol. - Access this field only through symbol's interface functions. For - example, if symbol::destructor = NULL, a default \c \%destructor - or a per-type \c \%destructor might be appropriate, and - \c symbol_destructor_get will compute the correct one. */ + Access this field only through symbol's interface + functions. For example, if symbol::destructor = NULL, a + default \c \%destructor or a per-type \c \%destructor might be + appropriate, and \c symbol_destructor_get will compute the + correct one. */ code_props destructor; /** Any \c \%printer declared specifically for this symbol. - Access this field only through symbol's interface functions. - \sa symbol::destructor */ + Access this field only through symbol's interface functions. + \sa symbol::destructor */ code_props printer; symbol_number number; @@ -133,9 +140,6 @@ void symbol_make_alias (symbol *sym, symbol *str, location loc); Do nothing if passed 0 as \c type_name. */ void symbol_type_set (symbol *sym, uniqstr type_name, location loc); -/** Get the \c class string associated with \c sym. */ -const char *symbol_class_get_string (symbol *sym); - /** Set the \c destructor associated with \c sym. */ void symbol_destructor_set (symbol *sym, code_props const *destructor);