diff options
Diffstat (limited to '')
| -rw-r--r-- | lex.c | 25 |
1 files changed, 2 insertions, 23 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | char *rcs_lex = "$Id: lex.c,v 2.28 1996/02/14 19:11:09 roberto Exp roberto $"; | 1 | char *rcs_lex = "$Id: lex.c,v 2.29 1996/02/26 22:35:51 roberto Exp roberto $"; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | #include <ctype.h> | 4 | #include <ctype.h> |
| @@ -12,7 +12,6 @@ char *rcs_lex = "$Id: lex.c,v 2.28 1996/02/14 19:11:09 roberto Exp roberto $"; | |||
| 12 | #include "inout.h" | 12 | #include "inout.h" |
| 13 | #include "luadebug.h" | 13 | #include "luadebug.h" |
| 14 | #include "parser.h" | 14 | #include "parser.h" |
| 15 | #include "ugly.h" | ||
| 16 | 15 | ||
| 17 | #define MINBUFF 260 | 16 | #define MINBUFF 260 |
| 18 | 17 | ||
| @@ -143,9 +142,6 @@ int luaY_lex (void) | |||
| 143 | while (1) | 142 | while (1) |
| 144 | { | 143 | { |
| 145 | yytextLast = yytext; | 144 | yytextLast = yytext; |
| 146 | #if 0 | ||
| 147 | fprintf(stderr,"'%c' %d\n",current,current); | ||
| 148 | #endif | ||
| 149 | switch (current) | 145 | switch (current) |
| 150 | { | 146 | { |
| 151 | case EOF: | 147 | case EOF: |
| @@ -177,8 +173,7 @@ int luaY_lex (void) | |||
| 177 | 173 | ||
| 178 | case '-': | 174 | case '-': |
| 179 | save_and_next(); | 175 | save_and_next(); |
| 180 | if (current != '-') return '-'; /* else goes through */ | 176 | if (current != '-') return '-'; |
| 181 | case '#': | ||
| 182 | do { next(); } while (current != '\n' && current != 0); | 177 | do { next(); } while (current != '\n' && current != 0); |
| 183 | continue; | 178 | continue; |
| 184 | 179 | ||
| @@ -323,22 +318,6 @@ fraction: | |||
| 323 | return NUMBER; | 318 | return NUMBER; |
| 324 | } | 319 | } |
| 325 | 320 | ||
| 326 | case U_and: case U_do: case U_else: case U_elseif: case U_end: | ||
| 327 | case U_function: case U_if: case U_local: case U_nil: case U_not: | ||
| 328 | case U_or: case U_repeat: case U_return: case U_then: | ||
| 329 | case U_until: case U_while: | ||
| 330 | { | ||
| 331 | int old = current; | ||
| 332 | next(); | ||
| 333 | return reserved[old-U_and].token; | ||
| 334 | } | ||
| 335 | |||
| 336 | case U_eq: next(); return EQ; | ||
| 337 | case U_le: next(); return LE; | ||
| 338 | case U_ge: next(); return GE; | ||
| 339 | case U_ne: next(); return NE; | ||
| 340 | case U_sc: next(); return CONC; | ||
| 341 | |||
| 342 | default: /* also end of file */ | 321 | default: /* also end of file */ |
| 343 | { | 322 | { |
| 344 | save_and_next(); | 323 | save_and_next(); |
