aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-08 17:10:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-08 17:10:05 -0300
commitf8df21bd2071c4e3729d37d1552f54ca2742551a (patch)
tree6d85e7fd9f86bfb6879c0edd60780b1f40325027 /lparser.c
parentd3902cfa81021bca0a8c30b3ad79a1e2367f6621 (diff)
downloadlua-f8df21bd2071c4e3729d37d1552f54ca2742551a.tar.gz
lua-f8df21bd2071c4e3729d37d1552f54ca2742551a.tar.bz2
lua-f8df21bd2071c4e3729d37d1552f54ca2742551a.zip
`luaconf.h´ exports all its definitions always (so all of them
must have a lua/LUA prefix).
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 9246d44f..373dbeaa 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.15 2005/03/08 18:00:16 roberto Exp roberto $ 2** $Id: lparser.c,v 2.16 2005/03/08 18:16:45 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 > LUA_MAXPARSERLEVEL) \ 36#define enterlevel(ls) if (++(ls)->nestlevel > LUAC_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, MAXVARS, "local variables"); 184 luaY_checklimit(fs, fs->nactvar+n+1, LUAC_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, MAXUPVALUES, "upvalues"); 216 luaY_checklimit(fs, f->nups + 1, LUAC_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[MAXEXPWHILE + EXTRAEXP]; 996 Instruction codeexp[LUAC_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 > MAXEXPWHILE) 1014 if (sizeexp > LUAC_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];