ReactOS 0.4.16-dev-237-gd6eebaa
xmlregexp.h
Go to the documentation of this file.
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
28typedef struct _xmlRegexp xmlRegexp;
29typedef xmlRegexp *xmlRegexpPtr;
30
36typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
37typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
38
39#ifdef __cplusplus
40}
41#endif
42#include <libxml/tree.h>
43#include <libxml/dict.h>
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/*
49 * The POSIX like API
50 */
51XMLPUBFUN xmlRegexpPtr XMLCALL
52 xmlRegexpCompile (const xmlChar *regexp);
53XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
55 xmlRegexpExec (xmlRegexpPtr comp,
56 const xmlChar *value);
58 xmlRegexpPrint (FILE *output,
59 xmlRegexpPtr regexp);
61 xmlRegexpIsDeterminist(xmlRegexpPtr comp);
62
72typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
73 const xmlChar *token,
74 void *transdata,
75 void *inputdata);
76
77/*
78 * The progressive API
79 */
80XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
81 xmlRegNewExecCtxt (xmlRegexpPtr comp,
82 xmlRegExecCallbacks callback,
83 void *data);
85 xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
87 xmlRegExecPushString(xmlRegExecCtxtPtr exec,
88 const xmlChar *value,
89 void *data);
91 xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
92 const xmlChar *value,
93 const xmlChar *value2,
94 void *data);
95
97 xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
98 int *nbval,
99 int *nbneg,
100 xmlChar **values,
101 int *terminal);
103 xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
104 const xmlChar **string,
105 int *nbval,
106 int *nbneg,
107 xmlChar **values,
108 int *terminal);
109#ifdef LIBXML_EXPR_ENABLED
110/*
111 * Formal regular expression handling
112 * Its goal is to do some formal work on content models
113 */
114
115/* expressions are used within a context */
116typedef struct _xmlExpCtxt xmlExpCtxt;
117typedef xmlExpCtxt *xmlExpCtxtPtr;
118
120 xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
121XMLPUBFUN xmlExpCtxtPtr XMLCALL
122 xmlExpNewCtxt (int maxNodes,
123 xmlDictPtr dict);
124
126 xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
128 xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
129
130/* Expressions are trees but the tree is opaque */
131typedef struct _xmlExpNode xmlExpNode;
132typedef xmlExpNode *xmlExpNodePtr;
133
134typedef enum {
135 XML_EXP_EMPTY = 0,
136 XML_EXP_FORBID = 1,
137 XML_EXP_ATOM = 2,
138 XML_EXP_SEQ = 3,
139 XML_EXP_OR = 4,
140 XML_EXP_COUNT = 5
141} xmlExpNodeType;
142
143/*
144 * 2 core expressions shared by all for the empty language set
145 * and for the set with just the empty token
146 */
147XMLPUBVAR xmlExpNodePtr forbiddenExp;
148XMLPUBVAR xmlExpNodePtr emptyExp;
149
150/*
151 * Expressions are reference counted internally
152 */
154 xmlExpFree (xmlExpCtxtPtr ctxt,
155 xmlExpNodePtr expr);
157 xmlExpRef (xmlExpNodePtr expr);
158
159/*
160 * constructors can be either manual or from a string
161 */
162XMLPUBFUN xmlExpNodePtr XMLCALL
163 xmlExpParse (xmlExpCtxtPtr ctxt,
164 const char *expr);
165XMLPUBFUN xmlExpNodePtr XMLCALL
166 xmlExpNewAtom (xmlExpCtxtPtr ctxt,
167 const xmlChar *name,
168 int len);
169XMLPUBFUN xmlExpNodePtr XMLCALL
170 xmlExpNewOr (xmlExpCtxtPtr ctxt,
171 xmlExpNodePtr left,
172 xmlExpNodePtr right);
173XMLPUBFUN xmlExpNodePtr XMLCALL
174 xmlExpNewSeq (xmlExpCtxtPtr ctxt,
175 xmlExpNodePtr left,
176 xmlExpNodePtr right);
177XMLPUBFUN xmlExpNodePtr XMLCALL
178 xmlExpNewRange (xmlExpCtxtPtr ctxt,
179 xmlExpNodePtr subset,
180 int min,
181 int max);
182/*
183 * The really interesting APIs
184 */
186 xmlExpIsNillable(xmlExpNodePtr expr);
188 xmlExpMaxToken (xmlExpNodePtr expr);
190 xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
191 xmlExpNodePtr expr,
192 const xmlChar**langList,
193 int len);
195 xmlExpGetStart (xmlExpCtxtPtr ctxt,
196 xmlExpNodePtr expr,
197 const xmlChar**tokList,
198 int len);
199XMLPUBFUN xmlExpNodePtr XMLCALL
200 xmlExpStringDerive(xmlExpCtxtPtr ctxt,
201 xmlExpNodePtr expr,
202 const xmlChar *str,
203 int len);
204XMLPUBFUN xmlExpNodePtr XMLCALL
205 xmlExpExpDerive (xmlExpCtxtPtr ctxt,
206 xmlExpNodePtr expr,
207 xmlExpNodePtr sub);
209 xmlExpSubsume (xmlExpCtxtPtr ctxt,
210 xmlExpNodePtr expr,
211 xmlExpNodePtr sub);
213 xmlExpDump (xmlBufferPtr buf,
214 xmlExpNodePtr expr);
215#endif /* LIBXML_EXPR_ENABLED */
216#ifdef __cplusplus
217}
218#endif
219
220#endif /* LIBXML_REGEXP_ENABLED */
221
222#endif /*__XML_REGEXP_H__ */
#define XMLCALL
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble GLdouble right
Definition: glext.h:10859
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLint left
Definition: glext.h:7726
GLboolean GLenum GLenum GLvoid * values
Definition: glext.h:5666
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
static IPrintDialogCallback callback
Definition: printdlg.c:326
#define min(a, b)
Definition: monoChain.cc:55
const WCHAR * str
Definition: dict.c:111
Definition: query.h:86
Definition: name.c:39
#define max(a, b)
Definition: svc.c:63
Definition: pdh_main.c:94
#define XMLPUBFUN
Definition: xmlexports.h:61
#define XMLPUBVAR
Definition: xmlexports.h:68
unsigned char xmlChar
Definition: xmlstring.h:28