Class ExprFactory
- java.lang.Object
-
- ru.ispras.microtesk.translator.nml.antlrex.WalkerFactoryBase
-
- ru.ispras.microtesk.translator.nml.antlrex.ExprFactory
-
- All Implemented Interfaces:
WalkerContext
public final class ExprFactory extends WalkerFactoryBase
-
-
Constructor Summary
Constructors Constructor Description ExprFactory(WalkerContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expr
cast(Where w, Expr src, Type type)
Expr
coerce(Where w, Expr src, Type type)
Expr
concat(Where w, Expr left, Expr right)
Expr
condition(Where w, java.util.List<ru.ispras.fortress.util.Pair<Expr,Expr>> blocks)
Expr
constant(Where w, java.lang.String text, int radix)
Expr
evaluateConst(Where w, Expr src)
Expr
evaluateData(Where w, Expr src)
Expr
evaluateIndex(Where w, Expr src)
Expr
evaluateLogic(Where w, Expr src)
Expr
evaluateSize(Where w, Expr src)
Expr
float_to_float(Where w, Expr src, Type type)
Expr
float_to_int(Where w, Expr src, Type type)
Expr
int_to_float(Where w, Expr src, Type type)
Expr
is_type(Where w, Expr src, Type type)
Expr
isNan(Where w, Expr operand)
Expr
isSignalingNan(Where w, Expr operand)
Expr
location(Location source)
Expr
namedConstant(Where w, java.lang.String name)
ru.ispras.fortress.expression.Node
newCondition(Where w, java.util.List<ru.ispras.fortress.util.Pair<ru.ispras.fortress.expression.Node,ru.ispras.fortress.expression.Node>> blocks)
Expr
operator(Where w, java.lang.String id, Expr... operands)
Expr
repeat(Where w, Expr count, Expr expr)
Expr
round(Where w, Expr operand)
Expr
signExtend(Where w, Expr src, Type type)
Expr
sizeOf(Where w, Expr operand)
Expr
sqrt(Where w, Expr operand)
Expr
zeroExtend(Where w, Expr src, Type type)
-
Methods inherited from class ru.ispras.microtesk.translator.nml.antlrex.WalkerFactoryBase
getIr, getReporter, getSymbols, getThisArgs, raiseError, raiseError
-
-
-
-
Constructor Detail
-
ExprFactory
public ExprFactory(WalkerContext context)
-
-
Method Detail
-
constant
public Expr constant(Where w, java.lang.String text, int radix) throws SemanticException
- Throws:
SemanticException
-
namedConstant
public Expr namedConstant(Where w, java.lang.String name) throws SemanticException
- Throws:
SemanticException
-
operator
public Expr operator(Where w, java.lang.String id, Expr... operands) throws SemanticException
- Throws:
SemanticException
-
repeat
public Expr repeat(Where w, Expr count, Expr expr) throws SemanticException
- Throws:
SemanticException
-
concat
public Expr concat(Where w, Expr left, Expr right) throws SemanticException
- Throws:
SemanticException
-
sqrt
public Expr sqrt(Where w, Expr operand) throws SemanticException
- Throws:
SemanticException
-
round
public Expr round(Where w, Expr operand) throws SemanticException
- Throws:
SemanticException
-
isNan
public Expr isNan(Where w, Expr operand) throws SemanticException
- Throws:
SemanticException
-
isSignalingNan
public Expr isSignalingNan(Where w, Expr operand) throws SemanticException
- Throws:
SemanticException
-
sizeOf
public Expr sizeOf(Where w, Expr operand) throws SemanticException
- Throws:
SemanticException
-
signExtend
public Expr signExtend(Where w, Expr src, Type type) throws SemanticException
- Throws:
SemanticException
-
zeroExtend
public Expr zeroExtend(Where w, Expr src, Type type) throws SemanticException
- Throws:
SemanticException
-
coerce
public Expr coerce(Where w, Expr src, Type type) throws SemanticException
- Throws:
SemanticException
-
cast
public Expr cast(Where w, Expr src, Type type) throws SemanticException
- Throws:
SemanticException
-
int_to_float
public Expr int_to_float(Where w, Expr src, Type type) throws SemanticException
- Throws:
SemanticException
-
float_to_int
public Expr float_to_int(Where w, Expr src, Type type) throws SemanticException
- Throws:
SemanticException
-
float_to_float
public Expr float_to_float(Where w, Expr src, Type type) throws SemanticException
- Throws:
SemanticException
-
is_type
public Expr is_type(Where w, Expr src, Type type) throws SemanticException
- Throws:
SemanticException
-
condition
public Expr condition(Where w, java.util.List<ru.ispras.fortress.util.Pair<Expr,Expr>> blocks) throws SemanticException
- Throws:
SemanticException
-
newCondition
public ru.ispras.fortress.expression.Node newCondition(Where w, java.util.List<ru.ispras.fortress.util.Pair<ru.ispras.fortress.expression.Node,ru.ispras.fortress.expression.Node>> blocks) throws SemanticException
- Throws:
SemanticException
-
evaluateConst
public Expr evaluateConst(Where w, Expr src) throws SemanticException
- Throws:
SemanticException
-
evaluateSize
public Expr evaluateSize(Where w, Expr src) throws SemanticException
- Throws:
SemanticException
-
evaluateIndex
public Expr evaluateIndex(Where w, Expr src) throws SemanticException
- Throws:
SemanticException
-
evaluateLogic
public Expr evaluateLogic(Where w, Expr src) throws SemanticException
- Throws:
SemanticException
-
evaluateData
public Expr evaluateData(Where w, Expr src) throws SemanticException
- Throws:
SemanticException
-
-