{
if (data_parser_get_records (parser) > 0)
{
- lex_sbc_only_once ("RECORDS");
+ lex_sbc_only_once (lexer, "RECORDS");
goto error;
}
lex_match (lexer, T_EQUALS);
{
if (!in_input_program ())
{
- msg (SE, _("The %s subcommand may only be used within %s."), "END", "INPUT PROGRAM");
+ lex_next_error (lexer, -1, -1,
+ _("The %s subcommand may only be used within %s."),
+ "END", "INPUT PROGRAM");
goto error;
}
if (end)
{
- lex_sbc_only_once ("END");
+ lex_sbc_only_once (lexer, "END");
goto error;
}
if (has_type)
{
- msg (SE, _("Only one of FIXED, FREE, or LIST may "
- "be specified."));
+ lex_next_error (lexer, -1, -1,
+ _("Only one of FIXED, FREE, or LIST may "
+ "be specified."));
goto error;
}
has_type = true;
return NULL;
if (!fmt_from_name (type, &input.type))
{
- msg (SE, _("Unknown format type `%s'."), type);
+ lex_next_error (lexer, -1, -1,
+ _("Unknown format type `%s'."), type);
return NULL;
}
input.d = 0;
}
- if (!fmt_check_input (&input) || !lex_force_match (lexer, T_RPAREN))
+ char *error = fmt_check_input__ (&input);
+ if (error)
+ {
+ lex_next_error (lexer, -1, -1, "%s", error);
+ free (error);
+ return NULL;
+ }
+ if (!lex_force_match (lexer, T_RPAREN))
return NULL;
/* As a special case, N format is treated as F format