version 1.29, 2005/09/13 06:40:46 |
version 1.32, 2005/09/30 01:35:25 |
|
|
* 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.28 2005/08/24 06:28:39 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/parse.y,v 1.31 2005/09/21 23:39:32 noro Exp $ |
*/ |
*/ |
%{ |
%{ |
#define malloc(x) GC_malloc(x) |
#define malloc(x) GC_malloc(x) |
Line 92 extern jmp_buf env; |
|
Line 92 extern jmp_buf env; |
|
%token <i> STRUCT POINT NEWSTRUCT ANS FDEF PFDEF MODDEF MODEND |
%token <i> STRUCT POINT NEWSTRUCT ANS FDEF PFDEF MODDEF MODEND |
%token <i> GLOBAL MGLOBAL LOCAL LOCALF CMP OR AND CAR CDR QUOTED COLONCOLON |
%token <i> GLOBAL MGLOBAL LOCAL LOCALF CMP OR AND CAR CDR QUOTED COLONCOLON |
%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> UNIFY |
|
%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 |
%token <p> '+' '-' '*' '/' '^' '%' |
%token <p> '+' '-' '*' '/' '^' '%' |
|
|
print_crossref(val); |
print_crossref(val); |
$$ = mkfnode(2,I_RECMAP,val,mkfnode(1,I_LIST,$5)); |
$$ = mkfnode(2,I_RECMAP,val,mkfnode(1,I_LIST,$5)); |
} |
} |
| UNIFY '(' expr ',' expr ')' |
|
{ |
|
$$ = mkfnode(2,I_UNIFY,$3,$5); |
|
} |
|
| LCASE '{' node '}' '(' node ')' |
| LCASE '{' node '}' '(' node ')' |
{ |
{ |
searchpf($1,(FUNC *)&val); |
searchpf($1,(FUNC *)&val); |
$$ = mkfnode(2,I_PFDERIV,val,mkfnode(1,I_LIST,$6),mkfnode(1,I_LIST,$3)); |
$$ = mkfnode(3,I_PFDERIV,val,mkfnode(1,I_LIST,$6),mkfnode(1,I_LIST,$3)); |
} |
} |
| GETOPT '(' rawstr ')' |
| GETOPT '(' rawstr ')' |
{ |
{ |
|
|
{ $$ = mkfnode(1,I_NEWCOMP,(int)structtoindex($3)); } |
{ $$ = mkfnode(1,I_NEWCOMP,(int)structtoindex($3)); } |
| QUOTED '(' expr ')' |
| QUOTED '(' expr ')' |
{ MKQUOTE(quote,$3); $$ = mkfnode(1,I_FORMULA,(pointer)quote); } |
{ MKQUOTE(quote,$3); $$ = mkfnode(1,I_FORMULA,(pointer)quote); } |
|
| '[' node '|' expr ']' |
|
{ $$ = mkfnode(2,I_CONS,$2,$4); } |
| '`' expr |
| '`' expr |
{ MKQUOTE(quote,$2); $$ = mkfnode(1,I_FORMULA,(pointer)quote); } |
{ MKQUOTE(quote,$2); $$ = mkfnode(1,I_FORMULA,(pointer)quote); } |
; |
; |