tgl.stree
クラス BinExprTree

java.lang.Object
  上位を拡張 tgl.stree.BinExprTree
すべての実装されたインタフェース:
ExprTree, STree

public class BinExprTree
extends java.lang.Object
implements ExprTree

二項演算子をもつ式の構文木のクラス。


コンストラクタの概要
BinExprTree(Operator operator, ExprTree operand1, ExprTree operand2)
          二項演算子をもつ構文木のインスタンスを作成する。
 
メソッドの概要
 void accept(STreeVisitor v)
          ビジタクラスに定義されたメソッド caseBinExprTree を呼び出す。
 ExprTree getFirstOperand()
          二項演算子の左辺の引数の式の構文木を取得する。
 Operator getOperator()
          二項演算子を取得する。
 ExprTree getSecondOperand()
          二項演算子の右辺の引数の式の構文木を取得する。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

BinExprTree

public BinExprTree(Operator operator,
                   ExprTree operand1,
                   ExprTree operand2)
二項演算子をもつ構文木のインスタンスを作成する。

パラメータ:
operator - 二項演算子
operand1 - 演算子の左辺の引数
operand2 - 演算子の右辺の引数
メソッドの詳細

getOperator

public Operator getOperator()
二項演算子を取得する。

戻り値:
二項演算子

getFirstOperand

public ExprTree getFirstOperand()
二項演算子の左辺の引数の式の構文木を取得する。

戻り値:
式の構文木

getSecondOperand

public ExprTree getSecondOperand()
二項演算子の右辺の引数の式の構文木を取得する。

戻り値:
式の構文木

accept

public void accept(STreeVisitor v)
ビジタクラスに定義されたメソッド caseBinExprTree を呼び出す。

定義:
インタフェース STree 内の accept