+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 2001-2002, International Business Machines Corporation and
+ * Copyright (c) 2001-2016, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
#define RBBINODE_H
#include "unicode/utypes.h"
+#include "unicode/unistr.h"
#include "unicode/uobject.h"
//
UBool fLookAheadEnd; // For endMark nodes, set TRUE if
// marking the end of a look-ahead rule.
+ UBool fRuleRoot; // True if this node is the root of a rule.
+ UBool fChainIn; // True if chaining into this rule is allowed
+ // (no '^' present).
+
UVector *fFirstPosSet;
UVector *fLastPosSet; // TODO: rename fFirstPos & fLastPos to avoid confusion.
UVector *fFollowPos;
void flattenSets();
void findNodes(UVector *dest, RBBINode::NodeType kind, UErrorCode &status);
- void print();
- void printTree(UBool withHeading=TRUE, UBool doVars=FALSE);
- static void printUnicodeString(const UnicodeString &s, int minWidth=0);
+#ifdef RBBI_DEBUG
+ static void printNodeHeader();
+ static void printNode(const RBBINode *n);
+ static void printTree(const RBBINode *n, UBool withHeading);
+#endif
private:
RBBINode &operator = (const RBBINode &other); // No defs.
UBool operator == (const RBBINode &other); // Private, so these functions won't accidently be used.
+#ifdef RBBI_DEBUG
+ public:
int fSerialNum; // Debugging aids.
- static int gLastSerial;
+#endif
};
+
+#ifdef RBBI_DEBUG
+U_CFUNC void
+RBBI_DEBUG_printUnicodeString(const UnicodeString &s, int minWidth=0);
+#endif
+
U_NAMESPACE_END
#endif