source: icGREP/icgrep-devel/icgrep/re/re_rep.h @ 6237

Last change on this file since 6237 was 6226, checked in by cameron, 8 months ago

Clean-up/refactoring step for REs

File size: 850 bytes
Line 
1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef RE_REP_H
8#define RE_REP_H
9
10#include "re_re.h"
11
12namespace re {
13
14class Rep : public RE {
15public:
16    enum { UNBOUNDED_REP = -1 };
17    RE * getRE() const {return mRE;}
18    int getLB() const {return mLB;}
19    int getUB() const {return mUB;}
20    static Rep * Create(RE * r, const int lb, const int ub) {return new Rep(r, lb, ub);}
21    RE_SUBTYPE(Rep)
22private:
23    Rep(RE * repeated, const int lb, const int ub) : RE(ClassTypeId::Rep), mRE(repeated), mLB(lb), mUB(ub) {}
24    RE* mRE;
25    int mLB;
26    int mUB;
27};
28
29RE * makeRep(RE * re, const int lower_bound, const int upper_bound);
30   
31RE * unrollFirst(Rep * re);
32
33RE * unrollLast(Rep * re);
34
35}
36
37#endif
Note: See TracBrowser for help on using the repository browser.