Yingdi Yu | 5e97420 | 2014-01-29 16:59:06 -0800 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2013 Regents of the University of California. |
| 4 | * @author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 5 | * See COPYING for copyright and distribution information. |
| 6 | */ |
| 7 | |
| 8 | #ifndef NDN_REGEX_PATTERN_LIST_MATCHER_HPP |
| 9 | #define NDN_REGEX_PATTERN_LIST_MATCHER_HPP |
| 10 | |
| 11 | #include <string> |
| 12 | |
| 13 | #include "regex-matcher.hpp" |
| 14 | |
| 15 | namespace ndn |
| 16 | { |
| 17 | |
| 18 | class RegexPatternListMatcher : public RegexMatcher |
| 19 | { |
| 20 | public: |
| 21 | RegexPatternListMatcher(const std::string expr, ptr_lib::shared_ptr<RegexBackrefManager> backRefManager); |
| 22 | |
| 23 | virtual ~RegexPatternListMatcher(){}; |
| 24 | |
| 25 | protected: |
| 26 | virtual void |
| 27 | compile(); |
| 28 | |
| 29 | private: |
| 30 | bool |
| 31 | extractPattern(int index, int* next); |
| 32 | |
| 33 | int |
| 34 | extractSubPattern(const char left, const char right, int index); |
| 35 | |
| 36 | int |
| 37 | extractRepetition(int index); |
| 38 | |
| 39 | private: |
| 40 | |
| 41 | }; |
| 42 | }//ndn |
| 43 | |
| 44 | #endif |