line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
| Copyright (c) 2013-2017, Nucleic Development Team. |
3
|
|
|
|
|
|
|
| |
4
|
|
|
|
|
|
|
| Distributed under the terms of the Modified BSD License. |
5
|
|
|
|
|
|
|
| |
6
|
|
|
|
|
|
|
| The full license is in the file LICENSE, distributed with this software. |
7
|
|
|
|
|
|
|
|----------------------------------------------------------------------------*/ |
8
|
|
|
|
|
|
|
#pragma once |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
namespace kiwi |
12
|
|
|
|
|
|
|
{ |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
namespace impl |
15
|
|
|
|
|
|
|
{ |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
class Symbol |
18
|
|
|
|
|
|
|
{ |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
public: |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
using Id = unsigned long long; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
enum Type |
25
|
|
|
|
|
|
|
{ |
26
|
|
|
|
|
|
|
Invalid, |
27
|
|
|
|
|
|
|
External, |
28
|
|
|
|
|
|
|
Slack, |
29
|
|
|
|
|
|
|
Error, |
30
|
|
|
|
|
|
|
Dummy |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
|
33
|
23713
|
|
|
|
|
|
Symbol() : m_id( 0 ), m_type( Invalid ) {} |
34
|
|
|
|
|
|
|
|
35
|
6834
|
|
|
|
|
|
Symbol( Type type, Id id ) : m_id( id ), m_type( type ) {} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
~Symbol() = default; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
Id id() const |
40
|
|
|
|
|
|
|
{ |
41
|
0
|
|
|
|
|
|
return m_id; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
6493915
|
|
|
|
|
|
Type type() const |
45
|
|
|
|
|
|
|
{ |
46
|
6493915
|
|
|
|
|
|
return m_type; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
private: |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Id m_id; |
52
|
|
|
|
|
|
|
Type m_type; |
53
|
|
|
|
|
|
|
|
54
|
85347262
|
|
|
|
|
|
friend bool operator<( const Symbol& lhs, const Symbol& rhs ) |
55
|
|
|
|
|
|
|
{ |
56
|
85347262
|
|
|
|
|
|
return lhs.m_id < rhs.m_id; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
friend bool operator==( const Symbol& lhs, const Symbol& rhs ) |
60
|
|
|
|
|
|
|
{ |
61
|
|
|
|
|
|
|
return lhs.m_id == rhs.m_id; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
}; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
} // namespace impl |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
} // namespace kiwi |