Ignore:
Timestamp:
May 18, 2015, 11:20:23 AM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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
Message:

licencing: third groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/SymTab/IdTable.h

    ra32b204 r0dd3a2f  
    1 #ifndef SYMTAB_IDTABLE_H
    2 #define SYMTAB_IDTABLE_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// IdTable.h --
     8//
     9// Author           : Richard C. Bilson
     10// Created On       : Sun May 17 21:30:02 2015
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun May 17 21:31:45 2015
     13// Update Count     : 3
     14//
     15
     16#ifndef IDTABLE_H
     17#define IDTABLE_H
    318
    419#include <iostream>
     
    1227    class IdTable {
    1328      public:
    14         IdTable();
     29                IdTable();
    1530 
    16         void enterScope();
    17         void leaveScope();
    18         void addDecl( DeclarationWithType *decl );
    19         void lookupId( const std::string &id, std::list< DeclarationWithType* >& decls ) const;
    20         DeclarationWithType* lookupId( const std::string &id) const;
     31                void enterScope();
     32                void leaveScope();
     33                void addDecl( DeclarationWithType *decl );
     34                void lookupId( const std::string &id, std::list< DeclarationWithType* >& decls ) const;
     35                DeclarationWithType* lookupId( const std::string &id) const;
    2136 
    22         void dump( std::ostream &os ) const; // debugging
     37                void dump( std::ostream &os ) const;                    // debugging
     38      private:
     39                typedef std::pair< DeclarationWithType*, int > DeclEntry;
     40                typedef std::map< std::string, std::stack< DeclEntry > > InnerTableType;
     41                typedef std::map< std::string, InnerTableType > OuterTableType;
    2342
    24       private:
    25         typedef std::pair< DeclarationWithType*, int > DeclEntry;
    26         typedef std::map< std::string, std::stack< DeclEntry > > InnerTableType;
    27         typedef std::map< std::string, InnerTableType > OuterTableType;
    28 
    29         OuterTableType table;
    30         int scopeLevel;
     43                OuterTableType table;
     44                int scopeLevel;
    3145    };
    3246} // namespace SymTab
    3347
    34 #endif // SYMTAB_IDTABLE_H
     48#endif // IDTABLE_H
     49
     50// Local Variables: //
     51// tab-width: 4 //
     52// mode: c++ //
     53// compile-command: "make install" //
     54// End: //
Note: See TracChangeset for help on using the changeset viewer.