![]() | ![]() | ![]() | Gnome XML Library Reference Manual | ![]() |
---|
xmlautomata —
struct xmlAutomata; typedef xmlAutomataPtr; struct xmlAutomataState; typedef xmlAutomataStatePtr; xmlAutomataPtr xmlNewAutomata (void); void xmlFreeAutomata (xmlAutomataPtr am); xmlAutomataStatePtr xmlAutomataGetInitState (xmlAutomataPtr am); int xmlAutomataSetFinalState (xmlAutomataPtr am, xmlAutomataStatePtr state); xmlAutomataStatePtr xmlAutomataNewState (xmlAutomataPtr am); xmlAutomataStatePtr xmlAutomataNewTransition (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, void *data); xmlAutomataStatePtr xmlAutomataNewTransition2 (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, const xmlChar *token2, void *data); xmlAutomataStatePtr xmlAutomataNewCountTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, int min, int max, void *data); xmlAutomataStatePtr xmlAutomataNewOnceTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, int min, int max, void *data); xmlAutomataStatePtr xmlAutomataNewAllTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, int lax); xmlAutomataStatePtr xmlAutomataNewEpsilon (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to); xmlAutomataStatePtr xmlAutomataNewCountedTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, int counter); xmlAutomataStatePtr xmlAutomataNewCounterTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, int counter); int xmlAutomataNewCounter (xmlAutomataPtr am, int min, int max); xmlRegexpPtr xmlAutomataCompile (xmlAutomataPtr am); int xmlAutomataIsDeterminist (xmlAutomataPtr am);
xmlAutomataStatePtr xmlAutomataGetInitState (xmlAutomataPtr am);
Initial state lookup
am : | |
Returns : |
int xmlAutomataSetFinalState (xmlAutomataPtr am, xmlAutomataStatePtr state);
Makes that state a final state
am : | |
state : | |
Returns : |
xmlAutomataStatePtr xmlAutomataNewState (xmlAutomataPtr am);
Create a new disconnected state in the automata
am : | |
Returns : |
xmlAutomataStatePtr xmlAutomataNewTransition (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, void *data);
If to is NULL, this create first a new target state in the automata and then adds a transition from the from state to the target state activated by the value of token
am : | |
from : | |
to : | |
token : | |
data : | |
Returns : |
xmlAutomataStatePtr xmlAutomataNewTransition2 (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, const xmlChar *token2, void *data);
If to is NULL, this create first a new target state in the automata and then adds a transition from the from state to the target state activated by the value of token
am : | |
from : | |
to : | |
token : | |
token2 : | |
data : | |
Returns : |
xmlAutomataStatePtr xmlAutomataNewCountTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, int min, int max, void *data);
If to is NULL, this create first a new target state in the automata and then adds a transition from the from state to the target state activated by a succession of input of value token and whose number is between min and max
am : | |
from : | |
to : | |
token : | |
min : | |
max : | |
data : | |
Returns : |
xmlAutomataStatePtr xmlAutomataNewOnceTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, int min, int max, void *data);
If to is NULL, this create first a new target state in the automata and then adds a transition from the from state to the target state activated by a succession of input of value token and whose number is between min and max, moreover that transistion can only be crossed once.
am : | |
from : | |
to : | |
token : | |
min : | |
max : | |
data : | |
Returns : |
xmlAutomataStatePtr xmlAutomataNewAllTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, int lax);
If to is NULL, this create first a new target state in the automata and then adds a an ALL transition from the from state to the target state. That transition is an epsilon transition allowed only when all transitions from the from node have been activated.
am : | |
from : | |
to : | |
lax : | |
Returns : |
xmlAutomataStatePtr xmlAutomataNewEpsilon (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to);
If to is NULL, this create first a new target state in the automata and then adds a an epsilon transition from the from state to the target state
am : | |
from : | |
to : | |
Returns : |
xmlAutomataStatePtr xmlAutomataNewCountedTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, int counter);
If to is NULL, this create first a new target state in the automata and then adds an epsilon transition from the from state to the target state which will increment the counter provided
am : | |
from : | |
to : | |
counter : | |
Returns : |
xmlAutomataStatePtr xmlAutomataNewCounterTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, int counter);
If to is NULL, this create first a new target state in the automata and then adds an epsilon transition from the from state to the target state which will be allowed only if the counter is within the right range.
am : | |
from : | |
to : | |
counter : | |
Returns : |
int xmlAutomataNewCounter (xmlAutomataPtr am, int min, int max);
Create a new counter
am : | |
min : | |
max : | |
Returns : |
xmlRegexpPtr xmlAutomataCompile (xmlAutomataPtr am);
Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.
am : | |
Returns : |
int xmlAutomataIsDeterminist (xmlAutomataPtr am);
Checks if an automata is determinist.
am : | |
Returns : |
<< xmlregexp | xmlunicode >> |