]> git.saurik.com Git - bison.git/blobdiff - doc/bison.texinfo
Support a file name argument to %defines. Deprecate `=' in
[bison.git] / doc / bison.texinfo
index 8c382520b155de510b49b19c9b10793da8f62b38..6183793b6231bed59e16e7e4af7570ac7a80434a 100644 (file)
@@ -4237,7 +4237,7 @@ For instance, if your locations use a file name, you may use
 @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,
@@ -4271,7 +4271,7 @@ grammar symbol that has that semantic type tag unless that symbol has its own
 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
@@ -4279,7 +4279,7 @@ 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
 
@@ -4300,7 +4300,7 @@ For example:
 %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
@@ -4339,7 +4339,7 @@ not reference @code{$$} in the mid-rule's action or @code{$@var{n}} (where
 @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
@@ -4598,12 +4598,16 @@ header also contains their code.
 @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
@@ -4616,14 +4620,14 @@ grammar does not use it, using @samp{%locations} allows for more
 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}.
@@ -4656,7 +4660,7 @@ associate errors with the parser file, treating it an independent source
 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
 
@@ -7265,7 +7269,7 @@ Pretend that @code{%locations} was specified.  @xref{Decl Summary}.
 
 @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
@@ -8572,7 +8576,7 @@ Used to define a default tagged @code{%destructor} or default tagged
 @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}.
@@ -8653,6 +8657,11 @@ Bison declaration to create a header file meant for the scanner.
 @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}.
@@ -8685,7 +8694,7 @@ Bison declaration to request verbose, specific error message strings
 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
@@ -8717,7 +8726,7 @@ function is applied to the two semantic values to get a single result.
 @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
 
@@ -8739,7 +8748,7 @@ Bison declaration to assign nonassociativity to token(s).
 @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