SQLite

Check-in [2683b375ad]
Login

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

Overview
Comment:More fixes to Lemon so that it automatically resets its error counter at the end of a parse.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2683b375ad1291172fdb47d94e16fcf869c78c8a
User & Date: drh 2016-07-05 16:11:26.639
Original Comment: More fixes to Fossil so that it automatically resets its error counter at the end of a parse.
Context
2016-07-06
09:19
Fix a memory leak in recently added test code. (check-in: 724e4cdc25 user: dan tags: trunk)
2016-07-05
16:11
More fixes to Lemon so that it automatically resets its error counter at the end of a parse. (check-in: 2683b375ad user: drh tags: trunk)
12:47
Attempt to reset the error count in the Lemon-generated parser after a parse failure. (check-in: 91889fa30e user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tool/lempar.c.
894
895
896
897
898
899
900



901
902
903
904
905
906
907
      ** 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, yyminor);



      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:
      **
      **  * Report an error message, and throw away the input token.







>
>
>







894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
      ** 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, yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt = -1;
#endif
      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:
      **
      **  * Report an error message, and throw away the input token.