From 5b9afe05cccf68c58ab5bc679533f6d00b83c99e Mon Sep 17 00:00:00 2001
From: expan <expan@student.cs.uwaterloo.ca>
Date: Thu, 7 Mar 2019 16:21:48 -0500
Subject: [PATCH] Added term,col,attr,var

---
 util.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/util.c b/util.c
index 54d2e36..7fac683 100644
--- a/util.c
+++ b/util.c
@@ -129,6 +129,30 @@ cons_cell* create_table(char *table) {
 	return create_cons_cell_w_atom(operator, table_cons);
 }
 
+cons_cell* create_term(char *term) {
+	cons_cell* term_cons = create_cons_cell_w_atom(term, NULL);
+	char operator[4] = "TERM";
+	return create_cons_cell_w_atom(operator, term_cons);
+}
+
+cons_cell* create_col(char *col) {
+	cons_cell* col_cons = create_cons_cell_w_atom(col, NULL);
+	char operator[3] = "COL";
+	return create_cons_cell_w_atom(operator, col_cons);
+}
+
+cons_cell* create_attr(char *attr) {
+	cons_cell* attr_cons = create_cons_cell_w_atom(attr, NULL);
+	char operator[4] = "attr";
+	return create_cons_cell_w_atom(operator, attr_cons);
+}
+
+cons_cell* create_var(char *var) {
+	cons_cell* var_cons = create_cons_cell_w_atom(var, NULL);
+	char operator[4] = "var";
+	return create_cons_cell_w_atom(operator, var_cons);
+}
+
 const char *node_types[] = {"program", "id", "query", "select_query", "body", "table path", "union_query", 
 "select list", "attrpath", "operator", "bool", "pred"};
 
-- 
GitLab