diff --git a/SQLPGrammar_new.tab.c b/SQLPGrammar_new.tab.c index a9ace2c10a162f689ae7522e38733c6f720753e3..16b7fadd102a6fcd3c3f4fe03fcbb03308dabcaf 100644 --- a/SQLPGrammar_new.tab.c +++ b/SQLPGrammar_new.tab.c @@ -1702,7 +1702,7 @@ yyreduce: printf("BasicPred 1\n"); cons_cell* first_term = create_term((yyvsp[-2])); cons_cell* second_term = create_term((yyvsp[0])); - (yyval) = create_comp_operator((yyvsp[-1]), first_term, second_term, NULL); + (yyval) = create_comp_operator((yyvsp[-1]), first_term, second_term); } #line 1708 "SQLPGrammar_new.tab.c" /* yacc.c:1646 */ break; diff --git a/SQLPGrammar_new.y b/SQLPGrammar_new.y index 94819286ee96e5a02dd6dc80a28d576a44a8d818..79205881b7b8be8fdb8709146043ddcbbbf34516 100644 --- a/SQLPGrammar_new.y +++ b/SQLPGrammar_new.y @@ -261,7 +261,7 @@ BasicPred printf("BasicPred 1\n"); cons_cell* first_term = create_term($1); cons_cell* second_term = create_term($3); - $$ = create_comp_operator($2, first_term, second_term, NULL); + $$ = create_comp_operator($2, first_term, second_term); } | EXIST '(' Body ')' { diff --git a/SQLPParser_new b/SQLPParser_new index c581a6616ebbe3b4b72cefb0d5dc68e8140d12e4..09e61542d0efb79e36c412179ae5d4f4919957ce 100755 Binary files a/SQLPParser_new and b/SQLPParser_new differ diff --git a/util_new.c b/util_new.c index 841b86e43f65928925bd5dc16c0916b5bf69c185..02c51561df9e82441227f000b820beec4b564cac 100644 --- a/util_new.c +++ b/util_new.c @@ -84,10 +84,9 @@ cons_cell* create_op(char *op) { } // todo: why need ra -cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term2, cons_cell* ra) { +cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term2) { - cons_cell* ra_cons = create_cons_cell(ra, NULL); - cons_cell* term2_cons = create_cons_cell(term2, ra_cons); + cons_cell* term2_cons = create_cons_cell(term2, NULL); cons_cell* term1_cons = create_cons_cell(term1, term2_cons); cons_cell* op_cons = create_cons_cell(op, term1_cons); char operator[5] = "COMP\0"; diff --git a/util_new.h b/util_new.h index e4e916d23c2e63a6a07d123ce9dfb74cbce39e4c..5eddf72ee82e8b65431848e91c904fc9a2795a79 100644 --- a/util_new.h +++ b/util_new.h @@ -69,7 +69,7 @@ cons_cell* create_col(char *col); cons_cell* create_attr(char *attr); cons_cell* create_var(char *var); cons_cell* create_op(char *op); -cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term2, cons_cell* ra); +cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term2); cons_cell* create_atom_operator(cons_cell* table, cons_cell* var); cons_cell* create_union_all_operator(cons_cell* ra1, cons_cell* ra2); cons_cell* create_union_operator(cons_cell* ra1, cons_cell* ra2);