From 7b8166d7b3949839bffcc15e167269e4a6d4660c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 24 Sep 1996 14:29:50 -0300 Subject: a chunk may end with a return. --- lua.stx | 13 +++++++------ 1 file 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 @@ %{ -char *rcs_luastx = "$Id: lua.stx,v 3.37 1996/05/28 21:07:32 roberto Exp roberto $"; +char *rcs_luastx = "$Id: lua.stx,v 3.38 1996/07/24 14:38:12 roberto Exp roberto $"; #include #include @@ -428,7 +428,7 @@ void lua_parse (TFunc *tf) TaggedString *pTStr; } -%start functionlist +%start chunk %token WRONGTOKEN %token NIL @@ -466,11 +466,12 @@ void lua_parse (TFunc *tf) %% /* beginning of rules section */ +chunk : chunklist ret -functionlist : /* empty */ - | functionlist globalstat - | functionlist function - ; +chunklist : /* empty */ + | chunklist globalstat + | chunklist function + ; globalstat : stat sc | setdebug -- cgit v1.2.3-55-g6feb