2 * regexp.h : describes the basic API for libxml regular expressions handling
4 * See Copyright for the status of this software.
6 * Daniel Veillard <veillard@redhat.com>
9 #ifndef __XML_REGEXP_H__
10 #define __XML_REGEXP_H__
12 #include <libxml/xmlversion.h>
14 #ifdef LIBXML_REGEXP_ENABLED
23 * A libxml regular expression, they can actually be far more complex
24 * thank the POSIX regex expressions.
26 typedef struct _xmlRegexp xmlRegexp;
27 typedef xmlRegexp *xmlRegexpPtr;
32 * A libxml progressive regular expression evaluation context
34 typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
35 typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
40 #include <libxml/tree.h>
48 xmlRegexpPtr xmlRegexpCompile(const xmlChar *regexp);
49 void xmlRegFreeRegexp(xmlRegexpPtr regexp);
50 int xmlRegexpExec (xmlRegexpPtr comp,
51 const xmlChar *value);
52 void xmlRegexpPrint (FILE *output,
54 int xmlRegexpIsDeterminist(xmlRegexpPtr comp);
57 * Callback function when doing a transition in the automata
59 typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
67 xmlRegExecCtxtPtr xmlRegNewExecCtxt (xmlRegexpPtr comp,
68 xmlRegExecCallbacks callback,
70 void xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
71 int xmlRegExecPushString (xmlRegExecCtxtPtr exec,
74 int xmlRegExecPushString2 (xmlRegExecCtxtPtr exec,
76 const xmlChar *value2,
83 #endif /* LIBXML_REGEXP_ENABLED */
85 #endif /*__XML_REGEXP_H__ */