source: icGREP/icgrep-devel/icgrep/pablo/pe_matchstar.h @ 5299

Last change on this file since 5299 was 5230, checked in by nmedfort, 3 years ago

Multi-threading support for PabloAST / PabloCompiler?. Requires unique LLVM Context / Module for each thread.

File size: 983 bytes
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_MATCHSTAR_H
8#define PE_MATCHSTAR_H
9
10#include <pablo/pabloAST.h>
11
12namespace pablo {
13
14class MatchStar : public Statement {
15    friend class PabloBlock;
16public:
17    static inline bool classof(const PabloAST * e) {
18        return e->getClassTypeId() == ClassTypeId::MatchStar;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23    inline PabloAST * getMarker() const {
24        return getOperand(0);
25    }
26    inline PabloAST * getCharClass() const  {
27        return getOperand(1);
28    }
29    virtual ~MatchStar() {}
30protected:
31    MatchStar(PabloAST * marker,  PabloAST * cc, const String * name, Allocator & allocator)
32    : Statement(ClassTypeId::MatchStar, marker->getType(), {marker, cc}, name, allocator) {
33    }
34};
35
36}
37
38#endif // PE_MATCHSTAR_H
39
40
41
Note: See TracBrowser for help on using the repository browser.