public BinaryExpression(string op, Expression left, Expression right, int precedence, int associativity) : base(precedence)
	  {
		this.op = op;
		this.left = left;
		this.right = right;
		this.associativity = associativity;
	  }
Example #2
0
 public FunctionCall(Expression function, Expression[] arguments, bool multiple)
     : base(PRECEDENCE_ATOMIC)
 {
     this.function = function;
     this.arguments = arguments;
     this.multiple = multiple;
 }
Example #3
0
	  public TableReference(Expression table, Expression index) : base(PRECEDENCE_ATOMIC)
	  {
		this.table = table;
		this.index = index;
	  }
Example #4
0
 public static BinaryExpression makeSUB(Expression left, Expression right)
 {
     return new BinaryExpression("-", left, right, PRECEDENCE_ADD, ASSOCIATIVITY_LEFT);
 }
Example #5
0
 public static UnaryExpression makeUNM(Expression expression)
 {
     return new UnaryExpression("-", expression, PRECEDENCE_UNARY);
 }
Example #6
0
 public static UnaryExpression makeNOT(Expression expression)
 {
     return new UnaryExpression("not ", expression, PRECEDENCE_UNARY);
 }
Example #7
0
 public static BinaryExpression makePOW(Expression left, Expression right)
 {
     return new BinaryExpression("^", left, right, PRECEDENCE_POW, ASSOCIATIVITY_RIGHT);
 }
Example #8
0
 public static BinaryExpression makeMUL(Expression left, Expression right)
 {
     return new BinaryExpression("*", left, right, PRECEDENCE_MUL, ASSOCIATIVITY_LEFT);
 }
Example #9
0
 public static BinaryExpression makeCONCAT(Expression left, Expression right)
 {
     return new BinaryExpression("..", left, right, PRECEDENCE_CONCAT, ASSOCIATIVITY_RIGHT);
 }
Example #10
0
 protected internal static void printUnary(Output @out, string op, Expression expression)
 {
     @out.print(op);
     expression.print(@out);
 }
Example #11
0
 protected internal static void printBinary(Output @out, string op, Expression left, Expression right)
 {
     left.print(@out);
     @out.print(" ");
     @out.print(op);
     @out.print(" ");
     right.print(@out);
 }
Example #12
0
	  public UnaryExpression(string op, Expression expression, int precedence) : base(precedence)
	  {
		this.op = op;
		this.expression = expression;
	  }