~burner/xsb/debianized-xsb

« back to all changes in this revision

Viewing changes to packages/xpath/cc/libxml/xmlregexp.h

  • Committer: Michael R. Head
  • Date: 2006-09-06 22:11:55 UTC
  • Revision ID: burner@n23-20060906221155-7e398d23438a7ee4
Add the files from the 3.0.1 release package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
19
extern "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
 */
 
28
typedef struct _xmlRegexp xmlRegexp;
 
29
typedef xmlRegexp *xmlRegexpPtr;
 
30
 
 
31
/**
 
32
 * xmlRegExecCtxtPtr:
 
33
 *
 
34
 * A libxml progressive regular expression evaluation context
 
35
 */
 
36
typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
 
37
typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
 
38
 
 
39
#ifdef __cplusplus
 
40
}
 
41
#endif 
 
42
#include <libxml/tree.h>
 
43
#ifdef __cplusplus
 
44
extern "C" {
 
45
#endif
 
46
 
 
47
/*
 
48
 * The POSIX like API
 
49
 */
 
50
XMLPUBFUN xmlRegexpPtr XMLCALL
 
51
                    xmlRegexpCompile    (const xmlChar *regexp);
 
52
XMLPUBFUN void XMLCALL                   xmlRegFreeRegexp(xmlRegexpPtr regexp);
 
53
XMLPUBFUN int XMLCALL                   
 
54
                    xmlRegexpExec       (xmlRegexpPtr comp,
 
55
                                         const xmlChar *value);
 
56
XMLPUBFUN void XMLCALL                  
 
57
                    xmlRegexpPrint      (FILE *output,
 
58
                                         xmlRegexpPtr regexp);
 
59
XMLPUBFUN int XMLCALL                   
 
60
                    xmlRegexpIsDeterminist(xmlRegexpPtr comp);
 
61
 
 
62
/*
 
63
 * Callback function when doing a transition in the automata
 
64
 */
 
65
typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
 
66
                                     const xmlChar *token,
 
67
                                     void *transdata,
 
68
                                     void *inputdata);
 
69
 
 
70
/*
 
71
 * The progressive API
 
72
 */
 
73
XMLPUBFUN xmlRegExecCtxtPtr XMLCALL     
 
74
                    xmlRegNewExecCtxt   (xmlRegexpPtr comp,
 
75
                                         xmlRegExecCallbacks callback,
 
76
                                         void *data);
 
77
XMLPUBFUN void XMLCALL                  
 
78
                    xmlRegFreeExecCtxt  (xmlRegExecCtxtPtr exec);
 
79
XMLPUBFUN int XMLCALL                   
 
80
                    xmlRegExecPushString(xmlRegExecCtxtPtr exec,
 
81
                                         const xmlChar *value,
 
82
                                         void *data);
 
83
XMLPUBFUN int XMLCALL                   
 
84
                    xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
 
85
                                         const xmlChar *value,
 
86
                                         const xmlChar *value2,
 
87
                                         void *data);
 
88
 
 
89
XMLPUBFUN int XMLCALL
 
90
                    xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
 
91
                                         int *nbval,
 
92
                                         int *nbneg,
 
93
                                         xmlChar **values,
 
94
                                         int *terminal);
 
95
XMLPUBFUN 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__ */