Modules |
Files |
Inheritance Tree |
Inheritance Graph |
Name Index |
Config
File: Synopsis/Parser/C++/syn/link_map.hh
1| // Synopsis C++ Parser: link_map.hh header file
2| // The LinkMap class which maps preprocessed file positions to input file
3| // positions
4|
5| // $Id: link_map.hh,v 1.5 2003/01/27 06:53:37 chalky Exp $
6| //
7| // This file is a part of Synopsis.
8| // Copyright (C) 2002 Stephen Davies
9| //
10| // Synopsis is free software; you can redistribute it and/or modify it
11| // under the terms of the GNU General Public License as published by
12| // the Free Software Foundation; either version 2 of the License, or
13| // (at your option) any later version.
14| //
15| // This program is distributed in the hope that it will be useful,
16| // but WITHOUT ANY WARRANTY; without even the implied warranty of
17| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18| // General Public License for more details.
19| //
20| // You should have received a copy of the GNU General Public License
21| // along with this program; if not, write to the Free Software
22| // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23| // 02111-1307, USA.
24|
25|
26| #ifndef H_SYNOPSIS_CPP_LINKMAP
27| #define H_SYNOPSIS_CPP_LINKMAP
28|
29| #include <vector>
30| #include "ast.hh"
31|
32|
33|
34| extern std::vector<AST::Macro*>* syn_macro_defines;
35|
36|
37| class LinkMap
38| {
39| public:
40|
41| LinkMap();
42|
43|
44| static LinkMap* instance();
45|
46|
47|
48|
49|
50| void add(const char* name, int line, int out_start, int out_end, int diff);
51|
52|
53|
54|
55| int map(int line, int col);
56|
57|
58|
59|
60| void clear();
61|
62| private:
63|
64| struct Private;
65| Private *m;
66| };
67|
68| #endif