1 * Summary: regular expressions handling
2 * Description: basic API for libxml regular expressions handling used
3 * for XML Schemas and validation.
5 * Copy: See Copyright for the status of this software.
7 * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
9 /if not defined(XML_REGEXP_H__)
10 /define XML_REGEXP_H__
12 /include "libxmlrpg/xmlversion"
14 /if defined(LIBXML_REGEXP_ENABLED)
16 /include "libxmlrpg/xmlTypesC"
20 * A libxml regular expression, they can actually be far more complex
21 * thank the POSIX regex expressions.
23 d xmlRegexpPtr s * based(######typedef######)
27 * A libxml progressive regular expression evaluation context
29 d xmlRegExecCtxtPtr...
30 d s * based(######typedef######)
32 /include "libxmlrpg/tree"
33 /include "libxmlrpg/dict"
38 d pr extproc('xmlRegexpCompile')
40 d regexp * value options(*string) const xmlChar *
43 d pr extproc('xmlRegFreeRegexp')
44 d regexp value like(xmlRegexpPtr)
46 d xmlRegexpExec pr extproc('xmlRegexpExec')
48 d comp value like(xmlRegexpPtr)
49 d value * value options(*string) const xmlChar *
51 d xmlRegexpPrint pr extproc('xmlRegexpPrint')
52 d output * value FILE *
53 d regexp value like(xmlRegexpPtr)
55 d xmlRegexpIsDeterminist...
56 d pr extproc('xmlRegexpIsDeterminist')
58 d comp value like(xmlRegexpPtr)
60 * xmlRegExecCallbacks:
61 * @exec: the regular expression context
62 * @token: the current token string
63 * @transdata: transition data
64 * @inputdata: input data
66 * Callback function when doing a transition in the automata
68 d xmlRegExecCallbacks...
69 d s * based(######typedef######)
74 d xmlRegNewExecCtxt...
75 d pr extproc('xmlRegNewExecCtxt')
76 d like(xmlRegExecCtxtPtr)
77 d comp value like(xmlRegexpPtr)
78 d callback value like(xmlRegExecCallbacks)
81 d xmlRegFreeExecCtxt...
82 d pr extproc('xmlRegFreeExecCtxt')
83 d exec value like(xmlRegExecCtxtPtr)
85 d xmlRegExecPushString...
86 d pr extproc('xmlRegExecPushString')
88 d exec value like(xmlRegExecCtxtPtr)
89 d value * value options(*string) const xmlChar *
92 d xmlRegExecPushString2...
93 d pr extproc('xmlRegExecPushString2')
95 d exec value like(xmlRegExecCtxtPtr)
96 d value * value options(*string) const xmlChar *
97 d value2 * value options(*string) const xmlChar *
100 d xmlRegExecNextValues...
101 d pr extproc('xmlRegExecNextValues')
103 d exec value like(xmlRegExecCtxtPtr)
104 d nbval like(xmlCint)
105 d nbneg like(xmlCint)
106 d values * xmlChar * (*)
107 d terminal like(xmlCint)
109 d xmlRegExecErrInfo...
110 d pr extproc('xmlRegExecErrInfo')
112 d exec value like(xmlRegExecCtxtPtr)
113 d string * const xmlChar * (*)
114 d nbval like(xmlCint)
115 d nbneg like(xmlCint)
116 d values * xmlChar * (*)
117 d terminal like(xmlCint)
119 /if defined(LIBXML_EXPR_ENABLED)
121 * Formal regular expression handling
122 * Its goal is to do some formal work on content models
124 * expressions are used within a context
126 d xmlExpCtxtPtr s * based(######typedef######)
128 d xmlExpFreeCtxt pr extproc('xmlExpFreeCtxt')
129 d ctxt value like(xmlExpCtxtPtr)
131 d xmlExpNewCtxt pr extproc('xmlExpNewCtxt')
132 d like(xmlExpCtxtPtr)
133 d maxNodes value like(xmlCint)
134 d dict value like(xmlDictPtr)
136 d xmlExpCtxtNbNodes...
137 d pr extproc('xmlExpCtxtNbNodes')
139 d ctxt value like(xmlExpCtxtPtr)
141 d xmlExpCtxtNbCons...
142 d pr extproc('xmlExpCtxtNbCons')
144 d ctxt value like(xmlExpCtxtPtr)
146 * Expressions are trees but the tree is opaque
148 d xmlExpNodePtr s * based(######typedef######)
150 d xmlExpNodeType s based(######typedef######)
160 * 2 core expressions shared by all for the empty language set
161 * and for the set with just the empty token
163 d forbiddenExp s import('forbiddenExp')
164 d like(xmlExpNodePtr)
166 d emptyExp s import('emptyExp')
167 d like(xmlExpNodePtr)
170 * Expressions are reference counted internally
172 d xmlExpFree pr extproc('xmlExpFree')
173 d expr value like(xmlExpNodePtr)
175 d xmlExpRef pr extproc('xmlExpRef')
176 d expr value like(xmlExpNodePtr)
178 * constructors can be either manual or from a string
180 d xmlExpParse pr extproc('xmlExpParse')
181 d like(xmlExpNodePtr)
182 d ctxt value like(xmlExpCtxtPtr)
183 d expr * value options(*string) const char *
185 d xmlExpNewAtom pr extproc('xmlExpNewAtom')
186 d like(xmlExpNodePtr)
187 d ctxt value like(xmlExpCtxtPtr)
188 d name * value options(*string) const xmlChar *
189 d len value like(xmlCint)
191 d xmlExpNewOr pr extproc('xmlExpNewOr')
192 d like(xmlExpNodePtr)
193 d ctxt value like(xmlExpCtxtPtr)
194 d left value like(xmlExpNodePtr)
195 d right value like(xmlExpNodePtr)
197 d xmlExpNewSeq pr extproc('xmlExpNewSeq')
198 d like(xmlExpNodePtr)
199 d ctxt value like(xmlExpCtxtPtr)
200 d left value like(xmlExpNodePtr)
201 d right value like(xmlExpNodePtr)
203 d xmlExpNewRange pr extproc('xmlExpNewRange')
204 d like(xmlExpNodePtr)
205 d ctxt value like(xmlExpCtxtPtr)
206 d subset value like(xmlExpNodePtr)
207 d min value like(xmlCint)
208 d max value like(xmlCint)
210 * The really interesting APIs
212 d xmlExpIsNillable...
213 d pr extproc('xmlExpIsNillable')
215 d expr value like(xmlExpNodePtr)
217 d xmlExpMaxToken pr extproc('xmlExpMaxToken')
219 d expr value like(xmlExpNodePtr)
221 d xmlExpGetLanguage...
222 d pr extproc('xmlExpGetLanguage')
224 d ctxt value like(xmlExpCtxtPtr)
225 d expr value like(xmlExpNodePtr)
226 d langList * const xmlChar *(*)
227 d len value like(xmlCint)
229 d xmlExpGetStart pr extproc('xmlExpGetStart')
231 d ctxt value like(xmlExpCtxtPtr)
232 d expr value like(xmlExpNodePtr)
233 d tokList * const xmlChar *(*)
234 d len value like(xmlCint)
236 d xmlExpStringDerive...
237 d pr extproc('xmlExpStringDerive')
238 d like(xmlExpNodePtr)
239 d ctxt value like(xmlExpCtxtPtr)
240 d expr value like(xmlExpNodePtr)
241 d str * value options(*string) const xmlChar *
242 d len value like(xmlCint)
245 d pr extproc('xmlExpExpDerive')
246 d like(xmlExpNodePtr)
247 d ctxt value like(xmlExpCtxtPtr)
248 d expr value like(xmlExpNodePtr)
249 d sub value like(xmlExpNodePtr)
251 d xmlExpSubsume pr extproc('xmlExpSubsume')
253 d ctxt value like(xmlExpCtxtPtr)
254 d expr value like(xmlExpNodePtr)
255 d sub value like(xmlExpNodePtr)
257 d xmlExpDump pr extproc('xmlExpDump')
258 d buf value like(xmlBufferPtr)
259 d expr value like(xmlExpNodePtr)
260 /endif LIBXML_EXPR_ENABLED
261 /endif LIBXML_REGEXP_ENABLD
262 /endif XML_REGEXP_H__