X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..cecc3f9394f261e71def48cf396d137687dbd0a7:/icuSources/common/rbbinode.h diff --git a/icuSources/common/rbbinode.h b/icuSources/common/rbbinode.h index 68286792..f3525960 100644 --- a/icuSources/common/rbbinode.h +++ b/icuSources/common/rbbinode.h @@ -1,6 +1,8 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /******************************************************************** * COPYRIGHT: - * Copyright (c) 2001-2003, International Business Machines Corporation and + * Copyright (c) 2001-2016, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -8,6 +10,7 @@ #define RBBINODE_H #include "unicode/utypes.h" +#include "unicode/unistr.h" #include "unicode/uobject.h" // @@ -79,6 +82,10 @@ class RBBINode : public UMemory { 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; @@ -94,22 +101,19 @@ class RBBINode : public UMemory { void findNodes(UVector *dest, RBBINode::NodeType kind, UErrorCode &status); #ifdef RBBI_DEBUG - void printNode(); - void printTree(UBool withHeading); -#else - // Do-nothing inline functions for non-debug builds. Can't make empty defines for member - // functions - they won't compile at the call sites. - int fakeField; - #define printNode() fakeField=0; - #define printTree(withHeading) fakeField=0; + 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