+// © 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.
********************************************************************/
#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 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