-C Fix\ssome\sminor\sproblems\swith\sthe\snew\stest4.c\smodule\sused\sfor\sdoing\sthread\ntesting.\s(CVS\s1142)
-D 2003-12-20T04:00:53
+C Optimizations\sto\sthe\sLEMON\sparser\stemplate.\s(CVS\s1143)
+D 2003-12-22T14:53:20
F Makefile.in 0515ff9218ad8d5a8f6220f0494b8ef94c67013b
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F test/where.test cb3a2ed062ce4b5f08aff2d08027c6a46d68c47b
F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
F tool/lemon.c e37dcb5b8cdb16f4ac98338134bf8d8cd28e399f
-F tool/lempar.c 686d85ff4b11a790f52dd033612e6890a2a10f3c
+F tool/lempar.c 0b5e7a58634e0d448929b8e85f7981c2aa708d57
F tool/memleak.awk 16ef9493dcd36146f806e75148f4bb0201a123ec
F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x
F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
-P 1e9689672c94e5ab89f07099c1402e157c8b02c1
-R a1fd48855a547ffbdcf831309e005755
+P 952924084aac4a7fa84a7cb7aaac869d35db1896
+R 7ab32ac7ee9a5574dd03ea51da394001
U drh
-Z d63babfeaee4d16e2d4a389b00f50ce6
+Z bb57c31f5dd8de3fdff4945aa0883461
struct yyParser {
int yyidx; /* Index of top element in stack */
int yyerrcnt; /* Shifts left before out of the error */
- yyStackEntry *yytop; /* Pointer to the top stack element */
ParseARG_SDECL /* A place to hold %extra_argument */
yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
};
*/
static int yy_pop_parser_stack(yyParser *pParser){
YYCODETYPE yymajor;
+ yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
if( pParser->yyidx<0 ) return 0;
#ifndef NDEBUG
if( yyTraceFILE && pParser->yyidx>=0 ){
fprintf(yyTraceFILE,"%sPopping %s\n",
yyTracePrompt,
- yyTokenName[pParser->yytop->major]);
+ yyTokenName[yytos->major]);
}
#endif
- yymajor = pParser->yytop->major;
- yy_destructor( yymajor, &pParser->yytop->minor);
+ yymajor = yytos->major;
+ yy_destructor( yymajor, &yytos->minor);
pParser->yyidx--;
- pParser->yytop--;
return yymajor;
}
int iLookAhead /* The look-ahead token */
){
int i;
+ int stateno = pParser->yystack[pParser->yyidx].stateno;
/* if( pParser->yyidx<0 ) return YY_NO_ACTION; */
- i = yy_shift_ofst[pParser->yytop->stateno];
+ i = yy_shift_ofst[stateno];
if( i==YY_SHIFT_USE_DFLT ){
- return yy_default[pParser->yytop->stateno];
+ return yy_default[stateno];
}
if( iLookAhead==YYNOCODE ){
return YY_NO_ACTION;
return yy_find_shift_action(pParser, iFallback);
}
#endif
- return yy_default[pParser->yytop->stateno];
+ return yy_default[stateno];
}else{
return yy_action[i];
}
int iLookAhead /* The look-ahead token */
){
int i;
+ int stateno = pParser->yystack[pParser->yyidx].stateno;
- i = yy_reduce_ofst[pParser->yytop->stateno];
+ i = yy_reduce_ofst[stateno];
if( i==YY_REDUCE_USE_DFLT ){
- return yy_default[pParser->yytop->stateno];
+ return yy_default[stateno];
}
if( iLookAhead==YYNOCODE ){
return YY_NO_ACTION;
}
i += iLookAhead;
if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
- return yy_default[pParser->yytop->stateno];
+ return yy_default[stateno];
}else{
return yy_action[i];
}
int yyMajor, /* The major token to shift in */
YYMINORTYPE *yypMinor /* Pointer ot the minor token to shift in */
){
+ yyStackEntry *yytos;
yypParser->yyidx++;
- yypParser->yytop++;
if( yypParser->yyidx>=YYSTACKDEPTH ){
ParseARG_FETCH;
yypParser->yyidx--;
- yypParser->yytop--;
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
return;
}
- yypParser->yytop->stateno = yyNewState;
- yypParser->yytop->major = yyMajor;
- yypParser->yytop->minor = *yypMinor;
+ yytos = &yypParser->yystack[yypParser->yyidx];
+ yytos->stateno = yyNewState;
+ yytos->major = yyMajor;
+ yytos->minor = *yypMinor;
#ifndef NDEBUG
if( yyTraceFILE && yypParser->yyidx>0 ){
int i;
yyStackEntry *yymsp; /* The top of the parser's stack */
int yysize; /* Amount to pop the stack */
ParseARG_FETCH;
- yymsp = yypParser->yytop;
+ yymsp = &yypParser->yystack[yypParser->yyidx];
#ifndef NDEBUG
if( yyTraceFILE && yyruleno>=0
&& yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){
yygoto = yyRuleInfo[yyruleno].lhs;
yysize = yyRuleInfo[yyruleno].nrhs;
yypParser->yyidx -= yysize;
- yypParser->yytop -= yysize;
yyact = yy_find_reduce_action(yypParser,yygoto);
if( yyact < YYNSTATE ){
yy_shift(yypParser,yyact,yygoto,&yygotominor);
if( yymajor==0 ) return;
yypParser->yyidx = 0;
yypParser->yyerrcnt = -1;
- yypParser->yytop = &yypParser->yystack[0];
- yypParser->yytop->stateno = 0;
- yypParser->yytop->major = 0;
+ yypParser->yystack[0].stateno = 0;
+ yypParser->yystack[0].major = 0;
}
yyminorunion.yy0 = yyminor;
yyendofinput = (yymajor==0);
}else if( yyact < YYNSTATE + YYNRULE ){
yy_reduce(yypParser,yyact-YYNSTATE);
}else if( yyact == YY_ERROR_ACTION ){
+ int yymx;
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
if( yypParser->yyerrcnt<0 ){
yy_syntax_error(yypParser,yymajor,yyminorunion);
}
- if( yypParser->yytop->major==YYERRORSYMBOL || yyerrorhit ){
+ yymx = yypParser->yystack[yypParser->yyidx].major;
+ if( yymx==YYERRORSYMBOL || yyerrorhit ){
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sDiscard input token %s\n",
}else{
while(
yypParser->yyidx >= 0 &&
- yypParser->yytop->major != YYERRORSYMBOL &&
+ yymx != YYERRORSYMBOL &&
(yyact = yy_find_shift_action(yypParser,YYERRORSYMBOL)) >= YYNSTATE
){
yy_pop_parser_stack(yypParser);
yy_destructor(yymajor,&yyminorunion);
yy_parse_failed(yypParser);
yymajor = YYNOCODE;
- }else if( yypParser->yytop->major!=YYERRORSYMBOL ){
+ }else if( yymx!=YYERRORSYMBOL ){
YYMINORTYPE u2;
u2.YYERRSYMDT = 0;
yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);