xmlautomata.h

00001 /*
00002 
00003  * Summary: API to build regexp automata
00004 
00005  * Description: the API to build regexp automata
00006 
00007  *
00008 
00009  * Copy: See Copyright for the status of this software.
00010 
00011  *
00012 
00013  * Author: Daniel Veillard
00014 
00015  */
00016 
00017 
00018 
00019 #ifndef __XML_AUTOMATA_H__
00020 
00021 #define __XML_AUTOMATA_H__
00022 
00023 
00024 
00025 #include <libxml/xmlversion.h>
00026 
00027 #include <libxml/tree.h>
00028 
00029 
00030 
00031 #ifdef LIBXML_REGEXP_ENABLED
00032 
00033 #ifdef LIBXML_AUTOMATA_ENABLED
00034 
00035 #include <libxml/xmlregexp.h>
00036 
00037 
00038 
00039 #ifdef __cplusplus
00040 
00041 extern "C" {
00042 
00043 #endif
00044 
00045 
00046 
00057 typedef struct _xmlAutomata xmlAutomata;
00058 
00059 typedef xmlAutomata *xmlAutomataPtr;
00060 
00061 
00062 
00073 typedef struct _xmlAutomataState xmlAutomataState;
00074 
00075 typedef xmlAutomataState *xmlAutomataStatePtr;
00076 
00077 
00078 
00079 /*
00080 
00081  * Building API
00082 
00083  */
00084 
00085 XMLPUBFUN xmlAutomataPtr XMLCALL                
00086 
00087                     xmlNewAutomata              (void);
00088 
00089 XMLPUBFUN void XMLCALL                  
00090 
00091                     xmlFreeAutomata             (xmlAutomataPtr am);
00092 
00093 
00094 
00095 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00096 
00097                     xmlAutomataGetInitState     (xmlAutomataPtr am);
00098 
00099 XMLPUBFUN int XMLCALL                   
00100 
00101                     xmlAutomataSetFinalState    (xmlAutomataPtr am,
00102 
00103                                                  xmlAutomataStatePtr state);
00104 
00105 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00106 
00107                     xmlAutomataNewState         (xmlAutomataPtr am);
00108 
00109 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00110 
00111                     xmlAutomataNewTransition    (xmlAutomataPtr am,
00112 
00113                                                  xmlAutomataStatePtr from,
00114 
00115                                                  xmlAutomataStatePtr to,
00116 
00117                                                  const xmlChar *token,
00118 
00119                                                  void *data);
00120 
00121 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00122 
00123                     xmlAutomataNewTransition2   (xmlAutomataPtr am,
00124 
00125                                                  xmlAutomataStatePtr from,
00126 
00127                                                  xmlAutomataStatePtr to,
00128 
00129                                                  const xmlChar *token,
00130 
00131                                                  const xmlChar *token2,
00132 
00133                                                  void *data);
00134 
00135 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00136 
00137                     xmlAutomataNewCountTrans    (xmlAutomataPtr am,
00138 
00139                                                  xmlAutomataStatePtr from,
00140 
00141                                                  xmlAutomataStatePtr to,
00142 
00143                                                  const xmlChar *token,
00144 
00145                                                  int min,
00146 
00147                                                  int max,
00148 
00149                                                  void *data);
00150 
00151 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00152 
00153                     xmlAutomataNewCountTrans2   (xmlAutomataPtr am,
00154 
00155                                                  xmlAutomataStatePtr from,
00156 
00157                                                  xmlAutomataStatePtr to,
00158 
00159                                                  const xmlChar *token,
00160 
00161                                                  const xmlChar *token2,
00162 
00163                                                  int min,
00164 
00165                                                  int max,
00166 
00167                                                  void *data);
00168 
00169 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00170 
00171                     xmlAutomataNewOnceTrans     (xmlAutomataPtr am,
00172 
00173                                                  xmlAutomataStatePtr from,
00174 
00175                                                  xmlAutomataStatePtr to,
00176 
00177                                                  const xmlChar *token,
00178 
00179                                                  int min,
00180 
00181                                                  int max,
00182 
00183                                                  void *data);
00184 
00185 XMLPUBFUN xmlAutomataStatePtr XMLCALL
00186 
00187                     xmlAutomataNewOnceTrans2    (xmlAutomataPtr am, 
00188 
00189                                                  xmlAutomataStatePtr from,
00190 
00191                                                  xmlAutomataStatePtr to, 
00192 
00193                                                  const xmlChar *token,
00194 
00195                                                  const xmlChar *token2,
00196 
00197                                                  int min, 
00198 
00199                                                  int max, 
00200 
00201                                                  void *data);
00202 
00203 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00204 
00205                     xmlAutomataNewAllTrans      (xmlAutomataPtr am,
00206 
00207                                                  xmlAutomataStatePtr from,
00208 
00209                                                  xmlAutomataStatePtr to,
00210 
00211                                                  int lax);
00212 
00213 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00214 
00215                     xmlAutomataNewEpsilon       (xmlAutomataPtr am,
00216 
00217                                                  xmlAutomataStatePtr from,
00218 
00219                                                  xmlAutomataStatePtr to);
00220 
00221 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00222 
00223                     xmlAutomataNewCountedTrans  (xmlAutomataPtr am,
00224 
00225                                                  xmlAutomataStatePtr from,
00226 
00227                                                  xmlAutomataStatePtr to,
00228 
00229                                                  int counter);
00230 
00231 XMLPUBFUN xmlAutomataStatePtr XMLCALL   
00232 
00233                     xmlAutomataNewCounterTrans  (xmlAutomataPtr am,
00234 
00235                                                  xmlAutomataStatePtr from,
00236 
00237                                                  xmlAutomataStatePtr to,
00238 
00239                                                  int counter);
00240 
00241 XMLPUBFUN int XMLCALL                   
00242 
00243                     xmlAutomataNewCounter       (xmlAutomataPtr am,
00244 
00245                                                  int min,
00246 
00247                                                  int max);
00248 
00249 
00250 
00251 XMLPUBFUN xmlRegexpPtr XMLCALL          
00252 
00253                     xmlAutomataCompile          (xmlAutomataPtr am);
00254 
00255 XMLPUBFUN int XMLCALL                   
00256 
00257                     xmlAutomataIsDeterminist    (xmlAutomataPtr am);
00258 
00259 
00260 
00261 #ifdef __cplusplus
00262 
00263 }
00264 
00265 #endif 
00266 
00267 
00268 
00269 #endif /* LIBXML_AUTOMATA_ENABLED */
00270 
00271 #endif /* LIBXML_REGEXP_ENABLED */
00272 
00273 
00274 
00275 #endif /* __XML_AUTOMATA_H__ */
00276 

Generated on Wed Jul 26 13:30:46 2006 for XSB by  doxygen 1.4.5