source: icGREP/icgrep-devel/icgrep/combine/stringGen.h @ 5825

Last change on this file since 5825 was 5825, checked in by faldebey, 15 months ago

Update to CoRE testing system

File size: 863 bytes
Line 
1#ifndef STRINGGEN_H
2#define STRINGGEN_H
3
4#include <string>
5#include <vector>
6#include <re/re_cc.h>
7#include <re/re_parser.h>
8
9namespace re {
10    class RE;
11}
12
13class StringGenerator
14{
15
16public:
17    StringGenerator(std::string re, std::vector<std::string> flags, re::RE_Syntax syntax);
18
19    std::vector<re::CC* > generate(re::RE *re, bool Complement=false, bool getOne=false);
20    std::string generate();
21    std::string stringifyVec(std::vector<re::CC *> elements);
22
23    ~StringGenerator();
24
25private:
26
27        std::string mRegex;
28        std::vector<std::string> mFlags;
29        re::RE_Syntax mSyntax;
30        std::vector<std::vector<re::CC *>> mReferences;
31
32    re::CC * const asciiCC;
33    re::CC * const unicodeCC;
34    re::CC * const forbiddenCC;
35    re::CC * const allCodepointsCC;
36
37    re::CC * getRandomCodepointCC(re::CC * cc);
38    re::CC * getAllCodepoints();
39
40};
41
42#endif // STRINGGEN_H
Note: See TracBrowser for help on using the repository browser.