/usr/share/gtk-doc/html/libxml2
NameSizeModeActions
general.html54690644editdlrm
home.png6540644editdlrm
index.html43210644editdlrm
left.png4590644editdlrm
libxml2-c14n.html135460644editdlrm
libxml2-catalog.html365490644editdlrm
libxml2-chvalid.html198350644editdlrm
libxml2-debugXML.html333170644editdlrm
libxml2-dict.html135640644editdlrm
libxml2-DOCBparser.html173610644editdlrm
libxml2-encoding.html295150644editdlrm
libxml2-entities.html231260644editdlrm
libxml2-globals.html356420644editdlrm
libxml2-hash.html420570644editdlrm
libxml2-HTMLparser.html581190644editdlrm
libxml2-HTMLtree.html244160644editdlrm
libxml2-list.html255700644editdlrm
libxml2-nanoftp.html224030644editdlrm
libxml2-nanohttp.html166140644editdlrm
libxml2-parser.html1374940644editdlrm
libxml2-parserInternals.html1253570644editdlrm
libxml2-pattern.html193620644editdlrm
libxml2-relaxng.html352300644editdlrm
libxml2-SAX.html388750644editdlrm
libxml2-SAX2.html396590644editdlrm
libxml2-schemasInternals.html651200644editdlrm
libxml2-schematron.html171050644editdlrm
libxml2-threads.html128960644editdlrm
libxml2-tree.html2346010644editdlrm
libxml2-uri.html184340644editdlrm
libxml2-valid.html985040644editdlrm
libxml2-xinclude.html159200644editdlrm
libxml2-xlink.html173290644editdlrm
libxml2-xmlautomata.html351790644editdlrm
libxml2-xmlerror.html847150644editdlrm
libxml2-xmlexports.html35850644editdlrm
libxml2-xmlIO.html574960644editdlrm
libxml2-xmlmemory.html240210644editdlrm
libxml2-xmlmodule.html73700644editdlrm
libxml2-xmlreader.html1080980644editdlrm
libxml2-xmlregexp.html420120644editdlrm
libxml2-xmlsave.html148420644editdlrm
libxml2-xmlschemas.html425210644editdlrm
libxml2-xmlschemastypes.html444510644editdlrm
libxml2-xmlstring.html349710644editdlrm
libxml2-xmlunicode.html1065960644editdlrm
libxml2-xmlversion.html190260644editdlrm
libxml2-xmlwriter.html1120770644editdlrm
libxml2-xpath.html622590644editdlrm
libxml2-xpathInternals.html1449370644editdlrm
libxml2-xpointer.html255600644editdlrm
libxml2.devhelp3432830644editdlrm
right.png4720644editdlrm
style.css8200644editdlrm
up.png4060644editdlrm
Edit: /usr/share/gtk-doc/html/libxml2/libxml2-xmlautomata.html (35179B)
xmlautomata: API to build regexp automata

xmlautomata

xmlautomata - API to build regexp automata

the API to build regexp automata

Author(s): Daniel Veillard

Synopsis

typedef xmlAutomataState * xmlAutomataStatePtr;
typedef struct _xmlAutomata xmlAutomata;
typedef xmlAutomata * xmlAutomataPtr;
typedef struct _xmlAutomataState xmlAutomataState;
void	xmlFreeAutomata			(xmlAutomataPtr am);
int	xmlAutomataNewCounter		(xmlAutomataPtr am, 
int min,
int max); xmlAutomataStatePtr xmlAutomataGetInitState (xmlAutomataPtr am); xmlAutomataStatePtr xmlAutomataNewTransition2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
void * data); xmlAutomataStatePtr xmlAutomataNewState (xmlAutomataPtr am); xmlAutomataStatePtr xmlAutomataNewCountTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
int min,
int max,
void * data); xmlAutomataStatePtr xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
int min,
int max,
void * data); xmlAutomataStatePtr xmlAutomataNewAllTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int lax); xmlAutomataStatePtr xmlAutomataNewCountedTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter); xmlAutomataStatePtr xmlAutomataNewCounterTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter); xmlRegexpPtr xmlAutomataCompile (xmlAutomataPtr am); xmlAutomataStatePtr xmlAutomataNewNegTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
void * data); xmlAutomataStatePtr xmlAutomataNewEpsilon (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to); xmlAutomataStatePtr xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
int min,
int max,
void * data); xmlAutomataPtr xmlNewAutomata (void); int xmlAutomataSetFinalState (xmlAutomataPtr am,
xmlAutomataStatePtr state); xmlAutomataStatePtr xmlAutomataNewOnceTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
int min,
int max,
void * data); xmlAutomataStatePtr xmlAutomataNewTransition (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
void * data); int xmlAutomataIsDeterminist (xmlAutomataPtr am);

Description

Details

Structure xmlAutomata

struct _xmlAutomata {
The content of this structure is not made public by the API.
} xmlAutomata;


Typedef xmlAutomataPtr

xmlAutomata * xmlAutomataPtr;

A libxml automata description, It can be compiled into a regexp


Structure xmlAutomataState

struct _xmlAutomataState {
The content of this structure is not made public by the API.
} xmlAutomataState;


Typedef xmlAutomataStatePtr

xmlAutomataState * xmlAutomataStatePtr;

A state int the automata description,


xmlAutomataCompile ()

xmlRegexpPtr	xmlAutomataCompile	(xmlAutomataPtr am)

Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.

am:an automata
Returns:the compiled regexp or NULL in case of error

xmlAutomataGetInitState ()

xmlAutomataStatePtr	xmlAutomataGetInitState	(xmlAutomataPtr am)

Initial state lookup

am:an automata
Returns:the initial state of the automata

xmlAutomataIsDeterminist ()

int	xmlAutomataIsDeterminist	(xmlAutomataPtr am)

Checks if an automata is determinist.

am:an automata
Returns:1 if true, 0 if not, and -1 in case of error

xmlAutomataNewAllTrans ()

xmlAutomataStatePtr	xmlAutomataNewAllTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int lax)

If @to is NULL, this creates 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:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
lax:allow to transition if not all all transitions have been activated
Returns:the target state or NULL in case of error

xmlAutomataNewCountTrans ()

xmlAutomataStatePtr	xmlAutomataNewCountTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
int min,
int max,
void * data)

If @to is NULL, this creates 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:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
token:the input string associated to that transition
min:the minimum successive occurences of token
max:the maximum successive occurences of token
data:data associated to the transition
Returns:the target state or NULL in case of error

xmlAutomataNewCountTrans2 ()

xmlAutomataStatePtr	xmlAutomataNewCountTrans2	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
int min,
int max,
void * data)

If @to is NULL, this creates 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 @token2 and whose number is between @min and @max

am:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
token:the input string associated to that transition
token2:the second input string associated to that transition
min:the minimum successive occurences of token
max:the maximum successive occurences of token
data:data associated to the transition
Returns:the target state or NULL in case of error

xmlAutomataNewCountedTrans ()

xmlAutomataStatePtr	xmlAutomataNewCountedTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter)

If @to is NULL, this creates 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:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
counter:the counter associated to that transition
Returns:the target state or NULL in case of error

xmlAutomataNewCounter ()

int	xmlAutomataNewCounter		(xmlAutomataPtr am, 
int min,
int max)

Create a new counter

am:an automata
min:the minimal value on the counter
max:the maximal value on the counter
Returns:the counter number or -1 in case of error

xmlAutomataNewCounterTrans ()

xmlAutomataStatePtr	xmlAutomataNewCounterTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter)

If @to is NULL, this creates 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:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
counter:the counter associated to that transition
Returns:the target state or NULL in case of error

xmlAutomataNewEpsilon ()

xmlAutomataStatePtr	xmlAutomataNewEpsilon	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to)

If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state

am:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
Returns:the target state or NULL in case of error

xmlAutomataNewNegTrans ()

xmlAutomataStatePtr	xmlAutomataNewNegTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
void * data)

If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by any value except (@token,@token2) Note that if @token2 is not NULL, then (X, NULL) won't match to follow # the semantic of XSD ##other

am:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
token:the first input string associated to that transition
token2:the second input string associated to that transition
data:data passed to the callback function if the transition is activated
Returns:the target state or NULL in case of error

xmlAutomataNewOnceTrans ()

xmlAutomataStatePtr	xmlAutomataNewOnceTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
int min,
int max,
void * data)

If @to is NULL, this creates 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 transition can only be crossed once.

am:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
token:the input string associated to that transition
min:the minimum successive occurences of token
max:the maximum successive occurences of token
data:data associated to the transition
Returns:the target state or NULL in case of error

xmlAutomataNewOnceTrans2 ()

xmlAutomataStatePtr	xmlAutomataNewOnceTrans2	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
int min,
int max,
void * data)

If @to is NULL, this creates 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 @token2 and whose number is between @min and @max, moreover that transition can only be crossed once.

am:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
token:the input string associated to that transition
token2:the second input string associated to that transition
min:the minimum successive occurences of token
max:the maximum successive occurences of token
data:data associated to the transition
Returns:the target state or NULL in case of error

xmlAutomataNewState ()

xmlAutomataStatePtr	xmlAutomataNewState	(xmlAutomataPtr am)

Create a new disconnected state in the automata

am:an automata
Returns:the new state or NULL in case of error

xmlAutomataNewTransition ()

xmlAutomataStatePtr	xmlAutomataNewTransition	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
void * data)

If @to is NULL, this creates 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:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
token:the input string associated to that transition
data:data passed to the callback function if the transition is activated
Returns:the target state or NULL in case of error

xmlAutomataNewTransition2 ()

xmlAutomataStatePtr	xmlAutomataNewTransition2	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
void * data)

If @to is NULL, this creates 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:an automata
from:the starting point of the transition
to:the target point of the transition or NULL
token:the first input string associated to that transition
token2:the second input string associated to that transition
data:data passed to the callback function if the transition is activated
Returns:the target state or NULL in case of error

xmlAutomataSetFinalState ()

int	xmlAutomataSetFinalState	(xmlAutomataPtr am, 
xmlAutomataStatePtr state)

Makes that state a final state

am:an automata
state:a state in this automata
Returns:0 or -1 in case of error

xmlFreeAutomata ()

void	xmlFreeAutomata			(xmlAutomataPtr am)

Free an automata

am:an automata

xmlNewAutomata ()

xmlAutomataPtr	xmlNewAutomata		(void)

Create a new automata

Returns:the new object or NULL in case of failure