source: icGREP/icgrep-devel/icgrep/grep_engine.h @ 5679

Last change on this file since 5679 was 5679, checked in by cameron, 19 months ago

Refactoring progress: \N uses name property; delay resolution of recursive property expressions, property object regexp support

File size: 1.3 KB
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6#ifndef GREP_ENGINE_H
7#define GREP_ENGINE_H
8#include <grep_interface.h>
9#include <grep_type.h>  // for GrepType, GrepType::Normal
10#include <string>       // for string
11#include <vector>
12#include <re/re_parser.h>
13#include <re/re_multiplex.h>
14
15namespace re { class CC; }
16namespace re { class RE; }
17namespace llvm { namespace cl { class OptionCategory; } }
18class Driver;
19
20
21namespace grep {
22
23// Thread function only.
24void *DoGrepThreadFunction(void *args);
25   
26class GrepEngine {
27public:
28
29    GrepEngine();
30
31
32    ~GrepEngine();
33
34    void grepCodeGen(std::vector<re::RE *> REs, GrepModeType grepMode, bool UTF_16, GrepSource grepSource);
35
36    void grepCodeGen_nvptx(std::vector<re::RE *> REs, GrepModeType grepMode, bool UTF_16);
37
38    void doGrep(const std::string & fileName, std::string & PTXFilename) const;
39   
40    uint64_t doGrep(const std::string & fileName, const uint32_t fileIdx) const;
41
42    uint64_t doGrep(const int32_t fileDescriptor, const uint32_t fileIdx) const;
43       
44private:
45   
46    Driver * mGrepDriver;
47};
48
49void initFileResult(std::vector<std::string> filenames);
50   
51void PrintResults();
52   
53}
54
55#endif
Note: See TracBrowser for help on using the repository browser.