aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-09 13:28:07 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-09 13:28:07 -0300
commit370d31a5593220723d222dec6e3e4019decc3309 (patch)
treee04ad903d079da2feea0b1759e89b65d1a70815c /lparser.c
parentf8df21bd2071c4e3729d37d1552f54ca2742551a (diff)
downloadlua-370d31a5593220723d222dec6e3e4019decc3309.tar.gz
lua-370d31a5593220723d222dec6e3e4019decc3309.tar.bz2
lua-370d31a5593220723d222dec6e3e4019decc3309.zip
`luacĀ“ -> `luai' (to avoid confusion with other luac stuff)
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lparser.c b/lparser.c
index 373dbeaa..a26f22f5 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.16 2005/03/08 18:16:45 roberto Exp roberto $ 2** $Id: lparser.c,v 2.17 2005/03/08 20:10:05 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -33,7 +33,7 @@
33 33
34#define luaY_checklimit(fs,v,l,m) if ((v)>(l)) errorlimit(fs,l,m) 34#define luaY_checklimit(fs,v,l,m) if ((v)>(l)) errorlimit(fs,l,m)
35 35
36#define enterlevel(ls) if (++(ls)->nestlevel > LUAC_MAXPARSERLEVEL) \ 36#define enterlevel(ls) if (++(ls)->nestlevel > LUAI_MAXPARSERLEVEL) \
37 luaX_lexerror(ls, "chunk has too many syntax levels", 0) 37 luaX_lexerror(ls, "chunk has too many syntax levels", 0)
38#define leavelevel(ls) ((ls)->nestlevel--) 38#define leavelevel(ls) ((ls)->nestlevel--)
39 39
@@ -181,7 +181,7 @@ static int registerlocalvar (LexState *ls, TString *varname) {
181 181
182static void new_localvar (LexState *ls, TString *name, int n) { 182static void new_localvar (LexState *ls, TString *name, int n) {
183 FuncState *fs = ls->fs; 183 FuncState *fs = ls->fs;
184 luaY_checklimit(fs, fs->nactvar+n+1, LUAC_MAXVARS, "local variables"); 184 luaY_checklimit(fs, fs->nactvar+n+1, LUAI_MAXVARS, "local variables");
185 fs->actvar[fs->nactvar+n] = cast(unsigned short, registerlocalvar(ls, name)); 185 fs->actvar[fs->nactvar+n] = cast(unsigned short, registerlocalvar(ls, name));
186} 186}
187 187
@@ -213,7 +213,7 @@ static int indexupvalue (FuncState *fs, TString *name, expdesc *v) {
213 } 213 }
214 } 214 }
215 /* new one */ 215 /* new one */
216 luaY_checklimit(fs, f->nups + 1, LUAC_MAXUPVALUES, "upvalues"); 216 luaY_checklimit(fs, f->nups + 1, LUAI_MAXUPVALUES, "upvalues");
217 luaM_growvector(fs->L, f->upvalues, f->nups, f->sizeupvalues, 217 luaM_growvector(fs->L, f->upvalues, f->nups, f->sizeupvalues,
218 TString *, MAX_INT, ""); 218 TString *, MAX_INT, "");
219 while (oldsize < f->sizeupvalues) f->upvalues[oldsize++] = NULL; 219 while (oldsize < f->sizeupvalues) f->upvalues[oldsize++] = NULL;
@@ -993,7 +993,7 @@ static int cond (LexState *ls) {
993 993
994static void whilestat (LexState *ls, int line) { 994static void whilestat (LexState *ls, int line) {
995 /* whilestat -> WHILE cond DO block END */ 995 /* whilestat -> WHILE cond DO block END */
996 Instruction codeexp[LUAC_MAXEXPWHILE + EXTRAEXP]; 996 Instruction codeexp[LUAI_MAXEXPWHILE + EXTRAEXP];
997 int lineexp; 997 int lineexp;
998 int i; 998 int i;
999 int sizeexp; 999 int sizeexp;
@@ -1011,7 +1011,7 @@ static void whilestat (LexState *ls, int line) {
1011 luaK_concat(fs, &v.f, fs->jpc); 1011 luaK_concat(fs, &v.f, fs->jpc);
1012 fs->jpc = NO_JUMP; 1012 fs->jpc = NO_JUMP;
1013 sizeexp = fs->pc - expinit; /* size of expression code */ 1013 sizeexp = fs->pc - expinit; /* size of expression code */
1014 if (sizeexp > LUAC_MAXEXPWHILE) 1014 if (sizeexp > LUAI_MAXEXPWHILE)
1015 luaX_syntaxerror(ls, "`while' condition too complex"); 1015 luaX_syntaxerror(ls, "`while' condition too complex");
1016 for (i = 0; i < sizeexp; i++) /* save `exp' code */ 1016 for (i = 0; i < sizeexp; i++) /* save `exp' code */
1017 codeexp[i] = fs->f->code[expinit + i]; 1017 codeexp[i] = fs->f->code[expinit + i];