diff --git a/src/xercesc/util/regx/ConcatToken.cpp b/src/xercesc/util/regx/ConcatToken.cpp
index d4e852bc34180b1d6709933e807f760bd5ab231b..3b96731a1a77017902c24ec82768cf2f73fde009 100644
--- a/src/xercesc/util/regx/ConcatToken.cpp
+++ b/src/xercesc/util/regx/ConcatToken.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:29  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:29  peiyongz
+ * sane_include
  *
  * Revision 1.2  2001/05/11 13:26:41  tng
  * Copyright update.
@@ -76,7 +79,7 @@
 //  Token: Constructors and Destructors
 // ---------------------------------------------------------------------------
 ConcatToken::ConcatToken(Token* const tok1, Token* const tok2)
-    : Token(Token::CONCAT)
+    : Token(Token::T_CONCAT)
     , fChild1(tok1)
     , fChild2(tok2)
 {
diff --git a/src/xercesc/util/regx/ConditionToken.cpp b/src/xercesc/util/regx/ConditionToken.cpp
index 54ab032723a8ce4c4a03622844da54a28130a244..010f920ddfcb5d9c206ca0e91adf4ea56e49e726 100644
--- a/src/xercesc/util/regx/ConditionToken.cpp
+++ b/src/xercesc/util/regx/ConditionToken.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:29  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:29  peiyongz
+ * sane_include
  *
  * Revision 1.2  2001/05/11 13:26:41  tng
  * Copyright update.
@@ -77,7 +80,7 @@
 // ---------------------------------------------------------------------------
 ConditionToken::ConditionToken(const unsigned int refNo, Token* const condTok,
                                Token* const yesTok, Token* const noTok)
-    : Token(Token::CONDITION)
+    : Token(Token::T_CONDITION)
     , fRefNo(refNo)
     , fConditionToken(condTok)
     , fYesToken(yesTok)
diff --git a/src/xercesc/util/regx/ModifierToken.cpp b/src/xercesc/util/regx/ModifierToken.cpp
index 2d6e99095a427be873e84c13f09cc764cae2480d..aaec2dd1ccc5ba8f44e0975dac5f8befbf678d4a 100644
--- a/src/xercesc/util/regx/ModifierToken.cpp
+++ b/src/xercesc/util/regx/ModifierToken.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:29  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:29  peiyongz
+ * sane_include
  *
  * Revision 1.2  2001/05/11 13:26:43  tng
  * Copyright update.
@@ -77,7 +80,7 @@
 // ---------------------------------------------------------------------------
 ModifierToken::ModifierToken(Token* const child, const int options,
                              const int mask)
-    : Token(Token::MODIFIERGROUP)
+    : Token(Token::T_MODIFIERGROUP)
     , fOptions(options)
     , fOptionsMask(mask)
     , fChild(child)
diff --git a/src/xercesc/util/regx/Op.hpp b/src/xercesc/util/regx/Op.hpp
index b7f79de3aa3dd528881daf529e916960a619516b..139c8d406863fa7da185a6f53dd7d191f7c940a5 100644
--- a/src/xercesc/util/regx/Op.hpp
+++ b/src/xercesc/util/regx/Op.hpp
@@ -78,26 +78,26 @@ class XMLUTIL_EXPORT Op {
 public:
 
     enum {
-        DOT                = 0,
-        CHAR               = 1,
-        RANGE              = 3,
-        NRANGE             = 4,
-        ANCHOR             = 5,
-        STRING             = 6,
-        CLOSURE            = 7,
-        NONGREEDYCLOSURE   = 8,
-        QUESTION           = 9,
-        NONGREEDYQUESTION  = 10,
-        UNION              = 11,
-        CAPTURE            = 15,
-        BACKREFERENCE      = 16,
-        LOOKAHEAD          = 20,
-        NEGATIVELOOKAHEAD  = 21,
-        LOOKBEHIND         = 22,
-        NEGATIVELOOKBEHIND = 23,
-        INDEPENDENT        = 24,
-        MODIFIER           = 25,
-        CONDITION          = 26
+        O_DOT                = 0,
+        O_CHAR               = 1,
+        O_RANGE              = 3,
+        O_NRANGE             = 4,
+        O_ANCHOR             = 5,
+        O_STRING             = 6,
+        O_CLOSURE            = 7,
+        O_NONGREEDYCLOSURE   = 8,
+        O_QUESTION           = 9,
+        O_NONGREEDYQUESTION  = 10,
+        O_UNION              = 11,
+        O_CAPTURE            = 15,
+        O_BACKREFERENCE      = 16,
+        O_LOOKAHEAD          = 20,
+        O_NEGATIVELOOKAHEAD  = 21,
+        O_LOOKBEHIND         = 22,
+        O_NEGATIVELOOKBEHIND = 23,
+        O_INDEPENDENT        = 24,
+        O_MODIFIER           = 25,
+        O_CONDITION          = 26
     };
 
     // -----------------------------------------------------------------------
diff --git a/src/xercesc/util/regx/OpFactory.cpp b/src/xercesc/util/regx/OpFactory.cpp
index 4d9990c7d2241b429e154009b0eaf54b3f7bd420..519f212595e8efc26c09d7e3aa1e1297ab54f1b7 100644
--- a/src/xercesc/util/regx/OpFactory.cpp
+++ b/src/xercesc/util/regx/OpFactory.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:29  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:29  peiyongz
+ * sane_include
  *
  * Revision 1.3  2001/06/07 20:55:36  tng
  * Fix no newline at the end warning.  By Pei Yong Zhang.
@@ -96,14 +99,14 @@ OpFactory::~OpFactory() {
 // ---------------------------------------------------------------------------
 Op* OpFactory::createDotOp() {
 
-	Op* tmpOp = new Op(Op::DOT);
+	Op* tmpOp = new Op(Op::O_DOT);
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
 }
 
 CharOp* OpFactory::createCharOp(int data) {
 
-	CharOp* tmpOp = new CharOp(Op::CHAR, data);
+	CharOp* tmpOp = new CharOp(Op::O_CHAR, data);
 
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
@@ -111,7 +114,7 @@ CharOp* OpFactory::createCharOp(int data) {
 
 CharOp* OpFactory::createAnchorOp(int data) {
 
-	CharOp* tmpOp = new CharOp(Op::ANCHOR, data);
+	CharOp* tmpOp = new CharOp(Op::O_ANCHOR, data);
 
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
@@ -119,7 +122,7 @@ CharOp* OpFactory::createAnchorOp(int data) {
 
 CharOp* OpFactory::createCaptureOp(int number, const Op* const next) {
 
-	CharOp* tmpOp = new CharOp(Op::CAPTURE, number);
+	CharOp* tmpOp = new CharOp(Op::O_CAPTURE, number);
 
 	tmpOp->setNextOp(next);
 	fOpVector->addElement(tmpOp);
@@ -128,7 +131,7 @@ CharOp* OpFactory::createCaptureOp(int number, const Op* const next) {
 
 UnionOp* OpFactory::createUnionOp(int size) {
 
-	UnionOp* tmpOp = new UnionOp(Op::UNION, size);
+	UnionOp* tmpOp = new UnionOp(Op::O_UNION, size);
 
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
@@ -136,7 +139,7 @@ UnionOp* OpFactory::createUnionOp(int size) {
 
 ChildOp* OpFactory::createClosureOp(int id) {
 
-	ModifierOp* tmpOp = new ModifierOp(Op::CLOSURE, id, -1);
+	ModifierOp* tmpOp = new ModifierOp(Op::O_CLOSURE, id, -1);
 
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
@@ -144,7 +147,7 @@ ChildOp* OpFactory::createClosureOp(int id) {
 
 ChildOp* OpFactory::createNonGreedyClosureOp() {
 
-	ChildOp* tmpOp = new ChildOp(Op::NONGREEDYCLOSURE);
+	ChildOp* tmpOp = new ChildOp(Op::O_NONGREEDYCLOSURE);
 
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
@@ -152,8 +155,8 @@ ChildOp* OpFactory::createNonGreedyClosureOp() {
 
 ChildOp* OpFactory::createQuestionOp(bool nonGreedy) {
 
-	ChildOp* tmpOp = new ChildOp(nonGreedy ? Op::NONGREEDYQUESTION :
-											 Op::QUESTION);
+	ChildOp* tmpOp = new ChildOp(nonGreedy ? Op::O_NONGREEDYQUESTION :
+											 Op::O_QUESTION);
 
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
@@ -161,7 +164,7 @@ ChildOp* OpFactory::createQuestionOp(bool nonGreedy) {
 
 RangeOp* OpFactory::createRangeOp(const Token* const token) {
 
-	RangeOp* tmpOp = new RangeOp(Op::RANGE, token);
+	RangeOp* tmpOp = new RangeOp(Op::O_RANGE, token);
 	
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
@@ -180,7 +183,7 @@ ChildOp* OpFactory::createLookOp(const short type, const Op* const next,
 
 CharOp* OpFactory::createBackReferenceOp(int refNo) {
 
-	CharOp* tmpOp = new CharOp(Op::BACKREFERENCE, refNo);
+	CharOp* tmpOp = new CharOp(Op::O_BACKREFERENCE, refNo);
 
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
@@ -188,7 +191,7 @@ CharOp* OpFactory::createBackReferenceOp(int refNo) {
 
 StringOp* OpFactory::createStringOp(const XMLCh* const literal) {
 
-	StringOp* tmpOp = new StringOp(Op::STRING, literal);
+	StringOp* tmpOp = new StringOp(Op::O_STRING, literal);
 
 	fOpVector->addElement(tmpOp);
 	return tmpOp;
@@ -197,7 +200,7 @@ StringOp* OpFactory::createStringOp(const XMLCh* const literal) {
 ChildOp* OpFactory::createIndependentOp(const Op* const next,
 							            const Op* const branch) {
 
-	ChildOp* tmpOp = new ChildOp(Op::INDEPENDENT);
+	ChildOp* tmpOp = new ChildOp(Op::O_INDEPENDENT);
 
 	tmpOp->setNextOp(next);
 	tmpOp->setChild(branch);
@@ -209,7 +212,7 @@ ModifierOp* OpFactory::createModifierOp(const Op* const next,
                                         const Op* const branch,
                                         const int add, const int mask) {
 
-	ModifierOp* tmpOp = new ModifierOp(Op::MODIFIER, add, mask);
+	ModifierOp* tmpOp = new ModifierOp(Op::O_MODIFIER, add, mask);
 
 	tmpOp->setNextOp(next);
 	tmpOp->setChild(branch);
@@ -221,7 +224,7 @@ ConditionOp* OpFactory::createConditionOp(const Op* const next, const int ref,
 								          const Op* const yesFlow,
 								          const Op* const noFlow) {
 
-	ConditionOp* tmpOp = new ConditionOp(Op::CONDITION, ref, conditionFlow,
+	ConditionOp* tmpOp = new ConditionOp(Op::O_CONDITION, ref, conditionFlow,
 										 yesFlow, noFlow);
 
 	tmpOp->setNextOp(next);
diff --git a/src/xercesc/util/regx/ParserForXMLSchema.cpp b/src/xercesc/util/regx/ParserForXMLSchema.cpp
index 164d4e8d23f6355e4427f9dc725613d799872fdb..79c2c7975e56fad70ee55f2966634a7f4ffe510c 100644
--- a/src/xercesc/util/regx/ParserForXMLSchema.cpp
+++ b/src/xercesc/util/regx/ParserForXMLSchema.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:29  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:29  peiyongz
+ * sane_include
  *
  * Revision 1.6  2001/09/20 13:11:42  knoaman
  * Regx  + misc. fixes
@@ -151,7 +154,7 @@ Token* ParserForXMLSchema::processQuestion(Token* const tok) {
     TokenFactory* tokFactory = getTokenFactory();
     Token* retTok = tokFactory->createUnion();
     retTok->addChild(tok, tokFactory);
-    retTok->addChild(tokFactory->createToken(Token::EMPTY), tokFactory);
+    retTok->addChild(tokFactory->createToken(Token::T_EMPTY), tokFactory);
     return retTok;
 }
 
diff --git a/src/xercesc/util/regx/RangeToken.cpp b/src/xercesc/util/regx/RangeToken.cpp
index 3963965d3b7e8ec870e9e002d8e353e888f7958c..870c3dd471b097d0880e81bae81a218656153b40 100644
--- a/src/xercesc/util/regx/RangeToken.cpp
+++ b/src/xercesc/util/regx/RangeToken.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:30  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:30  peiyongz
+ * sane_include
  *
  * Revision 1.4  2001/05/29 19:39:33  knoaman
  * Typo fix
@@ -131,7 +134,7 @@ RangeToken* RangeToken::getCaseInsensitiveToken(TokenFactory* const tokFactory)
     // For now we will return a copy of ourselves.
     if (fCaseIToken == 0 && tokFactory) {
 
-        bool isNRange = (getTokenType() == NRANGE) ? true : false;
+        bool isNRange = (getTokenType() == T_NRANGE) ? true : false;
         RangeToken* lwrToken = tokFactory->createRange(isNRange);
 
         lwrToken->mergeRanges(this);
@@ -348,7 +351,7 @@ void RangeToken::subtractRanges(RangeToken* const tok) {
     if (fRanges == 0 || tok->fRanges == 0)
         return;
 
-    if (tok->getTokenType() == NRANGE) {
+    if (tok->getTokenType() == T_NRANGE) {
 
         intersectRanges(tok);
         return;
@@ -518,7 +521,7 @@ void RangeToken::intersectRanges(RangeToken* const tok) {
 Token* RangeToken::complementRanges(RangeToken* const tok,
                                     TokenFactory* const tokFactory) {
 
-    if (tok->getTokenType() != RANGE && tok->getTokenType() != NRANGE)
+    if (tok->getTokenType() != T_RANGE && tok->getTokenType() != T_NRANGE)
         ThrowXML(IllegalArgumentException, XMLExcepts::Regex_ComplementRangesInvalidArg);
 
     tok->sortRanges();
@@ -555,7 +558,7 @@ bool RangeToken::match(const XMLInt32 ch) {
 
     bool ret;
 
-    if (getTokenType() == RANGE) {
+    if (getTokenType() == T_RANGE) {
 
         if (ch < MAPSIZE)
             return ((fMap[ch/32] & (1<<(ch&0x1f))) != 0);
diff --git a/src/xercesc/util/regx/RegularExpression.cpp b/src/xercesc/util/regx/RegularExpression.cpp
index 3d06d3f92eddb5ce8f15e7a99755e3588863f414..1d2f2f7a2c61e87753a130ad3dc8da0c77360ce0 100644
--- a/src/xercesc/util/regx/RegularExpression.cpp
+++ b/src/xercesc/util/regx/RegularExpression.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:30  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:30  peiyongz
+ * sane_include
  *
  * Revision 1.6  2002/01/02 20:09:11  knoaman
  * Fix for regular expression patterns that begin with ".".
@@ -519,8 +522,8 @@ bool RegularExpression::matches(const XMLCh* const expression, const int start,
 	/*
 	 *	Check whether the expression start with ".*"
 	 */
-	if (fOperations != 0 && fOperations->getOpType() == Op::CLOSURE
-        && fOperations->getChild()->getOpType() == Op::DOT) {
+	if (fOperations != 0 && fOperations->getOpType() == Op::O_CLOSURE
+        && fOperations->getChild()->getOpType() == Op::O_DOT) {
 
 		if (isSet(fOptions, SINGLE_LINE)) {
 			matchStart = context->fStart;
@@ -670,41 +673,41 @@ int RegularExpression::match(Context* const context, const Op* const operations
 			return -1;
 
 		switch(tmpOp->getOpType()) {
-		case Op::CHAR:
+		case Op::O_CHAR:
 			if (!matchChar(context, tmpOp->getData(), offset, direction,
 						   ignoreCase))
 				return -1;
 			tmpOp = tmpOp->getNextOp();
 			break;
-		case Op::DOT:
+		case Op::O_DOT:
 			if (!matchDot(context, offset, direction))
 				return -1;
 			tmpOp = tmpOp->getNextOp();
 			break;
-		case Op::RANGE:
-		case Op::NRANGE:
+		case Op::O_RANGE:
+		case Op::O_NRANGE:
 			if (!matchRange(context, tmpOp, offset, direction, ignoreCase))
 				return -1;
 			tmpOp = tmpOp->getNextOp();
 			break;
-		case Op::ANCHOR:
+		case Op::O_ANCHOR:
 			if (!matchAnchor(context, tmpOp->getData(), offset))
 				return -1;
 			tmpOp->getNextOp();
 			break;
-		case Op::BACKREFERENCE:
+		case Op::O_BACKREFERENCE:
 			if (!matchBackReference(context, tmpOp->getData(), offset,
 									direction, ignoreCase))
 				return -1;
 			tmpOp->getNextOp();
 			break;
-		case Op::STRING:
+		case Op::O_STRING:
 			if (!matchString(context, tmpOp->getLiteral(), offset, direction,
 							 ignoreCase))
 				return -1;
 			tmpOp = tmpOp->getNextOp();
 			break;
-		case Op::CLOSURE:
+		case Op::O_CLOSURE:
 			{
 				XMLInt32 id = tmpOp->getData();
 				if (id >= 0) {
@@ -731,7 +734,7 @@ int RegularExpression::match(Context* const context, const Op* const operations
 				tmpOp = tmpOp->getNextOp();
 			}
 			break;
-		case Op::QUESTION:
+		case Op::O_QUESTION:
 			{
 				int ret = match(context, tmpOp->getChild(), offset, direction);
 				if (ret >= 0)
@@ -739,8 +742,8 @@ int RegularExpression::match(Context* const context, const Op* const operations
 				tmpOp = tmpOp->getNextOp();
 			}
 			break;
-		case Op::NONGREEDYCLOSURE:
-		case Op::NONGREEDYQUESTION:
+		case Op::O_NONGREEDYCLOSURE:
+		case Op::O_NONGREEDYQUESTION:
 			{
 				int ret = match(context,tmpOp->getNextOp(),offset,direction);
 				if (ret >= 0)
@@ -748,39 +751,39 @@ int RegularExpression::match(Context* const context, const Op* const operations
 				tmpOp = tmpOp->getChild();
 			}
 			break;
-		case Op::UNION:
+		case Op::O_UNION:
 			{
 				return matchUnion(context, tmpOp, offset, direction);
 			}
-		case Op::CAPTURE:
+		case Op::O_CAPTURE:
 			if (context->fMatch != 0 && tmpOp->getData() != 0)
 				return matchCapture(context, tmpOp, offset, direction);
 			tmpOp = tmpOp->getNextOp();
 			break;
-		case Op::LOOKAHEAD:
+		case Op::O_LOOKAHEAD:
 			if (0 > match(context, tmpOp->getChild(), offset, 1))
 				return -1;
 			tmpOp = tmpOp->getNextOp();
 			break;
-		case Op::NEGATIVELOOKAHEAD:
+		case Op::O_NEGATIVELOOKAHEAD:
 			if (0 <= match(context, tmpOp->getChild(), offset, 1))
 				return -1;
 			tmpOp = tmpOp->getNextOp();
 			break;
-		case Op::LOOKBEHIND:
+		case Op::O_LOOKBEHIND:
 			if (0 > match(context, tmpOp->getChild(), offset, -1))
 				return - 1;
 			tmpOp = tmpOp->getNextOp();
 			break;
-		case Op::NEGATIVELOOKBEHIND:
+		case Op::O_NEGATIVELOOKBEHIND:
 			if (0 <= match(context, tmpOp->getChild(), offset, -1))
 				return -1;
 			tmpOp = tmpOp->getNextOp();
 			break;
-		case Op::INDEPENDENT:
-        case Op::MODIFIER:
+		case Op::O_INDEPENDENT:
+        case Op::O_MODIFIER:
 			{
-				int ret = (tmpOp->getOpType() == Op::INDEPENDENT)
+				int ret = (tmpOp->getOpType() == Op::O_INDEPENDENT)
 					   ? match(context, tmpOp->getChild(), offset, direction)
                        : matchModifier(context, tmpOp, offset, direction);
                 if (ret < 0)
@@ -789,7 +792,7 @@ int RegularExpression::match(Context* const context, const Op* const operations
 				tmpOp = tmpOp->getNextOp();
 			}
 			break;
-		case Op::CONDITION:
+		case Op::O_CONDITION:
 			if (tmpOp->getRefNo() >= fNoGroups)
 				return -1;
 			if (matchCondition(context, tmpOp, offset, direction))
@@ -1126,42 +1129,42 @@ Op* RegularExpression::compile(const Token* const token, Op* const next,
 	const unsigned short tokenType = token->getTokenType();
 
 	switch(tokenType) {
-	case Token::DOT:
-	case Token::CHAR:
-	case Token::ANCHOR:
-	case Token::RANGE:
-	case Token::NRANGE:
-	case Token::STRING:
-	case Token::BACKREFERENCE:
-	case Token::EMPTY:
+	case Token::T_DOT:
+	case Token::T_CHAR:
+	case Token::T_ANCHOR:
+	case Token::T_RANGE:
+	case Token::T_NRANGE:
+	case Token::T_STRING:
+	case Token::T_BACKREFERENCE:
+	case Token::T_EMPTY:
 		ret = compileSingle(token, next, tokenType);
 		break;
-	case Token::CONCAT:
+	case Token::T_CONCAT:
 		ret = compileConcat(token, next, reverse);
 		break;
-	case Token::UNION:
+	case Token::T_UNION:
 		ret = compileUnion(token, next, reverse);
 		break;
-	case Token::CLOSURE:
-	case Token::NONGREEDYCLOSURE:
+	case Token::T_CLOSURE:
+	case Token::T_NONGREEDYCLOSURE:
 		ret = compileClosure(token, next, reverse, tokenType);
 		break;
-	case Token::PAREN:
+	case Token::T_PAREN:
 		ret = compileParenthesis(token, next, reverse);
 		break;
-	case Token::LOOKAHEAD:
-	case Token::NEGATIVELOOKAHEAD:
+	case Token::T_LOOKAHEAD:
+	case Token::T_NEGATIVELOOKAHEAD:
 		ret = compileLook(token, next, false, tokenType);
 		break;
-	case Token::LOOKBEHIND:
-	case Token::NEGATIVELOOKBEHIND:
+	case Token::T_LOOKBEHIND:
+	case Token::T_NEGATIVELOOKBEHIND:
 		ret = compileLook(token, next, true, tokenType);
 		break;
-	case Token::INDEPENDENT:
-	case Token::MODIFIERGROUP:
+	case Token::T_INDEPENDENT:
+	case Token::T_MODIFIERGROUP:
 		ret = compileLook(token, next, reverse, tokenType);
 		break;
-	case Token::CONDITION:
+	case Token::T_CONDITION:
 		ret = compileCondition(token, next, reverse);
 		break;
 	default:
@@ -1198,12 +1201,12 @@ void RegularExpression::prepare() {
 	}
 
 	if (fOperations != 0 && fOperations->getNextOp() == 0 &&
-		(fOperations->getOpType() == Op::STRING ||
-		 fOperations->getOpType() == Op::CHAR) )			 {
+		(fOperations->getOpType() == Op::O_STRING ||
+		 fOperations->getOpType() == Op::O_CHAR) )			 {
 
 		fFixedStringOnly = true;
 
-		if (fOperations->getOpType() == Op::STRING) {
+		if (fOperations->getOpType() == Op::O_STRING) {
 			delete [] fFixedString;
 			fFixedString = XMLString::replicate(fOperations->getLiteral());
 		}
diff --git a/src/xercesc/util/regx/RegularExpression.hpp b/src/xercesc/util/regx/RegularExpression.hpp
index 2af7818b0c78f1a605d1699e908995fe8b650f64..e05e0c0e67cc5504a8fa7b17bbdd4a01004e8362 100644
--- a/src/xercesc/util/regx/RegularExpression.hpp
+++ b/src/xercesc/util/regx/RegularExpression.hpp
@@ -298,22 +298,22 @@ inline Op* RegularExpression::compileLook(const Token* const token,
     Op*    result = compile(token->getChild(0), 0, reverse);
 
     switch(tokType) {
-    case Token::LOOKAHEAD:
-        ret = fOpFactory.createLookOp(Op::LOOKAHEAD, next, result);
+    case Token::T_LOOKAHEAD:
+        ret = fOpFactory.createLookOp(Op::O_LOOKAHEAD, next, result);
         break;
-    case Token::NEGATIVELOOKAHEAD:
-        ret = fOpFactory.createLookOp(Op::NEGATIVELOOKAHEAD, next, result);
+    case Token::T_NEGATIVELOOKAHEAD:
+        ret = fOpFactory.createLookOp(Op::O_NEGATIVELOOKAHEAD, next, result);
         break;
-    case Token::LOOKBEHIND:
-        ret = fOpFactory.createLookOp(Op::LOOKBEHIND, next, result);
+    case Token::T_LOOKBEHIND:
+        ret = fOpFactory.createLookOp(Op::O_LOOKBEHIND, next, result);
         break;
-    case Token::NEGATIVELOOKBEHIND:
-        ret = fOpFactory.createLookOp(Op::NEGATIVELOOKBEHIND, next, result);
+    case Token::T_NEGATIVELOOKBEHIND:
+        ret = fOpFactory.createLookOp(Op::O_NEGATIVELOOKBEHIND, next, result);
         break;
-    case Token::INDEPENDENT:
+    case Token::T_INDEPENDENT:
         ret = fOpFactory.createIndependentOp(next, result);
         break;
-    case Token::MODIFIERGROUP:
+    case Token::T_MODIFIERGROUP:
         ret = fOpFactory.createModifierOp(next, result,
                                    ((ModifierToken *) token)->getOptions(),
                                    ((ModifierToken *) token)->getOptionsMask());
@@ -331,31 +331,31 @@ inline Op* RegularExpression::compileSingle(const Token* const token,
     Op* ret = 0;
 
     switch (tokType) {
-    case Token::DOT:
+    case Token::T_DOT:
         ret = fOpFactory.createDotOp();
         break;
-    case Token::CHAR:
+    case Token::T_CHAR:
         ret = fOpFactory.createCharOp(token->getChar());
         break;
-    case Token::ANCHOR:
+    case Token::T_ANCHOR:
         ret = fOpFactory.createAnchorOp(token->getChar());
         break;
-    case Token::RANGE:
-    case Token::NRANGE:
+    case Token::T_RANGE:
+    case Token::T_NRANGE:
         ret = fOpFactory.createRangeOp(token);
         break;
-    case Token::EMPTY:
+    case Token::T_EMPTY:
         ret = next;
         break;
-    case Token::STRING:
+    case Token::T_STRING:
         ret = fOpFactory.createStringOp(token->getString());
         break;
-    case Token::BACKREFERENCE:
+    case Token::T_BACKREFERENCE:
         ret = fOpFactory.createBackReferenceOp(token->getReferenceNo());
         break;
     }
 
-    if (tokType != Token::EMPTY)
+    if (tokType != Token::T_EMPTY)
         ret->setNextOp(next);
 
     return ret;
@@ -469,7 +469,7 @@ inline Op* RegularExpression::compileClosure(const Token* const token,
         for (int i=0; i<max; i++) {
 
             ChildOp* childOp = fOpFactory.createQuestionOp(
-                tokType == Token::NONGREEDYCLOSURE);
+                tokType == Token::T_NONGREEDYCLOSURE);
 
             childOp->setNextOp(next);
             childOp->setChild(compile(childTok, ret, reverse));
@@ -480,7 +480,7 @@ inline Op* RegularExpression::compileClosure(const Token* const token,
 
         ChildOp* childOp = 0;
 
-        if (tokType == Token::NONGREEDYCLOSURE) {
+        if (tokType == Token::T_NONGREEDYCLOSURE) {
             childOp = fOpFactory.createNonGreedyClosureOp();
         }
         else {
diff --git a/src/xercesc/util/regx/RegxParser.cpp b/src/xercesc/util/regx/RegxParser.cpp
index db817db3c27d7651f2b0ee77b3d0cb95bf8a06bb..65c2a996a6e1c6ce59165a85568a273fc4b2ca63 100644
--- a/src/xercesc/util/regx/RegxParser.cpp
+++ b/src/xercesc/util/regx/RegxParser.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:30  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:30  peiyongz
+ * sane_include
  *
  * Revision 1.10  2001/11/20 20:48:10  knoaman
  * Fix for invalid repeating quantifier check.
@@ -433,7 +436,7 @@ Token* RegxParser::parseTerm() {
     unsigned short state = fState;
 
     if (state == T_OR || state == T_RPAREN || state == T_EOF) {
-        return fTokenFactory->createToken(Token::EMPTY);
+        return fTokenFactory->createToken(Token::T_EMPTY);
     }
     else {
 
@@ -574,13 +577,13 @@ Token* RegxParser::processQuestion(Token* const tok) {
     if (fState == T_QUESTION) {
 
         processNext();
-        parentTok->addChild(fTokenFactory->createToken(Token::EMPTY), fTokenFactory);
+        parentTok->addChild(fTokenFactory->createToken(Token::T_EMPTY), fTokenFactory);
         parentTok->addChild(tok, fTokenFactory);
     }
     else {
 
         parentTok->addChild(tok, fTokenFactory);
-        parentTok->addChild(fTokenFactory->createToken(Token::EMPTY), fTokenFactory);
+        parentTok->addChild(fTokenFactory->createToken(Token::T_EMPTY), fTokenFactory);
     }
 
     return parentTok;
@@ -649,12 +652,12 @@ Token* RegxParser::processCondition() {
         processNext();
         conditionTok = parseFactor();
         switch(conditionTok->getTokenType()) {
-        case Token::LOOKAHEAD:
-        case Token::NEGATIVELOOKAHEAD:
-        case Token::LOOKBEHIND:
-        case Token::NEGATIVELOOKBEHIND:
+        case Token::T_LOOKAHEAD:
+        case Token::T_NEGATIVELOOKAHEAD:
+        case Token::T_LOOKBEHIND:
+        case Token::T_NEGATIVELOOKBEHIND:
             break;
-        case Token::ANCHOR:
+        case Token::T_ANCHOR:
             if (fState != T_RPAREN)
 				ThrowXML(ParseException,XMLExcepts::Parser_Factor1);
 			break;
@@ -667,7 +670,7 @@ Token* RegxParser::processCondition() {
     Token* yesPattern = parseRegx();
     Token* noPattern = 0;
 
-    if (yesPattern->getTokenType() == Token::UNION) {
+    if (yesPattern->getTokenType() == Token::T_UNION) {
 
         if (yesPattern->size() != 2)
             ThrowXML(ParseException,XMLExcepts::Parser_Factor6);
@@ -757,8 +760,7 @@ Token* RegxParser::processIndependent() {
 
     processNext();
 
-	Token* tok = fTokenFactory->createLook(Token::INDEPENDENT,
-		                                              parseRegx());
+	Token* tok = fTokenFactory->createLook(Token::T_INDEPENDENT, parseRegx());
 
 	if (fState != T_RPAREN)
 		ThrowXML(ParseException,XMLExcepts::Parser_Factor1);
@@ -840,16 +842,16 @@ Token* RegxParser::parseFactor() {
     case T_DOLLAR:
         return processDollar();
     case T_LOOKAHEAD:
-        return processLook(Token::LOOKAHEAD);
+        return processLook(Token::T_LOOKAHEAD);
     case T_NEGATIVELOOKAHEAD:
-        return processLook(Token::NEGATIVELOOKAHEAD);
+        return processLook(Token::T_NEGATIVELOOKAHEAD);
     case T_LOOKBEHIND:
-        return processLook(Token::LOOKBEHIND);
+        return processLook(Token::T_LOOKBEHIND);
     case T_NEGATIVELOOKBEHIND:
-        return processLook(Token::NEGATIVELOOKBEHIND);
+        return processLook(Token::T_NEGATIVELOOKBEHIND);
     case T_COMMENT:
         processNext();
-        return fTokenFactory->createToken(Token::EMPTY);
+        return fTokenFactory->createToken(Token::T_EMPTY);
     case T_BACKSOLIDUS:
         switch(fCharData) {
         case chLatin_A:
diff --git a/src/xercesc/util/regx/Token.cpp b/src/xercesc/util/regx/Token.cpp
index c07648321405d6f1dafb31eafcd8e08f2a3e86e9..49d254592ec5ddd6efc2f1321e7ab7d0f1442e43 100644
--- a/src/xercesc/util/regx/Token.cpp
+++ b/src/xercesc/util/regx/Token.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:31  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:31  peiyongz
+ * sane_include
  *
  * Revision 1.3  2001/05/11 13:26:50  tng
  * Copyright update.
@@ -117,7 +120,7 @@ int Token::getMinLength() const {
 
 	switch (fTokenType) {
 
-	case CONCAT:
+	case T_CONCAT:
         {
             int sum = 0;
             unsigned int childSize = size();
@@ -127,8 +130,8 @@ int Token::getMinLength() const {
             }
             return sum;
         }
-	case CONDITION:
-	case UNION:
+	case T_CONDITION:
+	case T_UNION:
         {
 			unsigned int childSize = size();
 
@@ -145,32 +148,32 @@ int Token::getMinLength() const {
             }
 			return ret;
         }
-	case CLOSURE:
-	case NONGREEDYCLOSURE:
+	case T_CLOSURE:
+	case T_NONGREEDYCLOSURE:
         if (getMin() >= 0)
             return getMin() * getChild(0)->getMinLength();
 
 		return 0;
-	case EMPTY:
-	case ANCHOR:
+	case T_EMPTY:
+	case T_ANCHOR:
 		return 0;
-	case DOT:
-	case CHAR:
-	case RANGE:
-	case NRANGE:
+	case T_DOT:
+	case T_CHAR:
+	case T_RANGE:
+	case T_NRANGE:
 		return 1;
-	case INDEPENDENT:
-	case PAREN:
-	case MODIFIERGROUP:
+	case T_INDEPENDENT:
+	case T_PAREN:
+	case T_MODIFIERGROUP:
 		return getChild(0)->getMinLength();
-	case BACKREFERENCE:
+	case T_BACKREFERENCE:
 		return 0; // *****  - REVISIT
-	case STRING:
+	case T_STRING:
 		return XMLString::stringLen(getString());
-	case LOOKAHEAD:
-	case NEGATIVELOOKAHEAD:
-	case LOOKBEHIND:
-	case NEGATIVELOOKBEHIND:
+	case T_LOOKAHEAD:
+	case T_NEGATIVELOOKAHEAD:
+	case T_LOOKBEHIND:
+	case T_NEGATIVELOOKBEHIND:
 		return 0; // *****  - REVIST
 //	default:
 //		throw;
@@ -185,7 +188,7 @@ int Token::getMaxLength() const {
 
 	switch (fTokenType) {
 
-	case CONCAT:
+	case T_CONCAT:
         {
             int sum = 0;
             unsigned int childSize = size();
@@ -201,8 +204,8 @@ int Token::getMaxLength() const {
             }
             return sum;
         }
-    case CONDITION:
-    case UNION:
+    case T_CONDITION:
+    case T_UNION:
         {
             unsigned int childSize = size();
 
@@ -226,33 +229,33 @@ int Token::getMaxLength() const {
             }
 			return ret;
         }
-    case CLOSURE:
-    case NONGREEDYCLOSURE:
+    case T_CLOSURE:
+    case T_NONGREEDYCLOSURE:
         if (getMax() >= 0) {
             return getMax() * getChild(0)->getMaxLength();
 		}
 		return -1;
-    case EMPTY:
-    case ANCHOR:
+    case T_EMPTY:
+    case T_ANCHOR:
         return 0;
-    case CHAR:
+    case T_CHAR:
         return 1;
-    case DOT:
-    case RANGE:
-    case NRANGE:
+    case T_DOT:
+    case T_RANGE:
+    case T_NRANGE:
         return 2;
-    case INDEPENDENT:
-    case PAREN:
-    case MODIFIERGROUP:
+    case T_INDEPENDENT:
+    case T_PAREN:
+    case T_MODIFIERGROUP:
         return getChild(0)->getMaxLength();
-    case BACKREFERENCE:
+    case T_BACKREFERENCE:
 		return -1; // REVISIT
-    case STRING:
+    case T_STRING:
         return XMLString::stringLen(getString());
-    case LOOKAHEAD:
-    case NEGATIVELOOKAHEAD:
-    case LOOKBEHIND:
-    case NEGATIVELOOKBEHIND:
+    case T_LOOKAHEAD:
+    case T_NEGATIVELOOKAHEAD:
+    case T_LOOKBEHIND:
+    case T_NEGATIVELOOKBEHIND:
 		return 0; // REVISIT
 //    default:
 //		throw; //ThrowXML(RuntimeException, ...)
@@ -269,7 +272,7 @@ int Token::analyzeFirstCharacter(RangeToken* const rangeTok,
                                  TokenFactory* const tokFactory)
 {
 	switch(fTokenType) {
-	case CONCAT:
+	case T_CONCAT:
 		{
 			int ret = FC_CONTINUE;
 			for (int i=0; i<size(); i++) {
@@ -282,7 +285,7 @@ int Token::analyzeFirstCharacter(RangeToken* const rangeTok,
 			}
 			return ret;
 		}
-	case UNION:
+	case T_UNION:
 		{
 			unsigned int childSize = size();
             if (childSize == 0)
@@ -302,7 +305,7 @@ int Token::analyzeFirstCharacter(RangeToken* const rangeTok,
 			}
 			return hasEmpty ? FC_CONTINUE : ret;
 		}
-	case CONDITION:
+	case T_CONDITION:
 		{
             int ret1 = getChild(0)->analyzeFirstCharacter(rangeTok, options, tokFactory);
 
@@ -322,19 +325,19 @@ int Token::analyzeFirstCharacter(RangeToken* const rangeTok,
 
 			return FC_TERMINAL;
 		}
-	case CLOSURE:
-	case NONGREEDYCLOSURE:
+	case T_CLOSURE:
+	case T_NONGREEDYCLOSURE:
 		{
 			Token* tok = getChild(0);
 			if (tok)
 				tok->analyzeFirstCharacter(rangeTok, options, tokFactory);
 			return FC_CONTINUE;
 		}
-	case DOT:
-	case EMPTY:
-	case ANCHOR:
+	case T_DOT:
+	case T_EMPTY:
+	case T_ANCHOR:
 		return FC_CONTINUE;
-	case CHAR:
+	case T_CHAR:
 		{
             XMLInt32 ch = getChar();
 			rangeTok->addRange(ch, ch);
@@ -343,7 +346,7 @@ int Token::analyzeFirstCharacter(RangeToken* const rangeTok,
 			}
 		}
 		return FC_TERMINAL;
-	case RANGE:
+	case T_RANGE:
 		{
 			if (isSet(options, RegularExpression::IGNORE_CASE)) {
                 rangeTok->mergeRanges(((RangeToken*)
@@ -354,7 +357,7 @@ int Token::analyzeFirstCharacter(RangeToken* const rangeTok,
 			}
 			return FC_TERMINAL;
 		}
-	case NRANGE:
+	case T_NRANGE:
 		{
 			if (isSet(options, RegularExpression::IGNORE_CASE)) {
 
@@ -367,18 +370,18 @@ int Token::analyzeFirstCharacter(RangeToken* const rangeTok,
 					RangeToken::complementRanges((RangeToken*) this, tokFactory));
 			}
 		}
-	case INDEPENDENT:
-	case PAREN:
+	case T_INDEPENDENT:
+	case T_PAREN:
 		{
 			Token* tok = getChild(0);
 			if (tok)
 				return tok->analyzeFirstCharacter(rangeTok,options, tokFactory);
 		}
-	case MODIFIERGROUP:
-	case BACKREFERENCE:
+	case T_MODIFIERGROUP:
+	case T_BACKREFERENCE:
 		rangeTok->addRange(0, UTF16_MAX);
 		return FC_ANY;
-	case STRING:
+	case T_STRING:
 		{
 			const XMLCh* str = getString();
             XMLInt32 ch = str[0];
@@ -392,10 +395,10 @@ int Token::analyzeFirstCharacter(RangeToken* const rangeTok,
             }
 		}
 		return FC_TERMINAL;
-	case LOOKAHEAD:
-	case NEGATIVELOOKAHEAD:
-	case LOOKBEHIND:
-	case NEGATIVELOOKBEHIND:
+	case T_LOOKAHEAD:
+	case T_NEGATIVELOOKAHEAD:
+	case T_LOOKBEHIND:
+	case T_NEGATIVELOOKBEHIND:
 		FC_CONTINUE;
 //	default:
 //		throw;
@@ -409,30 +412,30 @@ Token* Token::findFixedString(int options, int& outOptions) {
 
     switch(fTokenType) {
 
-    case CHAR:
+    case T_CHAR:
 		return 0;
-    case STRING:
+    case T_STRING:
 		outOptions = options;
 		return this;
-    case UNION:
-    case CLOSURE:
-    case NONGREEDYCLOSURE:
-    case EMPTY:
-    case ANCHOR:
-    case RANGE:
-    case NRANGE:
-    case DOT:
-    case BACKREFERENCE:
-    case LOOKAHEAD:
-    case NEGATIVELOOKAHEAD:
-    case LOOKBEHIND:
-    case NEGATIVELOOKBEHIND:
-    case CONDITION:
+    case T_UNION:
+    case T_CLOSURE:
+    case T_NONGREEDYCLOSURE:
+    case T_EMPTY:
+    case T_ANCHOR:
+    case T_RANGE:
+    case T_NRANGE:
+    case T_DOT:
+    case T_BACKREFERENCE:
+    case T_LOOKAHEAD:
+    case T_NEGATIVELOOKAHEAD:
+    case T_LOOKBEHIND:
+    case T_NEGATIVELOOKBEHIND:
+    case T_CONDITION:
 		return 0;
-    case INDEPENDENT:
-    case PAREN:
+    case T_INDEPENDENT:
+    case T_PAREN:
 		return getChild(0)->findFixedString(options, outOptions);
-    case CONCAT:
+    case T_CONCAT:
         {
             Token* prevTok = 0;
             int prevOptions = 0;
@@ -451,7 +454,7 @@ Token* Token::findFixedString(int options, int& outOptions) {
 			outOptions = prevOptions;
             return prevTok;
         }
-    case MODIFIERGROUP:
+    case T_MODIFIERGROUP:
         {
             options |= ((ModifierToken *) this)->getOptions();
             options &= ~((ModifierToken *) this)->getOptionsMask();
@@ -468,7 +471,7 @@ bool Token::isShorterThan(Token* const tok) {
 	if (tok == 0)
 		return false;
 
-	if (getTokenType() != STRING && tok->getTokenType() != STRING)
+	if (getTokenType() != T_STRING && tok->getTokenType() != T_STRING)
 		return false; //Should we throw an exception?
 
     int length = XMLString::stringLen(getString());
diff --git a/src/xercesc/util/regx/Token.hpp b/src/xercesc/util/regx/Token.hpp
index bae8b005b7f924402c03b9ea957c374ceb6ed691..174cb9b765ec84e473ebc6b6e3bd1baf9074d355 100644
--- a/src/xercesc/util/regx/Token.hpp
+++ b/src/xercesc/util/regx/Token.hpp
@@ -87,26 +87,26 @@ public:
     // -----------------------------------------------------------------------
 	// Token types
 	enum {
-		CHAR = 0,
-		CONCAT = 1,
-		UNION = 2,
-		CLOSURE = 3,
-		RANGE = 4,
-		NRANGE = 5,
-		PAREN = 6,
-		EMPTY = 7,
-		ANCHOR = 8,
-		NONGREEDYCLOSURE = 9,
-		STRING = 10,
-		DOT = 11,
-		BACKREFERENCE = 12,
-		LOOKAHEAD = 20,
-		NEGATIVELOOKAHEAD = 21,
-		LOOKBEHIND = 22,
-		NEGATIVELOOKBEHIND = 23,
-		INDEPENDENT = 24,
-		MODIFIERGROUP = 25,
-		CONDITION = 26
+		T_CHAR = 0,
+		T_CONCAT = 1,
+		T_UNION = 2,
+		T_CLOSURE = 3,
+		T_RANGE = 4,
+		T_NRANGE = 5,
+		T_PAREN = 6,
+		T_EMPTY = 7,
+		T_ANCHOR = 8,
+		T_NONGREEDYCLOSURE = 9,
+		T_STRING = 10,
+		T_DOT = 11,
+		T_BACKREFERENCE = 12,
+		T_LOOKAHEAD = 20,
+		T_NEGATIVELOOKAHEAD = 21,
+		T_LOOKBEHIND = 22,
+		T_NEGATIVELOOKBEHIND = 23,
+		T_INDEPENDENT = 24,
+		T_MODIFIERGROUP = 25,
+		T_CONDITION = 26
 	};
 
 	static const XMLInt32		UTF16_MAX;
diff --git a/src/xercesc/util/regx/TokenFactory.cpp b/src/xercesc/util/regx/TokenFactory.cpp
index 4cbf14b903f418e9e621f327f6f9d13171bf6d0e..9519a68cb58ae3a7ba5b873f86bba7486687ecbe 100644
--- a/src/xercesc/util/regx/TokenFactory.cpp
+++ b/src/xercesc/util/regx/TokenFactory.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:31  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:31  peiyongz
+ * sane_include
  *
  * Revision 1.5  2001/06/07 20:55:39  tng
  * Fix no newline at the end warning.  By Pei Yong Zhang.
@@ -136,12 +139,12 @@ TokenFactory::~TokenFactory() {
 // ---------------------------------------------------------------------------
 Token* TokenFactory::createToken(const unsigned short tokType) {
 
-	if (tokType == Token::EMPTY && fEmpty != 0)
+	if (tokType == Token::T_EMPTY && fEmpty != 0)
 		return fEmpty;
 
 	Token* tmpTok = new Token(tokType);
 
-	if (tokType == Token::EMPTY) {
+	if (tokType == Token::T_EMPTY) {
 		fEmpty = tmpTok;
     }
 
@@ -163,7 +166,7 @@ ParenToken* TokenFactory::createLook(const unsigned short tokType,
 ParenToken* TokenFactory::createParenthesis(Token* const token,
 											const int noGroups) {
 
-	ParenToken* tmpTok = new ParenToken(Token::PAREN, token, noGroups);
+	ParenToken* tmpTok = new ParenToken(Token::T_PAREN, token, noGroups);
 
 	fTokens->addElement(tmpTok);
 	return tmpTok;
@@ -172,8 +175,8 @@ ParenToken* TokenFactory::createParenthesis(Token* const token,
 ClosureToken* TokenFactory::createClosure(Token* const token,
 										  bool isNonGreedy) {
 
-	ClosureToken* tmpTok = isNonGreedy ? new ClosureToken(Token::NONGREEDYCLOSURE, token)
-									   : new ClosureToken(Token::CLOSURE, token);
+	ClosureToken* tmpTok = isNonGreedy ? new ClosureToken(Token::T_NONGREEDYCLOSURE, token)
+									   : new ClosureToken(Token::T_CLOSURE, token);
 	
 	fTokens->addElement(tmpTok);
 	return tmpTok;
@@ -190,8 +193,8 @@ ConcatToken* TokenFactory::createConcat(Token* const token1,
 
 UnionToken* TokenFactory::createUnion(const bool isConcat) {
 
-	UnionToken* tmpTok = isConcat ? new UnionToken(Token::CONCAT)
-								  : new UnionToken(Token::UNION);
+	UnionToken* tmpTok = isConcat ? new UnionToken(Token::T_CONCAT)
+								  : new UnionToken(Token::T_UNION);
 
 	fTokens->addElement(tmpTok);
 	return tmpTok;
@@ -200,8 +203,8 @@ UnionToken* TokenFactory::createUnion(const bool isConcat) {
 RangeToken* TokenFactory::createRange(const bool isNegRange){
 
 
-	RangeToken* tmpTok = isNegRange ? new RangeToken(Token::NRANGE)
-								   : new RangeToken(Token::RANGE);
+	RangeToken* tmpTok = isNegRange ? new RangeToken(Token::T_NRANGE)
+								   : new RangeToken(Token::T_RANGE);
 
 	fTokens->addElement(tmpTok);
 	return tmpTok;
@@ -211,8 +214,8 @@ RangeToken* TokenFactory::createRange(const bool isNegRange){
 
 CharToken* TokenFactory::createChar(const XMLUInt32 ch, const bool isAnchor) {
 
-	CharToken* tmpTok = isAnchor ? new CharToken(Token::ANCHOR, ch)
-								: new CharToken(Token::CHAR, ch);
+	CharToken* tmpTok = isAnchor ? new CharToken(Token::T_ANCHOR, ch)
+								: new CharToken(Token::T_CHAR, ch);
 
 	fTokens->addElement(tmpTok);
 	return tmpTok;
@@ -220,7 +223,7 @@ CharToken* TokenFactory::createChar(const XMLUInt32 ch, const bool isAnchor) {
 
 StringToken* TokenFactory::createBackReference(const int noRefs) {
 
-	StringToken* tmpTok = new StringToken(Token::BACKREFERENCE, 0, noRefs);
+	StringToken* tmpTok = new StringToken(Token::T_BACKREFERENCE, 0, noRefs);
 
 	fTokens->addElement(tmpTok);
 	return tmpTok;
@@ -228,7 +231,7 @@ StringToken* TokenFactory::createBackReference(const int noRefs) {
 
 StringToken* TokenFactory::createString(const XMLCh* const literal) {
 
-	StringToken* tmpTok = new StringToken(Token::STRING, literal, 0);
+	StringToken* tmpTok = new StringToken(Token::T_STRING, literal, 0);
 
 	fTokens->addElement(tmpTok);
 	return tmpTok;
@@ -351,7 +354,7 @@ Token* TokenFactory::getWordEnd() {
 Token* TokenFactory::getDot() {
 
 	if (fDot == 0)
-        fDot = createToken(Token::DOT);
+        fDot = createToken(Token::T_DOT);
 
     return fDot;
 }
@@ -402,7 +405,7 @@ Token* TokenFactory::getGraphemePattern() {
 
         Token* left = TokenFactory::createUnion();       // base_char?
         left->addChild(base_char, this);
-        left->addChild(createToken(Token::EMPTY), this);
+        left->addChild(createToken(Token::T_EMPTY), this);
 
         Token* foo = createUnion();
         foo->addChild(TokenFactory::createConcat(virama,getRange(fgUniLetter)), this);
diff --git a/src/xercesc/util/regx/UnionToken.cpp b/src/xercesc/util/regx/UnionToken.cpp
index fc7601a229b966db7b140e8807b46f4a602bb521..6fcd07b62468c3151c9880eb92aaf35397673be5 100644
--- a/src/xercesc/util/regx/UnionToken.cpp
+++ b/src/xercesc/util/regx/UnionToken.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:34  peiyongz
- * Initial revision
+ * Revision 1.2  2002/03/18 19:29:53  knoaman
+ * Change constant names to eliminate possible conflict with user defined ones.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:34  peiyongz
+ * sane_include
  *
  * Revision 1.4  2001/06/05 14:50:32  knoaman
  * Fixes to regular expression.
@@ -126,7 +129,7 @@ void UnionToken::addChild(Token* const child, TokenFactory* const tokFactory) {
     if (fChildren == 0)
         fChildren = new RefVectorOf<Token>(INITIALSIZE, false);
 
-    if (getTokenType() == UNION) {
+    if (getTokenType() == T_UNION) {
 
         fChildren->addElement(child);
         return;
@@ -135,7 +138,7 @@ void UnionToken::addChild(Token* const child, TokenFactory* const tokFactory) {
     unsigned short childType = child->getTokenType();
     unsigned int   childSize = child->size();
 
-    if (childType == CONCAT) {
+    if (childType == T_CONCAT) {
 
         for (unsigned int i = 0; i < childSize; i++) {
 
@@ -155,8 +158,8 @@ void UnionToken::addChild(Token* const child, TokenFactory* const tokFactory) {
     Token* previousTok = fChildren->elementAt(childrenSize - 1);
     unsigned short previousType = previousTok->getTokenType();
 
-    if (!((previousType == CHAR || previousType == STRING)
-          && (childType == CHAR || childType == STRING))) {
+    if (!((previousType == T_CHAR || previousType == T_STRING)
+          && (childType == T_CHAR || childType == T_STRING))) {
 
         fChildren->addElement(child);
         return;
@@ -165,7 +168,7 @@ void UnionToken::addChild(Token* const child, TokenFactory* const tokFactory) {
     // Continue
     XMLBuffer stringBuf;
 
-    if (previousType == CHAR) {
+    if (previousType == T_CHAR) {
 
         XMLInt32 ch = previousTok->getChar();
 
@@ -186,7 +189,7 @@ void UnionToken::addChild(Token* const child, TokenFactory* const tokFactory) {
         stringBuf.append(previousTok->getString());
     }
 
-    if (childType == CHAR) {
+    if (childType == T_CHAR) {
 
         XMLInt32 ch = child->getChar();