Ignore:
Timestamp:
May 18, 2015, 11:45:33 PM (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:
01aeade
Parents:
0dd3a2f
Message:

licencing: fourth groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/Tuples/NameMatcher.h

    r0dd3a2f r51587aa  
    1 #ifndef _TUPLE_NAMEMATCH_H_
    2 #define _TUPLE_NAMEMATCH_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// NameMatcher.h --
     8//
     9// Author           : Richard C. Bilson
     10// Created On       : Mon May 18 07:44:20 2015
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon May 18 15:01:37 2015
     13// Update Count     : 3
     14//
     15
     16#ifndef _NAMEMATCHER_H_
     17#define _NAMEMATCHER_H_
    318
    419#include <map>
     
    1732
    1833namespace Tuples {
    19   struct NoMoreElements {};
    20   struct NoMatch {
    21     NoMatch( std::string msg ) : message( msg ) {}
    22     std::string message;
    23   };
     34        struct NoMoreElements {};
     35        struct NoMatch {
     36                NoMatch( std::string msg ) : message( msg ) {}
     37                std::string message;
     38        };
    2439
    25   class NameMatcher
    26   {
    27   public:
    28     NameMatcher( std::list< DeclarationWithType* >& );
    29     ~NameMatcher();
     40        class NameMatcher {
     41          public:
     42                NameMatcher( std::list< DeclarationWithType* >& );
     43                ~NameMatcher();
    3044
    31     void match( ResolvExpr::AltList &alternatives ) throw (NoMatch) ;
    32     ResolvExpr::Alternative &get_next() throw (NoMoreElements);
     45                void match( ResolvExpr::AltList &alternatives ) throw (NoMatch) ;
     46                ResolvExpr::Alternative &get_next() throw (NoMoreElements);
    3347
    34   private:
    35     int current;
    36     std::vector< DeclarationWithType* > index;
    37     std::vector< const ResolvExpr::Alternative * > exprs;
    38     std::map< std::string, int> table;
    39   };
    40 
     48          private:
     49                int current;
     50                std::vector< DeclarationWithType* > index;
     51                std::vector< const ResolvExpr::Alternative * > exprs;
     52                std::map< std::string, int> table;
     53        };
    4154} // namespace Tuples
    4255
    43 #endif // #ifndef _TUPLE_NAMEMATCH_H_
     56#endif // _NAMEMATCHER_H_
    4457
    45 /*
    46   Local Variables:
    47   mode: c++
    48   End:
    49 */
     58// Local Variables: //
     59// tab-width: 4 //
     60// mode: c++ //
     61// compile-command: "make install" //
     62// End: //
Note: See TracChangeset for help on using the changeset viewer.