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

Last change on this file since 6104 was 5951, checked in by cameron, 18 months ago

Back reference analysis in support of future back reference compilation mode

File size: 1.1 KB
RevLine 
[4393]1#ifndef RE_ANALYSIS_H
2#define RE_ANALYSIS_H
3
[5267]4#include <utility>
[5682]5namespace re { class RE; class Name; class CC;}
[4393]6
7namespace re {
8
[5682]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
[5267]18bool isByteLength(const RE * re);
[4393]19   
[4829]20bool isUnicodeUnitLength(const RE * re);
[4393]21
[4829]22std::pair<int, int> getUnicodeUnitLengthRange(const RE * re);
23
[5951]24bool isFixedLength(const RE * re);
[4442]25
[5951]26int minMatchLength(const RE * re);
27
[5604]28bool unitBoundedRep(const RE * re);
29
30bool isTypeForLocal(const RE * re);
[5649]31   
[5723]32bool hasAssertion(const RE * re);
33   
[5902]34bool byteTestsWithinLimit(RE * re, unsigned limit);
[5891]35   
[5908]36bool hasTriCCwithinLimit(RE * r, unsigned byteCClimit, RE * & prefixRE, RE * & suffixRE);
37
[5910]38bool hasEndAnchor(const RE * r);
[5908]39   
[5951]40bool DefiniteLengthBackReferencesOnly(const RE * re);
41   
[5649]42void UndefinedNameError (const Name * n);
[4393]43}
44
45#endif // RE_ANALYSIS_H
Note: See TracBrowser for help on using the repository browser.