Last change
on this file since 61e362f was
fc95df3,
checked in by Peter A. Buhr <pabuhr@…>, 18 months ago
|
add additional debug printing
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
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 : Wed Jul 12 06:09:37 2023 |
---|
13 | // Update Count : 118 |
---|
14 | // |
---|
15 | |
---|
16 | #pragma once |
---|
17 | |
---|
18 | #include <string> // for string |
---|
19 | |
---|
20 | #include "Common/ScopedMap.h" // for ScopedMap |
---|
21 | |
---|
22 | class TypedefTable { |
---|
23 | struct Note { |
---|
24 | size_t level; |
---|
25 | bool forall; |
---|
26 | }; |
---|
27 | typedef ScopedMap< std::string, int, Note > KindTable; |
---|
28 | KindTable kindTable; |
---|
29 | unsigned int level = 0; |
---|
30 | public: |
---|
31 | ~TypedefTable(); |
---|
32 | |
---|
33 | bool exists( const std::string & identifier ) const; |
---|
34 | bool existsCurr( const std::string & identifier ) const; |
---|
35 | int isKind( const std::string & identifier ) const; |
---|
36 | void makeTypedef( const std::string & name, int kind, const char * ); |
---|
37 | void makeTypedef( const std::string & name, const char * ); |
---|
38 | void addToScope( const std::string & identifier, int kind, const char * ); |
---|
39 | void addToEnclosingScope( const std::string & identifier, int kind, const char * ); |
---|
40 | bool getEnclForall() { return kindTable.getNote( kindTable.currentScope() - 1 ).forall; } |
---|
41 | |
---|
42 | void enterScope(); |
---|
43 | void leaveScope(); |
---|
44 | |
---|
45 | void up( bool ); |
---|
46 | void down(); |
---|
47 | |
---|
48 | void print( void ) const; |
---|
49 | }; // TypedefTable |
---|
50 | |
---|
51 | // Local Variables: // |
---|
52 | // tab-width: 4 // |
---|
53 | // mode: c++ // |
---|
54 | // compile-command: "make install" // |
---|
55 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.