Lines Matching refs:RegexNode
12 RegexNode RegexParser::parse(std::string source) { in parse()
37 RegexNode RegexParser::pop() { in pop()
38 RegexNode result = fStack.top(); in pop()
55 case '*': fStack.push(RegexNode(RegexNode::kStar_Kind, this->pop())); ++fIndex; break; in quantifiedTerm()
56 case '+': fStack.push(RegexNode(RegexNode::kPlus_Kind, this->pop())); ++fIndex; break; in quantifiedTerm()
57 case '?': fStack.push(RegexNode(RegexNode::kQuestion_Kind, this->pop())); ++fIndex; break; in quantifiedTerm()
71 RegexNode right = this->pop(); in sequence()
72 RegexNode left = this->pop(); in sequence()
73 fStack.emplace(RegexNode::kConcat_Kind, std::move(left), std::move(right)); in sequence()
79 RegexNode RegexParser::escapeSequence(char c) { in escapeSequence()
81 case 'n': return RegexNode(RegexNode::kChar_Kind, '\n'); in escapeSequence()
82 case 'r': return RegexNode(RegexNode::kChar_Kind, '\r'); in escapeSequence()
83 case 't': return RegexNode(RegexNode::kChar_Kind, '\t'); in escapeSequence()
84 case 's': return RegexNode(RegexNode::kCharset_Kind, " \t\n\r"); in escapeSequence()
85 default: return RegexNode(RegexNode::kChar_Kind, c); in escapeSequence()
97 fStack.push(RegexNode(RegexNode::kChar_Kind, c)); in literal()
104 fStack.push(RegexNode(RegexNode::kDot_Kind)); in dot()
118 fStack.push(RegexNode(RegexNode::kChar_Kind, '-')); in setItem()
122 RegexNode end = this->pop(); in setItem()
123 SkASSERT(end.fKind == RegexNode::kChar_Kind); in setItem()
124 RegexNode start = this->pop(); in setItem()
125 SkASSERT(start.fKind == RegexNode::kChar_Kind); in setItem()
126 fStack.push(RegexNode(RegexNode::kRange_Kind, std::move(start), std::move(end))); in setItem()
134 RegexNode set(RegexNode::kCharset_Kind); in set()
167 RegexNode right = this->pop(); in regex()
168 RegexNode left = this->pop(); in regex()
169 fStack.push(RegexNode(RegexNode::kOr_Kind, left, right)); in regex()