@cindex freeing discarded symbols
@findex %destructor
@findex <*>
-@findex <!>
+@findex <>
During error recovery (@pxref{Error Recovery}), symbols already pushed
on the stack and tokens coming from the rest of the file are discarded
until the parser falls on its feet. If the parser runs out of memory,
per-symbol @code{%destructor}.
Finally, you can define two different kinds of default @code{%destructor}s.
-You can place each of @code{<*>} and @code{<!>} in the @var{symbols} list of
+You can place each of @code{<*>} and @code{<>} in the @var{symbols} list of
exactly one @code{%destructor} declaration in your grammar file.
The parser will invoke the @var{code} associated with one of these whenever it
discards any user-defined grammar symbol that has no per-symbol and no per-type
The parser uses the @var{code} for @code{<*>} in the case of such a grammar
symbol for which you have formally declared a semantic type tag (@code{%type}
counts as such a declaration, but @code{$<tag>$} does not).
-The parser uses the @var{code} for @code{<!>} in the case of such a grammar
+The parser uses the @var{code} for @code{<>} in the case of such a grammar
symbol that has no declared semantic type tag.
@end deffn
%destructor @{ @} <character>
%destructor @{ free ($$); @} <*>
%destructor @{ free ($$); printf ("%d", @@$.first_line); @} STRING1 string1
-%destructor @{ printf ("Discarding tagless symbol.\n"); @} <!>
+%destructor @{ printf ("Discarding tagless symbol.\n"); @} <>
@end smallexample
@noindent
@var{n} is the RHS symbol position of the mid-rule) in any later action in that
rule.
However, if you do reference either, the Bison-generated parser will invoke the
-@code{<!>} @code{%destructor} whenever it discards the mid-rule symbol.
+@code{<>} @code{%destructor} whenever it discards the mid-rule symbol.
@ignore
@noindent
@xref{Table of Symbols, ,%requires}.
@end deffn
+@deffn {Directive} %defines @var{defines-file}
+Same as above, but save in the file @var{defines-file}.
+@end deffn
+
@deffn {Directive} %destructor
Specify how the parser should reclaim the memory associated to
discarded symbols. @xref{Destructor Decl, , Freeing Discarded Symbols}.
@end deffn
-@deffn {Directive} %file-prefix="@var{prefix}"
+@deffn {Directive} %file-prefix "@var{prefix}"
Specify a prefix to use for all Bison output file names. The names are
chosen as if the input file were named @file{@var{prefix}.y}.
@end deffn
accurate syntax error messages.
@end deffn
-@deffn {Directive} %name-prefix="@var{prefix}"
+@deffn {Directive} %name-prefix "@var{prefix}"
Rename the external symbols used in the parser so that they start with
@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
in C parsers
is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
@code{yylval}, @code{yychar}, @code{yydebug}, and
(if locations are used) @code{yylloc}. For example, if you use
-@samp{%name-prefix="c_"}, the names become @code{c_parse}, @code{c_lex},
+@samp{%name-prefix "c_"}, the names become @code{c_parse}, @code{c_lex},
and so on. In C++ parsers, it is only the surrounding namespace which is
named @var{prefix} instead of @samp{yy}.
@xref{Multiple Parsers, ,Multiple Parsers in the Same Program}.
file in its own right.
@end deffn
-@deffn {Directive} %output="@var{file}"
+@deffn {Directive} %output "@var{file}"
Specify @var{file} for the parser file.
@end deffn
@item -p @var{prefix}
@itemx --name-prefix=@var{prefix}
-Pretend that @code{%name-prefix="@var{prefix}"} was specified.
+Pretend that @code{%name-prefix "@var{prefix}"} was specified.
@xref{Decl Summary}.
@item -l
@xref{Destructor Decl, , Freeing Discarded Symbols}.
@end deffn
-@deffn {Directive} <!>
+@deffn {Directive} <>
Used to define a default tagless @code{%destructor} or default tagless
@code{%printer}.
@xref{Destructor Decl, , Freeing Discarded Symbols}.
@xref{Decl Summary}.
@end deffn
+@deffn {Directive} %defines @var{defines-file}
+Same as above, but save in the file @var{defines-file}.
+@xref{Decl Summary}.
+@end deffn
+
@deffn {Directive} %destructor
Specify how the parser should reclaim the memory associated to
discarded symbols. @xref{Destructor Decl, , Freeing Discarded Symbols}.
when @code{yyerror} is called.
@end deffn
-@deffn {Directive} %file-prefix="@var{prefix}"
+@deffn {Directive} %file-prefix "@var{prefix}"
Bison declaration to set the prefix of the output files. @xref{Decl
Summary}.
@end deffn
@xref{GLR Parsers, ,Writing @acronym{GLR} Parsers}.
@end deffn
-@deffn {Directive} %name-prefix="@var{prefix}"
+@deffn {Directive} %name-prefix "@var{prefix}"
Bison declaration to rename the external symbols. @xref{Decl Summary}.
@end deffn
@xref{Precedence Decl, ,Operator Precedence}.
@end deffn
-@deffn {Directive} %output="@var{file}"
+@deffn {Directive} %output "@var{file}"
Bison declaration to set the name of the parser file. @xref{Decl
Summary}.
@end deffn