=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/parse.y,v retrieving revision 1.29 retrieving revision 1.33 diff -u -p -r1.29 -r1.33 --- OpenXM_contrib2/asir2000/parse/parse.y 2005/09/13 06:40:46 1.29 +++ OpenXM_contrib2/asir2000/parse/parse.y 2008/09/01 06:20:33 1.33 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * 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.32 2005/09/30 01:35:25 noro Exp $ */ %{ #define malloc(x) GC_malloc(x) @@ -92,7 +92,6 @@ extern jmp_buf env; %token STRUCT POINT NEWSTRUCT ANS FDEF PFDEF MODDEF MODEND %token GLOBAL MGLOBAL LOCAL LOCALF CMP OR AND CAR CDR QUOTED COLONCOLON %token DO WHILE FOR IF ELSE BREAK RETURN CONTINUE PARIF MAP RECMAP TIMER GF2NGEN GFPNGEN GFSNGEN GETOPT -%token UNIFY %token FOP_AND FOP_OR FOP_IMPL FOP_REPL FOP_EQUIV FOP_NOT LOP %token

FORMULA UCASE LCASE STR SELF BOPASS %token

'+' '-' '*' '/' '^' '%' @@ -307,14 +306,10 @@ pexpr : STR print_crossref(val); $$ = mkfnode(2,I_RECMAP,val,mkfnode(1,I_LIST,$5)); } - | UNIFY '(' expr ',' expr ')' - { - $$ = mkfnode(2,I_UNIFY,$3,$5); - } | LCASE '{' node '}' '(' node ')' { 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 ')' { @@ -344,8 +339,13 @@ pexpr : STR } | '(' '*' expr ')' '(' node ')' { - $$ = mkfnode(2,I_IFUNC,$3,mkfnode(1,I_LIST,$6)); + $$ = mkfnode(2,I_IFUNC,$3,mkfnode(1,I_LIST,$6),0); } + | '(' '*' expr ')' '(' node '|' optlist ')' + { + $$ = mkfnode(3,I_IFUNC,$3,mkfnode(1,I_LIST,$6), + mkfnode(1,I_LIST,$8)); + } | UCASE '(' node ')' { if ( main_parser || allow_create_var ) @@ -452,6 +452,8 @@ expr : pexpr { $$ = mkfnode(1,I_NEWCOMP,(int)structtoindex($3)); } | QUOTED '(' expr ')' { MKQUOTE(quote,$3); $$ = mkfnode(1,I_FORMULA,(pointer)quote); } + | '[' node '|' expr ']' + { $$ = mkfnode(2,I_CONS,$2,$4); } | '`' expr { MKQUOTE(quote,$2); $$ = mkfnode(1,I_FORMULA,(pointer)quote); } ;