|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectl3cover.translator.TranslatorBase
変換器の基底クラス
コンストラクタの概要 | |
protected |
TranslatorBase(MachineParameter machineParameter)
コンストラクタ |
メソッドの概要 | |
protected static Command |
createAssignment(Expression lhs,
Expression rhs)
代入文を作成する |
protected static int |
downcastInt(Expression expr)
Expression を int にダウンキャストする |
protected static int |
downcastInt(int intValue)
int をダウンキャスト(?) |
protected static LeftValue |
downcastLValue(Expression expr)
Expression を LeftValue にダウンキャストする |
protected static LeftValue |
downcastLValue(LeftValue lvalue)
LeftValue をダウンキャスト(?) |
protected TranslationContext |
getContext(java.util.Map map)
マッチ結果の変数束縛を、 translateOperand を用いて TranslationContext に変換する |
MachineParameter |
getMachineParameter()
抽象機械パラメータを取得する |
void |
performTranslation(ProgramGenerator output,
EventQueue input)
プログラム変換を行う |
protected void |
translateData(ProgramGenerator output,
Value value,
int size)
データを変換する |
abstract void |
translateInstruction(ProgramGenerator output,
EventQueue input,
Term term)
命令のマッチング |
abstract Expression |
translateOperand(Term term)
オペランドのマッチング |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
protected TranslatorBase(MachineParameter machineParameter)
machineParameter
- 抽象機械パラメータメソッドの詳細 |
public MachineParameter getMachineParameter()
public abstract Expression translateOperand(Term term) throws TranslationException
term
- 項
TranslationException
- 変換エラーが発生した場合public abstract void translateInstruction(ProgramGenerator output, EventQueue input, Term term) throws TranslationException
output
- 出力先term
- 項
TranslationException
- 変換エラーが発生した場合protected void translateData(ProgramGenerator output, Value value, int size) throws TranslationException
output
- 出力先value
- 変換する値size
- バイト幅
TranslationException
- 変換エラーが発生した場合public void performTranslation(ProgramGenerator output, EventQueue input) throws TranslationException
output
- 出力先input
- 入力元
TranslationException
- 変換エラーが発生した場合protected static LeftValue downcastLValue(LeftValue lvalue)
LeftValue
をダウンキャスト(?)する
lvalue
- 変換する値
protected static LeftValue downcastLValue(Expression expr) throws TranslationException
Expression
を LeftValue
にダウンキャストする
expr
- 変換する式
LeftValue
TranslationException
- 式が LeftValue
でない場合protected static int downcastInt(int intValue)
int
をダウンキャスト(?)する
intValue
- 変換する値
protected static int downcastInt(Expression expr) throws TranslationException
Expression
を int
にダウンキャストする
expr
- 変換する式
TranslationException
- 式が整数リテラルでない場合protected static Command createAssignment(Expression lhs, Expression rhs) throws TranslationException
lhs
- 左辺rhs
- 右辺
TranslationException
- 左辺が代入可能な式でない場合protected TranslationContext getContext(java.util.Map map) throws TranslationException
translateOperand
を用いて TranslationContext
に変換する
map
- 変数束縛
TranslationException
- 変換エラーが発生した場合translateOperand(Term)
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |