xmlautomata.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /**
  2. * @file
  3. *
  4. * @brief API to build regexp automata
  5. *
  6. * These are internal functions and shouldn't be used.
  7. *
  8. * @copyright See Copyright for the status of this software.
  9. *
  10. * @author Daniel Veillard
  11. */
  12. #ifndef __XML_AUTOMATA_H__
  13. #define __XML_AUTOMATA_H__
  14. #include <libxml/xmlversion.h>
  15. #ifdef LIBXML_REGEXP_ENABLED
  16. #include <libxml/xmlstring.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /**
  21. * A libxml automata description
  22. *
  23. * It can be compiled into a regexp
  24. */
  25. typedef struct _xmlAutomata xmlAutomata;
  26. typedef xmlAutomata *xmlAutomataPtr;
  27. /**
  28. * A state in the automata description
  29. */
  30. typedef struct _xmlAutomataState xmlAutomataState;
  31. typedef xmlAutomataState *xmlAutomataStatePtr;
  32. /*
  33. * Building API
  34. */
  35. XML_DEPRECATED
  36. XMLPUBFUN xmlAutomata *
  37. xmlNewAutomata (void);
  38. XML_DEPRECATED
  39. XMLPUBFUN void
  40. xmlFreeAutomata (xmlAutomata *am);
  41. XML_DEPRECATED
  42. XMLPUBFUN xmlAutomataState *
  43. xmlAutomataGetInitState (xmlAutomata *am);
  44. XML_DEPRECATED
  45. XMLPUBFUN int
  46. xmlAutomataSetFinalState (xmlAutomata *am,
  47. xmlAutomataState *state);
  48. XML_DEPRECATED
  49. XMLPUBFUN xmlAutomataState *
  50. xmlAutomataNewState (xmlAutomata *am);
  51. XML_DEPRECATED
  52. XMLPUBFUN xmlAutomataState *
  53. xmlAutomataNewTransition (xmlAutomata *am,
  54. xmlAutomataState *from,
  55. xmlAutomataState *to,
  56. const xmlChar *token,
  57. void *data);
  58. XML_DEPRECATED
  59. XMLPUBFUN xmlAutomataState *
  60. xmlAutomataNewTransition2 (xmlAutomata *am,
  61. xmlAutomataState *from,
  62. xmlAutomataState *to,
  63. const xmlChar *token,
  64. const xmlChar *token2,
  65. void *data);
  66. XML_DEPRECATED
  67. XMLPUBFUN xmlAutomataState *
  68. xmlAutomataNewNegTrans (xmlAutomata *am,
  69. xmlAutomataState *from,
  70. xmlAutomataState *to,
  71. const xmlChar *token,
  72. const xmlChar *token2,
  73. void *data);
  74. XML_DEPRECATED
  75. XMLPUBFUN xmlAutomataState *
  76. xmlAutomataNewCountTrans (xmlAutomata *am,
  77. xmlAutomataState *from,
  78. xmlAutomataState *to,
  79. const xmlChar *token,
  80. int min,
  81. int max,
  82. void *data);
  83. XML_DEPRECATED
  84. XMLPUBFUN xmlAutomataState *
  85. xmlAutomataNewCountTrans2 (xmlAutomata *am,
  86. xmlAutomataState *from,
  87. xmlAutomataState *to,
  88. const xmlChar *token,
  89. const xmlChar *token2,
  90. int min,
  91. int max,
  92. void *data);
  93. XML_DEPRECATED
  94. XMLPUBFUN xmlAutomataState *
  95. xmlAutomataNewOnceTrans (xmlAutomata *am,
  96. xmlAutomataState *from,
  97. xmlAutomataState *to,
  98. const xmlChar *token,
  99. int min,
  100. int max,
  101. void *data);
  102. XML_DEPRECATED
  103. XMLPUBFUN xmlAutomataState *
  104. xmlAutomataNewOnceTrans2 (xmlAutomata *am,
  105. xmlAutomataState *from,
  106. xmlAutomataState *to,
  107. const xmlChar *token,
  108. const xmlChar *token2,
  109. int min,
  110. int max,
  111. void *data);
  112. XML_DEPRECATED
  113. XMLPUBFUN xmlAutomataState *
  114. xmlAutomataNewAllTrans (xmlAutomata *am,
  115. xmlAutomataState *from,
  116. xmlAutomataState *to,
  117. int lax);
  118. XML_DEPRECATED
  119. XMLPUBFUN xmlAutomataState *
  120. xmlAutomataNewEpsilon (xmlAutomata *am,
  121. xmlAutomataState *from,
  122. xmlAutomataState *to);
  123. XML_DEPRECATED
  124. XMLPUBFUN xmlAutomataState *
  125. xmlAutomataNewCountedTrans (xmlAutomata *am,
  126. xmlAutomataState *from,
  127. xmlAutomataState *to,
  128. int counter);
  129. XML_DEPRECATED
  130. XMLPUBFUN xmlAutomataState *
  131. xmlAutomataNewCounterTrans (xmlAutomata *am,
  132. xmlAutomataState *from,
  133. xmlAutomataState *to,
  134. int counter);
  135. XML_DEPRECATED
  136. XMLPUBFUN int
  137. xmlAutomataNewCounter (xmlAutomata *am,
  138. int min,
  139. int max);
  140. XML_DEPRECATED
  141. XMLPUBFUN struct _xmlRegexp *
  142. xmlAutomataCompile (xmlAutomata *am);
  143. XML_DEPRECATED
  144. XMLPUBFUN int
  145. xmlAutomataIsDeterminist (xmlAutomata *am);
  146. #ifdef __cplusplus
  147. }
  148. #endif
  149. #endif /* LIBXML_REGEXP_ENABLED */
  150. #endif /* __XML_AUTOMATA_H__ */