source: icGREP/icgrep-devel/icgrep/pablo/pabloAST.h @ 4270

Last change on this file since 4270 was 4270, checked in by nmedfort, 4 years ago

Minor changes.

File size: 1.0 KB
Line 
1/*
2 *  Copyright (c) 2014 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
7#ifndef PE_PabloAST_H
8#define PE_PabloAST_H
9
10#include <llvm/Support/Casting.h>
11#include <vector>
12
13using namespace llvm;
14
15namespace pablo {
16
17class PabloBlock;
18
19class PabloAST {
20public:
21    enum class ClassTypeId : unsigned {
22        Advance
23        , And
24        , Assign
25        , Call
26        , If
27        , MatchStar
28        , Next
29        , Not
30        , Ones
31        , Or
32        , ScanThru
33        , Sel
34        , String
35        , Var
36        , While
37        , Xor
38        , Zeroes
39    };
40    inline ClassTypeId getClassTypeId() const {
41        return mClassTypeId;
42    }
43protected:
44    inline PabloAST(const ClassTypeId id)
45    : mClassTypeId(id)
46    {
47
48    }
49private:
50    const ClassTypeId   mClassTypeId;
51};
52
53bool equals(const PabloAST * expr1, const PabloAST *expr2);
54
55typedef std::vector<PabloAST *> StatementList;
56
57}
58
59#endif // PE_PabloAST_H
60
61
62
Note: See TracBrowser for help on using the repository browser.