aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-24 15:08:57 +1000
committerDavid Walter Seikel2012-01-24 15:08:57 +1000
commit5f3188ff6b8c768f1a18e4d238dced35bc4ad811 (patch)
tree2e3f91a1a26c289d6e92aa91c176807363cddfec /libraries
parentRearrange the big test multitasking test script to be prettier. (diff)
downloadSledjHamr-5f3188ff6b8c768f1a18e4d238dced35bc4ad811.zip
SledjHamr-5f3188ff6b8c768f1a18e4d238dced35bc4ad811.tar.gz
SledjHamr-5f3188ff6b8c768f1a18e4d238dced35bc4ad811.tar.bz2
SledjHamr-5f3188ff6b8c768f1a18e4d238dced35bc4ad811.tar.xz
Update to latest lemon, and actually use our local copy.
Diffstat (limited to 'libraries')
-rw-r--r--libraries/lemon/lemon.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libraries/lemon/lemon.c b/libraries/lemon/lemon.c
index a089bc7..c3e612b 100644
--- a/libraries/lemon/lemon.c
+++ b/libraries/lemon/lemon.c
@@ -117,8 +117,6 @@ void ResortStates(struct lemon *);
117void SetSize(int); /* All sets will be of size N */ 117void SetSize(int); /* All sets will be of size N */
118char *SetNew(void); /* A new set for element 0..N */ 118char *SetNew(void); /* A new set for element 0..N */
119void SetFree(char*); /* Deallocate a set */ 119void SetFree(char*); /* Deallocate a set */
120
121char *SetNew(void); /* A new set for element 0..N */
122int SetAdd(char*,int); /* Add element to a set */ 120int SetAdd(char*,int); /* Add element to a set */
123int SetUnion(char *,char *); /* A <- A U B, thru element N */ 121int SetUnion(char *,char *); /* A <- A U B, thru element N */
124#define SetFind(X,Y) (X[Y]) /* True if Y is in set X */ 122#define SetFind(X,Y) (X[Y]) /* True if Y is in set X */
@@ -969,7 +967,7 @@ void FindFollowSets(struct lemon *lemp)
969 }while( progress ); 967 }while( progress );
970} 968}
971 969
972static int resolve_conflict(struct action *,struct action *, struct symbol *); 970static int resolve_conflict(struct action *,struct action *);
973 971
974/* Compute the reduce actions, and resolve conflicts. 972/* Compute the reduce actions, and resolve conflicts.
975*/ 973*/
@@ -1023,7 +1021,7 @@ void FindActions(struct lemon *lemp)
1023 for(nap=ap->next; nap && nap->sp==ap->sp; nap=nap->next){ 1021 for(nap=ap->next; nap && nap->sp==ap->sp; nap=nap->next){
1024 /* The two actions "ap" and "nap" have the same lookahead. 1022 /* The two actions "ap" and "nap" have the same lookahead.
1025 ** Figure out which one should be used */ 1023 ** Figure out which one should be used */
1026 lemp->nconflict += resolve_conflict(ap,nap,lemp->errsym); 1024 lemp->nconflict += resolve_conflict(ap,nap);
1027 } 1025 }
1028 } 1026 }
1029 } 1027 }
@@ -1058,8 +1056,7 @@ void FindActions(struct lemon *lemp)
1058*/ 1056*/
1059static int resolve_conflict( 1057static int resolve_conflict(
1060 struct action *apx, 1058 struct action *apx,
1061 struct action *apy, 1059 struct action *apy
1062 struct symbol *errsym /* The error symbol (if defined. NULL otherwise) */
1063){ 1060){
1064 struct symbol *spx, *spy; 1061 struct symbol *spx, *spy;
1065 int errcnt = 0; 1062 int errcnt = 0;
@@ -1996,7 +1993,7 @@ static void parseonetoken(struct pstate *psp)
1996 }else if( x[0]=='{' ){ 1993 }else if( x[0]=='{' ){
1997 if( psp->prevrule==0 ){ 1994 if( psp->prevrule==0 ){
1998 ErrorMsg(psp->filename,psp->tokenlineno, 1995 ErrorMsg(psp->filename,psp->tokenlineno,
1999"There is no prior rule opon which to attach the code \ 1996"There is no prior rule upon which to attach the code \
2000fragment which begins on this line."); 1997fragment which begins on this line.");
2001 psp->errorcnt++; 1998 psp->errorcnt++;
2002 }else if( psp->prevrule->code!=0 ){ 1999 }else if( psp->prevrule->code!=0 ){