|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.simbad.ident.Pgm
Classe qui contient le liste ordonnee des differentes instructions
Field Summary | |
static char |
CHAR_COMA
|
static char |
CHAR_DOUBLE_QUOTES
|
static char |
CHAR_LPAR
|
static char |
CHAR_QUOTES
|
static char |
CHAR_RPAR
|
private java.util.ArrayList |
instrList
|
private java.util.regex.Pattern |
pat
|
Constructor Summary | |
Pgm()
Constructor of a Pgm object. |
Method Summary | |
void |
addInstruction(java.lang.String line)
adds an instruction to the programme. |
void |
clear()
Clears a programme, by suppressing the instructions |
private Instruction |
createInstruction(java.lang.String instrName,
java.lang.String params)
Cretae an instruction object, according to the parameters. |
boolean |
equals(java.lang.Object o)
MOD-BB 21-01-04 Ajout de cette methode. |
Instruction |
getInstructionAt(int i)
Returns the n-th instruction in the programme |
Instruction[] |
getInstructions()
Returns an array with all the instructions objects in the programme |
int |
getLength()
Returns the number of instructions in the programme |
java.util.regex.Pattern |
getPattern()
Returns the compiled regular expression used to analyse an identifier with this programme. |
int |
getSize()
returns the number of instructions in a programme |
java.lang.String |
toRE()
Returns the regular expression (as a string) build with the all the regular instructions defined by the instructions |
java.lang.String |
toString()
Displays a program as a list of instructions |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final char CHAR_LPAR
public static final char CHAR_RPAR
public static final char CHAR_COMA
public static final char CHAR_QUOTES
public static final char CHAR_DOUBLE_QUOTES
private java.util.ArrayList instrList
private java.util.regex.Pattern pat
Constructor Detail |
public Pgm()
Method Detail |
public void addInstruction(java.lang.String line) throws IdentifierDescriptionException
line
- contains the instruction parameters to analyze. its syntax
is always:IdentifierDescriptionException
- in case of syntax error in the
instructionprivate Instruction createInstruction(java.lang.String instrName, java.lang.String params) throws IdentifierDescriptionException
instrName
- name of the instruction to createparams
- parameter string
IdentifierDescriptionException
- in case of errorpublic int getLength()
public Instruction getInstructionAt(int i)
i
- index of the instruction
public Instruction[] getInstructions()
public int getSize()
public java.util.regex.Pattern getPattern()
public java.lang.String toString()
public java.lang.String toRE()
public void clear()
public boolean equals(java.lang.Object o)
o
- Objet a comparer.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |