source: icGREP/icgrep-devel/icgrep/re_nullable.h @ 3994

Last change on this file since 3994 was 3917, checked in by cameron, 5 years ago

New files for re simplification

File size: 979 bytes
RevLine 
[3917]1#ifndef RE_NULLABLE_H
2#define RE_NULLABLE_H
3
4//Regular Expressions
5#include "re_re.h"
6#include "re_cc.h"
7#include "re_start.h"
8#include "re_end.h"
9#include "re_seq.h"
10#include "re_alt.h"
11#include "re_rep.h"
12#include "re_simplifier.h"
13
14#include <list>
15
16class RE_Nullable
17{
18public:
19    static RE* removeNullablePrefix(RE* re);
20    static RE* removeNullableSuffix(RE* re);
21private:
22    static bool isNullable(RE* re);
23    static bool isNullableSeq(std::list<RE*>* re_list);
24    static bool isNullableSeq_helper(std::list<RE*>* re_list, std::list<RE*>::iterator it);
25    static bool isNullableAlt(std::list<RE*>* re_list);
26    static bool isNullableAlt_helper(std::list<RE*>* re_list, std::list<RE*>::iterator it);
27    static bool hasNullablePrefix(RE* re);
28    static bool hasNullableSuffix(RE* re);
29    static std::list<RE*>* removeNullableSeqPrefix(std::list<RE*>* re_list);
30    static std::list<RE*>* removeNullableSeqSuffix(std::list<RE*>* re_list);
31};
32
33#endif // RE_NULLABLE_H
Note: See TracBrowser for help on using the repository browser.