sims.mdt
Class TmParser
java.lang.Object
sims.mdt.TmParser
- All Implemented Interfaces:
- Errors
public class TmParser
- extends java.lang.Object
- implements Errors
Fields inherited from interface sims.mdt.Errors |
error1, error10, error11, error12, error13, error2, error3, error4, error5, error6, error7, error8, error9 |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TmParser
public TmParser(java.lang.String inFile,
MachineRead m)
throws java.io.IOException,
ExceptionCompilation
- Initialize the parser.
- Parameters:
inFile
- a string of the file to parse name.m
- the MachineRead instance associated to the parser.
- Throws:
java.io.IOException
ExceptionCompilation
getInstructions
public java.lang.String getInstructions(int i)
- Returns:
- the instruction at line i
getNbInstructions
public int getNbInstructions()
- Returns:
- the number of instructions read.
getStartVert
public java.lang.String getStartVert(int i)
- Returns:
- the (String) start state/vertex for the i-th instruction
getEndVert
public java.lang.String getEndVert(int i)
- Parameters:
i
- an index of an instruction.
- Returns:
- the ending state (end vertex in the graph) of the instruction i.
getLabel
public java.lang.String getLabel(int i)
- Returns:
- the graph-label of the i-th transition
getNbStates
public int getNbStates()
- Returns:
- the number of states
getInstComp
public java.lang.String getInstComp(int i,
int j)
- Parameters:
i
- indice of instruction linej
- indice of component in the line
- Returns:
- the jth component of instruction i
getInstCard
public int getInstCard(int i)
- Returns:
- the size (nb of elements) of instruction i
getAlphabet
public java.util.HashMap getAlphabet()
- Returns:
- the HashMap of the alphabets read.
getLine
public int getLine(int nbinst)
- Returns:
- the number of the line from its index.