summaryrefslogtreecommitdiffstats
path: root/src/syntaxParser/GeneralCondenseExpr.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntaxParser/GeneralCondenseExpr.java')
-rw-r--r--src/syntaxParser/GeneralCondenseExpr.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/syntaxParser/GeneralCondenseExpr.java b/src/syntaxParser/GeneralCondenseExpr.java
new file mode 100644
index 0000000..397e36a
--- /dev/null
+++ b/src/syntaxParser/GeneralCondenseExpr.java
@@ -0,0 +1,37 @@
+package syntaxParser;
+/**
+ * GeneralCondenseExpr
+ * Creation date: (3/3/2003 2:28:43 AM)
+ * @author: mattia parigiani, Sorin stancu-Mara
+ */
+class GeneralCondenseExpr implements IParseTreeNode {
+
+ String condenseOpType;
+ ScalarExpr scalarExpr;
+ VariableList variables;
+ BooleanScalarExpr condition;
+
+ public GeneralCondenseExpr(String op, VariableList vars, ScalarExpr val) {
+ condenseOpType = op;
+ variables = vars;
+ scalarExpr = val;
+ }
+
+ public GeneralCondenseExpr(String op, VariableList vars, BooleanScalarExpr cond, ScalarExpr val) {
+ condenseOpType = op;
+ variables = vars;
+ scalarExpr = val;
+ condition = cond;
+ }
+
+ public String toXML(){
+ String result = "<condense>" + variables.toXML();
+ if (condition != null)
+ result += "<where>" + condition.toXML() + "</where>";
+ result += scalarExpr.toXML() + "</condense>";
+ return result;
+ }
+
+
+
+}