mirror of
https://github.com/lua/lua
synced 2025-04-16 18:02:47 +03:00
a chunk may end with a return.
This commit is contained in:
parent
3636bbad3a
commit
7b8166d7b3
13
lua.stx
13
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 <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -428,7 +428,7 @@ void lua_parse (TFunc *tf)
|
|||||||
TaggedString *pTStr;
|
TaggedString *pTStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
%start functionlist
|
%start chunk
|
||||||
|
|
||||||
%token WRONGTOKEN
|
%token WRONGTOKEN
|
||||||
%token NIL
|
%token NIL
|
||||||
@ -466,11 +466,12 @@ void lua_parse (TFunc *tf)
|
|||||||
|
|
||||||
%% /* beginning of rules section */
|
%% /* beginning of rules section */
|
||||||
|
|
||||||
|
chunk : chunklist ret
|
||||||
|
|
||||||
functionlist : /* empty */
|
chunklist : /* empty */
|
||||||
| functionlist globalstat
|
| chunklist globalstat
|
||||||
| functionlist function
|
| chunklist function
|
||||||
;
|
;
|
||||||
|
|
||||||
globalstat : stat sc
|
globalstat : stat sc
|
||||||
| setdebug
|
| setdebug
|
||||||
|
Loading…
x
Reference in New Issue
Block a user