/ Check-in [3ef93950]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the error counter reset in Lemon generated parsers. This has no effect on SQLite.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3ef93950d30b34d852d6bbc101d433a04112868a
User & Date: drh 2016-07-12 19:54:49
Context
2016-07-13
00:55
Fix header comments and remove an unnecessary version restriction from the carray() table-valued function implementation. check-in: 021d0fb8 user: drh tags: trunk
2016-07-12
19:54
Fix the error counter reset in Lemon generated parsers. This has no effect on SQLite. check-in: 3ef93950 user: drh tags: trunk
2016-07-10
19:35
Fix typos in comments. No changes to code. check-in: 77c692a6 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/lempar.c.

   752    752   ){
   753    753     ParseARG_FETCH;
   754    754   #ifndef NDEBUG
   755    755     if( yyTraceFILE ){
   756    756       fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
   757    757     }
   758    758   #endif
          759  +#ifndef YYNOERRORRECOVERY
          760  +  yypParser->yyerrcnt = -1;
          761  +#endif
   759    762     assert( yypParser->yytos==yypParser->yystack );
   760    763     /* Here code is inserted which will be executed whenever the
   761    764     ** parser accepts */
   762    765   /*********** Begin %parse_accept code *****************************************/
   763    766   %%
   764    767   /*********** End %parse_accept code *******************************************/
   765    768     ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
................................................................................
   894    897         ** do any kind of error recovery.  Instead, simply invoke the syntax
   895    898         ** error routine and continue going as if nothing had happened.
   896    899         **
   897    900         ** Applications can set this macro (for example inside %include) if
   898    901         ** they intend to abandon the parse upon the first syntax error seen.
   899    902         */
   900    903         yy_syntax_error(yypParser,yymajor, yyminor);
   901         -#ifndef YYNOERRORRECOVERY
   902         -      yypParser->yyerrcnt = -1;
   903         -#endif
   904    904         yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
   905    905         yymajor = YYNOCODE;
   906    906         
   907    907   #else  /* YYERRORSYMBOL is not defined */
   908    908         /* This is what we do if the grammar does not define ERROR:
   909    909         **
   910    910         **  * Report an error message, and throw away the input token.