version 1.11, 2020/06/10 21:02:33 |
version 1.12, 2020/06/10 21:03:56 |
|
|
|
|
Node *beginloc = 0; |
Node *beginloc = 0; |
Node *endloc = 0; |
Node *endloc = 0; |
int infunc = 0; /* = 1 if in arglist or body of func */ |
bool infunc = false; /* = true if in arglist or body of func */ |
int inloop = 0; /* = 1 if in while, for, do */ |
int inloop = 0; /* >= 1 if in while, for, do; can't be bool, since loops can next */ |
char *curfname = 0; /* current function name */ |
char *curfname = 0; /* current function name */ |
Node *arglist = 0; /* list of args for current function */ |
Node *arglist = 0; /* list of args for current function */ |
%} |
%} |
|
|
{ beginloc = linkum(beginloc, $3); $$ = 0; } |
{ beginloc = linkum(beginloc, $3); $$ = 0; } |
| XEND lbrace stmtlist '}' |
| XEND lbrace stmtlist '}' |
{ endloc = linkum(endloc, $3); $$ = 0; } |
{ endloc = linkum(endloc, $3); $$ = 0; } |
| FUNC funcname '(' varlist rparen {infunc++;} lbrace stmtlist '}' |
| FUNC funcname '(' varlist rparen {infunc = true;} lbrace stmtlist '}' |
{ infunc--; curfname=0; defn((Cell *)$2, $4, $8); $$ = 0; } |
{ infunc = false; curfname=0; defn((Cell *)$2, $4, $8); $$ = 0; } |
; |
; |
|
|
pa_stats: |
pa_stats: |