+ if (lex_match_id (lexer, "ENCODING"))
+ {
+ lex_match (lexer, T_EQUALS);
+ if (!lex_force_string (lexer))
+ goto exit;
+
+ free (encoding);
+ encoding = xstrdup (lex_tokcstr (lexer));
+ }
+ else if (variant == INSERT && lex_match_id (lexer, "SYNTAX"))
+ {
+ lex_match (lexer, T_EQUALS);
+ if ( lex_match_id (lexer, "INTERACTIVE") )
+ syntax_mode = LEX_SYNTAX_INTERACTIVE;
+ else if ( lex_match_id (lexer, "BATCH"))
+ syntax_mode = LEX_SYNTAX_BATCH;
+ else if ( lex_match_id (lexer, "AUTO"))
+ syntax_mode = LEX_SYNTAX_AUTO;
+ else
+ {
+ lex_error (lexer, _("expecting %s, %s, or %s after %s"),
+ "BATCH", "INTERACTIVE", "AUTO", "SYNTAX");
+ goto exit;
+ }
+ }
+ else if (variant == INSERT && lex_match_id (lexer, "CD"))
+ {
+ lex_match (lexer, T_EQUALS);
+ if ( lex_match_id (lexer, "YES") )
+ {
+ cd = true;
+ }
+ else if ( lex_match_id (lexer, "NO"))
+ {
+ cd = false;
+ }
+ else
+ {
+ lex_error (lexer, _("expecting %s or %s after %s"),
+ "YES", "NO", "CD");
+ goto exit;
+ }
+ }
+ else if (variant == INSERT && lex_match_id (lexer, "ERROR"))
+ {
+ lex_match (lexer, T_EQUALS);
+ if ( lex_match_id (lexer, "CONTINUE") )
+ {
+ error_mode = LEX_ERROR_CONTINUE;
+ }
+ else if ( lex_match_id (lexer, "STOP"))
+ {
+ error_mode = LEX_ERROR_STOP;
+ }
+ else
+ {
+ lex_error (lexer, _("expecting %s or %s after %s"),
+ "CONTINUE", "STOP", "ERROR");
+ goto exit;
+ }
+ }
+
+ else
+ {
+ lex_error (lexer, NULL);
+ goto exit;
+ }