2002-04-16 15:50:10 +00:00
/*
2003-11-18 20:56:51 +00:00
* Summary : API to build regexp automata
* Description : the API to build regexp automata
2002-04-16 15:50:10 +00:00
*
2003-11-18 20:56:51 +00:00
* Copy : See Copyright for the status of this software .
2002-04-16 15:50:10 +00:00
*
2003-11-18 20:56:51 +00:00
* Author : Daniel Veillard
2002-04-16 15:50:10 +00:00
*/
# ifndef __XML_AUTOMATA_H__
# define __XML_AUTOMATA_H__
# include <libxml/xmlversion.h>
2002-09-16 10:51:38 +00:00
# include <libxml/tree.h>
2002-04-16 15:50:10 +00:00
Re-examined the problems of configuring a "minimal" library.
Synchronized the header files with the library code in order
to assure that all the various conditionals (LIBXML_xxxx_ENABLED)
were the same in both. Modified the API database content to more
accurately reflect the conditionals. Enhanced the generation
of that database. Although there was no substantial change to
any of the library code's logic, a large number of files were
modified to achieve the above, and the configuration script
was enhanced to do some automatic enabling of features (e.g.
--with-xinclude forces --with-xpath). Additionally, all the format
errors discovered by apibuild.py were corrected.
* configure.in: enhanced cross-checking of options
* doc/apibuild.py, doc/elfgcchack.xsl, doc/libxml2-refs.xml,
doc/libxml2-api.xml, gentest.py: changed the usage of the
<cond> element in module descriptions
* elfgcchack.h, testapi.c: regenerated with proper conditionals
* HTMLparser.c, SAX.c, globals.c, tree.c, xmlschemas.c, xpath.c,
testSAX.c: cleaned up conditionals
* include/libxml/[SAX.h, SAX2.h, debugXML.h, encoding.h, entities.h,
hash.h, parser.h, parserInternals.h, schemasInternals.h, tree.h,
valid.h, xlink.h, xmlIO.h, xmlautomata.h, xmlreader.h, xpath.h]:
synchronized the conditionals with the corresponding module code
* doc/examples/tree2.c, doc/examples/xpath1.c, doc/examples/xpath2.c:
added additional conditions required for compilation
* doc/*.html, doc/html/*.html: rebuilt the docs
2005-01-02 09:53:13 +00:00
# ifdef LIBXML_REGEXP_ENABLED
2002-09-16 10:51:38 +00:00
# ifdef LIBXML_AUTOMATA_ENABLED
2002-04-16 15:50:10 +00:00
# include <libxml/xmlregexp.h>
# ifdef __cplusplus
extern " C " {
# endif
/**
* xmlAutomataPtr :
*
* A libxml automata description , It can be compiled into a regexp
*/
typedef struct _xmlAutomata xmlAutomata ;
typedef xmlAutomata * xmlAutomataPtr ;
/**
* xmlAutomataStatePtr :
*
* A state int the automata description ,
*/
typedef struct _xmlAutomataState xmlAutomataState ;
typedef xmlAutomataState * xmlAutomataStatePtr ;
/*
* Building API
*/
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataPtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlNewAutomata ( void ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN void XMLCALL
2003-08-27 08:59:58 +00:00
xmlFreeAutomata ( xmlAutomataPtr am ) ;
2002-04-16 15:50:10 +00:00
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataGetInitState ( xmlAutomataPtr am ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN int XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataSetFinalState ( xmlAutomataPtr am ,
2002-04-16 15:50:10 +00:00
xmlAutomataStatePtr state ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewState ( xmlAutomataPtr am ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewTransition ( xmlAutomataPtr am ,
2002-04-16 15:50:10 +00:00
xmlAutomataStatePtr from ,
xmlAutomataStatePtr to ,
const xmlChar * token ,
void * data ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewTransition2 ( xmlAutomataPtr am ,
2003-04-13 19:53:42 +00:00
xmlAutomataStatePtr from ,
xmlAutomataStatePtr to ,
const xmlChar * token ,
const xmlChar * token2 ,
void * data ) ;
2005-07-19 14:33:55 +00:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewNegTrans ( xmlAutomataPtr am ,
xmlAutomataStatePtr from ,
xmlAutomataStatePtr to ,
const xmlChar * token ,
const xmlChar * token2 ,
void * data ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewCountTrans ( xmlAutomataPtr am ,
2002-04-16 15:50:10 +00:00
xmlAutomataStatePtr from ,
xmlAutomataStatePtr to ,
const xmlChar * token ,
int min ,
int max ,
void * data ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2004-09-29 13:29:03 +00:00
xmlAutomataNewCountTrans2 ( xmlAutomataPtr am ,
xmlAutomataStatePtr from ,
xmlAutomataStatePtr to ,
const xmlChar * token ,
const xmlChar * token2 ,
int min ,
int max ,
void * data ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewOnceTrans ( xmlAutomataPtr am ,
2002-04-20 06:41:40 +00:00
xmlAutomataStatePtr from ,
xmlAutomataStatePtr to ,
const xmlChar * token ,
int min ,
int max ,
void * data ) ;
2004-09-29 13:29:03 +00:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2012-09-11 13:26:36 +08:00
xmlAutomataNewOnceTrans2 ( xmlAutomataPtr am ,
2004-09-29 13:29:03 +00:00
xmlAutomataStatePtr from ,
2012-09-11 13:26:36 +08:00
xmlAutomataStatePtr to ,
2004-09-29 13:29:03 +00:00
const xmlChar * token ,
const xmlChar * token2 ,
2012-09-11 13:26:36 +08:00
int min ,
int max ,
2004-09-29 13:29:03 +00:00
void * data ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewAllTrans ( xmlAutomataPtr am ,
2002-04-20 06:41:40 +00:00
xmlAutomataStatePtr from ,
2002-04-20 17:38:48 +00:00
xmlAutomataStatePtr to ,
int lax ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewEpsilon ( xmlAutomataPtr am ,
2002-04-16 15:50:10 +00:00
xmlAutomataStatePtr from ,
xmlAutomataStatePtr to ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewCountedTrans ( xmlAutomataPtr am ,
2002-04-17 16:28:10 +00:00
xmlAutomataStatePtr from ,
xmlAutomataStatePtr to ,
int counter ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlAutomataStatePtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewCounterTrans ( xmlAutomataPtr am ,
2002-04-17 16:28:10 +00:00
xmlAutomataStatePtr from ,
xmlAutomataStatePtr to ,
int counter ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN int XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataNewCounter ( xmlAutomataPtr am ,
2002-04-17 16:28:10 +00:00
int min ,
int max ) ;
2002-04-16 15:50:10 +00:00
2012-09-11 13:26:36 +08:00
XMLPUBFUN xmlRegexpPtr XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataCompile ( xmlAutomataPtr am ) ;
2012-09-11 13:26:36 +08:00
XMLPUBFUN int XMLCALL
2003-08-27 08:59:58 +00:00
xmlAutomataIsDeterminist ( xmlAutomataPtr am ) ;
2002-04-16 15:50:10 +00:00
# ifdef __cplusplus
}
2012-09-11 13:26:36 +08:00
# endif
2002-04-16 15:50:10 +00:00
# endif /* LIBXML_AUTOMATA_ENABLED */
Re-examined the problems of configuring a "minimal" library.
Synchronized the header files with the library code in order
to assure that all the various conditionals (LIBXML_xxxx_ENABLED)
were the same in both. Modified the API database content to more
accurately reflect the conditionals. Enhanced the generation
of that database. Although there was no substantial change to
any of the library code's logic, a large number of files were
modified to achieve the above, and the configuration script
was enhanced to do some automatic enabling of features (e.g.
--with-xinclude forces --with-xpath). Additionally, all the format
errors discovered by apibuild.py were corrected.
* configure.in: enhanced cross-checking of options
* doc/apibuild.py, doc/elfgcchack.xsl, doc/libxml2-refs.xml,
doc/libxml2-api.xml, gentest.py: changed the usage of the
<cond> element in module descriptions
* elfgcchack.h, testapi.c: regenerated with proper conditionals
* HTMLparser.c, SAX.c, globals.c, tree.c, xmlschemas.c, xpath.c,
testSAX.c: cleaned up conditionals
* include/libxml/[SAX.h, SAX2.h, debugXML.h, encoding.h, entities.h,
hash.h, parser.h, parserInternals.h, schemasInternals.h, tree.h,
valid.h, xlink.h, xmlIO.h, xmlautomata.h, xmlreader.h, xpath.h]:
synchronized the conditionals with the corresponding module code
* doc/examples/tree2.c, doc/examples/xpath1.c, doc/examples/xpath2.c:
added additional conditions required for compilation
* doc/*.html, doc/html/*.html: rebuilt the docs
2005-01-02 09:53:13 +00:00
# endif /* LIBXML_REGEXP_ENABLED */
2002-04-16 15:50:10 +00:00
# endif /* __XML_AUTOMATA_H__ */