pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree.expressions
Class TernaryExpression

java.lang.Object
  |
  +--pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree.AbstractSyntaxTree
        |
        +--pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree.Expression
              |
              +--pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree.expressions.TernaryExpression
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConditionExpression, RangeExpression

public abstract class TernaryExpression
extends Expression

The TernaryExpression class represents the ternaryexpression nodes in the abstract syntax tree.

Author:
Jakub Trzetrzelewski, jakub_trzetrzelewski@yahoo.com
See Also:
Serialized Form

Field Summary
 Expression l
           
 Expression m
           
 Expression r
           
 
Constructor Summary
TernaryExpression(Expression l, Expression m, Expression r)
          Creates a new ternary expression node with the given expressions l, m and r.
 
Method Summary
 void accept(Visitor v)
          Method responsible for traversing the abstract syntax tree structure.
 void show(java.lang.String st)
          Method responsible for displaying the ternary node.
 
Methods inherited from class pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree.AbstractSyntaxTree
getLongestTypeAsSpacesString, getPreparedTypeAsString, getSpellingAndPosition, getTypeAsString, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

l

public Expression l

m

public Expression m

r

public Expression r
Constructor Detail

TernaryExpression

public TernaryExpression(Expression l,
                         Expression m,
                         Expression r)
Creates a new ternary expression node with the given expressions l, m and r.
Parameters:
l - any expression.
m - any expression.
r - any expression.
Method Detail

accept

public void accept(Visitor v)
            throws EvalException
Method responsible for traversing the abstract syntax tree structure.
Overrides:
accept in class AbstractSyntaxTree
Parameters:
v - the visitor.
Throws:
EvalException - if evaluation fails.
See Also:
Visitor

show

public void show(java.lang.String st)
Method responsible for displaying the ternary node.
Overrides:
show in class AbstractSyntaxTree
Parameters:
st - the string which is an auxiliary tabulator.