Changeset 0dd3a2f for translator/SymTab/StackTable.h
- Timestamp:
- May 18, 2015, 11:20:23 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 51587aa
- Parents:
- a32b204
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/SymTab/StackTable.h
ra32b204 r0dd3a2f 1 #ifndef SYMTAB_STACKTABLE_H 2 #define SYMTAB_STACKTABLE_H 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 // StackTable.h -- 8 // 9 // Author : Richard C. Bilson 10 // Created On : Sun May 17 21:47:10 2015 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun May 17 21:48:15 2015 13 // Update Count : 3 14 // 15 16 #ifndef STACKTABLE_H 17 #define STACKTABLE_H 3 18 4 19 #include <map> … … 11 26 class StackTable { 12 27 public: 13 StackTable();28 StackTable(); 14 29 15 void enterScope();16 void leaveScope();17 void add( Element *type );18 void add( std::string fwdDeclName );19 Element *lookup( std::string id ) const;30 void enterScope(); 31 void leaveScope(); 32 void add( Element *type ); 33 void add( std::string fwdDeclName ); 34 Element *lookup( std::string id ) const; 20 35 21 void dump( std::ostream &os ) const;// debugging36 void dump( std::ostream &os ) const; // debugging 22 37 private: 23 typedef std::pair< Element*, int > Entry;24 typedef std::map< std::string, std::stack< Entry > > TableType;38 typedef std::pair< Element*, int > Entry; 39 typedef std::map< std::string, std::stack< Entry > > TableType; 25 40 26 ConflictFunction conflictFunction;27 TableType table;28 int scopeLevel;41 ConflictFunction conflictFunction; 42 TableType table; 43 int scopeLevel; 29 44 }; 30 45 } // SymTab … … 32 47 #include "StackTable.cc" 33 48 34 #endif // SYMTAB_STACKTABLE_H 49 #endif // STACKTABLE_H 50 51 // Local Variables: // 52 // tab-width: 4 // 53 // mode: c++ // 54 // compile-command: "make install" // 55 // End: //
Note: See TracChangeset
for help on using the changeset viewer.