aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-09-24 14:29:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-09-24 14:29:50 -0300
commit7b8166d7b3949839bffcc15e167269e4a6d4660c (patch)
tree2c5d6e153e7a990d0386bc2bda3bdaf9eb11eba3
parent3636bbad3acb6c1671f20ec3f7dc65507146d7f4 (diff)
downloadlua-7b8166d7b3949839bffcc15e167269e4a6d4660c.tar.gz
lua-7b8166d7b3949839bffcc15e167269e4a6d4660c.tar.bz2
lua-7b8166d7b3949839bffcc15e167269e4a6d4660c.zip
a chunk may end with a return.
-rw-r--r--lua.stx13
1 files changed, 7 insertions, 6 deletions
diff --git a/lua.stx b/lua.stx
index 6032b993..be186696 100644
--- a/lua.stx
+++ b/lua.stx
@@ -1,6 +1,6 @@
1%{ 1%{
2 2
3char *rcs_luastx = "$Id: lua.stx,v 3.37 1996/05/28 21:07:32 roberto Exp roberto $"; 3char *rcs_luastx = "$Id: lua.stx,v 3.38 1996/07/24 14:38:12 roberto Exp roberto $";
4 4
5#include <stdio.h> 5#include <stdio.h>
6#include <stdlib.h> 6#include <stdlib.h>
@@ -428,7 +428,7 @@ void lua_parse (TFunc *tf)
428 TaggedString *pTStr; 428 TaggedString *pTStr;
429} 429}
430 430
431%start functionlist 431%start chunk
432 432
433%token WRONGTOKEN 433%token WRONGTOKEN
434%token NIL 434%token NIL
@@ -466,11 +466,12 @@ void lua_parse (TFunc *tf)
466 466
467%% /* beginning of rules section */ 467%% /* beginning of rules section */
468 468
469chunk : chunklist ret
469 470
470functionlist : /* empty */ 471chunklist : /* empty */
471 | functionlist globalstat 472 | chunklist globalstat
472 | functionlist function 473 | chunklist function
473 ; 474 ;
474 475
475globalstat : stat sc 476globalstat : stat sc
476 | setdebug 477 | setdebug