diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
index 7df8b9dc..f751f308 100644
--- a/doc/libxml2-api.xml
+++ b/doc/libxml2-api.xml
@@ -8203,25 +8203,25 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
Initial state lookup
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
Checks if an automata is determinist.
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds a an ALL transition from the @from state to the target state. That transition is an epsilon transition allowed only when all transitions from the @from node have been activated.
@@ -8230,7 +8230,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max
@@ -8242,7 +8242,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max
@@ -8255,7 +8255,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will increment the counter provided
@@ -8264,7 +8264,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
Create a new counter
@@ -8272,7 +8272,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will be allowed only if the counter is within the right range.
@@ -8281,7 +8281,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state
@@ -8289,7 +8289,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by any value except (@token,@token2) Note that if @token2 is not NULL, then (X, NULL) won't match to follow # the semantic of XSD ##other
@@ -8300,7 +8300,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max, moreover that transition can only be crossed once.
@@ -8312,7 +8312,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max, moreover that transition can only be crossed once.
@@ -8325,13 +8325,13 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
Create a new disconnected state in the automata
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token
@@ -8341,7 +8341,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token
@@ -8352,7 +8352,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
Makes that state a final state
@@ -9765,7 +9765,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
Free an automata
@@ -11160,7 +11160,7 @@ Could we use @subtypes for this?'/>
- defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ defined(LIBXML_REGEXP_ENABLED)
Create a new automata
diff --git a/include/libxml/xmlautomata.h b/include/libxml/xmlautomata.h
index ea38eb37..f40e8af9 100644
--- a/include/libxml/xmlautomata.h
+++ b/include/libxml/xmlautomata.h
@@ -13,7 +13,6 @@
#include
#ifdef LIBXML_REGEXP_ENABLED
-#ifdef LIBXML_AUTOMATA_ENABLED
#include
@@ -140,7 +139,6 @@ XMLPUBFUN int
}
#endif
-#endif /* LIBXML_AUTOMATA_ENABLED */
#endif /* LIBXML_REGEXP_ENABLED */
#endif /* __XML_AUTOMATA_H__ */
diff --git a/parser.c b/parser.c
index 60cee178..fb6cee18 100644
--- a/parser.c
+++ b/parser.c
@@ -639,7 +639,7 @@ xmlHasFeature(xmlFeature feature)
return(0);
#endif
case XML_WITH_AUTOMATA:
-#ifdef LIBXML_AUTOMATA_ENABLED
+#ifdef LIBXML_REGEXP_ENABLED
return(1);
#else
return(0);
diff --git a/runtest.c b/runtest.c
index 084fc591..665f2725 100644
--- a/runtest.c
+++ b/runtest.c
@@ -4452,9 +4452,6 @@ done:
return(res);
}
-#endif /* LIBXML_REGEXPS_ENABLED */
-
-#ifdef LIBXML_AUTOMATA_ENABLED
/************************************************************************
* *
* Automata tests *
@@ -4691,7 +4688,7 @@ automataTest(const char *filename, const char *result,
return(res);
}
-#endif /* LIBXML_AUTOMATA_ENABLED */
+#endif /* LIBXML_REGEXP_ENABLED */
/************************************************************************
* *
@@ -4899,8 +4896,6 @@ testDesc testDescriptions[] = {
{ "Regexp regression tests" ,
regexpTest, "./test/regexp/*", "result/regexp/", "", ".err",
0 },
-#endif
-#if defined(LIBXML_AUTOMATA_ENABLED)
{ "Automata regression tests" ,
automataTest, "./test/automata/*", "result/automata/", "", NULL,
0 },
diff --git a/testapi.c b/testapi.c
index 401d0283..b98d6e9e 100644
--- a/testapi.c
+++ b/testapi.c
@@ -29872,7 +29872,7 @@ static int
test_xmlAutomataIsDeterminist(void) {
int test_ret = 0;
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#if defined(LIBXML_REGEXP_ENABLED)
int mem_base;
int ret_val;
xmlAutomataPtr am; /* an automata */
@@ -29946,7 +29946,7 @@ static int
test_xmlAutomataNewCounter(void) {
int test_ret = 0;
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#if defined(LIBXML_REGEXP_ENABLED)
int mem_base;
int ret_val;
xmlAutomataPtr am; /* an automata */
@@ -30081,7 +30081,7 @@ static int
test_xmlAutomataSetFinalState(void) {
int test_ret = 0;
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#if defined(LIBXML_REGEXP_ENABLED)
int mem_base;
int ret_val;
xmlAutomataPtr am; /* an automata */
diff --git a/xmlregexp.c b/xmlregexp.c
index 31e3d1a6..f39de960 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -5550,7 +5550,6 @@ xmlRegFreeRegexp(xmlRegexpPtr regexp) {
xmlFree(regexp);
}
-#ifdef LIBXML_AUTOMATA_ENABLED
/************************************************************************
* *
* The Automata interface *
@@ -6315,7 +6314,6 @@ xmlAutomataIsDeterminist(xmlAutomataPtr am) {
ret = xmlFAComputesDeterminism(am);
return(ret);
}
-#endif /* LIBXML_AUTOMATA_ENABLED */
#ifdef LIBXML_EXPR_ENABLED
/************************************************************************