#include <cursor.h>
Inherits astl::cursor_concept.
Public Types | |
| typedef DFA::char_traits | char_traits |
| Character traits describing char_type. | |
| typedef DFA::char_type | char_type |
| The type of the transitions letters. | |
| typedef DFA::state_type | state_type |
| The type of the automaton-states identifiers. | |
| typedef DFA::tag_type | tag_type |
| The type of the data attached to states. | |
Public Member Functions | |
| cursor (const DFA &a, state_type p) | |
Creates a cursor pointing to state p of the automaton a. | |
| cursor (const DFA &a) | |
Creates a cursor pointing to an undefined state of the automaton a. | |
| cursor () | |
| Creates a singular cursor. | |
| bool | exists (const char_type &a) const |
Returns true if any outgoing transition labeled with a exists. | |
| bool | forward (const char_type &a) |
Moves along the outgoing transition labeled with a if defined, otherwise moves to sink state and returns false. | |
| self & | operator= (state_type p) |
Sets this cursor to point to the state p. | |
| bool | operator== (const self &x) const |
Returns true if x points to the same state as this cursor. | |
| bool | sink () const |
Returns true if this cursor points to the sink state DFA::null_state. | |
| state_type | sink_state () const |
Returns the identifier of the sink state DFA::null_state. | |
| state_type | src () const |
| Returns the identifier of the state that this cursor points to. | |
| bool | src_final () const |
Returns true if the state that this cursor points to is final. | |
| const tag_type & | src_tag () const |
| Returns the data attached to the state that this cursor points to. | |
Its purpose is to implement simple traversals checking if a word is in the language defined by an automaton.
| Parameter | Description | Default | Requirements |
|---|---|---|---|
DFA | The type of the DFA that this cursor will point to | DFA is a model of DFA |
| cursor | ( | const DFA & | a, | |
| state_type | p | |||
| ) |
| self& operator= | ( | state_type | p | ) |
| bool operator== | ( | const self & | x | ) | const |
1.5.7.1