Ignore:
Timestamp:
May 19, 2015, 4:58:14 PM (11 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, stuck-waitfor-destruct, with_gc
Children:
843054c2
Parents:
01aeade
Message:

licencing: sixth groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/SymTab/Indexer.h

    r01aeade ra08ba92  
    1010// Created On       : Sun May 17 21:38:55 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 21:40:17 2015
    13 // Update Count     : 2
     12// Last Modified On : Tue May 19 16:51:21 2015
     13// Update Count     : 3
    1414//
    1515
     
    2727
    2828namespace SymTab {
    29     class Indexer : public Visitor {
    30       public:
    31         Indexer( bool useDebug = false );
    32         virtual ~Indexer();
     29        class Indexer : public Visitor {
     30          public:
     31                Indexer( bool useDebug = false );
     32                virtual ~Indexer();
    3333
    34         //using Visitor::visit;
    35         virtual void visit( ObjectDecl *objectDecl );
    36         virtual void visit( FunctionDecl *functionDecl );
    37         virtual void visit( TypeDecl *typeDecl );
    38         virtual void visit( TypedefDecl *typeDecl );
    39         virtual void visit( StructDecl *aggregateDecl );
    40         virtual void visit( UnionDecl *aggregateDecl );
    41         virtual void visit( EnumDecl *aggregateDecl );
    42         virtual void visit( ContextDecl *aggregateDecl );
     34                //using Visitor::visit;
     35                virtual void visit( ObjectDecl *objectDecl );
     36                virtual void visit( FunctionDecl *functionDecl );
     37                virtual void visit( TypeDecl *typeDecl );
     38                virtual void visit( TypedefDecl *typeDecl );
     39                virtual void visit( StructDecl *aggregateDecl );
     40                virtual void visit( UnionDecl *aggregateDecl );
     41                virtual void visit( EnumDecl *aggregateDecl );
     42                virtual void visit( ContextDecl *aggregateDecl );
    4343
    44         virtual void visit( CompoundStmt *compoundStmt );
     44                virtual void visit( CompoundStmt *compoundStmt );
    4545
    46         virtual void visit( ContextInstType *contextInst );
    47         virtual void visit( StructInstType *contextInst );
    48         virtual void visit( UnionInstType *contextInst );
     46                virtual void visit( ContextInstType *contextInst );
     47                virtual void visit( StructInstType *contextInst );
     48                virtual void visit( UnionInstType *contextInst );
    4949
    50         virtual void visit( ForStmt *forStmt );
     50                virtual void visit( ForStmt *forStmt );
    5151
    52         // when using an indexer manually (e.g., within a mutator traversal), it is necessary to tell the indexer
    53         // explicitly when scopes begin and end
    54         void enterScope();
    55         void leaveScope();
     52                // when using an indexer manually (e.g., within a mutator traversal), it is necessary to tell the indexer
     53                // explicitly when scopes begin and end
     54                void enterScope();
     55                void leaveScope();
    5656
    57         void lookupId( const std::string &id, std::list< DeclarationWithType* >& ) const;
    58         DeclarationWithType* lookupId( const std::string &id) const;
    59         NamedTypeDecl *lookupType( const std::string &id ) const;
    60         StructDecl *lookupStruct( const std::string &id ) const;
    61         EnumDecl *lookupEnum( const std::string &id ) const;
    62         UnionDecl *lookupUnion( const std::string &id ) const;
    63         ContextDecl *lookupContext( const std::string &id ) const;
     57                void lookupId( const std::string &id, std::list< DeclarationWithType* >& ) const;
     58                DeclarationWithType* lookupId( const std::string &id) const;
     59                NamedTypeDecl *lookupType( const std::string &id ) const;
     60                StructDecl *lookupStruct( const std::string &id ) const;
     61                EnumDecl *lookupEnum( const std::string &id ) const;
     62                UnionDecl *lookupUnion( const std::string &id ) const;
     63                ContextDecl *lookupContext( const std::string &id ) const;
    6464 
    65         void print( std::ostream &os, int indent = 0 ) const;
    66       private:
    67         IdTable idTable;
    68         TypeTable typeTable;
    69         StructTable structTable;
    70         EnumTable enumTable;
    71         UnionTable unionTable;
    72         ContextTable contextTable;
     65                void print( std::ostream &os, int indent = 0 ) const;
     66          private:
     67                IdTable idTable;
     68                TypeTable typeTable;
     69                StructTable structTable;
     70                EnumTable enumTable;
     71                UnionTable unionTable;
     72                ContextTable contextTable;
    7373 
    74         bool doDebug;                                   // display debugging trace
    75     };
     74                bool doDebug;                                   // display debugging trace
     75        };
    7676} // namespace SymTab
    7777
Note: See TracChangeset for help on using the changeset viewer.