org.millscript.millscript.expr
Class ConstantLeftArithExpr

java.lang.Object
  extended by org.millscript.millscript.expr.Expr<A>
      extended by org.millscript.millscript.expr.UnaryOpExpr<UnaryOpAction>
          extended by org.millscript.millscript.expr.ConstantLeftArithExpr
All Implemented Interfaces:
OneResult

public final class ConstantLeftArithExpr
extends UnaryOpExpr<UnaryOpAction>

This class implements an arithmetic expression with a constant integer value for the left hand side. This expression always returns one result.

See Also:
IntegerTools

Constructor Summary
ConstantLeftArithExpr(java.lang.String s, java.lang.Integer a, Expr<?> b)
          Creates a new arithmetic expression for the specified symbol and left and right hand side expressions.
 
Method Summary
 UnaryOpAction newAction(Action a)
          Compiles this expression into an action.
 
Methods inherited from class org.millscript.millscript.expr.UnaryOpExpr
compileIt, resolve
 
Methods inherited from class org.millscript.millscript.expr.Expr
arity, compile, isIntegerExpr, resolveList, setLineNumber, setOrigin, show, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantLeftArithExpr

public ConstantLeftArithExpr(java.lang.String s,
                             java.lang.Integer a,
                             Expr<?> b)
Creates a new arithmetic expression for the specified symbol and left and right hand side expressions.

Parameters:
s - the arithmetic symbol to make an expression for
a - the left hand side integer
b - the right hand side expression, which should return a single result
Method Detail

newAction

public UnaryOpAction newAction(Action a)
Description copied from class: UnaryOpExpr
Compiles this expression into an action. This is method performs the expression specific compilation, but does not need to handle the single expression compilation.

Specified by:
newAction in class UnaryOpExpr<UnaryOpAction>
Parameters:
a - the compiled single expression
Returns:
the Action for this expression
See Also:
UnaryOpExpr.newAction(org.millscript.millscript.action.Action)


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.