aboutsummaryrefslogtreecommitdiff
path: root/lua.stx
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-09-25 18:52:00 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-09-25 18:52:00 -0300
commit0af581f0bf5a7d0d67803a1a25959a53d5bb6cda (patch)
tree308955cc0ef9a22e3447b44fcf0d244d3965a50e /lua.stx
parent2a506ea9d2ed9531352c91a4930bf80549e2e495 (diff)
downloadlua-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.stx12
1 files changed, 2 insertions, 10 deletions
diff --git a/lua.stx b/lua.stx
index be186696..1e00f88a 100644
--- a/lua.stx
+++ b/lua.stx
@@ -1,6 +1,6 @@
1%{ 1%{
2 2
3char *rcs_luastx = "$Id: lua.stx,v 3.38 1996/07/24 14:38:12 roberto Exp roberto $"; 3char *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)
469chunk : chunklist ret 468chunk : chunklist ret
470 469
471chunklist : /* empty */ 470chunklist : /* empty */
472 | chunklist globalstat 471 | chunklist stat sc
473 | chunklist function 472 | chunklist function
474 ; 473 ;
475 474
476globalstat : stat sc
477 | setdebug
478 ;
479
480function : FUNCTION funcname body 475function : 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
807setdebug : DEBUG { lua_debug = $1; }
808 ;
809
810%% 802%%