new way to handle pragmas (at the lexical level, instead of parsing).

This commit is contained in:
Roberto Ierusalimschy
1996-09-25 18:52:00 -03:00
parent 2a506ea9d2
commit 0af581f0bf
2 changed files with 35 additions and 35 deletions

12
lua.stx
View File

@@ -1,6 +1,6 @@
%{
char *rcs_luastx = "$Id: lua.stx,v 3.38 1996/07/24 14:38:12 roberto Exp roberto $";
char *rcs_luastx = "$Id: lua.stx,v 3.39 1996/09/24 17:29:50 roberto Exp roberto $";
#include <stdio.h>
#include <stdlib.h>
@@ -440,7 +440,6 @@ void lua_parse (TFunc *tf)
%token <vFloat> NUMBER
%token <vWord> STRING
%token <pTStr> NAME
%token <vInt> DEBUG
%type <vLong> PrepJump
%type <vLong> exprlist, exprlist1 /* if > 0, points to function return
@@ -469,14 +468,10 @@ void lua_parse (TFunc *tf)
chunk : chunklist ret
chunklist : /* empty */
| chunklist globalstat
| chunklist stat sc
| chunklist function
;
globalstat : stat sc
| setdebug
;
function : FUNCTION funcname body
{
code_byte(PUSHFUNCTION);
@@ -804,7 +799,4 @@ decinit : /* empty */ { $$ = 0; }
| '=' exprlist1 { $$ = $2; }
;
setdebug : DEBUG { lua_debug = $1; }
;
%%