ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumwith_gc
Line | |
---|
1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
3 | // |
---|
4 | // The contents of this file are covered under the licence agreement in the |
---|
5 | // file "LICENCE" distributed with Cforall. |
---|
6 | // |
---|
7 | // TypedefTable.h -- |
---|
8 | // |
---|
9 | // Author : Peter A. Buhr |
---|
10 | // Created On : Sat May 16 15:24:36 2015 |
---|
11 | // Last Modified By : Peter A. Buhr |
---|
12 | // Last Modified On : Mon May 21 20:28:01 2018 |
---|
13 | // Update Count : 76 |
---|
14 | // |
---|
15 | |
---|
16 | #pragma once |
---|
17 | |
---|
18 | #include <string> // for string |
---|
19 | |
---|
20 | #include "Common/ScopedMap.h" // for ScopedMap |
---|
21 | #include "ParserTypes.h" |
---|
22 | #include "parser.hh" // for IDENTIFIER, TYPEDEFname, TYPEGENname |
---|
23 | |
---|
24 | class TypedefTable { |
---|
25 | public: |
---|
26 | enum kind_t { ID = IDENTIFIER, TD = TYPEDEFname, TG = TYPEGENname }; |
---|
27 | private: |
---|
28 | typedef ScopedMap< std::string, kind_t > KindTable; |
---|
29 | KindTable kindTable; |
---|
30 | public: |
---|
31 | ~TypedefTable(); |
---|
32 | |
---|
33 | bool exists( const std::string & identifier ); |
---|
34 | int isKind( const std::string & identifier ) const; |
---|
35 | void changeKind( const std::string & identifier, kind_t kind ); |
---|
36 | void makeTypedef( const std::string & name ); |
---|
37 | void addToEnclosingScope( const std::string & identifier, kind_t kind ); |
---|
38 | |
---|
39 | void enterScope(); |
---|
40 | void leaveScope(); |
---|
41 | }; // TypedefTable |
---|
42 | |
---|
43 | // Local Variables: // |
---|
44 | // tab-width: 4 // |
---|
45 | // mode: c++ // |
---|
46 | // compile-command: "make install" // |
---|
47 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.