| java.lang.Object ro.infoiasi.donald.compiler.lexer.RTS
RTS | public class RTS implements Cloneable(Code) | | Regular Transitionl System.
A RTS it's special type of transitional system.
It's states can only be of three types:
- One final state that has no trasitions at all.
- Normal states that have only one ordinary
(consuming a symbol) or lambda transition.
- Branching states that have two lambda transitions.
|
RTS | public RTS()(Code) | | Constructs an empty RTS
|
RTS | public RTS(RTS r)(Code) | | Constructs a RTS that is a copy of the specified RTS
|
clone | public Object clone()(Code) | | Creates and returns a clone of this object
|
getNext2State | public Integer getNext2State(int state) throws InvalidState, EmptyRTS(Code) | | Returns the second state one can reach from the specified state
(not null only in the case of lambda transitions)
|
getStartState | public int getStartState() throws EmptyRTS(Code) | | Returns the starting state of this RTS
|
getStateNo | public int getStateNo()(Code) | | Returns the number of states of this RTS
|
getStateSymbol | public Character getStateSymbol(int state) throws EmptyRTS(Code) | | Returns the symbol used for transition from the specified state
|
isEmpty | public boolean isEmpty()(Code) | | Returns true if this RTS has zero states
|
lambda | public boolean lambda(int state, Set set) throws InvalidState, EmptyRTS(Code) | | Computes the lambda closure for a given state.
The lambda closure contains all the states accessible
from the given state by zero or more lambda transitions.
The set given as an argument will contain the lambda
closure and the function will return true if it
contains the final state
|
print | public void print()(Code) | | Prints the RTS. [Debuging purpose]
|
toString | public String toString()(Code) | | Returns a string representation of this RTS
|
|
|