SQLite

Check-in [3665a2f554]
Login

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

Overview
Comment:Fix lempar.c so that the shift-reduce optimization works for error processing. This is a Lemon issue only and has no impact on SQLite.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3665a2f554e5b8d2717d952dbaf325a39c637c31
User & Date: drh 2016-06-06 18:17:36.269
Context
2016-06-06
20:27
Translate filenames of the form "/c:/*" into just "c:/*" on WinRT and Cygwin. (SQLite has long done this for Win32/WinNT.) (check-in: f8470ffc49 user: drh tags: trunk)
18:17
Fix lempar.c so that the shift-reduce optimization works for error processing. This is a Lemon issue only and has no impact on SQLite. (check-in: 3665a2f554 user: drh tags: trunk)
13:24
Initialize the yyerrcnt variable in the lemon parser template. This has no effect on SQLite itself. (check-in: 45531654f7 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tool/lempar.c.
597
598
599
600
601
602
603



604
605
606
607
608
609
610
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif



  yytos = yypParser->yytos;
  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState);
}








>
>
>







597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState);
}

809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
    fprintf(yyTraceFILE,"%sInput '%s'\n",yyTracePrompt,yyTokenName[yymajor]);
  }
#endif

  do{
    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact <= YY_MAX_SHIFTREDUCE ){
      if( yyact > YY_MAX_SHIFT ){
        yyact += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
      }
      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt--;
#endif
      yymajor = YYNOCODE;
    }else if( yyact <= YY_MAX_REDUCE ){
      yy_reduce(yypParser,yyact-YY_MIN_REDUCE);







<
<
<







812
813
814
815
816
817
818



819
820
821
822
823
824
825
    fprintf(yyTraceFILE,"%sInput '%s'\n",yyTracePrompt,yyTokenName[yymajor]);
  }
#endif

  do{
    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact <= YY_MAX_SHIFTREDUCE ){



      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt--;
#endif
      yymajor = YYNOCODE;
    }else if( yyact <= YY_MAX_REDUCE ){
      yy_reduce(yypParser,yyact-YY_MIN_REDUCE);