  
    
    
    
    
    
    
    
  
  
    
      
        
          
libxml2-xmlIO.html            
Prev          
        
        
          
general.html            
Up          
        
        
          
index.html            
Home          
        
        
          
libxml2-xmlerror.html            
Next          
        
        
libxml2 Reference Manual      
    
    
      
xmlautomata    
    
xmlautomata - API to build regexp automata
    
the API to build regexp automata 
    
Author(s): Daniel Veillard 
    
      
Synopsis
      
typedef libxml2-xmlautomata.html#xmlAutomataStatexmlAutomataState  * #xmlAutomataStatePtrxmlAutomataStatePtr ;
typedef struct _xmlAutomata 
#xmlAutomataxmlAutomata ;
typedef 
libxml2-xmlautomata.html#xmlAutomataxmlAutomata  * #xmlAutomataPtrxmlAutomataPtr ;
typedef struct _xmlAutomataState 
#xmlAutomataStatexmlAutomataState ;
void	
#xmlFreeAutomataxmlFreeAutomata 			( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am);
int	
#xmlAutomataNewCounterxmlAutomataNewCounter 		( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 					 int min, 					 int max);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataGetInitStatexmlAutomataGetInitState 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewTransition2xmlAutomataNewTransition2 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token2, 							 void * data);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewStatexmlAutomataNewState 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewCountTransxmlAutomataNewCountTrans 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 							 int min, 							 int max, 							 void * data);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewOnceTrans2xmlAutomataNewOnceTrans2 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token2, 							 int min, 							 int max, 							 void * data);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewAllTransxmlAutomataNewAllTrans 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 						 int lax);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewCountedTransxmlAutomataNewCountedTrans 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 int counter);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewCounterTransxmlAutomataNewCounterTrans 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 int counter);
libxml2-xmlregexp.html#xmlRegexpPtrxmlRegexpPtr 	#xmlAutomataCompilexmlAutomataCompile 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewNegTransxmlAutomataNewNegTrans 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 						 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 						 const libxml2-xmlstring.html#xmlCharxmlChar  * token2, 						 void * data);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewEpsilonxmlAutomataNewEpsilon 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewCountTrans2xmlAutomataNewCountTrans2 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token2, 							 int min, 							 int max, 							 void * data);
libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr 	#xmlNewAutomataxmlNewAutomata 		(void);
int	
#xmlAutomataSetFinalStatexmlAutomataSetFinalState 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 					 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  state);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewOnceTransxmlAutomataNewOnceTrans 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 						 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 						 int min, 						 int max, 						 void * data);
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	#xmlAutomataNewTransitionxmlAutomataNewTransition 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 							 void * data);
int	
#xmlAutomataIsDeterministxmlAutomataIsDeterminist 	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am);
    
    
      
Description
    
    
      
Details
      
        
Structure xmlAutomata
struct _xmlAutomata {
The content of this structure is not made public by the API.
} xmlAutomata;
        
        
Typedef xmlAutomataPtr
libxml2-xmlautomata.html#xmlAutomataxmlAutomata  * 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
libxml2-xmlautomata.html#xmlAutomataStatexmlAutomataState  * xmlAutomataStatePtr;
A state int the automata description,
        
        
xmlAutomataCompile ()
libxml2-xmlregexp.html#xmlRegexpPtrxmlRegexpPtr 	xmlAutomataCompile	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataGetInitState	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am)Initial state lookup
am: an automata Returns: the initial state of the automata         
        
xmlAutomataIsDeterminist ()
int	xmlAutomataIsDeterminist	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am)Checks if an automata is determinist.
am: an automata Returns: 1 if true, 0 if not, and -1 in case of error         
        
xmlAutomataNewAllTrans ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewAllTrans	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewCountTrans	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * 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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewCountTrans2	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * 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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewCountedTrans	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  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		( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewCounterTrans	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewEpsilon	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewNegTrans	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 						 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 						 const libxml2-xmlstring.html#xmlCharxmlChar  * 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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewOnceTrans	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 						 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 						 const libxml2-xmlstring.html#xmlCharxmlChar  * 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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewOnceTrans2	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * 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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewState	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am)Create a new disconnected state in the automata
am: an automata Returns: the new state or NULL in case of error         
        
xmlAutomataNewTransition ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewTransition	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * 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 ()
libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr 	xmlAutomataNewTransition2	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  from, 							 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  to, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * token, 							 const libxml2-xmlstring.html#xmlCharxmlChar  * 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	( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am, 					 libxml2-xmlautomata.html#xmlAutomataStatePtrxmlAutomataStatePtr  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			( libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr  am)Free an automata
am: an automata         
        
xmlNewAutomata ()
libxml2-xmlautomata.html#xmlAutomataPtrxmlAutomataPtr 	xmlNewAutomata		(void)Create a new automata
Returns: the new object or NULL in case of failure         
      
    
  
