source: src/Parser/TypedefTable.h @ fc95df3

Last change on this file since fc95df3 was fc95df3, checked in by Peter A. Buhr <pabuhr@…>, 11 months ago

add additional debug printing

  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[b87a5ed]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//
[be9288a]7// TypedefTable.h --
[b87a5ed]8//
[7fdb94e]9// Author           : Peter A. Buhr
[b87a5ed]10// Created On       : Sat May 16 15:24:36 2015
11// Last Modified By : Peter A. Buhr
[fc95df3]12// Last Modified On : Wed Jul 12 06:09:37 2023
13// Update Count     : 118
[b87a5ed]14//
15
[6b0b624]16#pragma once
[51b7345]17
[7fdb94e]18#include <string>                                                                               // for string
[51b7345]19
[7fdb94e]20#include "Common/ScopedMap.h"                                                   // for ScopedMap
[984dce6]21
[c8ffe20b]22class TypedefTable {
[fc95df3]23        struct Note {
24                size_t level;
25                bool forall;
26        };
[fc20514]27        typedef ScopedMap< std::string, int, Note > KindTable;
[c468150]28        KindTable kindTable;
[fc20514]29        unsigned int level = 0;
[51b7345]30  public:
[7fdb94e]31        ~TypedefTable();
[45161b4d]32
[60a8062]33        bool exists( const std::string & identifier ) const;
34        bool existsCurr( const std::string & identifier ) const;
[7fdb94e]35        int isKind( const std::string & identifier ) const;
[fc95df3]36        void makeTypedef( const std::string & name, int kind, const char * );
37        void makeTypedef( const std::string & name, const char * );
[ecae5860]38        void addToScope( const std::string & identifier, int kind, const char * );
39        void addToEnclosingScope( const std::string & identifier, int kind, const char * );
[fc20514]40        bool getEnclForall() { return kindTable.getNote( kindTable.currentScope() -  1 ).forall; }
[be9288a]41
[b87a5ed]42        void enterScope();
43        void leaveScope();
[3d26610]44
[fc20514]45        void up( bool );
46        void down();
[3d56d15b]47
[3d26610]48        void print( void ) const;
[7fdb94e]49}; // TypedefTable
[51b7345]50
[b87a5ed]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.