summaryrefslogtreecommitdiff
path: root/lex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-13 12:39:04 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-13 12:39:04 -0200
commite4645c835d2b2e49f0d39eb3069638f60da388cd (patch)
tree6e87114792a20333667fa2bebf37b2ed812890dd /lex.c
parent0c5ac77c9949ecfe83537ebe2de355a5286ce6ae (diff)
downloadlua-e4645c835d2b2e49f0d39eb3069638f60da388cd.tar.gz
lua-e4645c835d2b2e49f0d39eb3069638f60da388cd.tar.bz2
lua-e4645c835d2b2e49f0d39eb3069638f60da388cd.zip
small changes in 'ugly' part.
Diffstat (limited to 'lex.c')
-rw-r--r--lex.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/lex.c b/lex.c
index 55bb08f6..7aad1d0d 100644
--- a/lex.c
+++ b/lex.c
@@ -1,4 +1,4 @@
1char *rcs_lex = "$Id: lex.c,v 2.8 1994/10/18 17:34:34 celes Exp roberto $"; 1char *rcs_lex = "$Id: lex.c,v 2.9 1994/11/03 17:09:20 roberto Exp roberto $";
2 2
3 3
4#include <ctype.h> 4#include <ctype.h>
@@ -246,22 +246,17 @@ fraction:
246 yylval.vFloat = a; 246 yylval.vFloat = a;
247 return NUMBER; 247 return NUMBER;
248 } 248 }
249 case U_and: next(); return AND; 249
250 case U_do: next(); return DO; 250 case U_and: case U_do: case U_else: case U_elseif: case U_end:
251 case U_else: next(); return ELSE; 251 case U_function: case U_if: case U_local: case U_nil: case U_not:
252 case U_elseif: next(); return ELSEIF; 252 case U_or: case U_repeat: case U_return: case U_then:
253 case U_end: next(); return END; 253 case U_until: case U_while:
254 case U_function: next(); return FUNCTION; 254 {
255 case U_if: next(); return IF; 255 int old = current;
256 case U_local: next(); return LOCAL; 256 next();
257 case U_nil: next(); return NIL; 257 return reserved[old-U_and].token;
258 case U_not: next(); return NOT; 258 }
259 case U_or: next(); return OR; 259
260 case U_repeat: next(); return REPEAT;
261 case U_return: next(); return RETURN;
262 case U_then: next(); return THEN;
263 case U_until: next(); return UNTIL;
264 case U_while: next(); return WHILE;
265 case U_eq: next(); return EQ; 260 case U_eq: next(); return EQ;
266 case U_le: next(); return LE; 261 case U_le: next(); return LE;
267 case U_ge: next(); return GE; 262 case U_ge: next(); return GE;