Lines Matching full:patternstr
102 bool ParsePattern(StringRef PatternStr, SourceMgr &SM, unsigned LineNumber);
151 bool Pattern::ParsePattern(StringRef PatternStr, SourceMgr &SM,
154 PatternLoc = SMLoc::getFromPointer(PatternStr.data());
157 while (!PatternStr.empty() &&
158 (PatternStr.back() == ' ' || PatternStr.back() == '\t'))
159 PatternStr = PatternStr.substr(0, PatternStr.size()-1);
162 if (PatternStr.empty()) {
170 if (PatternStr.size() < 2 ||
171 (PatternStr.find("{{") == StringRef::npos &&
172 PatternStr.find("[[") == StringRef::npos)) {
173 FixedStr = PatternStr;
183 while (!PatternStr.empty()) {
185 if (PatternStr.startswith("{{")) {
187 size_t End = PatternStr.find("}}");
189 SM.PrintMessage(SMLoc::getFromPointer(PatternStr.data()),
202 if (AddRegExToRegEx(PatternStr.substr(2, End-2), CurParen, SM))
206 PatternStr = PatternStr.substr(End+2);
215 if (PatternStr.startswith("[[")) {
218 size_t End = FindRegexVarEnd(PatternStr.substr(2));
221 SM.PrintMessage(SMLoc::getFromPointer(PatternStr.data()),
227 StringRef MatchStr = PatternStr.substr(2, End);
228 PatternStr = PatternStr.substr(End+4);
302 size_t FixedMatchEnd = PatternStr.find("{{");
303 FixedMatchEnd = std::min(FixedMatchEnd, PatternStr.find("[["));
304 AddFixedStringToRegEx(PatternStr.substr(0, FixedMatchEnd), RegExStr);
305 PatternStr = PatternStr.substr(FixedMatchEnd);