org.millscript.millscript.expr
Class ConstantRightArithExpr

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.ConstantRightArithExpr
All Implemented Interfaces:
OneResult

public final class ConstantRightArithExpr
extends UnaryOpExpr<UnaryOpAction>

This class implements an arithmetic expression. This expression always returns one result.

See Also:
IntegerTools

Constructor Summary
ConstantRightArithExpr(java.lang.String s, Expr<?> a, java.lang.Integer 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

ConstantRightArithExpr

public ConstantRightArithExpr(java.lang.String s,
                              Expr<?> a,
                              java.lang.Integer 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 expression, which should return a single result
b - the right hand side integer
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.