diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-09-25 18:52:00 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-09-25 18:52:00 -0300 |
commit | 0af581f0bf5a7d0d67803a1a25959a53d5bb6cda (patch) | |
tree | 308955cc0ef9a22e3447b44fcf0d244d3965a50e /lua.stx | |
parent | 2a506ea9d2ed9531352c91a4930bf80549e2e495 (diff) | |
download | lua-0af581f0bf5a7d0d67803a1a25959a53d5bb6cda.tar.gz lua-0af581f0bf5a7d0d67803a1a25959a53d5bb6cda.tar.bz2 lua-0af581f0bf5a7d0d67803a1a25959a53d5bb6cda.zip |
new way to handle pragmas (at the lexical level, instead of parsing).
Diffstat (limited to 'lua.stx')
-rw-r--r-- | lua.stx | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | 2 | ||
3 | char *rcs_luastx = "$Id: lua.stx,v 3.38 1996/07/24 14:38:12 roberto Exp roberto $"; | 3 | char *rcs_luastx = "$Id: lua.stx,v 3.39 1996/09/24 17:29:50 roberto Exp roberto $"; |
4 | 4 | ||
5 | #include <stdio.h> | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
@@ -440,7 +440,6 @@ void lua_parse (TFunc *tf) | |||
440 | %token <vFloat> NUMBER | 440 | %token <vFloat> NUMBER |
441 | %token <vWord> STRING | 441 | %token <vWord> STRING |
442 | %token <pTStr> NAME | 442 | %token <pTStr> NAME |
443 | %token <vInt> DEBUG | ||
444 | 443 | ||
445 | %type <vLong> PrepJump | 444 | %type <vLong> PrepJump |
446 | %type <vLong> exprlist, exprlist1 /* if > 0, points to function return | 445 | %type <vLong> exprlist, exprlist1 /* if > 0, points to function return |
@@ -469,14 +468,10 @@ void lua_parse (TFunc *tf) | |||
469 | chunk : chunklist ret | 468 | chunk : chunklist ret |
470 | 469 | ||
471 | chunklist : /* empty */ | 470 | chunklist : /* empty */ |
472 | | chunklist globalstat | 471 | | chunklist stat sc |
473 | | chunklist function | 472 | | chunklist function |
474 | ; | 473 | ; |
475 | 474 | ||
476 | globalstat : stat sc | ||
477 | | setdebug | ||
478 | ; | ||
479 | |||
480 | function : FUNCTION funcname body | 475 | function : FUNCTION funcname body |
481 | { | 476 | { |
482 | code_byte(PUSHFUNCTION); | 477 | code_byte(PUSHFUNCTION); |
@@ -804,7 +799,4 @@ decinit : /* empty */ { $$ = 0; } | |||
804 | | '=' exprlist1 { $$ = $2; } | 799 | | '=' exprlist1 { $$ = $2; } |
805 | ; | 800 | ; |
806 | 801 | ||
807 | setdebug : DEBUG { lua_debug = $1; } | ||
808 | ; | ||
809 | |||
810 | %% | 802 | %% |