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

Last change on this file was 6297, checked in by cameron, 3 months ago

Merge branch 'master' of https://cs-git-research.cs.surrey.sfu.ca/cameron/parabix-devel

File size: 1.2 KB
Line 
1#ifndef RE_ANALYSIS_H
2#define RE_ANALYSIS_H
3
4#include <utility>
5namespace re { class RE; class Name; class CC;}
6namespace cc { class Alphabet;}
7
8namespace re {
9
10// Does the RE match the empty string, considering that ^ and $ each
11// do match an empty string.
12bool matchesEmptyString(const RE * re);
13
14//  Determine the set of all codepoints cp such that the given RE
15//  matches a string consisting of a single Unicode character whose
16//  codepoint value is cp.
17const CC * matchableCodepoints(const RE * re);
18
19bool isByteLength(const RE * re);
20
21bool isAllCcByteLength(const RE * re);
22bool isRequireNonFinal(const RE * re, bool checkByteLength = true);
23   
24bool isUnicodeUnitLength(const RE * re);
25
26std::pair<int, int> getLengthRange(const RE * re, const cc::Alphabet * indexingAlphabet);
27
28bool isFixedLength(const RE * re);
29
30int minMatchLength(const RE * re);
31
32bool unitBoundedRep(const RE * re);
33
34bool isTypeForLocal(const RE * re);
35   
36bool hasAssertion(const RE * re);
37   
38bool byteTestsWithinLimit(RE * re, unsigned limit);
39   
40bool hasTriCCwithinLimit(RE * r, unsigned byteCClimit, RE * & prefixRE, RE * & suffixRE);
41
42bool hasEndAnchor(const RE * r);
43   
44bool DefiniteLengthBackReferencesOnly(const RE * re);
45   
46}
47
48#endif // RE_ANALYSIS_H
Note: See TracBrowser for help on using the repository browser.