Skip to content
Snippets Groups Projects
Commit 8d57d576 authored by JasonJPu's avatar JasonJPu
Browse files

Fix issue

parent 99eed1da
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -89,11 +89,11 @@ Select_List
}
| Col
{ printf("select list attr path\n");
$$ = create_rename_operator($1, NULL);
$$ = create_assign_operator($1, NULL);
}
| Col ',' Select_List
{ printf("Select list\n");
$$ = create_rename_operator($1, $2);
$$ = create_assign_operator($1, $2);
}
;
......
No preview for this file type
......@@ -121,9 +121,8 @@ cons_cell* create_cross_operator(cons_cell* ra1, cons_cell* ra2) {
}
// For when you want to assign column names to another name
// THIS DOESN"T WORK FOR JASON"S COMPILER SO REVERTING BACK BUT LEFT HERE IN CASE WE NEED IT LATER XD
cons_cell* create_rename_operator(cons_cell* col, cons_cell* next) {
cons_cell* original_cons = create_cons_cell(NULL, NULL);//col, next);
cons_cell* create_rename_operator(cons_cell* table, cons_cell* var) {
cons_cell* original_cons = create_cons_cell(table, var);
char operator[7] = "RENAME\0";
cons_cell* operator_cons = create_cons_cell_w_atom(operator, original_cons);
return operator_cons;
......
......@@ -76,7 +76,8 @@ cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term
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_cross_operator(cons_cell* ra1, cons_cell* ra2);
cons_cell* create_assign_operator(cons_cell* spcol, cons_cell* next);
cons_cell* create_rename_operator(cons_cell* table, cons_cell* var);
cons_cell* create_assign_operator(cons_cell* table, cons_cell* var);
cons_cell* create_proj_operator(cons_cell* assign, cons_cell* ra);
cons_cell* create_not_operator(cons_cell* ra1, cons_cell* ra2);
cons_cell* create_limit_operator(cons_cell* ra1, cons_cell* ra2);
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment