aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-05 06:37:36 +1000
committerDavid Walter Seikel2012-01-05 06:37:36 +1000
commit47da7d8f2fd5c14dc515eecfe4e1c45daee68045 (patch)
tree30b1d274b1a68a5719b4b6e281a5b0e5cfc97238 /LuaSL/src
parentLicence info added. (diff)
downloadSledjHamr-47da7d8f2fd5c14dc515eecfe4e1c45daee68045.zip
SledjHamr-47da7d8f2fd5c14dc515eecfe4e1c45daee68045.tar.gz
SledjHamr-47da7d8f2fd5c14dc515eecfe4e1c45daee68045.tar.bz2
SledjHamr-47da7d8f2fd5c14dc515eecfe4e1c45daee68045.tar.xz
Make the btyacc stuff a little more reentrant to match bison.
It's still not reentrant. lol
Diffstat (limited to '')
-rw-r--r--LuaSL/src/btyacc-c.ske16
1 files changed, 8 insertions, 8 deletions
diff --git a/LuaSL/src/btyacc-c.ske b/LuaSL/src/btyacc-c.ske
index ac0fcd5..dc37b17 100644
--- a/LuaSL/src/btyacc-c.ske
+++ b/LuaSL/src/btyacc-c.ske
@@ -188,7 +188,7 @@ static Yshort *yylexemes = 0;
188/* Local prototypes. */ 188/* Local prototypes. */
189int yyparse(void *YYPARSE_PARAM); 189int yyparse(void *YYPARSE_PARAM);
190 190
191static int yyLex1(yyscan_t scanner); 191static int yyLex1(YYSTYPE *yylval, yyscan_t scanner);
192static int yyExpand(); 192static int yyExpand();
193static void yySCopy(YYSTYPE *to, YYSTYPE *from, int size); 193static void yySCopy(YYSTYPE *to, YYSTYPE *from, int size);
194static void yyPCopy(YYPOSN *to, YYPOSN *from, int size); 194static void yyPCopy(YYPOSN *to, YYPOSN *from, int size);
@@ -264,7 +264,7 @@ int yyparse(void *YYPARSE_PARAM) {
264 264
265 /* Read one token */ 265 /* Read one token */
266 if (yychar < 0) { 266 if (yychar < 0) {
267 yychar = yyLex1(YYLEX_PARAM); 267 yychar = yyLex1(&yylval, YYLEX_PARAM);
268 if (yychar < 0) yychar = 0; 268 if (yychar < 0) yychar = 0;
269# if YYDEBUG 269# if YYDEBUG
270 if (yydebug) { 270 if (yydebug) {
@@ -658,7 +658,7 @@ yyreduce:
658 *++(yyps->psp) = yyps->pos; 658 *++(yyps->psp) = yyps->pos;
659 yyretposn = yyps->pos; /* return value of root position to yyposn */ 659 yyretposn = yyps->pos; /* return value of root position to yyposn */
660 if (yychar < 0) { 660 if (yychar < 0) {
661 if ((yychar = yyLex1(YYLEX_PARAM)) < 0) { 661 if ((yychar = yyLex1(&yylval, YYLEX_PARAM)) < 0) {
662 yychar = 0; 662 yychar = 0;
663 } 663 }
664# if YYDEBUG 664# if YYDEBUG
@@ -781,24 +781,24 @@ yyaccept:
781 781
782 782
783/* Call yylex() unless the token has already been read. */ 783/* Call yylex() unless the token has already been read. */
784static int yyLex1(yyscan_t scanner) { 784static int yyLex1(YYSTYPE *yylval, yyscan_t scanner) {
785 if(yylvp < yylve) { 785 if(yylvp < yylve) {
786 /* we're currently re-reading tokens */ 786 /* we're currently re-reading tokens */
787 yylval = *yylvp++; 787 *yylval = *yylvp++;
788 yyposn = *yylpp++; 788 yyposn = *yylpp++;
789 return *yylexp++; 789 return *yylexp++;
790 } else if(yyps->save) { 790 } else if(yyps->save) {
791 /* in trial mode; save scanner results for future parse attempts */ 791 /* in trial mode; save scanner results for future parse attempts */
792 if(yylvp == yylvlim) 792 if(yylvp == yylvlim)
793 yyExpand(); 793 yyExpand();
794 *yylexp = yylex(&yylval, scanner); 794 *yylexp = yylex(yylval, scanner);
795 *yylvp++ = yylval; 795 *yylvp++ = *yylval;
796 yylve++; 796 yylve++;
797 *yylpp++ = yyposn; 797 *yylpp++ = yyposn;
798 yylpe++; 798 yylpe++;
799 return *yylexp++; 799 return *yylexp++;
800 } else { /* normal operation, no conflict encountered */ 800 } else { /* normal operation, no conflict encountered */
801 return yylex(&yylval, scanner); 801 return yylex(yylval, scanner);
802 } 802 }
803} 803}
804 804