sync up our in tree sqlite with the 3.3.13 official release. Commit to follow to finish this process on the windows build.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4351 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-02-22 22:09:42 +00:00
parent 64133ab31a
commit 5791353cec
118 changed files with 15152 additions and 1229 deletions

View File

@@ -361,8 +361,6 @@ struct action *ap2;
rc = ap1->sp->index - ap2->sp->index;
if( rc==0 ) rc = (int)ap1->type - (int)ap2->type;
if( rc==0 ){
assert( ap1->type==REDUCE || ap1->type==RD_RESOLVED || ap1->type==CONFLICT);
assert( ap2->type==REDUCE || ap2->type==RD_RESOLVED || ap2->type==CONFLICT);
rc = ap1->x.rp->index - ap2->x.rp->index;
}
return rc;
@@ -1019,6 +1017,10 @@ struct symbol *errsym; /* The error symbol (if defined. NULL otherwise) */
struct symbol *spx, *spy;
int errcnt = 0;
assert( apx->sp==apy->sp ); /* Otherwise there would be no conflict */
if( apx->type==SHIFT && apy->type==SHIFT ){
apy->type = CONFLICT;
errcnt++;
}
if( apx->type==SHIFT && apy->type==REDUCE ){
spx = apx->sp;
spy = apy->x.rp->precsym;
@@ -3166,7 +3168,7 @@ PRIVATE char *append_str(char *zText, int n, int p1, int p2){
if( z==0 ) return "";
while( n-- > 0 ){
c = *(zText++);
if( c=='%' && zText[0]=='d' ){
if( c=='%' && n>0 && zText[0]=='d' ){
sprintf(zInt, "%d", p1);
p1 = p2;
strcpy(&z[used], zInt);
@@ -3196,7 +3198,7 @@ PRIVATE void translate_code(struct lemon *lemp, struct rule *rp){
lhsused = 0;
append_str(0,0,0,0);
for(cp=rp->code; *cp; cp++){
for(cp=(rp->code?rp->code:""); *cp; cp++){
if( isalpha(*cp) && (cp==rp->code || (!isalnum(cp[-1]) && cp[-1]!='_')) ){
char saved;
for(xp= &cp[1]; isalnum(*xp) || *xp=='_'; xp++);
@@ -3259,8 +3261,10 @@ PRIVATE void translate_code(struct lemon *lemp, struct rule *rp){
}
}
}
cp = append_str(0,0,0,0);
rp->code = Strsafe(cp);
if( rp->code ){
cp = append_str(0,0,0,0);
rp->code = Strsafe(cp?cp:"");
}
}
/*
@@ -3623,7 +3627,7 @@ int mhflag; /* Output in makeheaders format if true */
n = acttab_size(pActtab);
for(i=j=0; i<n; i++){
int action = acttab_yyaction(pActtab, i);
if( action<0 ) action = lemp->nsymbol + lemp->nrule + 2;
if( action<0 ) action = lemp->nstate + lemp->nrule + 2;
if( j==0 ) fprintf(out," /* %5d */ ", i);
fprintf(out, " %4d,", action);
if( j==9 || i==n-1 ){
@@ -3828,7 +3832,7 @@ int mhflag; /* Output in makeheaders format if true */
/* Generate code which execution during each REDUCE action */
for(rp=lemp->rule; rp; rp=rp->next){
if( rp->code ) translate_code(lemp, rp);
translate_code(lemp, rp);
}
for(rp=lemp->rule; rp; rp=rp->next){
struct rule *rp2;