|
|
|
@ -58,9 +58,13 @@ inline |
|
|
|
enqGlobId (s_stmtQueue * sQueue, char * id) |
|
|
|
{ |
|
|
|
s_stmtQueue * ret = (sQueue == NULL) ? stmtQueueNew () : sQueue; |
|
|
|
s_stmt * val = stmtNew (STMT_CONST, NULL, STYP_EVAL, (u_stmtType) id); |
|
|
|
s_stmt * val = stmtNew ( |
|
|
|
STMT_CONST, |
|
|
|
NULL, |
|
|
|
STYP_EVAL, |
|
|
|
(u_stmtType) expValueStringNew (id)); |
|
|
|
|
|
|
|
stmtQueueEnqueue (ret, id); |
|
|
|
stmtQueueEnqueue (ret, val); |
|
|
|
|
|
|
|
return ret; |
|
|
|
} |
|
|
|
@ -363,7 +367,7 @@ genCastStringStmt (s_stmt * stmt) |
|
|
|
%} |
|
|
|
|
|
|
|
%token STMT_END ';' REPEAT COUNT FOREACH AS IF ELSE BLOCK_END UNSET |
|
|
|
%token ICAST FCAST SCAST GLOBAL /* for explicit casts */ |
|
|
|
%token ICAST FCAST SCAST GLOBAL PARENT /* for explicit casts */ |
|
|
|
%token <cPtr> IDENT |
|
|
|
%token <cPtr> HTML |
|
|
|
%token <iVal> INT |
|
|
|
@ -399,7 +403,6 @@ genCastStringStmt (s_stmt * stmt) |
|
|
|
%type <stmt> expr; |
|
|
|
%type <stmt> html; |
|
|
|
%type <stmt> block_stmt; |
|
|
|
%type <stmt> gdecl_block; |
|
|
|
%type <stmt> simple_stmt; |
|
|
|
%type <stmt> if_stmt; |
|
|
|
%type <stmt> rep_stmt; |
|
|
|
@ -408,6 +411,7 @@ genCastStringStmt (s_stmt * stmt) |
|
|
|
%type <sQue> stmt_queue; |
|
|
|
%type <sQue> block_queue; |
|
|
|
%type <sQue> glob_decl; |
|
|
|
%type <sQue> gdecl_block; |
|
|
|
|
|
|
|
%expect 1 |
|
|
|
|
|
|
|
@ -459,7 +463,7 @@ block_queue : stmt_queue { $$ = genBlockQue (NULL, $1); } |
|
|
|
* ------ |
|
|
|
*/ |
|
|
|
gdecl_block : GLOBAL ':' glob_decl BLOCK_END |
|
|
|
{ $$ = $3); } |
|
|
|
{ $$ = $3; } |
|
|
|
; |
|
|
|
|
|
|
|
glob_decl : IDENT { $$ = enqGlobId (NULL, $1); } |
|
|
|
|