line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Highlight::CPP; |
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
255
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
sub syntax |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
return { |
7
|
1
|
|
|
1
|
0
|
62
|
'name' => 'C/C++', |
8
|
|
|
|
|
|
|
'blockCommentOn' => [ |
9
|
|
|
|
|
|
|
'/*' |
10
|
|
|
|
|
|
|
], |
11
|
|
|
|
|
|
|
'case' => 1, |
12
|
|
|
|
|
|
|
'key2' => { |
13
|
|
|
|
|
|
|
'ifndef' => 1, |
14
|
|
|
|
|
|
|
'elif' => 1, |
15
|
|
|
|
|
|
|
'undef' => 1, |
16
|
|
|
|
|
|
|
'ifdef' => 1, |
17
|
|
|
|
|
|
|
'include' => 1, |
18
|
|
|
|
|
|
|
'else' => 1, |
19
|
|
|
|
|
|
|
'define' => 1, |
20
|
|
|
|
|
|
|
'if' => 1, |
21
|
|
|
|
|
|
|
'pragma' => 1, |
22
|
|
|
|
|
|
|
'error' => 1, |
23
|
|
|
|
|
|
|
'endif' => 1, |
24
|
|
|
|
|
|
|
'line' => 1 |
25
|
|
|
|
|
|
|
}, |
26
|
|
|
|
|
|
|
'lineComment' => [ |
27
|
|
|
|
|
|
|
'//' |
28
|
|
|
|
|
|
|
], |
29
|
|
|
|
|
|
|
'delimiters' => ',(){}[]-+*%/="\'~!&|<>?:;.#', |
30
|
|
|
|
|
|
|
'key1' => { |
31
|
|
|
|
|
|
|
'__based' => 1, |
32
|
|
|
|
|
|
|
'static' => 1, |
33
|
|
|
|
|
|
|
'if' => 1, |
34
|
|
|
|
|
|
|
'sizeof' => 1, |
35
|
|
|
|
|
|
|
'double' => 1, |
36
|
|
|
|
|
|
|
'typedef' => 1, |
37
|
|
|
|
|
|
|
'unsigned' => 1, |
38
|
|
|
|
|
|
|
'new' => 1, |
39
|
|
|
|
|
|
|
'this' => 1, |
40
|
|
|
|
|
|
|
'break' => 1, |
41
|
|
|
|
|
|
|
'inline' => 1, |
42
|
|
|
|
|
|
|
'explicit' => 1, |
43
|
|
|
|
|
|
|
'template' => 1, |
44
|
|
|
|
|
|
|
'bool' => 1, |
45
|
|
|
|
|
|
|
'for' => 1, |
46
|
|
|
|
|
|
|
'private' => 1, |
47
|
|
|
|
|
|
|
'default' => 1, |
48
|
|
|
|
|
|
|
'else' => 1, |
49
|
|
|
|
|
|
|
'const' => 1, |
50
|
|
|
|
|
|
|
'__pascal' => 1, |
51
|
|
|
|
|
|
|
'delete' => 1, |
52
|
|
|
|
|
|
|
'class' => 1, |
53
|
|
|
|
|
|
|
'continue' => 1, |
54
|
|
|
|
|
|
|
'__fastcall' => 1, |
55
|
|
|
|
|
|
|
'union' => 1, |
56
|
|
|
|
|
|
|
'extern' => 1, |
57
|
|
|
|
|
|
|
'__cdecl' => 1, |
58
|
|
|
|
|
|
|
'friend' => 1, |
59
|
|
|
|
|
|
|
'__inline' => 1, |
60
|
|
|
|
|
|
|
'int' => 1, |
61
|
|
|
|
|
|
|
'do' => 1, |
62
|
|
|
|
|
|
|
'__virtual_inheritance' => 1, |
63
|
|
|
|
|
|
|
'void' => 1, |
64
|
|
|
|
|
|
|
'case' => 1, |
65
|
|
|
|
|
|
|
'__multiple_inheritance' => 1, |
66
|
|
|
|
|
|
|
'short' => 1, |
67
|
|
|
|
|
|
|
'operator' => 1, |
68
|
|
|
|
|
|
|
'__asm' => 1, |
69
|
|
|
|
|
|
|
'float' => 1, |
70
|
|
|
|
|
|
|
'struct' => 1, |
71
|
|
|
|
|
|
|
'cout' => 1, |
72
|
|
|
|
|
|
|
'public' => 1, |
73
|
|
|
|
|
|
|
'enum' => 1, |
74
|
|
|
|
|
|
|
'long' => 1, |
75
|
|
|
|
|
|
|
'goto' => 1, |
76
|
|
|
|
|
|
|
'__single_inheritance' => 1, |
77
|
|
|
|
|
|
|
'volatile' => 1, |
78
|
|
|
|
|
|
|
'throw' => 1, |
79
|
|
|
|
|
|
|
'namespace' => 1, |
80
|
|
|
|
|
|
|
'protected' => 1, |
81
|
|
|
|
|
|
|
'virtual' => 1, |
82
|
|
|
|
|
|
|
'return' => 1, |
83
|
|
|
|
|
|
|
'signed' => 1, |
84
|
|
|
|
|
|
|
'register' => 1, |
85
|
|
|
|
|
|
|
'while' => 1, |
86
|
|
|
|
|
|
|
'auto' => 1, |
87
|
|
|
|
|
|
|
'try' => 1, |
88
|
|
|
|
|
|
|
'switch' => 1, |
89
|
|
|
|
|
|
|
'char' => 1, |
90
|
|
|
|
|
|
|
'catch' => 1, |
91
|
|
|
|
|
|
|
'cerr' => 1, |
92
|
|
|
|
|
|
|
'cin' => 1 |
93
|
|
|
|
|
|
|
}, |
94
|
|
|
|
|
|
|
'quot' => [ |
95
|
|
|
|
|
|
|
'\'', |
96
|
|
|
|
|
|
|
'"' |
97
|
|
|
|
|
|
|
], |
98
|
|
|
|
|
|
|
'blockCommentOff' => [ |
99
|
|
|
|
|
|
|
'*/' |
100
|
|
|
|
|
|
|
], |
101
|
|
|
|
|
|
|
'escape' => '\\', |
102
|
|
|
|
|
|
|
'continueQuote' => 0 |
103
|
|
|
|
|
|
|
}; |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; |
108
|
|
|
|
|
|
|
__END__ |