version 1.14, 2002/12/22 02:08:29 |
version 1.16, 2003/05/14 09:18:38 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/parse/parse.y,v 1.13 2002/12/09 00:42:15 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/parse.y,v 1.15 2003/05/14 06:20:12 noro Exp $ |
*/ |
*/ |
%{ |
%{ |
#define malloc(x) GC_malloc(x) |
#define malloc(x) GC_malloc(x) |
|
|
|
|
#define NOPR (prresult=0) |
#define NOPR (prresult=0) |
|
|
extern int gdef; |
extern int gdef,mgdef; |
extern SNODE parse_snode; |
extern SNODE parse_snode; |
extern int main_parser, allow_create_var; |
extern int main_parser, allow_create_var; |
|
|
Line 89 extern jmp_buf env; |
|
Line 89 extern jmp_buf env; |
|
pointer p; |
pointer p; |
} |
} |
|
|
%token <i> STRUCT POINT NEWSTRUCT ANS FDEF PFDEF GLOBAL CMP OR AND CAR CDR QUOTED |
%token <i> STRUCT POINT NEWSTRUCT ANS FDEF PFDEF MODDEF MODEND GLOBAL MGLOBAL CMP OR AND CAR CDR QUOTED |
%token <i> DO WHILE FOR IF ELSE BREAK RETURN CONTINUE PARIF MAP RECMAP TIMER GF2NGEN GFPNGEN GFSNGEN GETOPT |
%token <i> DO WHILE FOR IF ELSE BREAK RETURN CONTINUE PARIF MAP RECMAP TIMER GF2NGEN GFPNGEN GFSNGEN GETOPT |
%token <i> FOP_AND FOP_OR FOP_IMPL FOP_REPL FOP_EQUIV FOP_NOT LOP |
%token <i> FOP_AND FOP_OR FOP_IMPL FOP_REPL FOP_EQUIV FOP_NOT LOP |
%token <p> FORMULA UCASE LCASE STR SELF BOPASS |
%token <p> FORMULA UCASE LCASE STR SELF BOPASS |
|
|
{ $$ = 0; } |
{ $$ = 0; } |
| GLOBAL { gdef=1; } pvars { gdef=0; } tail |
| GLOBAL { gdef=1; } pvars { gdef=0; } tail |
{ $$ = 0; } |
{ $$ = 0; } |
|
| MGLOBAL { mgdef=1; } pvars { mgdef=0; } tail |
|
{ $$ = 0; } |
| STRUCT rawstr '{' members '}' tail |
| STRUCT rawstr '{' members '}' tail |
{ structdef($2,$4); $$ = 0; } |
{ structdef($2,$4); $$ = 0; } |
| expr tail |
| expr tail |
|
|
| FDEF LCASE { mkpvs(); } '(' node ')' desc '{' stats '}' |
| FDEF LCASE { mkpvs(); } '(' node ')' desc '{' stats '}' |
{ |
{ |
mkuf($2,asir_infile->name,$5, |
mkuf($2,asir_infile->name,$5, |
mksnode(1,S_CPLX,$9),$1,asir_infile->ln,$7); |
mksnode(1,S_CPLX,$9),$1,asir_infile->ln,$7,CUR_MODULE); |
$$ = 0; NOPR; |
$$ = 0; NOPR; |
} |
} |
|
| MODDEF LCASE tail |
|
{ CUR_MODULE = mkmodule($2); MPVS = CUR_MODULE->pvs; $$ = 0; NOPR; } |
|
| MODEND tail |
|
{ CUR_MODULE = 0; MPVS = 0; $$ = 0; NOPR; } |
| error tail |
| error tail |
{ yyerrok; $$ = 0; } |
{ yyerrok; $$ = 0; } |
; |
; |