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

Last change on this file since 6153 was 6153, checked in by xwa163, 9 months ago

lz4_grep: 1. fix typo 2. analyse the requirement of u8 non final

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