source: NonGTP/FCollada/libxml/xmlregexp.h @ 964

Revision 964, 2.5 KB checked in by igarcia, 18 years ago (diff)
Line 
1/*
2 * Summary: regular expressions handling
3 * Description: basic API for libxml regular expressions handling used
4 *              for XML Schemas and validation.
5 *
6 * Copy: See Copyright for the status of this software.
7 *
8 * Author: Daniel Veillard
9 */
10
11#ifndef __XML_REGEXP_H__
12#define __XML_REGEXP_H__
13
14#include <libxml/xmlversion.h>
15
16#ifdef LIBXML_REGEXP_ENABLED
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/**
23 * xmlRegexpPtr:
24 *
25 * A libxml regular expression, they can actually be far more complex
26 * thank the POSIX regex expressions.
27 */
28typedef struct _xmlRegexp xmlRegexp;
29typedef xmlRegexp *xmlRegexpPtr;
30
31/**
32 * xmlRegExecCtxtPtr:
33 *
34 * A libxml progressive regular expression evaluation context
35 */
36typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
37typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
38
39#ifdef __cplusplus
40}
41#endif
42#include <libxml/tree.h>
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47/*
48 * The POSIX like API
49 */
50XMLPUBFUN xmlRegexpPtr XMLCALL
51                    xmlRegexpCompile    (const xmlChar *regexp);
52XMLPUBFUN void XMLCALL                   xmlRegFreeRegexp(xmlRegexpPtr regexp);
53XMLPUBFUN int XMLCALL                   
54                    xmlRegexpExec       (xmlRegexpPtr comp,
55                                         const xmlChar *value);
56XMLPUBFUN void XMLCALL                 
57                    xmlRegexpPrint      (FILE *output,
58                                         xmlRegexpPtr regexp);
59XMLPUBFUN int XMLCALL                   
60                    xmlRegexpIsDeterminist(xmlRegexpPtr comp);
61
62/*
63 * Callback function when doing a transition in the automata
64 */
65typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
66                                     const xmlChar *token,
67                                     void *transdata,
68                                     void *inputdata);
69
70/*
71 * The progressive API
72 */
73XMLPUBFUN xmlRegExecCtxtPtr XMLCALL     
74                    xmlRegNewExecCtxt   (xmlRegexpPtr comp,
75                                         xmlRegExecCallbacks callback,
76                                         void *data);
77XMLPUBFUN void XMLCALL                 
78                    xmlRegFreeExecCtxt  (xmlRegExecCtxtPtr exec);
79XMLPUBFUN int XMLCALL                   
80                    xmlRegExecPushString(xmlRegExecCtxtPtr exec,
81                                         const xmlChar *value,
82                                         void *data);
83XMLPUBFUN int XMLCALL                   
84                    xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
85                                         const xmlChar *value,
86                                         const xmlChar *value2,
87                                         void *data);
88
89XMLPUBFUN int XMLCALL
90                    xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
91                                         int *nbval,
92                                         int *nbneg,
93                                         xmlChar **values,
94                                         int *terminal);
95XMLPUBFUN int XMLCALL
96                    xmlRegExecErrInfo   (xmlRegExecCtxtPtr exec,
97                                         const xmlChar **string,
98                                         int *nbval,
99                                         int *nbneg,
100                                         xmlChar **values,
101                                         int *terminal);
102#ifdef __cplusplus
103}
104#endif
105
106#endif /* LIBXML_REGEXP_ENABLED */
107
108#endif /*__XML_REGEXP_H__ */
Note: See TracBrowser for help on using the repository browser.