source: icGREP/icgrep-devel/icgrep/pablo/pe_infile.h @ 5157

Last change on this file since 5157 was 5042, checked in by cameron, 3 years ago

Add pablo.atEOF; clean out bit4/6 hack for unterminated final lines in icgrep.

File size: 1.2 KB
Line 
1/*
2 *  Copyright (c) 2016 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_INFILE_H
8#define PE_INFILE_H
9
10#include <pablo/pabloAST.h>
11
12namespace pablo {
13
14class InFile : public Statement {
15    friend class PabloBlock;
16public:
17    static inline bool classof(const PabloAST * e) {
18        return e->getClassTypeId() == ClassTypeId::InFile;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23    virtual ~InFile(){
24    }
25    PabloAST * getExpr() const {
26        return getOperand(0);
27    }
28protected:
29    InFile(PabloAST * expr, String * name) : Statement(ClassTypeId::InFile, {expr}, name) { }
30};
31
32class AtEOF : public Statement {
33    friend class PabloBlock;
34public:
35    static inline bool classof(const PabloAST * e) {
36        return e->getClassTypeId() == ClassTypeId::AtEOF;
37    }
38    static inline bool classof(const void *) {
39        return false;
40    }
41    virtual ~AtEOF(){
42    }
43    PabloAST * getExpr() const {
44        return getOperand(0);
45    }
46protected:
47    AtEOF(PabloAST * expr, String * name) : Statement(ClassTypeId::AtEOF, {expr}, name) { }
48};
49   
50}
51
52#endif // PE_INFILE_H
Note: See TracBrowser for help on using the repository browser.