source: icGREP/icgrep-devel/icgrep/re/re_star_normal.h

Last change on this file was 6170, checked in by cameron, 9 months ago

RE Transformation names and printing

File size: 675 bytes
Line 
1#ifndef RE_STAR_NORMAL_H
2#define RE_STAR_NORMAL_H
3
4#include <re/re_toolchain.h>
5
6namespace re {
7
8class RE; class Rep;
9
10//A regular expression E is in star normal form if, for each starred
11//subexpression H * of E, the following SNF-conditions hold:
12//1> The follow(H, last(H)) and first(H) are disjoint.
13//2> H is not Nullable.
14//
15//For example: (a + b)* is the star normal form of (a*b*)* .
16//Both of them have the same Glushkov NFA.
17//
18
19// Usage:  RE_Star_Normal().transform(regexp);
20
21class RE_Star_Normal : public RE_Transformer {
22public:
23    RE_Star_Normal() : RE_Transformer("StarNormal") {}
24    RE * transformRep(Rep * rep) override;
25};
26
27}
28
29#endif // RE_STAR_NORMAL_H
Note: See TracBrowser for help on using the repository browser.