+#define NUMBER_UNDEFINED (-1)
+
+/** Fetch (or create) the symbol associated to KEY. */
+symbol *symbol_from_uniqstr (const uniqstr key, location loc);
+
+/** Fetch (or create) the symbol associated to KEY. */
+symbol *symbol_get (const char *key, location loc);
+
+/** Generate a dummy nonterminal.
+
+ Its name cannot conflict with the user's names. */
+symbol *dummy_symbol_get (location loc);
+
+
+/*--------------------.
+| Methods on symbol. |
+`--------------------*/
+
+/** Print a symbol (for debugging). */
+void symbol_print (symbol *s, FILE *f);
+
+/** Is this a dummy nonterminal? */
+bool symbol_is_dummy (const symbol *sym);
+
+/** Return the name of the symbol that can be used as an identifier.
+ ** Consider the alias if needed.
+ ** Return 0 if there is none (e.g., the symbol is only defined as
+ ** a string). */
+uniqstr symbol_id_get (symbol const *sym);
+
+/** Declare the new symbol \c sym. Make it an alias of \c symval. */
+void symbol_make_alias (symbol *sym, symbol *symval, location loc);
+
+/** Set the \c type_name associated with \c sym.
+
+ 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);
+
+/** Get the computed \c \%destructor for \c sym, which was initialized with
+ \c code_props_none_init if there's no \c \%destructor. */
+code_props const *symbol_destructor_get (symbol const *sym);
+
+/** Set the \c printer associated with \c sym. */
+void symbol_printer_set (symbol *sym, code_props const *printer);
+
+/** Get the computed \c \%printer for \c sym, which was initialized with
+ \c code_props_none_init if there's no \c \%printer. */
+code_props const *symbol_printer_get (symbol const *sym);
+
+/* Set the \c precedence associated with \c sym.
+
+ Ensure that \a symbol is a terminal.
+ Do nothing if invoked with \c undef_assoc as \c assoc. */
+void symbol_precedence_set (symbol *sym, int prec, assoc a, location loc);
+
+/** Set the \c class associated with \c sym. */
+void symbol_class_set (symbol *sym, symbol_class class, location loc,
+ bool declaring);
+
+/** Set the \c user_token_number associated with \c sym. */
+void symbol_user_token_number_set (symbol *sym, int user_number, location loc);
+
+
+
+/*------------------.
+| Special symbols. |
+`------------------*/
+
+/** The error token. */
+extern symbol *errtoken;
+/** The token for unknown tokens. */
+extern symbol *undeftoken;
+/** The end of input token. */
+extern symbol *endtoken;
+/** The genuine start symbol.
+
+ $accept: start-symbol $end */
+extern symbol *accept;