|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.creole.tokeniser.DFSMState
Implements a state of the deterministic finite state machine of the
tokeniser.
It differs from FSMState
by the definition of the
transition function which in this case maps character types to other states
as oposed to the transition function from FSMState which maps character
types to sets of states, hence the nondeterministic character.
{@see FSMState FSMState}
Field Summary | |
private static boolean |
DEBUG
Debug flag |
(package private) static int |
index
Used to generate unique indices for all the objects of this class |
(package private) int |
myIndex
The unique index of this state |
(package private) String |
rhs
The string of the RHS of the rule from which the token description is built |
(package private) String[][] |
tokenDesc
A table of strings describing an annotation. |
(package private) DFSMState[] |
transitionFunction
The transition function of this state. |
Constructor Summary | |
DFSMState(DefaultTokeniser owner)
Constructs a new DFSMState object and adds it to the list of deterministic states of the DefaultTokeniser provided as owner. |
Method Summary | |
(package private) static void |
|
(package private) void |
buildTokenDesc()
Builds the token description for the token that will be generated when this final state will be reached and the action associated with it will be fired. |
(package private) String |
getEdgesGML()
Returns a GML (Graph Modelling Language) representation of the edges emerging from this state |
(package private) int |
getIndex()
Returns the unique ID of this state. |
(package private) String |
getRhs()
Returns the RHS string |
(package private) String[][] |
getTokenDesc()
Returns the token description associated with this state. |
(package private) boolean |
isFinal()
Checks whether this state is a final one |
(package private) DFSMState |
next(int type)
This method is used to access the transition function of this state. |
(package private) void |
put(int index,
DFSMState state)
Adds a new mapping using the actual index in the internal array. |
(package private) void |
put(UnicodeType type,
DFSMState state)
Adds a new mapping in the transition function of this state |
(package private) void |
setRhs(String rhs)
Sets the right hand side associated with this state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Field Detail |
private static final boolean DEBUG
String[][] tokenDesc
DFSMState[] transitionFunction
String rhs
int myIndex
static int index
Constructor Detail |
public DFSMState(DefaultTokeniser owner)
DefaultTokeniser
provided as owner.owner
- a DefaultTokeniser
objectMethod Detail |
void put(UnicodeType type, DFSMState state)
type
- the UnicodeType for this mappingvoid put(int index, DFSMState state)
put(gate.creole.tokeniser.UnicodeType,
gate.creole.tokeniser.DFSMState)
instead.DFSMState next(int type)
type
- the Unicode type identifier as the corresponding static value
on Character
String getEdgesGML()
void buildTokenDesc() throws TokeniserException
setRhs(String)
.void setRhs(String rhs)
buildTokenDesc()
method being converted in a table of strings
with 2 columns and as many lines as necessary.rhs
- the RHS stringString getRhs()
boolean isFinal()
int getIndex()
String[][] getTokenDesc()
buildTokenDesc()
method and consists of a table of
strings having two columns.
The first line of the table contains the annotation type on the first
position and nothing on the second.
Each line after the first one contains a attribute on the first position
and its associated value on the second.static void()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |