mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
binpac: Initial import of Bro's binpac subdirectory from SVN r7088.
This commit is contained in:
parent
5a1c4fd5fe
commit
c8665318e6
113 changed files with 15630 additions and 0 deletions
41
tools/binpac/src/pac_regex.h
Normal file
41
tools/binpac/src/pac_regex.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef pac_regex_h
|
||||
#define pac_regex_h
|
||||
|
||||
#include "pac_common.h"
|
||||
#include "pac_decl.h"
|
||||
|
||||
class RegExDecl;
|
||||
|
||||
class RegEx : public Object
|
||||
{
|
||||
public:
|
||||
RegEx(const string &str);
|
||||
~RegEx();
|
||||
|
||||
const string &str() const { return str_; }
|
||||
ID *matcher_id() const { return matcher_id_; }
|
||||
|
||||
private:
|
||||
string str_;
|
||||
ID *matcher_id_;
|
||||
RegExDecl *decl_;
|
||||
|
||||
public:
|
||||
static const char *kREMatcherType;
|
||||
static const char *kMatchPrefix;
|
||||
};
|
||||
|
||||
class RegExDecl : public Decl
|
||||
{
|
||||
public:
|
||||
RegExDecl(RegEx *regex);
|
||||
|
||||
void Prepare();
|
||||
void GenForwardDeclaration(Output *out_h);
|
||||
void GenCode(Output *out_h, Output *out_cc);
|
||||
|
||||
private:
|
||||
RegEx *regex_;
|
||||
};
|
||||
|
||||
#endif // pac_regex_h
|
Loading…
Add table
Add a link
Reference in a new issue