break;
else
{
- lex_error (lexer, _("expecting VARIABLES"));
+ lex_error (lexer, _("expecting %s"), "VARIABLES");
goto error;
}
}
command = DELETE;
else if (command == UNKNOWN)
{
- lex_error (lexer, _("expecting ATTRIBUTE= or DELETE="));
+ lex_error (lexer, _("expecting %s or %s"), "ATTRIBUTE=", "DELETE=");
return CMD_FAILURE;
}
if (!parse_variables (lexer, dataset_dict (ds), &v, &nv, PV_NONE))
goto done;
- if (!lex_match (lexer, '('))
- {
- lex_error (lexer, _("expecting `('"));
- goto done;
- }
+ if (!lex_force_match (lexer, '('))
+ goto done;
for (i = 0; i < nv; i++)
var_clear_missing_values (v[i]);
union any_node *node;
lex_get (lexer);
node = parse_or (lexer, e);
- if (node != NULL && !lex_match (lexer, ')'))
- {
- lex_error (lexer, _("expecting `)'"));
- return NULL;
- }
+ if (node != NULL && !lex_force_match (lexer, ')'))
+ return NULL;
return node;
}
lex_match (lexer, '=');
if (!lex_match_id (lexer, "COLUMNWISE"))
{
- lex_error (lexer, _("while expecting COLUMNWISE"));
+ lex_error (lexer, _("expecting %s"), "COLUMNWISE");
goto error;
}
agr.missing = COLUMNWISE;
copy_documents = true;
else if (lex_match_id (lexer, "PRESORTED"))
presorted = true;
- else if (lex_match_id (lexer, "BREAK"))
+ else if (lex_force_match_id (lexer, "BREAK"))
{
int i;
break;
}
else
- {
- lex_error (lexer, _("expecting BREAK"));
- goto error;
- }
+ goto error;
+
}
if (presorted && saw_direction)
msg (SW, _("When PRESORTED is specified, specifying sorting directions "
{
if (function->src_vars == AGR_SV_YES)
{
- lex_error (lexer, _("expecting `('"));
+ lex_force_match (lexer, '(');
goto error;
}
}
}
/* Trailing rparen. */
- if (!lex_match (lexer, ')'))
- {
- lex_error (lexer, _("expecting `)'"));
- goto error;
- }
+ if (!lex_force_match (lexer, ')'))
+ goto error;
/* Now check that the number of source variables match
the number of target variables. If we check earlier
{
if (n_by < 2)
{
- lex_error (lexer, _("expecting BY"));
+ lex_force_match (lexer, T_BY);
goto done;
}
else
| PV_NO_DUPLICATE | PV_NO_SCRATCH)))
return 0;
- if (lex_token (lexer) != '(')
- {
- lex_error (lexer, "expecting `('");
+ if (!lex_force_match (lexer, '('))
goto lossage;
- }
- lex_get (lexer);
if (!lex_force_int (lexer))
goto lossage;
}
lex_get (lexer);
- if (lex_token (lexer) != ')')
- {
- lex_error (lexer, "expecting `)'");
- goto lossage;
- }
- lex_get (lexer);
+ if (!lex_force_match (lexer, ')'))
+ goto lossage;
for (i = orig_nv; i < proc->n_variables; i++)
{
syntax_mode = GETL_BATCH;
else
{
- lex_error(lexer,
- _("Expecting BATCH or INTERACTIVE after SYNTAX."));
+ lex_error (lexer, _("expecting %s or %s after %s"),
+ "BATCH", "INTERACTIVE", "SYNTAX");
return CMD_FAILURE;
}
}
}
else
{
- lex_error (lexer, _("Expecting YES or NO after CD."));
+ lex_error (lexer, _("expecting %s or %s after %s"),
+ "YES", "NO", "CD");
return CMD_FAILURE;
}
}
}
else
{
- lex_error (lexer, _("Expecting CONTINUE or STOP after ERROR."));
+ lex_error (lexer, _("expecting %s or %s after %s"),
+ "CONTINUE", "STOP", "ERROR");
return CMD_FAILURE;
}
}