Lines Matching refs:RBBINode

27 RBBITableBuilder::RBBITableBuilder(RBBIRuleBuilder *rb, RBBINode **rootNode) :
93 RBBINode *bofTop = new RBBINode(RBBINode::opCat);
94 RBBINode *bofLeaf = new RBBINode(RBBINode::leafChar);
114 RBBINode *cn = new RBBINode(RBBINode::opCat);
122 cn->fRightChild = new RBBINode(RBBINode::endMark);
200 void RBBITableBuilder::calcNullable(RBBINode *n) {
204 if (n->fType == RBBINode::setRef ||
205 n->fType == RBBINode::endMark ) {
211 if (n->fType == RBBINode::lookAhead || n->fType == RBBINode::tag) {
225 if (n->fType == RBBINode::opOr) {
228 else if (n->fType == RBBINode::opCat) {
231 else if (n->fType == RBBINode::opStar || n->fType == RBBINode::opQuestion) {
247 void RBBITableBuilder::calcFirstPos(RBBINode *n) {
251 if (n->fType == RBBINode::leafChar ||
252 n->fType == RBBINode::endMark ||
253 n->fType == RBBINode::lookAhead ||
254 n->fType == RBBINode::tag) {
269 if (n->fType == RBBINode::opOr) {
273 else if (n->fType == RBBINode::opCat) {
279 else if (n->fType == RBBINode::opStar ||
280 n->fType == RBBINode::opQuestion ||
281 n->fType == RBBINode::opPlus) {
293 void RBBITableBuilder::calcLastPos(RBBINode *n) {
297 if (n->fType == RBBINode::leafChar ||
298 n->fType == RBBINode::endMark ||
299 n->fType == RBBINode::lookAhead ||
300 n->fType == RBBINode::tag) {
315 if (n->fType == RBBINode::opOr) {
319 else if (n->fType == RBBINode::opCat) {
325 else if (n->fType == RBBINode::opStar ||
326 n->fType == RBBINode::opQuestion ||
327 n->fType == RBBINode::opPlus) {
339 void RBBITableBuilder::calcFollowPos(RBBINode *n) {
341 n->fType == RBBINode::leafChar ||
342 n->fType == RBBINode::endMark) {
350 if (n->fType == RBBINode::opCat) {
351 RBBINode *i; // is 'i' in Aho's description
357 i = (RBBINode *)LastPosOfLeftChild->elementAt(ix);
363 if (n->fType == RBBINode::opStar ||
364 n->fType == RBBINode::opPlus) {
365 RBBINode *i; // again, n and i are the names from Aho's description.
369 i = (RBBINode *)n->fLastPosSet->elementAt(ix);
385 void RBBITableBuilder::calcChainedFollowPos(RBBINode *tree) {
396 tree->findNodes(&endMarkerNodes, RBBINode::endMark, *fStatus);
399 tree->findNodes(&leafNodes, RBBINode::leafChar, *fStatus);
407 RBBINode *userRuleRoot = tree;
421 RBBINode *tNode = (RBBINode *)leafNodes.elementAt(endNodeIx);
422 RBBINode *endNode = NULL;
457 RBBINode *startNode;
459 startNode = (RBBINode *)matchStartNodes->elementAt(startNodeIx);
460 if (startNode->fType != RBBINode::leafChar) {
505 RBBINode *bofNode = fTree->fLeftChild->fLeftChild;
506 U_ASSERT(bofNode->fType == RBBINode::leafChar);
516 RBBINode *startNode;
519 startNode = (RBBINode *)matchStartNodes->elementAt(startNodeIx);
520 if (startNode->fType != RBBINode::leafChar) {
619 RBBINode *p;
622 p = (RBBINode *)T->fPositions->elementAt(px);
623 if ((p->fType == RBBINode::leafChar) && (p->fVal == a)) {
699 RBBINode *endMarker;
707 fTree->findNodes(&endMarkerNodes, RBBINode::endMark, *fStatus);
713 endMarker = (RBBINode *)endMarkerNodes.elementAt(i);
761 RBBINode *lookAheadNode;
765 fTree->findNodes(&lookAheadNodes, RBBINode::lookAhead, *fStatus);
770 lookAheadNode = (RBBINode *)lookAheadNodes.elementAt(i);
794 RBBINode *tagNode;
801 fTree->findNodes(&tagNodes, RBBINode::tag, *fStatus);
806 tagNode = (RBBINode *)tagNodes.elementAt(i);
1031 void RBBITableBuilder::printPosSets(RBBINode *n) {