mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
java: promote YYEOF rather that Lexer.EOF
* doc/bison.texi: here. * data/skeletons/lalr1.java: Use YYEOF.
This commit is contained in:
3
TODO
3
TODO
@@ -24,9 +24,6 @@ You can explicitly specify the numeric code for a token type...
|
||||
|
||||
The token numbered as 0.
|
||||
|
||||
** Java: EOF
|
||||
We should be able to redefine EOF like we do in C.
|
||||
|
||||
** Java: calc.at
|
||||
Stop hard-coding "Calc". Adjust local.at (look for FIXME).
|
||||
|
||||
|
||||
@@ -178,10 +178,10 @@ import java.text.MessageFormat;
|
||||
* parser <tt>]b4_parser_class[</tt>.
|
||||
*/
|
||||
public interface Lexer {
|
||||
/** Token returned by the scanner to signal the end of its input. */
|
||||
public static final int EOF = 0;
|
||||
|
||||
]b4_token_enums[
|
||||
/** Deprecated, use b4_symbol(0, id) instead. */
|
||||
public static final int EOF = ]b4_symbol(0, id)[;
|
||||
|
||||
]b4_locations_if([[
|
||||
/**
|
||||
* Method to retrieve the beginning position of the last scanned token.
|
||||
@@ -692,10 +692,10 @@ b4_dollar_popdef[]dnl
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
error, discard it. */
|
||||
|
||||
if (yychar <= Lexer.EOF)
|
||||
if (yychar <= Lexer.]b4_symbol(0, id)[)
|
||||
{
|
||||
/* Return failure if at end of input. */
|
||||
if (yychar == Lexer.EOF)
|
||||
if (yychar == Lexer.]b4_symbol(0, id)[)
|
||||
]b4_push_if([{label = YYABORT; break;}], [return false;])[
|
||||
}
|
||||
else
|
||||
|
||||
@@ -13208,7 +13208,7 @@ with a scanner: the scanner may be defined by @code{%code lexer}, or
|
||||
defined elsewhere. In either case, the scanner has to implement the
|
||||
@code{Lexer} inner interface of the parser class. This interface also
|
||||
contain constants for all user-defined token names and the predefined
|
||||
@code{EOF} token.
|
||||
@code{YYEOF} token.
|
||||
|
||||
In the first case, the body of the scanner class is placed in
|
||||
@code{%code lexer} blocks. If you want to pass parameters from the
|
||||
|
||||
Reference in New Issue
Block a user