doc: type-face fixes

* doc/bison.texi: Use @code for types in function definitions.
This commit is contained in:
Akim Demaille
2019-11-07 07:12:34 +01:00
parent 7bdf7246fb
commit 1650c729d9

View File

@@ -6858,7 +6858,7 @@ write an action which directs @code{yyparse} to return immediately
without reading further. without reading further.
@deftypefun int yyparse (void) @deftypefun int yyparse (@code{void})
The value returned by @code{yyparse} is 0 if parsing was successful (return The value returned by @code{yyparse} is 0 if parsing was successful (return
is due to end-of-input). is due to end-of-input).
@@ -6950,7 +6950,7 @@ function is available if either the @samp{%define api.push-pull push} or
@samp{%define api.push-pull both} declaration is used. @samp{%define api.push-pull both} declaration is used.
@xref{Push Decl, ,A Push Parser}. @xref{Push Decl, ,A Push Parser}.
@deftypefun int yypush_parse (yypstate *@var{yyps}) @deftypefun int yypush_parse (@code{yypstate *}@var{yyps})
The value returned by @code{yypush_parse} is the same as for @code{yyparse} The value returned by @code{yypush_parse} is the same as for @code{yyparse}
with the following exception: it returns @code{YYPUSH_MORE} if more input is with the following exception: it returns @code{YYPUSH_MORE} if more input is
required to finish parsing the grammar. required to finish parsing the grammar.
@@ -6973,7 +6973,7 @@ stream. This function is available if the @samp{%define api.push-pull both}
declaration is used. declaration is used.
@xref{Push Decl, ,A Push Parser}. @xref{Push Decl, ,A Push Parser}.
@deftypefun int yypull_parse (yypstate *@var{yyps}) @deftypefun int yypull_parse (@code{yypstate *}@var{yyps})
The value returned by @code{yypull_parse} is the same as for @code{yyparse}. The value returned by @code{yypull_parse} is the same as for @code{yyparse}.
The parser instance @code{yyps} may be reused for new parses. The parser instance @code{yyps} may be reused for new parses.
@@ -6988,7 +6988,7 @@ This function is available if either the @samp{%define api.push-pull push} or
@samp{%define api.push-pull both} declaration is used. @samp{%define api.push-pull both} declaration is used.
@xref{Push Decl, ,A Push Parser}. @xref{Push Decl, ,A Push Parser}.
@deftypefun {yypstate*} yypstate_new (void) @deftypefun {yypstate*} yypstate_new (@code{void})
The function will return a valid parser instance if there was memory available The function will return a valid parser instance if there was memory available
or 0 if no memory was available. or 0 if no memory was available.
In impure mode, it will also return 0 if a parser instance is currently In impure mode, it will also return 0 if a parser instance is currently
@@ -7004,7 +7004,7 @@ function is available if either the @samp{%define api.push-pull push} or
@samp{%define api.push-pull both} declaration is used. @samp{%define api.push-pull both} declaration is used.
@xref{Push Decl, ,A Push Parser}. @xref{Push Decl, ,A Push Parser}.
@deftypefun void yypstate_delete (yypstate *@var{yyps}) @deftypefun void yypstate_delete (@code{yypstate *}@var{yyps})
This function will reclaim the memory associated with a parser instance. This function will reclaim the memory associated with a parser instance.
After this call, you should no longer attempt to use the parser instance. After this call, you should no longer attempt to use the parser instance.
@end deftypefun @end deftypefun
@@ -11279,8 +11279,8 @@ Build a new parser object. There are no arguments, unless
@samp{%parse-param @{@var{type1} @var{arg1}@}} was used. @samp{%parse-param @{@var{type1} @var{arg1}@}} was used.
@end deftypeop @end deftypeop
@deftypeop {Constructor} {syntax_error} {} syntax_error (const location_type& @var{l}, const std::string& @var{m}) @deftypeop {Constructor} {syntax_error} {} syntax_error (@code{const location_type&} @var{l}, @code{const std::string&} @var{m})
@deftypeopx {Constructor} {syntax_error} {} syntax_error (const std::string& @var{m}) @deftypeopx {Constructor} {syntax_error} {} syntax_error (@code{const std::string&} @var{m})
Instantiate a syntax-error exception. Instantiate a syntax-error exception.
@end deftypeop @end deftypeop
@@ -11300,7 +11300,7 @@ Exception related code in the generated parser is protected by CPP guards
@end deftypemethod @end deftypemethod
@deftypemethod {parser} {std::ostream&} debug_stream () @deftypemethod {parser} {std::ostream&} debug_stream ()
@deftypemethodx {parser} {void} set_debug_stream (std::ostream& @var{o}) @deftypemethodx {parser} {void} set_debug_stream (@code{std::ostream&} @var{o})
Get or set the stream used for tracing the parsing. It defaults to Get or set the stream used for tracing the parsing. It defaults to
@code{std::cerr}. @code{std::cerr}.
@end deftypemethod @end deftypemethod
@@ -11311,8 +11311,8 @@ Get or set the tracing level (an integral). Currently its value is either
0, no trace, or nonzero, full tracing. 0, no trace, or nonzero, full tracing.
@end deftypemethod @end deftypemethod
@deftypemethod {parser} {void} error (const location_type& @var{l}, const std::string& @var{m}) @deftypemethod {parser} {void} error (@code{const location_type&} @var{l}, @code{const std::string&} @var{m})
@deftypemethodx {parser} {void} error (const std::string& @var{m}) @deftypemethodx {parser} {void} error (@code{const std::string&} @var{m})
The definition for this member function must be supplied by the user: the The definition for this member function must be supplied by the user: the
parser uses it to report a parser error occurring at @var{l}, described by parser uses it to report a parser error occurring at @var{l}, described by
@var{m}. If location tracking is not enabled, the second signature is used. @var{m}. If location tracking is not enabled, the second signature is used.
@@ -11407,14 +11407,14 @@ of alternative types such as @samp{$<int>2} or @samp{$<std::string>$}, even
in midrule actions. It is mandatory to use typed midrule actions in midrule actions. It is mandatory to use typed midrule actions
(@pxref{Typed Midrule Actions}). (@pxref{Typed Midrule Actions}).
@deftypemethod {semantic_type} {T&} emplace<T> () @deftypemethod {semantic_type} {T&} {emplace<T>} ()
@deftypemethodx {semantic_type} {T&} emplace<T> (const T& @var{t}) @deftypemethodx {semantic_type} {T&} {emplace<T>} (@code{const T&} @var{t})
Available in C++98/C++03 only. Default construct/copy-construct from Available in C++98/C++03 only. Default construct/copy-construct from
@var{t}. Return a reference to where the actual value may be stored. @var{t}. Return a reference to where the actual value may be stored.
Requires that the variant was not initialized yet. Requires that the variant was not initialized yet.
@end deftypemethod @end deftypemethod
@deftypemethod {semantic_type} {T&} emplace<T, U> (U&&... @var{u}) @deftypemethod {semantic_type} {T&} {emplace<T, U>} (@code{U&&...} @var{u})
Available in C++11 and later only. Build a variant of type @code{T} from Available in C++11 and later only. Build a variant of type @code{T} from
the variadic forwarding references @var{u...}. the variadic forwarding references @var{u...}.
@end deftypemethod @end deftypemethod
@@ -11481,13 +11481,13 @@ generated, and the user defined type will be used.
The type used to store line and column numbers. Defined as @code{int}. The type used to store line and column numbers. Defined as @code{int}.
@end defcv @end defcv
@deftypeop {Constructor} {position} {} position (std::string* @var{file} = nullptr, counter_type @var{line} = 1, counter_type @var{col} = 1) @deftypeop {Constructor} {position} {} position (@code{std::string*} @var{file} = nullptr, @code{counter_type} @var{line} = 1, @code{counter_type} @var{col} = 1)
Create a @code{position} denoting a given point. Note that @code{file} is Create a @code{position} denoting a given point. Note that @code{file} is
not reclaimed when the @code{position} is destroyed: memory managed must be not reclaimed when the @code{position} is destroyed: memory managed must be
handled elsewhere. handled elsewhere.
@end deftypeop @end deftypeop
@deftypemethod {position} {void} initialize (std::string* @var{file} = nullptr, counter_type @var{line} = 1, counter_type @var{col} = 1) @deftypemethod {position} {void} initialize (@code{std::string*} @var{file} = nullptr, @code{counter_type} @var{line} = 1, @code{counter_type} @var{col} = 1)
Reset the position to the given values. Reset the position to the given values.
@end deftypemethod @end deftypemethod
@@ -11502,7 +11502,7 @@ change it to @samp{@var{type}*} using @samp{%define filename_type
The line, starting at 1. The line, starting at 1.
@end deftypeivar @end deftypeivar
@deftypemethod {position} {void} lines (counter_type @var{height} = 1) @deftypemethod {position} {void} lines (@code{counter_type} @var{height} = 1)
If @var{height} is not null, advance by @var{height} lines, resetting the If @var{height} is not null, advance by @var{height} lines, resetting the
column number. The resulting line number cannot be less than 1. column number. The resulting line number cannot be less than 1.
@end deftypemethod @end deftypemethod
@@ -11511,24 +11511,24 @@ column number. The resulting line number cannot be less than 1.
The column, starting at 1. The column, starting at 1.
@end deftypeivar @end deftypeivar
@deftypemethod {position} {void} columns (counter_type @var{width} = 1) @deftypemethod {position} {void} columns (@code{counter_type} @var{width} = 1)
Advance by @var{width} columns, without changing the line number. The Advance by @var{width} columns, without changing the line number. The
resulting column number cannot be less than 1. resulting column number cannot be less than 1.
@end deftypemethod @end deftypemethod
@deftypemethod {position} {position&} operator+= (counter_type @var{width}) @deftypemethod {position} {position&} operator+= (@code{counter_type} @var{width})
@deftypemethodx {position} {position} operator+ (counter_type @var{width}) @deftypemethodx {position} {position} operator+ (@code{counter_type} @var{width})
@deftypemethodx {position} {position&} operator-= (counter_type @var{width}) @deftypemethodx {position} {position&} operator-= (@code{counter_type} @var{width})
@deftypemethodx {position} {position} operator- (counter_type @var{width}) @deftypemethodx {position} {position} operator- (@code{counter_type} @var{width})
Various forms of syntactic sugar for @code{columns}. Various forms of syntactic sugar for @code{columns}.
@end deftypemethod @end deftypemethod
@deftypemethod {position} {bool} operator== (const position& @var{that}) @deftypemethod {position} {bool} operator== (@code{const position&} @var{that})
@deftypemethodx {position} {bool} operator!= (const position& @var{that}) @deftypemethodx {position} {bool} operator!= (@code{const position&} @var{that})
Whether @code{*this} and @code{that} denote equal/different positions. Whether @code{*this} and @code{that} denote equal/different positions.
@end deftypemethod @end deftypemethod
@deftypefun {std::ostream&} operator<< (std::ostream& @var{o}, const position& @var{p}) @deftypefun {std::ostream&} operator<< (@code{std::ostream&} @var{o}, @code{const position&} @var{p})
Report @var{p} on @var{o} like this: Report @var{p} on @var{o} like this:
@samp{@var{file}:@var{line}.@var{column}}, or @samp{@var{file}:@var{line}.@var{column}}, or
@samp{@var{line}.@var{column}} if @var{file} is null. @samp{@var{line}.@var{column}} if @var{file} is null.
@@ -11537,16 +11537,16 @@ Report @var{p} on @var{o} like this:
@node C++ location @node C++ location
@subsubsection C++ @code{location} @subsubsection C++ @code{location}
@deftypeop {Constructor} {location} {} location (const position& @var{begin}, const position& @var{end}) @deftypeop {Constructor} {location} {} location (@code{const position&} @var{begin}, @code{const position&} @var{end})
Create a @code{Location} from the endpoints of the range. Create a @code{Location} from the endpoints of the range.
@end deftypeop @end deftypeop
@deftypeop {Constructor} {location} {} location (const position& @var{pos} = position()) @deftypeop {Constructor} {location} {} location (@code{const position&} @var{pos} = position())
@deftypeopx {Constructor} {location} {} location (std::string* @var{file}, counter_type @var{line}, counter_type @var{col}) @deftypeopx {Constructor} {location} {} location (@code{std::string*} @var{file}, @code{counter_type} @var{line}, @code{counter_type} @var{col})
Create a @code{Location} denoting an empty range located at a given point. Create a @code{Location} denoting an empty range located at a given point.
@end deftypeop @end deftypeop
@deftypemethod {location} {void} initialize (std::string* @var{file} = nullptr, counter_type @var{line} = 1, counter_type @var{col} = 1) @deftypemethod {location} {void} initialize (@code{std::string*} @var{file} = nullptr, @code{counter_type} @var{line} = 1, @code{counter_type} @var{col} = 1)
Reset the location to an empty range at the given values. Reset the location to an empty range at the given values.
@end deftypemethod @end deftypemethod
@@ -11555,20 +11555,20 @@ Reset the location to an empty range at the given values.
The first, inclusive, position of the range, and the first beyond. The first, inclusive, position of the range, and the first beyond.
@end deftypeivar @end deftypeivar
@deftypemethod {location} {void} columns (counter_type @var{width} = 1) @deftypemethod {location} {void} columns (@code{counter_type} @var{width} = 1)
@deftypemethodx {location} {void} lines (counter_type @var{height} = 1) @deftypemethodx {location} {void} lines (@code{counter_type} @var{height} = 1)
Forwarded to the @code{end} position. Forwarded to the @code{end} position.
@end deftypemethod @end deftypemethod
@deftypemethod {location} {location} operator+ (counter_type @var{width}) @deftypemethod {location} {location} operator+ (@code{counter_type} @var{width})
@deftypemethodx {location} {location} operator+= (counter_type @var{width}) @deftypemethodx {location} {location} operator+= (@code{counter_type} @var{width})
@deftypemethodx {location} {location} operator- (counter_type @var{width}) @deftypemethodx {location} {location} operator- (@code{counter_type} @var{width})
@deftypemethodx {location} {location} operator-= (counter_type @var{width}) @deftypemethodx {location} {location} operator-= (@code{counter_type} @var{width})
Various forms of syntactic sugar for @code{columns}. Various forms of syntactic sugar for @code{columns}.
@end deftypemethod @end deftypemethod
@deftypemethod {location} {location} operator+ (const location& @var{end}) @deftypemethod {location} {location} operator+ (@code{const location&} @var{end})
@deftypemethodx {location} {location} operator+= (const location& @var{end}) @deftypemethodx {location} {location} operator+= (@code{const location&} @var{end})
Join two locations: starts at the position of the first one, and ends at the Join two locations: starts at the position of the first one, and ends at the
position of the second. position of the second.
@end deftypemethod @end deftypemethod
@@ -11577,13 +11577,13 @@ position of the second.
Move @code{begin} onto @code{end}. Move @code{begin} onto @code{end}.
@end deftypemethod @end deftypemethod
@deftypemethod {location} {bool} operator== (const location& @var{that}) @deftypemethod {location} {bool} operator== (@code{const location&} @var{that})
@deftypemethodx {location} {bool} operator!= (const location& @var{that}) @deftypemethodx {location} {bool} operator!= (@code{const location&} @var{that})
Whether @code{*this} and @code{that} denote equal/different ranges of Whether @code{*this} and @code{that} denote equal/different ranges of
positions. positions.
@end deftypemethod @end deftypemethod
@deftypefun {std::ostream&} operator<< (std::ostream& @var{o}, const location& @var{p}) @deftypefun {std::ostream&} operator<< (@code{std::ostream&} @var{o}, @code{const location&} @var{p})
Report @var{p} on @var{o}, taking care of special cases such as: no Report @var{p} on @var{o}, taking care of special cases such as: no
@code{filename} defined, or equal filename/line or column. @code{filename} defined, or equal filename/line or column.
@end deftypefun @end deftypefun
@@ -11716,8 +11716,8 @@ depends whether you use unions, or variants.
The generated parser expects @code{yylex} to have the following prototype. The generated parser expects @code{yylex} to have the following prototype.
@deftypefun {int} yylex (semantic_type* @var{yylval}, location_type* @var{yylloc}, @var{type1} @var{arg1}, ...) @deftypefun {int} yylex (@code{semantic_type*} @var{yylval}, @code{location_type*} @var{yylloc}, @var{type1} @var{arg1}, @dots{})
@deftypefunx {int} yylex (semantic_type* @var{yylval}, @var{type1} @var{arg1}, ...) @deftypefunx {int} yylex (@code{semantic_type*} @var{yylval}, @var{type1} @var{arg1}, @dots{})
Return the next token. Its type is the return value, its semantic value and Return the next token. Its type is the return value, its semantic value and
location (if enabled) being @var{yylval} and @var{yylloc}. Invocations of location (if enabled) being @var{yylval} and @var{yylloc}. Invocations of
@samp{%lex-param @{@var{type1} @var{arg1}@}} yield additional arguments. @samp{%lex-param @{@var{type1} @var{arg1}@}} yield additional arguments.
@@ -11776,7 +11776,7 @@ api.token.constructor}, the parser defines the type @code{symbol_type}, and
expects @code{yylex} to have the following prototype. expects @code{yylex} to have the following prototype.
@deftypefun {parser::symbol_type} yylex () @deftypefun {parser::symbol_type} yylex ()
@deftypefunx {parser::symbol_type} yylex (@var{type1} @var{arg1}, ...) @deftypefunx {parser::symbol_type} yylex (@var{type1} @var{arg1}, @dots{})
Return a @emph{complete} symbol, aggregating its type (i.e., the traditional Return a @emph{complete} symbol, aggregating its type (i.e., the traditional
value returned by @code{yylex}), its semantic value, and possibly its value returned by @code{yylex}), its semantic value, and possibly its
location. Invocations of @samp{%lex-param @{@var{type1} @var{arg1}@}} yield location. Invocations of @samp{%lex-param @{@var{type1} @var{arg1}@}} yield
@@ -11785,10 +11785,10 @@ additional arguments.
For each token type, Bison generates named constructors as follows. For each token type, Bison generates named constructors as follows.
@deftypeop {Constructor} {parser::symbol_type} {} {symbol_type} (int @var{token}, const @var{value_type}& @var{value}, const location_type& @var{location}) @deftypeop {Constructor} {parser::symbol_type} {} {symbol_type} (@code{int} @var{token}, @code{const @var{value_type}&} @var{value}, @code{const location_type&} @var{location})
@deftypeopx {Constructor} {parser::symbol_type} {} {symbol_type} (int @var{token}, const location_type& @var{location}) @deftypeopx {Constructor} {parser::symbol_type} {} {symbol_type} (@code{int} @var{token}, @code{const location_type&} @var{location})
@deftypeopx {Constructor} {parser::symbol_type} {} {symbol_type} (int @var{token}, const @var{value_type}& @var{value}) @deftypeopx {Constructor} {parser::symbol_type} {} {symbol_type} (@code{int} @var{token}, @code{const @var{value_type}&} @var{value})
@deftypeopx {Constructor} {parser::symbol_type} {} {symbol_type} (int @var{token}) @deftypeopx {Constructor} {parser::symbol_type} {} {symbol_type} (@code{int} @var{token})
Build a complete terminal symbol for the token type @var{token} (including Build a complete terminal symbol for the token type @var{token} (including
the @code{api.token.prefix}), whose semantic value, if it has one, is the @code{api.token.prefix}), whose semantic value, if it has one, is
@var{value} of adequate @var{value_type}. Pass the @var{location} iff @var{value} of adequate @var{value_type}. Pass the @var{location} iff
@@ -11842,9 +11842,9 @@ to the compiler). Bison supports an alternative that guarantees that type
incorrect code will not even compile. Indeed, it generates @emph{named incorrect code will not even compile. Indeed, it generates @emph{named
constructors} as follows. constructors} as follows.
@deftypemethod {parser} {symbol_type} {make_@var{token}} (const @var{value_type}& @var{value}, const location_type& @var{location}) @deftypemethod {parser} {symbol_type} {make_@var{token}} (@code{const @var{value_type}&} @var{value}, @code{const location_type&} @var{location})
@deftypemethodx {parser} {symbol_type} {make_@var{token}} (const location_type& @var{location}) @deftypemethodx {parser} {symbol_type} {make_@var{token}} (@code{const location_type&} @var{location})
@deftypemethodx {parser} {symbol_type} {make_@var{token}} (const @var{value_type}& @var{value}) @deftypemethodx {parser} {symbol_type} {make_@var{token}} (@code{const @var{value_type}&} @var{value})
@deftypemethodx {parser} {symbol_type} {make_@var{token}} () @deftypemethodx {parser} {symbol_type} {make_@var{token}} ()
Build a complete terminal symbol for the token type @var{token} (not Build a complete terminal symbol for the token type @var{token} (not
including the @code{api.token.prefix}), whose semantic value, if it has one, including the @code{api.token.prefix}), whose semantic value, if it has one,
@@ -12607,11 +12607,11 @@ be supplied by the user.
The first, inclusive, position of the range, and the first beyond. The first, inclusive, position of the range, and the first beyond.
@end deftypeivar @end deftypeivar
@deftypeop {Constructor} {Location} {} Location (Position @var{loc}) @deftypeop {Constructor} {Location} {} Location (@code{Position} @var{loc})
Create a @code{Location} denoting an empty range located at a given point. Create a @code{Location} denoting an empty range located at a given point.
@end deftypeop @end deftypeop
@deftypeop {Constructor} {Location} {} Location (Position @var{begin}, Position @var{end}) @deftypeop {Constructor} {Location} {} Location (@code{Position} @var{begin}, @code{Position} @var{end})
Create a @code{Location} from the endpoints of the range. Create a @code{Location} from the endpoints of the range.
@end deftypeop @end deftypeop
@@ -12667,7 +12667,7 @@ body. This is especially useful to initialize superclasses. Use
@samp{%define init_throws} to specify any uncaught exceptions. @samp{%define init_throws} to specify any uncaught exceptions.
@end deftypeop @end deftypeop
@deftypeop {Constructor} {YYParser} {} YYParser (Lexer @var{lexer}, @var{parse_param}, @dots{}) @deftypeop {Constructor} {YYParser} {} YYParser (@code{Lexer} @var{lexer}, @var{parse_param}, @dots{})
Build a new parser object using the specified scanner. There are no Build a new parser object using the specified scanner. There are no
additional parameters unless @code{%param}s and/or @code{%parse-param}s are additional parameters unless @code{%param}s and/or @code{%parse-param}s are
used. used.
@@ -12693,9 +12693,9 @@ available with @samp{%define parse.error verbose}, which also turns on
verbose error messages. verbose error messages.
@end deftypemethod @end deftypemethod
@deftypemethod {YYParser} {void} yyerror (String @var{msg}) @deftypemethod {YYParser} {void} yyerror (@code{String} @var{msg})
@deftypemethodx {YYParser} {void} yyerror (Position @var{pos}, String @var{msg}) @deftypemethodx {YYParser} {void} yyerror (@code{Position} @var{pos}, @code{String} @var{msg})
@deftypemethodx {YYParser} {void} yyerror (Location @var{loc}, String @var{msg}) @deftypemethodx {YYParser} {void} yyerror (@code{Location} @var{loc}, @code{String} @var{msg})
Print an error message using the @code{yyerror} method of the scanner Print an error message using the @code{yyerror} method of the scanner
instance in use. The @code{Location} and @code{Position} parameters are instance in use. The @code{Location} and @code{Position} parameters are
available only if location tracking is active. available only if location tracking is active.
@@ -12708,13 +12708,13 @@ from a syntax error.
@end deftypemethod @end deftypemethod
@deftypemethod {YYParser} {java.io.PrintStream} getDebugStream () @deftypemethod {YYParser} {java.io.PrintStream} getDebugStream ()
@deftypemethodx {YYParser} {void} setDebugStream (java.io.printStream @var{o}) @deftypemethodx {YYParser} {void} setDebugStream (@code{java.io.printStream} @var{o})
Get or set the stream used for tracing the parsing. It defaults to Get or set the stream used for tracing the parsing. It defaults to
@code{System.err}. @code{System.err}.
@end deftypemethod @end deftypemethod
@deftypemethod {YYParser} {int} getDebugLevel () @deftypemethod {YYParser} {int} getDebugLevel ()
@deftypemethodx {YYParser} {void} setDebugLevel (int @var{l}) @deftypemethodx {YYParser} {void} setDebugLevel (@code{int} @var{l})
Get or set the tracing level. Currently its value is either 0, no trace, Get or set the tracing level. Currently its value is either 0, no trace,
or nonzero, full tracing. or nonzero, full tracing.
@end deftypemethod @end deftypemethod
@@ -12752,7 +12752,7 @@ case.
In both cases, the scanner has to implement the following methods. In both cases, the scanner has to implement the following methods.
@deftypemethod {Lexer} {void} yyerror (Location @var{loc}, String @var{msg}) @deftypemethod {Lexer} {void} yyerror (@code{Location} @var{loc}, @code{String} @var{msg})
This method is defined by the user to emit an error message. The first This method is defined by the user to emit an error message. The first
parameter is omitted if location tracking is not active. Its type can be parameter is omitted if location tracking is not active. Its type can be
changed using @code{%define api.location.type @{@var{class-name}@}}. changed using @code{%define api.location.type @{@var{class-name}@}}.
@@ -12854,9 +12854,9 @@ operation.
@xref{Error Recovery}. @xref{Error Recovery}.
@end deftypefn @end deftypefn
@deftypefn {Function} {void} yyerror (String @var{msg}) @deftypefn {Function} {void} yyerror (@code{String} @var{msg})
@deftypefnx {Function} {void} yyerror (Position @var{loc}, String @var{msg}) @deftypefnx {Function} {void} yyerror (@code{Position} @var{loc}, @code{String} @var{msg})
@deftypefnx {Function} {void} yyerror (Location @var{loc}, String @var{msg}) @deftypefnx {Function} {void} yyerror (@code{Location} @var{loc}, @code{String} @var{msg})
Print an error message using the @code{yyerror} method of the scanner Print an error message using the @code{yyerror} method of the scanner
instance in use. The @code{Location} and @code{Position} parameters are instance in use. The @code{Location} and @code{Position} parameters are
available only if location tracking is active. available only if location tracking is active.
@@ -12881,9 +12881,9 @@ Parser Interface}) applies to the push parser interface as well.
When generating a push parser, the method @code{push_parse} is created with When generating a push parser, the method @code{push_parse} is created with
the following signature (depending on if locations are enabled). the following signature (depending on if locations are enabled).
@deftypemethod {YYParser} {void} push_parse ({int} @var{token}, {Object} @var{yylval}) @deftypemethod {YYParser} {void} push_parse (@code{int} @var{token}, @code{Object} @var{yylval})
@deftypemethodx {YYParser} {void} push_parse ({int} @var{token}, {Object} @var{yylval}, {Location} @var{yyloc}) @deftypemethodx {YYParser} {void} push_parse (@code{int} @var{token}, @code{Object} @var{yylval}, @code{Location} @var{yyloc})
@deftypemethodx {YYParser} {void} push_parse ({int} @var{token}, {Object} @var{yylval}, {Position} @var{yypos}) @deftypemethodx {YYParser} {void} push_parse (@code{int} @var{token}, @code{Object} @var{yylval}, @code{Position} @var{yypos})
@end deftypemethod @end deftypemethod
The primary difference with respect to a pull parser is that the parser The primary difference with respect to a pull parser is that the parser