mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Modifications to the parser to eliminate unreachable code. (CVS 6749)
FossilOrigin-Name: 457e0b245b1833c0d297bc6f4ff9785e6a2cee02
This commit is contained in:
@ -608,6 +608,7 @@ static void yy_reduce(
|
||||
/*
|
||||
** The following code executes when the parse fails
|
||||
*/
|
||||
#ifndef YYNOERRORRECOVERY
|
||||
static void yy_parse_failed(
|
||||
yyParser *yypParser /* The parser */
|
||||
){
|
||||
@ -623,6 +624,7 @@ static void yy_parse_failed(
|
||||
%%
|
||||
ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
||||
}
|
||||
#endif /* YYNOERRORRECOVERY */
|
||||
|
||||
/*
|
||||
** The following code executes when a syntax error first occurs.
|
||||
@ -790,6 +792,18 @@ void Parse(
|
||||
}
|
||||
yypParser->yyerrcnt = 3;
|
||||
yyerrorhit = 1;
|
||||
#elif defined(YYNOERRORRECOVERY)
|
||||
/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
|
||||
** do any kind of error recovery. Instead, simply invoke the syntax
|
||||
** error routine and continue going as if nothing had happened.
|
||||
**
|
||||
** Applications can set this macro (for example inside %include) if
|
||||
** they intend to abandon the parse upon the first syntax error seen.
|
||||
*/
|
||||
yy_syntax_error(yypParser,yymajor,yyminorunion);
|
||||
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
|
||||
yymajor = YYNOCODE;
|
||||
|
||||
#else /* YYERRORSYMBOL is not defined */
|
||||
/* This is what we do if the grammar does not define ERROR:
|
||||
**
|
||||
|
Reference in New Issue
Block a user