Use "look-ahead" instead of "lookahead", consistently.

This commit is contained in:
Paul Eggert
2004-06-21 20:20:31 +00:00
parent 57a90331bd
commit 8dd162d3ff
23 changed files with 253 additions and 218 deletions

View File

@@ -60,7 +60,7 @@ m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])])
# b4_lyyerror_args
# ----------------
# Same as above, but on the lookahead, hence yyllocp instead of yylocp.
# Same as above, but on the look-ahead, hence yyllocp instead of yylocp.
m4_define([b4_lyyerror_args],
[b4_pure_if([b4_location_if([yyllocp, ])])dnl
m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])])
@@ -82,14 +82,14 @@ m4_define([b4_pure_formals],
# b4_lpure_args
# -------------
# Same as above, but on the lookahead, hence yyllocp instead of yylocp.
# Same as above, but on the look-ahead, hence yyllocp instead of yylocp.
m4_define([b4_lpure_args],
[b4_pure_if([b4_location_if([, yyllocp])])[]b4_user_args])
# b4_lpure_formals
# ----------------
# Same as above, but on the lookahead, hence yyllocp instead of yylocp.
# Same as above, but on the look-ahead, hence yyllocp instead of yylocp.
m4_define([b4_lpure_formals],
[b4_pure_if([b4_location_if([YYLTYPE *yyllocp])])[]b4_user_formals])
@@ -1686,7 +1686,7 @@ yyreportSyntaxError (yyGLRStack* yystack,
/* Recover from a syntax error on YYSTACK, assuming that YYTOKENP,
YYLVALP, and YYLLOCP point to the syntactic category, semantic
value, and location of the lookahead. */
value, and location of the look-ahead. */
static void
yyrecoverSyntaxError (yyGLRStack* yystack,
YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[)

View File

@@ -307,14 +307,14 @@ namespace yy
int debug_;
std::ostream &cdebug_;
/* Lookahead and lookahead in internal form. */
/* Look-ahead and look-ahead in internal form. */
int looka_;
int ilooka_;
/* Message. */
std::string message;
/* Semantic value and location of lookahead token. */
/* Semantic value and location of look-ahead token. */
SemanticType value;
LocationType location;
/* Beginning of the last erroneous token popped off. */
@@ -394,12 +394,12 @@ yy::]b4_parser_class_name[::parse ()
/* Backup. */
yybackup:
/* Try to take a decision without lookahead. */
/* Try to take a decision without look-ahead. */
n_ = pact_[state_];
if (n_ == pact_ninf_)
goto yydefault;
/* Read a lookahead token. */
/* Read a look-ahead token. */
if (looka_ == empty_)
{
YYCDEBUG << "Reading a token: ";
@@ -452,7 +452,7 @@ yy::]b4_parser_class_name[::parse ()
if (n_ == final_)
goto yyacceptlab;
/* Shift the lookahead token. */
/* Shift the look-ahead token. */
#if YYDEBUG
YYCDEBUG << "Shifting token " << looka_
<< " (" << name_[ilooka_] << "), ";
@@ -546,7 +546,7 @@ b4_syncline([@oline@], [@ofile@])[
error_start_ = location.begin;
if (errstatus_ == 3)
{
/* If just tried and failed to reuse lookahead token after an
/* If just tried and failed to reuse look-ahead token after an
error, discard it. */
/* Return failure if at end of input. */
@@ -580,7 +580,7 @@ b4_syncline([@oline@], [@ofile@])[
}
}
/* Else will try to reuse lookahead token after shifting the error
/* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;

View File

@@ -713,15 +713,15 @@ m4_divert_push([KILL])# ======================== M4 code.
# Declare the variables that are global, or local to YYPARSE if
# pure-parser.
m4_define([b4_declare_parser_variables],
[/* The lookahead symbol. */
[/* The look-ahead symbol. */
int yychar;
/* The semantic value of the lookahead symbol. */
/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;b4_location_if([
/* Location data for the lookahead symbol. */
/* Location data for the look-ahead symbol. */
YYLTYPE yylloc;])
])
m4_divert_pop([KILL])dnl# ====================== End of M4 code.
@@ -751,7 +751,7 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Lookahead token as an internal (translated) token number. */
/* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
/* Three stacks and their tools:
@@ -906,18 +906,18 @@ b4_syncline([@oline@], [@ofile@])])dnl
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* Read a look-ahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
/* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* Not known => get a look-ahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -952,7 +952,7 @@ yybackup:
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
/* Shift the look-ahead token. */
YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
/* Discard the token being shifted unless it is eof. */
@@ -1108,7 +1108,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
/* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -1134,7 +1134,7 @@ yyerrlab:
}
}
/* Else will try to reuse lookahead token after shifting the error
/* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;