interpretationJajacode
Class InterpretationJajacode

java.lang.Object
  |
  +--interpretationJajacode.InterpretationJajacode

public class InterpretationJajacode
extends java.lang.Object

Classe permettant de representer un interpreteur JajaCode

Author:
Lionel Droz-Bartholet

Field Summary
private  int addr
           
private  memoire.EtatMemoire mem
           
private  java.lang.String[] tabBreakPoint
           
private  int tailleBreakPoint
           
private  boolean termine
           
private  java.util.Vector vectInterprete
           
 
Constructor Summary
InterpretationJajacode(java.util.Vector vect)
           
 
Method Summary
private  boolean appartient(int adresse)
           
 memoire.EtatMemoire getEtatMemoire()
          retour l'état mémoire actuel
 int getNumeroLigne()
          indique le numéro de la ligne ou se situe le pointeur d'instruction
 int gotoNextBreakPoint()
          execute l'interpretation jusqu'au premier break point rencontré
 void initInterpreteurJajaCode(memoire.EtatMemoire mem)
          (Ré)Initialise l'interpretation
 int nextInstruction()
          permet d'interpreter l'instruction suivante
 void setBreakPoint(java.lang.String buff)
          Initialise la liste des points d'arrêt
 boolean termineProgramme()
          indique si l'interprétation est terminer ou non
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vectInterprete

private java.util.Vector vectInterprete

tabBreakPoint

private java.lang.String[] tabBreakPoint

mem

private memoire.EtatMemoire mem

addr

private int addr

tailleBreakPoint

private int tailleBreakPoint

termine

private boolean termine
Constructor Detail

InterpretationJajacode

public InterpretationJajacode(java.util.Vector vect)
Method Detail

nextInstruction

public int nextInstruction()
permet d'interpreter l'instruction suivante

Returns:
retourne l'adresse de l'instruction suivante

getEtatMemoire

public memoire.EtatMemoire getEtatMemoire()
retour l'état mémoire actuel


setBreakPoint

public void setBreakPoint(java.lang.String buff)
Initialise la liste des points d'arrêt

Parameters:
buff - liste des adresses des breaks points (String)

appartient

private boolean appartient(int adresse)

gotoNextBreakPoint

public int gotoNextBreakPoint()
execute l'interpretation jusqu'au premier break point rencontré

Returns:
retourne l'adresse de l'instruction suivante

initInterpreteurJajaCode

public void initInterpreteurJajaCode(memoire.EtatMemoire mem)
(Ré)Initialise l'interpretation


termineProgramme

public boolean termineProgramme()
indique si l'interprétation est terminer ou non

Returns:
retourne true si l'interpretation est terminée, false sinon

getNumeroLigne

public int getNumeroLigne()
indique le numéro de la ligne ou se situe le pointeur d'instruction

Returns:
retourne e numéro de la ligne