diff --git a/HTMLtree.c b/HTMLtree.c
index 06741c21..3ebacd4d 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -26,6 +26,7 @@
#include "private/buf.h"
#include "private/error.h"
#include "private/io.h"
+#include "private/parser.h"
#include "private/save.h"
/************************************************************************
diff --git a/catalog.c b/catalog.c
index cf690ae3..b1409a1b 100644
--- a/catalog.c
+++ b/catalog.c
@@ -41,6 +41,7 @@
#include "private/buf.h"
#include "private/error.h"
#include "private/memory.h"
+#include "private/parser.h"
#include "private/threads.h"
#define MAX_DELEGATE 50
diff --git a/debugXML.c b/debugXML.c
index f5ffe60c..bcf90a00 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -24,6 +24,7 @@
#include
#include "private/error.h"
+#include "private/parser.h"
#define DUMP_TEXT_TYPE 1
diff --git a/entities.c b/entities.c
index b7b49305..a6c8a0f9 100644
--- a/entities.c
+++ b/entities.c
@@ -28,6 +28,7 @@
#include "private/entities.h"
#include "private/error.h"
+#include "private/parser.h"
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t) -1)
diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h
index 9b3118eb..9d2b1d82 100644
--- a/include/libxml/parserInternals.h
+++ b/include/libxml/parserInternals.h
@@ -99,42 +99,6 @@ XMLPUBVAR const unsigned int xmlParserMaxDepth;
*/
#define INPUT_CHUNK 250
-/************************************************************************
- * *
- * UNICODE version of the macros. *
- * *
- ************************************************************************/
-/**
- * IS_BYTE_CHAR:
- * @c: an byte value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [2] Char ::= #x9 | #xA | #xD | [#x20...]
- * any byte character in the accepted range
- */
-#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
-
-/**
- * IS_CHAR:
- * @c: an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
- * | [#x10000-#x10FFFF]
- * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
- */
-#define IS_CHAR(c) xmlIsCharQ(c)
-
-/**
- * IS_CHAR_CH:
- * @c: an xmlChar (usually an unsigned char)
- *
- * Behaves like IS_CHAR on single-byte value
- */
-#define IS_CHAR_CH(c) xmlIsChar_ch(c)
-
/**
* IS_BLANK:
* @c: an UNICODE value (int)
@@ -153,142 +117,6 @@ XMLPUBVAR const unsigned int xmlParserMaxDepth;
*/
#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
-/**
- * IS_BASECHAR:
- * @c: an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [85] BaseChar ::= ... long list see REC ...
- */
-#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
-
-/**
- * IS_DIGIT:
- * @c: an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [88] Digit ::= ... long list see REC ...
- */
-#define IS_DIGIT(c) xmlIsDigitQ(c)
-
-/**
- * IS_DIGIT_CH:
- * @c: an xmlChar value (usually an unsigned char)
- *
- * Behaves like IS_DIGIT but with a single byte argument
- */
-#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
-
-/**
- * IS_COMBINING:
- * @c: an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [87] CombiningChar ::= ... long list see REC ...
- */
-#define IS_COMBINING(c) xmlIsCombiningQ(c)
-
-/**
- * IS_COMBINING_CH:
- * @c: an xmlChar (usually an unsigned char)
- *
- * Always false (all combining chars > 0xff)
- */
-#define IS_COMBINING_CH(c) 0
-
-/**
- * IS_EXTENDER:
- * @c: an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- *
- * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
- * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
- * [#x309D-#x309E] | [#x30FC-#x30FE]
- */
-#define IS_EXTENDER(c) xmlIsExtenderQ(c)
-
-/**
- * IS_EXTENDER_CH:
- * @c: an xmlChar value (usually an unsigned char)
- *
- * Behaves like IS_EXTENDER but with a single-byte argument
- */
-#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
-
-/**
- * IS_IDEOGRAPHIC:
- * @c: an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- *
- * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
- */
-#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
-
-/**
- * IS_LETTER:
- * @c: an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- *
- * [84] Letter ::= BaseChar | Ideographic
- */
-#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
-
-/**
- * IS_LETTER_CH:
- * @c: an xmlChar value (normally unsigned char)
- *
- * Macro behaves like IS_LETTER, but only check base chars
- *
- */
-#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
-
-/**
- * IS_ASCII_LETTER:
- * @c: an xmlChar value
- *
- * Macro to check [a-zA-Z]
- *
- */
-#define IS_ASCII_LETTER(c) ((0x61 <= ((c) | 0x20)) && \
- (((c) | 0x20) <= 0x7a))
-
-/**
- * IS_ASCII_DIGIT:
- * @c: an xmlChar value
- *
- * Macro to check [0-9]
- *
- */
-#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
-
-/**
- * IS_PUBIDCHAR:
- * @c: an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- *
- * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
- */
-#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
-
-/**
- * IS_PUBIDCHAR_CH:
- * @c: an xmlChar value (normally unsigned char)
- *
- * Same as IS_PUBIDCHAR but for single-byte value
- */
-#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
-
/**
* Global variables used for predefined strings.
*/
diff --git a/include/private/parser.h b/include/private/parser.h
index d159c860..68803b3d 100644
--- a/include/private/parser.h
+++ b/include/private/parser.h
@@ -46,6 +46,20 @@
(((ctxt)->input->entity != NULL) && \
((ctxt)->input->entity->etype == XML_EXTERNAL_PARAMETER_ENTITY)))
+#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
+#define IS_CHAR(c) xmlIsCharQ(c)
+#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
+#define IS_DIGIT(c) xmlIsDigitQ(c)
+#define IS_COMBINING(c) xmlIsCombiningQ(c)
+#define IS_EXTENDER(c) xmlIsExtenderQ(c)
+#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
+#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
+#define IS_ASCII_LETTER(c) ((0x61 <= ((c) | 0x20)) && \
+ (((c) | 0x20) <= 0x7a))
+#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
+#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
+#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
+
struct _xmlAttrHashBucket {
int index;
};
diff --git a/pattern.c b/pattern.c
index 60845dca..0877fc1a 100644
--- a/pattern.c
+++ b/pattern.c
@@ -35,6 +35,7 @@
#include
#include "private/memory.h"
+#include "private/parser.h"
#ifdef LIBXML_PATTERN_ENABLED
diff --git a/relaxng.c b/relaxng.c
index d452fcea..8136333a 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -35,6 +35,7 @@
#include
#include "private/error.h"
+#include "private/parser.h"
#include "private/regexp.h"
#include "private/string.h"
diff --git a/tree.c b/tree.c
index aaa9a3c7..2df09d92 100644
--- a/tree.c
+++ b/tree.c
@@ -46,6 +46,7 @@
#include "private/entities.h"
#include "private/error.h"
#include "private/memory.h"
+#include "private/parser.h"
#include "private/tree.h"
/*
diff --git a/xmlregexp.c b/xmlregexp.c
index 2a7f762d..c7604244 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -31,6 +31,7 @@
#include "private/error.h"
#include "private/memory.h"
+#include "private/parser.h"
#include "private/regexp.h"
#ifndef SIZE_MAX
diff --git a/xmlsave.c b/xmlsave.c
index d1b97455..118ddbed 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -26,6 +26,7 @@
#include "private/entities.h"
#include "private/error.h"
#include "private/io.h"
+#include "private/parser.h"
#include "private/save.h"
#ifdef LIBXML_OUTPUT_ENABLED
diff --git a/xmlschemas.c b/xmlschemas.c
index 4f13a2df..d006d48b 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -78,6 +78,7 @@
#include "private/error.h"
#include "private/memory.h"
+#include "private/parser.h"
#include "private/string.h"
/* #define WXS_ELEM_DECL_CONS_ENABLED */
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 97de1473..24c68b94 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -35,6 +35,7 @@
#include
#include "private/error.h"
+#include "private/parser.h"
#ifndef isnan
#define isnan(x) (!((x) == (x)))
diff --git a/xpath.c b/xpath.c
index e19ade96..ecdbc652 100644
--- a/xpath.c
+++ b/xpath.c
@@ -47,6 +47,7 @@
#include "private/buf.h"
#include "private/error.h"
#include "private/memory.h"
+#include "private/parser.h"
#include "private/xpath.h"
/* Disabled for now */
diff --git a/xpointer.c b/xpointer.c
index 6c995b77..01205d50 100644
--- a/xpointer.c
+++ b/xpointer.c
@@ -45,6 +45,7 @@
#define XPTR_XMLNS_SCHEME
#include "private/error.h"
+#include "private/parser.h"
#include "private/xpath.h"
/************************************************************************