diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-09-24 14:29:50 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-09-24 14:29:50 -0300 |
commit | 7b8166d7b3949839bffcc15e167269e4a6d4660c (patch) | |
tree | 2c5d6e153e7a990d0386bc2bda3bdaf9eb11eba3 | |
parent | 3636bbad3acb6c1671f20ec3f7dc65507146d7f4 (diff) | |
download | lua-7b8166d7b3949839bffcc15e167269e4a6d4660c.tar.gz lua-7b8166d7b3949839bffcc15e167269e4a6d4660c.tar.bz2 lua-7b8166d7b3949839bffcc15e167269e4a6d4660c.zip |
a chunk may end with a return.
-rw-r--r-- | lua.stx | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | 2 | ||
3 | char *rcs_luastx = "$Id: lua.stx,v 3.37 1996/05/28 21:07:32 roberto Exp roberto $"; | 3 | char *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 | ||
469 | chunk : chunklist ret | ||
469 | 470 | ||
470 | functionlist : /* empty */ | 471 | chunklist : /* empty */ |
471 | | functionlist globalstat | 472 | | chunklist globalstat |
472 | | functionlist function | 473 | | chunklist function |
473 | ; | 474 | ; |
474 | 475 | ||
475 | globalstat : stat sc | 476 | globalstat : stat sc |
476 | | setdebug | 477 | | setdebug |