line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. |
2
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
3
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# This file was generated from the 'gdl.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 1.01 |
9
|
|
|
|
|
|
|
#kate version 2.0 |
10
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:05 2008, localtime |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::GDL; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.07'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
1019
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
17
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
18
|
1
|
|
|
1
|
|
5
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3804
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
1
|
|
|
1
|
0
|
819
|
my $proto = shift; |
22
|
1
|
|
33
|
|
|
12
|
my $class = ref($proto) || $proto; |
23
|
1
|
|
|
|
|
14
|
my $self = $class->SUPER::new(@_); |
24
|
1
|
|
|
|
|
23
|
$self->attributes({ |
25
|
|
|
|
|
|
|
'Char' => 'Char', |
26
|
|
|
|
|
|
|
'Comment' => 'Comment', |
27
|
|
|
|
|
|
|
'Datatype' => 'DataType', |
28
|
|
|
|
|
|
|
'Float' => 'Float', |
29
|
|
|
|
|
|
|
'Integer' => 'DecVal', |
30
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
31
|
|
|
|
|
|
|
'Normal' => 'Normal', |
32
|
|
|
|
|
|
|
'String' => 'String', |
33
|
|
|
|
|
|
|
'Value' => 'Others', |
34
|
|
|
|
|
|
|
}); |
35
|
1
|
|
|
|
|
13
|
$self->listAdd('algorithms', |
36
|
|
|
|
|
|
|
'dfs', |
37
|
|
|
|
|
|
|
'forcedir', |
38
|
|
|
|
|
|
|
'maxdegree', |
39
|
|
|
|
|
|
|
'maxdepth', |
40
|
|
|
|
|
|
|
'maxdepthslow', |
41
|
|
|
|
|
|
|
'maxindegree', |
42
|
|
|
|
|
|
|
'maxoutdegree', |
43
|
|
|
|
|
|
|
'minbackward', |
44
|
|
|
|
|
|
|
'mindegree', |
45
|
|
|
|
|
|
|
'mindepth', |
46
|
|
|
|
|
|
|
'mindepthslow', |
47
|
|
|
|
|
|
|
'minindegree', |
48
|
|
|
|
|
|
|
'minoutdegree', |
49
|
|
|
|
|
|
|
'normal', |
50
|
|
|
|
|
|
|
'tree', |
51
|
|
|
|
|
|
|
); |
52
|
1
|
|
|
|
|
7
|
$self->listAdd('colors', |
53
|
|
|
|
|
|
|
'aquamarine', |
54
|
|
|
|
|
|
|
'black', |
55
|
|
|
|
|
|
|
'blue', |
56
|
|
|
|
|
|
|
'cyan', |
57
|
|
|
|
|
|
|
'darkblue', |
58
|
|
|
|
|
|
|
'darkcyan', |
59
|
|
|
|
|
|
|
'darkgray', |
60
|
|
|
|
|
|
|
'darkgreen', |
61
|
|
|
|
|
|
|
'darkgrey', |
62
|
|
|
|
|
|
|
'darkmagenta', |
63
|
|
|
|
|
|
|
'darkred', |
64
|
|
|
|
|
|
|
'darkyellow', |
65
|
|
|
|
|
|
|
'gold', |
66
|
|
|
|
|
|
|
'green', |
67
|
|
|
|
|
|
|
'khaki', |
68
|
|
|
|
|
|
|
'lightblue', |
69
|
|
|
|
|
|
|
'lightcyan', |
70
|
|
|
|
|
|
|
'lightgray', |
71
|
|
|
|
|
|
|
'lightgreen', |
72
|
|
|
|
|
|
|
'lightgrey', |
73
|
|
|
|
|
|
|
'lightmagenta', |
74
|
|
|
|
|
|
|
'lightred', |
75
|
|
|
|
|
|
|
'lightyellow', |
76
|
|
|
|
|
|
|
'lilac', |
77
|
|
|
|
|
|
|
'magenta', |
78
|
|
|
|
|
|
|
'orange', |
79
|
|
|
|
|
|
|
'orchid', |
80
|
|
|
|
|
|
|
'pink', |
81
|
|
|
|
|
|
|
'purple', |
82
|
|
|
|
|
|
|
'red', |
83
|
|
|
|
|
|
|
'turquoise', |
84
|
|
|
|
|
|
|
'white', |
85
|
|
|
|
|
|
|
'yellow', |
86
|
|
|
|
|
|
|
'yellowgreen', |
87
|
|
|
|
|
|
|
); |
88
|
1
|
|
|
|
|
6
|
$self->listAdd('fisheye', |
89
|
|
|
|
|
|
|
'cfish', |
90
|
|
|
|
|
|
|
'dcfish', |
91
|
|
|
|
|
|
|
'dpfish', |
92
|
|
|
|
|
|
|
'fcfish', |
93
|
|
|
|
|
|
|
'fpfish', |
94
|
|
|
|
|
|
|
'pfish', |
95
|
|
|
|
|
|
|
); |
96
|
1
|
|
|
|
|
7
|
$self->listAdd('forcedir', |
97
|
|
|
|
|
|
|
'attraction', |
98
|
|
|
|
|
|
|
'randomfactor', |
99
|
|
|
|
|
|
|
'randomimpulse', |
100
|
|
|
|
|
|
|
'randomrounds', |
101
|
|
|
|
|
|
|
'repulsion', |
102
|
|
|
|
|
|
|
'tempmax', |
103
|
|
|
|
|
|
|
'tempmin', |
104
|
|
|
|
|
|
|
'tempscheme', |
105
|
|
|
|
|
|
|
'temptreshold', |
106
|
|
|
|
|
|
|
); |
107
|
1
|
|
|
|
|
5
|
$self->listAdd('lines', |
108
|
|
|
|
|
|
|
'continuous', |
109
|
|
|
|
|
|
|
'dashed', |
110
|
|
|
|
|
|
|
'dotted', |
111
|
|
|
|
|
|
|
'double', |
112
|
|
|
|
|
|
|
'invisible', |
113
|
|
|
|
|
|
|
'solid', |
114
|
|
|
|
|
|
|
'triple', |
115
|
|
|
|
|
|
|
); |
116
|
1
|
|
|
|
|
5
|
$self->listAdd('magnetic', |
117
|
|
|
|
|
|
|
'circular', |
118
|
|
|
|
|
|
|
'no', |
119
|
|
|
|
|
|
|
'orthogonal', |
120
|
|
|
|
|
|
|
'polar', |
121
|
|
|
|
|
|
|
'polcircular', |
122
|
|
|
|
|
|
|
); |
123
|
1
|
|
|
|
|
5
|
$self->listAdd('orientation', |
124
|
|
|
|
|
|
|
'bottom_to_top', |
125
|
|
|
|
|
|
|
'bottomtotop', |
126
|
|
|
|
|
|
|
'left_to_right', |
127
|
|
|
|
|
|
|
'lefttoright', |
128
|
|
|
|
|
|
|
'right_to_left', |
129
|
|
|
|
|
|
|
'righttoleft', |
130
|
|
|
|
|
|
|
'top_to_bottom', |
131
|
|
|
|
|
|
|
'toptobottom', |
132
|
|
|
|
|
|
|
); |
133
|
1
|
|
|
|
|
5
|
$self->listAdd('shapes', |
134
|
|
|
|
|
|
|
'box', |
135
|
|
|
|
|
|
|
'circle', |
136
|
|
|
|
|
|
|
'ellipse', |
137
|
|
|
|
|
|
|
'hexagon', |
138
|
|
|
|
|
|
|
'lparallelogram', |
139
|
|
|
|
|
|
|
'rhomb', |
140
|
|
|
|
|
|
|
'rhomboid', |
141
|
|
|
|
|
|
|
'rparallelogram', |
142
|
|
|
|
|
|
|
'trapeze', |
143
|
|
|
|
|
|
|
'trapezoid', |
144
|
|
|
|
|
|
|
'triangle', |
145
|
|
|
|
|
|
|
'uptrapeze', |
146
|
|
|
|
|
|
|
'uptrapezoid', |
147
|
|
|
|
|
|
|
); |
148
|
1
|
|
|
|
|
5
|
$self->listAdd('states', |
149
|
|
|
|
|
|
|
'boxed', |
150
|
|
|
|
|
|
|
'clustered', |
151
|
|
|
|
|
|
|
'exclusive', |
152
|
|
|
|
|
|
|
'folded', |
153
|
|
|
|
|
|
|
'unfolded', |
154
|
|
|
|
|
|
|
'white', |
155
|
|
|
|
|
|
|
'wrapped', |
156
|
|
|
|
|
|
|
); |
157
|
1
|
|
|
|
|
88
|
$self->contextdata({ |
158
|
|
|
|
|
|
|
'algid' => { |
159
|
|
|
|
|
|
|
callback => \&parsealgid, |
160
|
|
|
|
|
|
|
attribute => 'Normal', |
161
|
|
|
|
|
|
|
}, |
162
|
|
|
|
|
|
|
'arrow' => { |
163
|
|
|
|
|
|
|
callback => \&parsearrow, |
164
|
|
|
|
|
|
|
attribute => 'Normal', |
165
|
|
|
|
|
|
|
}, |
166
|
|
|
|
|
|
|
'arrowmode' => { |
167
|
|
|
|
|
|
|
callback => \&parsearrowmode, |
168
|
|
|
|
|
|
|
attribute => 'Normal', |
169
|
|
|
|
|
|
|
}, |
170
|
|
|
|
|
|
|
'boolean' => { |
171
|
|
|
|
|
|
|
callback => \&parseboolean, |
172
|
|
|
|
|
|
|
attribute => 'Normal', |
173
|
|
|
|
|
|
|
}, |
174
|
|
|
|
|
|
|
'ccomment' => { |
175
|
|
|
|
|
|
|
callback => \&parseccomment, |
176
|
|
|
|
|
|
|
attribute => 'Comment', |
177
|
|
|
|
|
|
|
lineending => 'default', |
178
|
|
|
|
|
|
|
}, |
179
|
|
|
|
|
|
|
'cecolon' => { |
180
|
|
|
|
|
|
|
callback => \&parsececolon, |
181
|
|
|
|
|
|
|
attribute => 'Normal', |
182
|
|
|
|
|
|
|
}, |
183
|
|
|
|
|
|
|
'centry' => { |
184
|
|
|
|
|
|
|
callback => \&parsecentry, |
185
|
|
|
|
|
|
|
attribute => 'Normal', |
186
|
|
|
|
|
|
|
lineending => 'default', |
187
|
|
|
|
|
|
|
}, |
188
|
|
|
|
|
|
|
'classname' => { |
189
|
|
|
|
|
|
|
callback => \&parseclassname, |
190
|
|
|
|
|
|
|
attribute => 'Normal', |
191
|
|
|
|
|
|
|
}, |
192
|
|
|
|
|
|
|
'colorid' => { |
193
|
|
|
|
|
|
|
callback => \&parsecolorid, |
194
|
|
|
|
|
|
|
attribute => 'Normal', |
195
|
|
|
|
|
|
|
}, |
196
|
|
|
|
|
|
|
'cppcomment' => { |
197
|
|
|
|
|
|
|
callback => \&parsecppcomment, |
198
|
|
|
|
|
|
|
attribute => 'Comment', |
199
|
|
|
|
|
|
|
}, |
200
|
|
|
|
|
|
|
'default' => { |
201
|
|
|
|
|
|
|
callback => \&parsedefault, |
202
|
|
|
|
|
|
|
attribute => 'Normal', |
203
|
|
|
|
|
|
|
}, |
204
|
|
|
|
|
|
|
'fishid' => { |
205
|
|
|
|
|
|
|
callback => \&parsefishid, |
206
|
|
|
|
|
|
|
attribute => 'Normal', |
207
|
|
|
|
|
|
|
}, |
208
|
|
|
|
|
|
|
'floatval' => { |
209
|
|
|
|
|
|
|
callback => \&parsefloatval, |
210
|
|
|
|
|
|
|
attribute => 'Normal', |
211
|
|
|
|
|
|
|
}, |
212
|
|
|
|
|
|
|
'fontbase' => { |
213
|
|
|
|
|
|
|
callback => \&parsefontbase, |
214
|
|
|
|
|
|
|
attribute => 'Normal', |
215
|
|
|
|
|
|
|
}, |
216
|
|
|
|
|
|
|
'fontlq' => { |
217
|
|
|
|
|
|
|
callback => \&parsefontlq, |
218
|
|
|
|
|
|
|
attribute => 'Normal', |
219
|
|
|
|
|
|
|
}, |
220
|
|
|
|
|
|
|
'fontsize' => { |
221
|
|
|
|
|
|
|
callback => \&parsefontsize, |
222
|
|
|
|
|
|
|
attribute => 'Normal', |
223
|
|
|
|
|
|
|
}, |
224
|
|
|
|
|
|
|
'intval' => { |
225
|
|
|
|
|
|
|
callback => \&parseintval, |
226
|
|
|
|
|
|
|
attribute => 'Normal', |
227
|
|
|
|
|
|
|
}, |
228
|
|
|
|
|
|
|
'lineid' => { |
229
|
|
|
|
|
|
|
callback => \&parselineid, |
230
|
|
|
|
|
|
|
attribute => 'Normal', |
231
|
|
|
|
|
|
|
}, |
232
|
|
|
|
|
|
|
'longint' => { |
233
|
|
|
|
|
|
|
callback => \&parselongint, |
234
|
|
|
|
|
|
|
attribute => 'Normal', |
235
|
|
|
|
|
|
|
lineending => 'default', |
236
|
|
|
|
|
|
|
}, |
237
|
|
|
|
|
|
|
'lquote' => { |
238
|
|
|
|
|
|
|
callback => \&parselquote, |
239
|
|
|
|
|
|
|
attribute => 'Normal', |
240
|
|
|
|
|
|
|
}, |
241
|
|
|
|
|
|
|
'magnor' => { |
242
|
|
|
|
|
|
|
callback => \&parsemagnor, |
243
|
|
|
|
|
|
|
attribute => 'Normal', |
244
|
|
|
|
|
|
|
}, |
245
|
|
|
|
|
|
|
'nodealign' => { |
246
|
|
|
|
|
|
|
callback => \&parsenodealign, |
247
|
|
|
|
|
|
|
attribute => 'Normal', |
248
|
|
|
|
|
|
|
}, |
249
|
|
|
|
|
|
|
'nodelevel' => { |
250
|
|
|
|
|
|
|
callback => \&parsenodelevel, |
251
|
|
|
|
|
|
|
attribute => 'Normal', |
252
|
|
|
|
|
|
|
}, |
253
|
|
|
|
|
|
|
'orient' => { |
254
|
|
|
|
|
|
|
callback => \&parseorient, |
255
|
|
|
|
|
|
|
attribute => 'Normal', |
256
|
|
|
|
|
|
|
}, |
257
|
|
|
|
|
|
|
'rgb' => { |
258
|
|
|
|
|
|
|
callback => \&parsergb, |
259
|
|
|
|
|
|
|
attribute => 'Normal', |
260
|
|
|
|
|
|
|
}, |
261
|
|
|
|
|
|
|
'scaling' => { |
262
|
|
|
|
|
|
|
callback => \&parsescaling, |
263
|
|
|
|
|
|
|
attribute => 'Normal', |
264
|
|
|
|
|
|
|
}, |
265
|
|
|
|
|
|
|
'shapeid' => { |
266
|
|
|
|
|
|
|
callback => \&parseshapeid, |
267
|
|
|
|
|
|
|
attribute => 'Normal', |
268
|
|
|
|
|
|
|
}, |
269
|
|
|
|
|
|
|
'stateid' => { |
270
|
|
|
|
|
|
|
callback => \&parsestateid, |
271
|
|
|
|
|
|
|
attribute => 'Normal', |
272
|
|
|
|
|
|
|
}, |
273
|
|
|
|
|
|
|
'string' => { |
274
|
|
|
|
|
|
|
callback => \&parsestring, |
275
|
|
|
|
|
|
|
attribute => 'String', |
276
|
|
|
|
|
|
|
}, |
277
|
|
|
|
|
|
|
'textmode' => { |
278
|
|
|
|
|
|
|
callback => \&parsetextmode, |
279
|
|
|
|
|
|
|
attribute => 'Normal', |
280
|
|
|
|
|
|
|
}, |
281
|
|
|
|
|
|
|
'weight' => { |
282
|
|
|
|
|
|
|
callback => \&parseweight, |
283
|
|
|
|
|
|
|
attribute => 'Normal', |
284
|
|
|
|
|
|
|
}, |
285
|
|
|
|
|
|
|
}); |
286
|
1
|
|
|
|
|
11
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
287
|
1
|
|
|
|
|
5
|
$self->basecontext('default'); |
288
|
1
|
|
|
|
|
11
|
$self->keywordscase(0); |
289
|
1
|
|
|
|
|
4
|
$self->initialize; |
290
|
1
|
|
|
|
|
4
|
bless ($self, $class); |
291
|
1
|
|
|
|
|
4
|
return $self; |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
sub language { |
295
|
0
|
|
|
0
|
0
|
|
return 'GDL'; |
296
|
|
|
|
|
|
|
} |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
sub parsealgid { |
299
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
300
|
|
|
|
|
|
|
# String => 'algorithms' |
301
|
|
|
|
|
|
|
# attribute => 'Datatype' |
302
|
|
|
|
|
|
|
# context => 'default' |
303
|
|
|
|
|
|
|
# type => 'keyword' |
304
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'algorithms', 0, undef, 0, 'default', 'Datatype')) { |
305
|
0
|
|
|
|
|
|
return 1 |
306
|
|
|
|
|
|
|
} |
307
|
0
|
|
|
|
|
|
return 0; |
308
|
|
|
|
|
|
|
}; |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
sub parsearrow { |
311
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
312
|
|
|
|
|
|
|
# String => '(solid|line|none)' |
313
|
|
|
|
|
|
|
# attribute => 'Datatype' |
314
|
|
|
|
|
|
|
# context => 'default' |
315
|
|
|
|
|
|
|
# type => 'RegExpr' |
316
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(solid|line|none)', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
317
|
0
|
|
|
|
|
|
return 1 |
318
|
|
|
|
|
|
|
} |
319
|
0
|
|
|
|
|
|
return 0; |
320
|
|
|
|
|
|
|
}; |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
sub parsearrowmode { |
323
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
324
|
|
|
|
|
|
|
# String => '(free|fixed)' |
325
|
|
|
|
|
|
|
# attribute => 'Datatype' |
326
|
|
|
|
|
|
|
# context => 'default' |
327
|
|
|
|
|
|
|
# type => 'RegExpr' |
328
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(free|fixed)', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
329
|
0
|
|
|
|
|
|
return 1 |
330
|
|
|
|
|
|
|
} |
331
|
0
|
|
|
|
|
|
return 0; |
332
|
|
|
|
|
|
|
}; |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
sub parseboolean { |
335
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
336
|
|
|
|
|
|
|
# String => '(yes|no)' |
337
|
|
|
|
|
|
|
# attribute => 'Datatype' |
338
|
|
|
|
|
|
|
# context => 'default' |
339
|
|
|
|
|
|
|
# type => 'RegExpr' |
340
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(yes|no)', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
341
|
0
|
|
|
|
|
|
return 1 |
342
|
|
|
|
|
|
|
} |
343
|
0
|
|
|
|
|
|
return 0; |
344
|
|
|
|
|
|
|
}; |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
sub parseccomment { |
347
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
348
|
0
|
|
|
|
|
|
return 0; |
349
|
|
|
|
|
|
|
}; |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
sub parsececolon { |
352
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
353
|
|
|
|
|
|
|
# attribute => 'Value' |
354
|
|
|
|
|
|
|
# char => ':' |
355
|
|
|
|
|
|
|
# context => 'rgb' |
356
|
|
|
|
|
|
|
# type => 'DetectChar' |
357
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, 'rgb', 'Value')) { |
358
|
0
|
|
|
|
|
|
return 1 |
359
|
|
|
|
|
|
|
} |
360
|
0
|
|
|
|
|
|
return 0; |
361
|
|
|
|
|
|
|
}; |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
sub parsecentry { |
364
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
365
|
|
|
|
|
|
|
# String => '[0-9][0-9]?' |
366
|
|
|
|
|
|
|
# attribute => 'Value' |
367
|
|
|
|
|
|
|
# context => 'cecolon' |
368
|
|
|
|
|
|
|
# type => 'RegExpr' |
369
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[0-9][0-9]?', 0, 0, 0, undef, 0, 'cecolon', 'Value')) { |
370
|
0
|
|
|
|
|
|
return 1 |
371
|
|
|
|
|
|
|
} |
372
|
0
|
|
|
|
|
|
return 0; |
373
|
|
|
|
|
|
|
}; |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
sub parseclassname { |
376
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
377
|
|
|
|
|
|
|
# String => '[0-9]+' |
378
|
|
|
|
|
|
|
# attribute => 'Value' |
379
|
|
|
|
|
|
|
# context => '#stay' |
380
|
|
|
|
|
|
|
# type => 'RegExpr' |
381
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[0-9]+', 0, 0, 0, undef, 0, '#stay', 'Value')) { |
382
|
0
|
|
|
|
|
|
return 1 |
383
|
|
|
|
|
|
|
} |
384
|
|
|
|
|
|
|
# attribute => 'Value' |
385
|
|
|
|
|
|
|
# char => ':' |
386
|
|
|
|
|
|
|
# context => 'lquote' |
387
|
|
|
|
|
|
|
# type => 'DetectChar' |
388
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, 'lquote', 'Value')) { |
389
|
0
|
|
|
|
|
|
return 1 |
390
|
|
|
|
|
|
|
} |
391
|
0
|
|
|
|
|
|
return 0; |
392
|
|
|
|
|
|
|
}; |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
sub parsecolorid { |
395
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
396
|
|
|
|
|
|
|
# String => 'colors' |
397
|
|
|
|
|
|
|
# attribute => 'Datatype' |
398
|
|
|
|
|
|
|
# context => 'default' |
399
|
|
|
|
|
|
|
# type => 'keyword' |
400
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'colors', 0, undef, 0, 'default', 'Datatype')) { |
401
|
0
|
|
|
|
|
|
return 1 |
402
|
|
|
|
|
|
|
} |
403
|
|
|
|
|
|
|
# String => '[0-9][0-9]?' |
404
|
|
|
|
|
|
|
# attribute => 'Datatype' |
405
|
|
|
|
|
|
|
# context => 'default' |
406
|
|
|
|
|
|
|
# type => 'RegExpr' |
407
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[0-9][0-9]?', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
408
|
0
|
|
|
|
|
|
return 1 |
409
|
|
|
|
|
|
|
} |
410
|
0
|
|
|
|
|
|
return 0; |
411
|
|
|
|
|
|
|
}; |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
sub parsecppcomment { |
414
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
415
|
|
|
|
|
|
|
# attribute => 'Comment' |
416
|
|
|
|
|
|
|
# char => '*' |
417
|
|
|
|
|
|
|
# char1 => '/' |
418
|
|
|
|
|
|
|
# context => 'default' |
419
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
420
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, 'default', 'Comment')) { |
421
|
0
|
|
|
|
|
|
return 1 |
422
|
|
|
|
|
|
|
} |
423
|
0
|
|
|
|
|
|
return 0; |
424
|
|
|
|
|
|
|
}; |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
sub parsedefault { |
427
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
428
|
|
|
|
|
|
|
# attribute => 'Comment' |
429
|
|
|
|
|
|
|
# char => '/' |
430
|
|
|
|
|
|
|
# char1 => '/' |
431
|
|
|
|
|
|
|
# context => 'ccomment' |
432
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
433
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'ccomment', 'Comment')) { |
434
|
0
|
|
|
|
|
|
return 1 |
435
|
|
|
|
|
|
|
} |
436
|
|
|
|
|
|
|
# attribute => 'Comment' |
437
|
|
|
|
|
|
|
# char => '/' |
438
|
|
|
|
|
|
|
# char1 => '*' |
439
|
|
|
|
|
|
|
# context => 'cppcomment' |
440
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
441
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'cppcomment', 'Comment')) { |
442
|
0
|
|
|
|
|
|
return 1 |
443
|
|
|
|
|
|
|
} |
444
|
|
|
|
|
|
|
# String => 'focus' |
445
|
|
|
|
|
|
|
# attribute => 'Keyword' |
446
|
|
|
|
|
|
|
# context => '#stay' |
447
|
|
|
|
|
|
|
# type => 'StringDetect' |
448
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'focus', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { |
449
|
0
|
|
|
|
|
|
return 1 |
450
|
|
|
|
|
|
|
} |
451
|
|
|
|
|
|
|
# String => '(graph|edge|node|region|backedge|(left|right|)(bent|)nearedge):' |
452
|
|
|
|
|
|
|
# attribute => 'Keyword' |
453
|
|
|
|
|
|
|
# context => '#stay' |
454
|
|
|
|
|
|
|
# type => 'RegExpr' |
455
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(graph|edge|node|region|backedge|(left|right|)(bent|)nearedge):', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { |
456
|
0
|
|
|
|
|
|
return 1 |
457
|
|
|
|
|
|
|
} |
458
|
|
|
|
|
|
|
# String => 'loc *:' |
459
|
|
|
|
|
|
|
# attribute => 'Value' |
460
|
|
|
|
|
|
|
# context => '#stay' |
461
|
|
|
|
|
|
|
# type => 'RegExpr' |
462
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'loc *:', 0, 0, 0, undef, 0, '#stay', 'Value')) { |
463
|
0
|
|
|
|
|
|
return 1 |
464
|
|
|
|
|
|
|
} |
465
|
|
|
|
|
|
|
# String => 'colorentry' |
466
|
|
|
|
|
|
|
# attribute => 'Value' |
467
|
|
|
|
|
|
|
# context => 'centry' |
468
|
|
|
|
|
|
|
# type => 'StringDetect' |
469
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'colorentry', 0, 0, 0, undef, 0, 'centry', 'Value')) { |
470
|
0
|
|
|
|
|
|
return 1 |
471
|
|
|
|
|
|
|
} |
472
|
|
|
|
|
|
|
# String => 'arrow_?mode *:' |
473
|
|
|
|
|
|
|
# attribute => 'Value' |
474
|
|
|
|
|
|
|
# context => 'arrowmode' |
475
|
|
|
|
|
|
|
# type => 'RegExpr' |
476
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'arrow_?mode *:', 0, 0, 0, undef, 0, 'arrowmode', 'Value')) { |
477
|
0
|
|
|
|
|
|
return 1 |
478
|
|
|
|
|
|
|
} |
479
|
|
|
|
|
|
|
# String => '(foldnode.|node.|)(text|border|)color *:' |
480
|
|
|
|
|
|
|
# attribute => 'Value' |
481
|
|
|
|
|
|
|
# context => 'colorid' |
482
|
|
|
|
|
|
|
# type => 'RegExpr' |
483
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|)(text|border|)color *:', 0, 0, 0, undef, 0, 'colorid', 'Value')) { |
484
|
0
|
|
|
|
|
|
return 1 |
485
|
|
|
|
|
|
|
} |
486
|
|
|
|
|
|
|
# String => '(foldedge.|edge.|)(arrow|backarrow|)color *:' |
487
|
|
|
|
|
|
|
# attribute => 'Value' |
488
|
|
|
|
|
|
|
# context => 'colorid' |
489
|
|
|
|
|
|
|
# type => 'RegExpr' |
490
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldedge.|edge.|)(arrow|backarrow|)color *:', 0, 0, 0, undef, 0, 'colorid', 'Value')) { |
491
|
0
|
|
|
|
|
|
return 1 |
492
|
|
|
|
|
|
|
} |
493
|
|
|
|
|
|
|
# String => '(foldedge.|edge.|)(arrow|backarrow)style *:' |
494
|
|
|
|
|
|
|
# attribute => 'Value' |
495
|
|
|
|
|
|
|
# context => 'arrow' |
496
|
|
|
|
|
|
|
# type => 'RegExpr' |
497
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldedge.|edge.|)(arrow|backarrow)style *:', 0, 0, 0, undef, 0, 'arrow', 'Value')) { |
498
|
0
|
|
|
|
|
|
return 1 |
499
|
|
|
|
|
|
|
} |
500
|
|
|
|
|
|
|
# String => '(foldedge.|edge.|)linestyle *:' |
501
|
|
|
|
|
|
|
# attribute => 'Value' |
502
|
|
|
|
|
|
|
# context => 'lineid' |
503
|
|
|
|
|
|
|
# type => 'RegExpr' |
504
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldedge.|edge.|)linestyle *:', 0, 0, 0, undef, 0, 'lineid', 'Value')) { |
505
|
0
|
|
|
|
|
|
return 1 |
506
|
|
|
|
|
|
|
} |
507
|
|
|
|
|
|
|
# String => '(foldnode.|node.|)borderstyle *:' |
508
|
|
|
|
|
|
|
# attribute => 'Value' |
509
|
|
|
|
|
|
|
# context => 'lineid' |
510
|
|
|
|
|
|
|
# type => 'RegExpr' |
511
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|)borderstyle *:', 0, 0, 0, undef, 0, 'lineid', 'Value')) { |
512
|
0
|
|
|
|
|
|
return 1 |
513
|
|
|
|
|
|
|
} |
514
|
|
|
|
|
|
|
# String => 'view *:' |
515
|
|
|
|
|
|
|
# attribute => 'Value' |
516
|
|
|
|
|
|
|
# context => 'fishid' |
517
|
|
|
|
|
|
|
# type => 'RegExpr' |
518
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'view *:', 0, 0, 0, undef, 0, 'fishid', 'Value')) { |
519
|
0
|
|
|
|
|
|
return 1 |
520
|
|
|
|
|
|
|
} |
521
|
|
|
|
|
|
|
# String => '(foldnode.|node.|)shape' |
522
|
|
|
|
|
|
|
# attribute => 'Value' |
523
|
|
|
|
|
|
|
# context => 'shapeid' |
524
|
|
|
|
|
|
|
# type => 'RegExpr' |
525
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|)shape', 0, 0, 0, undef, 0, 'shapeid', 'Value')) { |
526
|
0
|
|
|
|
|
|
return 1 |
527
|
|
|
|
|
|
|
} |
528
|
|
|
|
|
|
|
# String => '(source|target)(name|)' |
529
|
|
|
|
|
|
|
# attribute => 'Value' |
530
|
|
|
|
|
|
|
# context => 'lquote' |
531
|
|
|
|
|
|
|
# type => 'RegExpr' |
532
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(source|target)(name|)', 0, 0, 0, undef, 0, 'lquote', 'Value')) { |
533
|
0
|
|
|
|
|
|
return 1 |
534
|
|
|
|
|
|
|
} |
535
|
|
|
|
|
|
|
# String => 'title *:' |
536
|
|
|
|
|
|
|
# attribute => 'Value' |
537
|
|
|
|
|
|
|
# context => 'lquote' |
538
|
|
|
|
|
|
|
# type => 'RegExpr' |
539
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'title *:', 0, 0, 0, undef, 0, 'lquote', 'Value')) { |
540
|
0
|
|
|
|
|
|
return 1 |
541
|
|
|
|
|
|
|
} |
542
|
|
|
|
|
|
|
# String => '(foldnode.|node.|foldedge.|edge.|)label *:' |
543
|
|
|
|
|
|
|
# attribute => 'Value' |
544
|
|
|
|
|
|
|
# context => 'lquote' |
545
|
|
|
|
|
|
|
# type => 'RegExpr' |
546
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|foldedge.|edge.|)label *:', 0, 0, 0, undef, 0, 'lquote', 'Value')) { |
547
|
0
|
|
|
|
|
|
return 1 |
548
|
|
|
|
|
|
|
} |
549
|
|
|
|
|
|
|
# String => '(foldnode.|node.|foldedge.|edge.|)fontname *:' |
550
|
|
|
|
|
|
|
# attribute => 'Value' |
551
|
|
|
|
|
|
|
# context => 'fontlq' |
552
|
|
|
|
|
|
|
# type => 'RegExpr' |
553
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|foldedge.|edge.|)fontname *:', 0, 0, 0, undef, 0, 'fontlq', 'Value')) { |
554
|
0
|
|
|
|
|
|
return 1 |
555
|
|
|
|
|
|
|
} |
556
|
|
|
|
|
|
|
# String => 'infoname(1|2|3) *:' |
557
|
|
|
|
|
|
|
# attribute => 'Value' |
558
|
|
|
|
|
|
|
# context => 'lquote' |
559
|
|
|
|
|
|
|
# type => 'RegExpr' |
560
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'infoname(1|2|3) *:', 0, 0, 0, undef, 0, 'lquote', 'Value')) { |
561
|
0
|
|
|
|
|
|
return 1 |
562
|
|
|
|
|
|
|
} |
563
|
|
|
|
|
|
|
# String => '(foldnode.|node.|)info(1|2|3) *:' |
564
|
|
|
|
|
|
|
# attribute => 'Value' |
565
|
|
|
|
|
|
|
# context => 'lquote' |
566
|
|
|
|
|
|
|
# type => 'RegExpr' |
567
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|)info(1|2|3) *:', 0, 0, 0, undef, 0, 'lquote', 'Value')) { |
568
|
0
|
|
|
|
|
|
return 1 |
569
|
|
|
|
|
|
|
} |
570
|
|
|
|
|
|
|
# String => 'spreadlevel *:' |
571
|
|
|
|
|
|
|
# attribute => 'Value' |
572
|
|
|
|
|
|
|
# context => 'intval' |
573
|
|
|
|
|
|
|
# type => 'RegExpr' |
574
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'spreadlevel *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
575
|
0
|
|
|
|
|
|
return 1 |
576
|
|
|
|
|
|
|
} |
577
|
|
|
|
|
|
|
# String => '(foldnode.|node.|)(level|vertical_?order) *:' |
578
|
|
|
|
|
|
|
# attribute => 'Value' |
579
|
|
|
|
|
|
|
# context => 'nodelevel' |
580
|
|
|
|
|
|
|
# type => 'RegExpr' |
581
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|)(level|vertical_?order) *:', 0, 0, 0, undef, 0, 'nodelevel', 'Value')) { |
582
|
0
|
|
|
|
|
|
return 1 |
583
|
|
|
|
|
|
|
} |
584
|
|
|
|
|
|
|
# String => '(foldnode.|node.|foldedge.|edge.|)horizontal_?order *:' |
585
|
|
|
|
|
|
|
# attribute => 'Value' |
586
|
|
|
|
|
|
|
# context => 'intval' |
587
|
|
|
|
|
|
|
# type => 'RegExpr' |
588
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|foldedge.|edge.|)horizontal_?order *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
589
|
0
|
|
|
|
|
|
return 1 |
590
|
|
|
|
|
|
|
} |
591
|
|
|
|
|
|
|
# String => 'stat(e|us) *:' |
592
|
|
|
|
|
|
|
# attribute => 'Value' |
593
|
|
|
|
|
|
|
# context => 'stateid' |
594
|
|
|
|
|
|
|
# type => 'RegExpr' |
595
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'stat(e|us) *:', 0, 0, 0, undef, 0, 'stateid', 'Value')) { |
596
|
0
|
|
|
|
|
|
return 1 |
597
|
|
|
|
|
|
|
} |
598
|
|
|
|
|
|
|
# String => 'layout_?algorithm *:' |
599
|
|
|
|
|
|
|
# attribute => 'Value' |
600
|
|
|
|
|
|
|
# context => 'algid' |
601
|
|
|
|
|
|
|
# type => 'RegExpr' |
602
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'layout_?algorithm *:', 0, 0, 0, undef, 0, 'algid', 'Value')) { |
603
|
0
|
|
|
|
|
|
return 1 |
604
|
|
|
|
|
|
|
} |
605
|
|
|
|
|
|
|
# String => 'crossing_?optimization *:' |
606
|
|
|
|
|
|
|
# attribute => 'Value' |
607
|
|
|
|
|
|
|
# context => 'boolean' |
608
|
|
|
|
|
|
|
# type => 'RegExpr' |
609
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'crossing_?optimization *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
610
|
0
|
|
|
|
|
|
return 1 |
611
|
|
|
|
|
|
|
} |
612
|
|
|
|
|
|
|
# String => 'crossing_?phase2 *:' |
613
|
|
|
|
|
|
|
# attribute => 'Value' |
614
|
|
|
|
|
|
|
# context => 'boolean' |
615
|
|
|
|
|
|
|
# type => 'RegExpr' |
616
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'crossing_?phase2 *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
617
|
0
|
|
|
|
|
|
return 1 |
618
|
|
|
|
|
|
|
} |
619
|
|
|
|
|
|
|
# String => '(dirty_edge_|display_edge_|displayedge|late_edge_|subgraph_?)labels *:' |
620
|
|
|
|
|
|
|
# attribute => 'Value' |
621
|
|
|
|
|
|
|
# context => 'boolean' |
622
|
|
|
|
|
|
|
# type => 'RegExpr' |
623
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(dirty_edge_|display_edge_|displayedge|late_edge_|subgraph_?)labels *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
624
|
0
|
|
|
|
|
|
return 1 |
625
|
|
|
|
|
|
|
} |
626
|
|
|
|
|
|
|
# String => 's?manhatt(a|e)n_?edges *:' |
627
|
|
|
|
|
|
|
# attribute => 'Value' |
628
|
|
|
|
|
|
|
# context => 'boolean' |
629
|
|
|
|
|
|
|
# type => 'RegExpr' |
630
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 's?manhatt(a|e)n_?edges *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
631
|
0
|
|
|
|
|
|
return 1 |
632
|
|
|
|
|
|
|
} |
633
|
|
|
|
|
|
|
# String => '(nodes|near_?edges|edges|splines) *:' |
634
|
|
|
|
|
|
|
# attribute => 'Value' |
635
|
|
|
|
|
|
|
# context => 'boolean' |
636
|
|
|
|
|
|
|
# type => 'RegExpr' |
637
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(nodes|near_?edges|edges|splines) *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
638
|
0
|
|
|
|
|
|
return 1 |
639
|
|
|
|
|
|
|
} |
640
|
|
|
|
|
|
|
# String => 'classname' |
641
|
|
|
|
|
|
|
# attribute => 'Value' |
642
|
|
|
|
|
|
|
# context => 'classname' |
643
|
|
|
|
|
|
|
# type => 'RegExpr' |
644
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'classname', 0, 0, 0, undef, 0, 'classname', 'Value')) { |
645
|
0
|
|
|
|
|
|
return 1 |
646
|
|
|
|
|
|
|
} |
647
|
|
|
|
|
|
|
# String => 'orientation *:' |
648
|
|
|
|
|
|
|
# attribute => 'Value' |
649
|
|
|
|
|
|
|
# context => 'orient' |
650
|
|
|
|
|
|
|
# type => 'RegExpr' |
651
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'orientation *:', 0, 0, 0, undef, 0, 'orient', 'Value')) { |
652
|
0
|
|
|
|
|
|
return 1 |
653
|
|
|
|
|
|
|
} |
654
|
|
|
|
|
|
|
# String => 'node_alignment *:' |
655
|
|
|
|
|
|
|
# attribute => 'Value' |
656
|
|
|
|
|
|
|
# context => 'nodealign' |
657
|
|
|
|
|
|
|
# type => 'RegExpr' |
658
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'node_alignment *:', 0, 0, 0, undef, 0, 'nodealign', 'Value')) { |
659
|
0
|
|
|
|
|
|
return 1 |
660
|
|
|
|
|
|
|
} |
661
|
|
|
|
|
|
|
# String => '(foldnode.|node.|)textmode *:' |
662
|
|
|
|
|
|
|
# attribute => 'Value' |
663
|
|
|
|
|
|
|
# context => 'textmode' |
664
|
|
|
|
|
|
|
# type => 'RegExpr' |
665
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|)textmode *:', 0, 0, 0, undef, 0, 'textmode', 'Value')) { |
666
|
0
|
|
|
|
|
|
return 1 |
667
|
|
|
|
|
|
|
} |
668
|
|
|
|
|
|
|
# String => 'equal_y_dist *:' |
669
|
|
|
|
|
|
|
# attribute => 'Value' |
670
|
|
|
|
|
|
|
# context => 'boolean' |
671
|
|
|
|
|
|
|
# type => 'RegExpr' |
672
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'equal_y_dist *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
673
|
0
|
|
|
|
|
|
return 1 |
674
|
|
|
|
|
|
|
} |
675
|
|
|
|
|
|
|
# String => 'equal_?ydist *:' |
676
|
|
|
|
|
|
|
# attribute => 'Value' |
677
|
|
|
|
|
|
|
# context => 'boolean' |
678
|
|
|
|
|
|
|
# type => 'RegExpr' |
679
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'equal_?ydist *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
680
|
0
|
|
|
|
|
|
return 1 |
681
|
|
|
|
|
|
|
} |
682
|
|
|
|
|
|
|
# String => 'crossing_?weight *:' |
683
|
|
|
|
|
|
|
# attribute => 'Value' |
684
|
|
|
|
|
|
|
# context => 'weight' |
685
|
|
|
|
|
|
|
# type => 'RegExpr' |
686
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'crossing_?weight *:', 0, 0, 0, undef, 0, 'weight', 'Value')) { |
687
|
0
|
|
|
|
|
|
return 1 |
688
|
|
|
|
|
|
|
} |
689
|
|
|
|
|
|
|
# String => '(fast_?|)icons *:' |
690
|
|
|
|
|
|
|
# attribute => 'Value' |
691
|
|
|
|
|
|
|
# context => 'boolean' |
692
|
|
|
|
|
|
|
# type => 'RegExpr' |
693
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(fast_?|)icons *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
694
|
0
|
|
|
|
|
|
return 1 |
695
|
|
|
|
|
|
|
} |
696
|
|
|
|
|
|
|
# String => 'fine_?tuning *:' |
697
|
|
|
|
|
|
|
# attribute => 'Value' |
698
|
|
|
|
|
|
|
# context => 'boolean' |
699
|
|
|
|
|
|
|
# type => 'RegExpr' |
700
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'fine_?tuning *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
701
|
0
|
|
|
|
|
|
return 1 |
702
|
|
|
|
|
|
|
} |
703
|
|
|
|
|
|
|
# String => '(f?straight_?|priority_)phase *:' |
704
|
|
|
|
|
|
|
# attribute => 'Value' |
705
|
|
|
|
|
|
|
# context => 'boolean' |
706
|
|
|
|
|
|
|
# type => 'RegExpr' |
707
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(f?straight_?|priority_)phase *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
708
|
0
|
|
|
|
|
|
return 1 |
709
|
|
|
|
|
|
|
} |
710
|
|
|
|
|
|
|
# String => 'ignore_?singles *:' |
711
|
|
|
|
|
|
|
# attribute => 'Value' |
712
|
|
|
|
|
|
|
# context => 'boolean' |
713
|
|
|
|
|
|
|
# type => 'RegExpr' |
714
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'ignore_?singles *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
715
|
0
|
|
|
|
|
|
return 1 |
716
|
|
|
|
|
|
|
} |
717
|
|
|
|
|
|
|
# String => '(in|out|)port_?sharing *:' |
718
|
|
|
|
|
|
|
# attribute => 'Value' |
719
|
|
|
|
|
|
|
# context => 'boolean' |
720
|
|
|
|
|
|
|
# type => 'RegExpr' |
721
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(in|out|)port_?sharing *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
722
|
0
|
|
|
|
|
|
return 1 |
723
|
|
|
|
|
|
|
} |
724
|
|
|
|
|
|
|
# String => 'linear_?segments *:' |
725
|
|
|
|
|
|
|
# attribute => 'Value' |
726
|
|
|
|
|
|
|
# context => 'boolean' |
727
|
|
|
|
|
|
|
# type => 'RegExpr' |
728
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'linear_?segments *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
729
|
0
|
|
|
|
|
|
return 1 |
730
|
|
|
|
|
|
|
} |
731
|
|
|
|
|
|
|
# String => '(foldnode.|node.|)(height|width|borderwidth|stretch|shrink) *:' |
732
|
|
|
|
|
|
|
# attribute => 'Value' |
733
|
|
|
|
|
|
|
# context => 'intval' |
734
|
|
|
|
|
|
|
# type => 'RegExpr' |
735
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldnode.|node.|)(height|width|borderwidth|stretch|shrink) *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
736
|
0
|
|
|
|
|
|
return 1 |
737
|
|
|
|
|
|
|
} |
738
|
|
|
|
|
|
|
# String => '(foldedge.|edge.|)(arrowsize|backarrowsize|thickness|class|priority) *:' |
739
|
|
|
|
|
|
|
# attribute => 'Value' |
740
|
|
|
|
|
|
|
# context => 'intval' |
741
|
|
|
|
|
|
|
# type => 'RegExpr' |
742
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(foldedge.|edge.|)(arrowsize|backarrowsize|thickness|class|priority) *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
743
|
0
|
|
|
|
|
|
return 1 |
744
|
|
|
|
|
|
|
} |
745
|
|
|
|
|
|
|
# String => 'anchor *:' |
746
|
|
|
|
|
|
|
# attribute => 'Value' |
747
|
|
|
|
|
|
|
# context => 'intval' |
748
|
|
|
|
|
|
|
# type => 'RegExpr' |
749
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'anchor *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
750
|
0
|
|
|
|
|
|
return 1 |
751
|
|
|
|
|
|
|
} |
752
|
|
|
|
|
|
|
# String => 'iconcolors *:' |
753
|
|
|
|
|
|
|
# attribute => 'Value' |
754
|
|
|
|
|
|
|
# context => 'intval' |
755
|
|
|
|
|
|
|
# type => 'RegExpr' |
756
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'iconcolors *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
757
|
0
|
|
|
|
|
|
return 1 |
758
|
|
|
|
|
|
|
} |
759
|
|
|
|
|
|
|
# String => 'hidden *:' |
760
|
|
|
|
|
|
|
# attribute => 'Value' |
761
|
|
|
|
|
|
|
# context => 'intval' |
762
|
|
|
|
|
|
|
# type => 'RegExpr' |
763
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'hidden *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
764
|
0
|
|
|
|
|
|
return 1 |
765
|
|
|
|
|
|
|
} |
766
|
|
|
|
|
|
|
# String => 'energetic *:' |
767
|
|
|
|
|
|
|
# attribute => 'Value' |
768
|
|
|
|
|
|
|
# context => 'boolean' |
769
|
|
|
|
|
|
|
# type => 'RegExpr' |
770
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'energetic *:', 0, 0, 0, undef, 0, 'boolean', 'Value')) { |
771
|
0
|
|
|
|
|
|
return 1 |
772
|
|
|
|
|
|
|
} |
773
|
|
|
|
|
|
|
# String => 'layout_(up|down|near|spline)factor *:' |
774
|
|
|
|
|
|
|
# attribute => 'Value' |
775
|
|
|
|
|
|
|
# context => 'intval' |
776
|
|
|
|
|
|
|
# type => 'RegExpr' |
777
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'layout_(up|down|near|spline)factor *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
778
|
0
|
|
|
|
|
|
return 1 |
779
|
|
|
|
|
|
|
} |
780
|
|
|
|
|
|
|
# String => 'border +(x|y) *:' |
781
|
|
|
|
|
|
|
# attribute => 'Value' |
782
|
|
|
|
|
|
|
# context => 'intval' |
783
|
|
|
|
|
|
|
# type => 'RegExpr' |
784
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'border +(x|y) *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
785
|
0
|
|
|
|
|
|
return 1 |
786
|
|
|
|
|
|
|
} |
787
|
|
|
|
|
|
|
# String => 'splinefactor *:' |
788
|
|
|
|
|
|
|
# attribute => 'Value' |
789
|
|
|
|
|
|
|
# context => 'intval' |
790
|
|
|
|
|
|
|
# type => 'RegExpr' |
791
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'splinefactor *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
792
|
0
|
|
|
|
|
|
return 1 |
793
|
|
|
|
|
|
|
} |
794
|
|
|
|
|
|
|
# String => '(gravity|tempfactor|treefactor) *:' |
795
|
|
|
|
|
|
|
# attribute => 'Value' |
796
|
|
|
|
|
|
|
# context => 'floatval' |
797
|
|
|
|
|
|
|
# type => 'RegExpr' |
798
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(gravity|tempfactor|treefactor) *:', 0, 0, 0, undef, 0, 'floatval', 'Value')) { |
799
|
0
|
|
|
|
|
|
return 1 |
800
|
|
|
|
|
|
|
} |
801
|
|
|
|
|
|
|
# String => '(xspace|xbase|xmax|xraster|x) *:' |
802
|
|
|
|
|
|
|
# attribute => 'Value' |
803
|
|
|
|
|
|
|
# context => 'intval' |
804
|
|
|
|
|
|
|
# type => 'RegExpr' |
805
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(xspace|xbase|xmax|xraster|x) *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
806
|
0
|
|
|
|
|
|
return 1 |
807
|
|
|
|
|
|
|
} |
808
|
|
|
|
|
|
|
# String => '(yspace|ybase|ymax|yraster|y) *:' |
809
|
|
|
|
|
|
|
# attribute => 'Value' |
810
|
|
|
|
|
|
|
# context => 'intval' |
811
|
|
|
|
|
|
|
# type => 'RegExpr' |
812
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(yspace|ybase|ymax|yraster|y) *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
813
|
0
|
|
|
|
|
|
return 1 |
814
|
|
|
|
|
|
|
} |
815
|
|
|
|
|
|
|
# String => '(xlraster|xlspace) *:' |
816
|
|
|
|
|
|
|
# attribute => 'Value' |
817
|
|
|
|
|
|
|
# context => 'intval' |
818
|
|
|
|
|
|
|
# type => 'RegExpr' |
819
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(xlraster|xlspace) *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
820
|
0
|
|
|
|
|
|
return 1 |
821
|
|
|
|
|
|
|
} |
822
|
|
|
|
|
|
|
# String => 'magnetic_force(1|2) *:' |
823
|
|
|
|
|
|
|
# attribute => 'Value' |
824
|
|
|
|
|
|
|
# context => 'intval' |
825
|
|
|
|
|
|
|
# type => 'RegExpr' |
826
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'magnetic_force(1|2) *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
827
|
0
|
|
|
|
|
|
return 1 |
828
|
|
|
|
|
|
|
} |
829
|
|
|
|
|
|
|
# String => 'magnetic_field(1|2) *:' |
830
|
|
|
|
|
|
|
# attribute => 'Value' |
831
|
|
|
|
|
|
|
# context => 'magnor' |
832
|
|
|
|
|
|
|
# type => 'RegExpr' |
833
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'magnetic_field(1|2) *:', 0, 0, 0, undef, 0, 'magnor', 'Value')) { |
834
|
0
|
|
|
|
|
|
return 1 |
835
|
|
|
|
|
|
|
} |
836
|
|
|
|
|
|
|
# String => '(a|b|c|fd|p|r|s)(max) *:' |
837
|
|
|
|
|
|
|
# attribute => 'Value' |
838
|
|
|
|
|
|
|
# context => 'intval' |
839
|
|
|
|
|
|
|
# type => 'RegExpr' |
840
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(a|b|c|fd|p|r|s)(max) *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
841
|
0
|
|
|
|
|
|
return 1 |
842
|
|
|
|
|
|
|
} |
843
|
|
|
|
|
|
|
# String => '(c|p|r)(min) *:' |
844
|
|
|
|
|
|
|
# attribute => 'Value' |
845
|
|
|
|
|
|
|
# context => 'intval' |
846
|
|
|
|
|
|
|
# type => 'RegExpr' |
847
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(c|p|r)(min) *:', 0, 0, 0, undef, 0, 'intval', 'Value')) { |
848
|
0
|
|
|
|
|
|
return 1 |
849
|
|
|
|
|
|
|
} |
850
|
|
|
|
|
|
|
# String => 'forcedir' |
851
|
|
|
|
|
|
|
# attribute => 'Value' |
852
|
|
|
|
|
|
|
# context => 'intval' |
853
|
|
|
|
|
|
|
# type => 'keyword' |
854
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'forcedir', 0, undef, 0, 'intval', 'Value')) { |
855
|
0
|
|
|
|
|
|
return 1 |
856
|
|
|
|
|
|
|
} |
857
|
|
|
|
|
|
|
# String => 'scaling *:' |
858
|
|
|
|
|
|
|
# attribute => 'Value' |
859
|
|
|
|
|
|
|
# context => 'scaling' |
860
|
|
|
|
|
|
|
# type => 'RegExpr' |
861
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'scaling *:', 0, 0, 0, undef, 0, 'scaling', 'Value')) { |
862
|
0
|
|
|
|
|
|
return 1 |
863
|
|
|
|
|
|
|
} |
864
|
|
|
|
|
|
|
# String => 'useraction(name|cmd)(1|2|3|4) *:' |
865
|
|
|
|
|
|
|
# attribute => 'Value' |
866
|
|
|
|
|
|
|
# context => 'lquote' |
867
|
|
|
|
|
|
|
# type => 'RegExpr' |
868
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'useraction(name|cmd)(1|2|3|4) *:', 0, 0, 0, undef, 0, 'lquote', 'Value')) { |
869
|
0
|
|
|
|
|
|
return 1 |
870
|
|
|
|
|
|
|
} |
871
|
0
|
|
|
|
|
|
return 0; |
872
|
|
|
|
|
|
|
}; |
873
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
sub parsefishid { |
875
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
876
|
|
|
|
|
|
|
# String => 'fisheye' |
877
|
|
|
|
|
|
|
# attribute => 'Datatype' |
878
|
|
|
|
|
|
|
# context => 'default' |
879
|
|
|
|
|
|
|
# type => 'keyword' |
880
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'fisheye', 0, undef, 0, 'default', 'Datatype')) { |
881
|
0
|
|
|
|
|
|
return 1 |
882
|
|
|
|
|
|
|
} |
883
|
0
|
|
|
|
|
|
return 0; |
884
|
|
|
|
|
|
|
}; |
885
|
|
|
|
|
|
|
|
886
|
|
|
|
|
|
|
sub parsefloatval { |
887
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
888
|
|
|
|
|
|
|
# attribute => 'Float' |
889
|
|
|
|
|
|
|
# context => 'default' |
890
|
|
|
|
|
|
|
# type => 'Float' |
891
|
0
|
0
|
|
|
|
|
if ($self->testFloat($text, 0, undef, 0, 'default', 'Float')) { |
892
|
0
|
|
|
|
|
|
return 1 |
893
|
|
|
|
|
|
|
} |
894
|
0
|
|
|
|
|
|
return 0; |
895
|
|
|
|
|
|
|
}; |
896
|
|
|
|
|
|
|
|
897
|
|
|
|
|
|
|
sub parsefontbase { |
898
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
899
|
|
|
|
|
|
|
# String => '((tim|ncen)(R|B|I|BI)|(cour|helv)(R|B|O|BO)|symb)' |
900
|
|
|
|
|
|
|
# attribute => 'Datatype' |
901
|
|
|
|
|
|
|
# context => 'fontsize' |
902
|
|
|
|
|
|
|
# type => 'RegExpr' |
903
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '((tim|ncen)(R|B|I|BI)|(cour|helv)(R|B|O|BO)|symb)', 0, 0, 0, undef, 0, 'fontsize', 'Datatype')) { |
904
|
0
|
|
|
|
|
|
return 1 |
905
|
|
|
|
|
|
|
} |
906
|
0
|
|
|
|
|
|
return 0; |
907
|
|
|
|
|
|
|
}; |
908
|
|
|
|
|
|
|
|
909
|
|
|
|
|
|
|
sub parsefontlq { |
910
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
911
|
|
|
|
|
|
|
# attribute => 'Datatype' |
912
|
|
|
|
|
|
|
# char => '"' |
913
|
|
|
|
|
|
|
# context => 'fontbase' |
914
|
|
|
|
|
|
|
# type => 'DetectChar' |
915
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'fontbase', 'Datatype')) { |
916
|
0
|
|
|
|
|
|
return 1 |
917
|
|
|
|
|
|
|
} |
918
|
0
|
|
|
|
|
|
return 0; |
919
|
|
|
|
|
|
|
}; |
920
|
|
|
|
|
|
|
|
921
|
|
|
|
|
|
|
sub parsefontsize { |
922
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
923
|
|
|
|
|
|
|
# String => '(08|10|12|14|18|24)(.vcf|)' |
924
|
|
|
|
|
|
|
# attribute => 'Datatype' |
925
|
|
|
|
|
|
|
# context => '#stay' |
926
|
|
|
|
|
|
|
# type => 'RegExpr' |
927
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(08|10|12|14|18|24)(.vcf|)', 0, 0, 0, undef, 0, '#stay', 'Datatype')) { |
928
|
0
|
|
|
|
|
|
return 1 |
929
|
|
|
|
|
|
|
} |
930
|
|
|
|
|
|
|
# attribute => 'Datatype' |
931
|
|
|
|
|
|
|
# char => '"' |
932
|
|
|
|
|
|
|
# context => 'default' |
933
|
|
|
|
|
|
|
# type => 'DetectChar' |
934
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
935
|
0
|
|
|
|
|
|
return 1 |
936
|
|
|
|
|
|
|
} |
937
|
0
|
|
|
|
|
|
return 0; |
938
|
|
|
|
|
|
|
}; |
939
|
|
|
|
|
|
|
|
940
|
|
|
|
|
|
|
sub parseintval { |
941
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
942
|
|
|
|
|
|
|
# attribute => 'Integer' |
943
|
|
|
|
|
|
|
# context => 'longint' |
944
|
|
|
|
|
|
|
# type => 'Int' |
945
|
0
|
0
|
|
|
|
|
if ($self->testInt($text, 0, undef, 0, 'longint', 'Integer')) { |
946
|
0
|
|
|
|
|
|
return 1 |
947
|
|
|
|
|
|
|
} |
948
|
0
|
|
|
|
|
|
return 0; |
949
|
|
|
|
|
|
|
}; |
950
|
|
|
|
|
|
|
|
951
|
|
|
|
|
|
|
sub parselineid { |
952
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
953
|
|
|
|
|
|
|
# String => 'lines' |
954
|
|
|
|
|
|
|
# attribute => 'Datatype' |
955
|
|
|
|
|
|
|
# context => 'default' |
956
|
|
|
|
|
|
|
# type => 'keyword' |
957
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'lines', 0, undef, 0, 'default', 'Datatype')) { |
958
|
0
|
|
|
|
|
|
return 1 |
959
|
|
|
|
|
|
|
} |
960
|
0
|
|
|
|
|
|
return 0; |
961
|
|
|
|
|
|
|
}; |
962
|
|
|
|
|
|
|
|
963
|
|
|
|
|
|
|
sub parselongint { |
964
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
965
|
|
|
|
|
|
|
# attribute => 'Integer' |
966
|
|
|
|
|
|
|
# context => 'longint' |
967
|
|
|
|
|
|
|
# type => 'Int' |
968
|
0
|
0
|
|
|
|
|
if ($self->testInt($text, 0, undef, 0, 'longint', 'Integer')) { |
969
|
0
|
|
|
|
|
|
return 1 |
970
|
|
|
|
|
|
|
} |
971
|
|
|
|
|
|
|
# String => '\ ' |
972
|
|
|
|
|
|
|
# attribute => 'Normal' |
973
|
|
|
|
|
|
|
# context => 'default' |
974
|
|
|
|
|
|
|
# type => 'RegExpr' |
975
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\ ', 0, 0, 0, undef, 0, 'default', 'Normal')) { |
976
|
0
|
|
|
|
|
|
return 1 |
977
|
|
|
|
|
|
|
} |
978
|
0
|
|
|
|
|
|
return 0; |
979
|
|
|
|
|
|
|
}; |
980
|
|
|
|
|
|
|
|
981
|
|
|
|
|
|
|
sub parselquote { |
982
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
983
|
|
|
|
|
|
|
# attribute => 'String' |
984
|
|
|
|
|
|
|
# char => '"' |
985
|
|
|
|
|
|
|
# context => 'string' |
986
|
|
|
|
|
|
|
# type => 'DetectChar' |
987
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'String')) { |
988
|
0
|
|
|
|
|
|
return 1 |
989
|
|
|
|
|
|
|
} |
990
|
0
|
|
|
|
|
|
return 0; |
991
|
|
|
|
|
|
|
}; |
992
|
|
|
|
|
|
|
|
993
|
|
|
|
|
|
|
sub parsemagnor { |
994
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
995
|
|
|
|
|
|
|
# String => 'magnetic' |
996
|
|
|
|
|
|
|
# attribute => 'Datatype' |
997
|
|
|
|
|
|
|
# context => 'default' |
998
|
|
|
|
|
|
|
# type => 'keyword' |
999
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'magnetic', 0, undef, 0, 'default', 'Datatype')) { |
1000
|
0
|
|
|
|
|
|
return 1 |
1001
|
|
|
|
|
|
|
} |
1002
|
|
|
|
|
|
|
# String => 'orientation' |
1003
|
|
|
|
|
|
|
# attribute => 'Datatype' |
1004
|
|
|
|
|
|
|
# context => 'default' |
1005
|
|
|
|
|
|
|
# type => 'keyword' |
1006
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'orientation', 0, undef, 0, 'default', 'Datatype')) { |
1007
|
0
|
|
|
|
|
|
return 1 |
1008
|
|
|
|
|
|
|
} |
1009
|
0
|
|
|
|
|
|
return 0; |
1010
|
|
|
|
|
|
|
}; |
1011
|
|
|
|
|
|
|
|
1012
|
|
|
|
|
|
|
sub parsenodealign { |
1013
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1014
|
|
|
|
|
|
|
# String => '(top|center|bottom)' |
1015
|
|
|
|
|
|
|
# attribute => 'Datatype' |
1016
|
|
|
|
|
|
|
# context => 'default' |
1017
|
|
|
|
|
|
|
# type => 'RegExpr' |
1018
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(top|center|bottom)', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
1019
|
0
|
|
|
|
|
|
return 1 |
1020
|
|
|
|
|
|
|
} |
1021
|
0
|
|
|
|
|
|
return 0; |
1022
|
|
|
|
|
|
|
}; |
1023
|
|
|
|
|
|
|
|
1024
|
|
|
|
|
|
|
sub parsenodelevel { |
1025
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1026
|
|
|
|
|
|
|
# String => 'maxlevel' |
1027
|
|
|
|
|
|
|
# attribute => 'Datatype' |
1028
|
|
|
|
|
|
|
# context => 'default' |
1029
|
|
|
|
|
|
|
# type => 'StringDetect' |
1030
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'maxlevel', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
1031
|
0
|
|
|
|
|
|
return 1 |
1032
|
|
|
|
|
|
|
} |
1033
|
|
|
|
|
|
|
# attribute => 'Integer' |
1034
|
|
|
|
|
|
|
# context => 'longint' |
1035
|
|
|
|
|
|
|
# type => 'Int' |
1036
|
0
|
0
|
|
|
|
|
if ($self->testInt($text, 0, undef, 0, 'longint', 'Integer')) { |
1037
|
0
|
|
|
|
|
|
return 1 |
1038
|
|
|
|
|
|
|
} |
1039
|
0
|
|
|
|
|
|
return 0; |
1040
|
|
|
|
|
|
|
}; |
1041
|
|
|
|
|
|
|
|
1042
|
|
|
|
|
|
|
sub parseorient { |
1043
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1044
|
|
|
|
|
|
|
# String => 'orientation' |
1045
|
|
|
|
|
|
|
# attribute => 'Datatype' |
1046
|
|
|
|
|
|
|
# context => 'default' |
1047
|
|
|
|
|
|
|
# type => 'keyword' |
1048
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'orientation', 0, undef, 0, 'default', 'Datatype')) { |
1049
|
0
|
|
|
|
|
|
return 1 |
1050
|
|
|
|
|
|
|
} |
1051
|
0
|
|
|
|
|
|
return 0; |
1052
|
|
|
|
|
|
|
}; |
1053
|
|
|
|
|
|
|
|
1054
|
|
|
|
|
|
|
sub parsergb { |
1055
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1056
|
|
|
|
|
|
|
# String => '[0-9][0-9]?[0-9]? +[0-9][0-9]?[0-9]? +[0-9][0-9]?[0-9]?' |
1057
|
|
|
|
|
|
|
# attribute => 'Integer' |
1058
|
|
|
|
|
|
|
# context => 'default' |
1059
|
|
|
|
|
|
|
# type => 'RegExpr' |
1060
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[0-9][0-9]?[0-9]? +[0-9][0-9]?[0-9]? +[0-9][0-9]?[0-9]?', 0, 0, 0, undef, 0, 'default', 'Integer')) { |
1061
|
0
|
|
|
|
|
|
return 1 |
1062
|
|
|
|
|
|
|
} |
1063
|
0
|
|
|
|
|
|
return 0; |
1064
|
|
|
|
|
|
|
}; |
1065
|
|
|
|
|
|
|
|
1066
|
|
|
|
|
|
|
sub parsescaling { |
1067
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1068
|
|
|
|
|
|
|
# String => 'maxspect' |
1069
|
|
|
|
|
|
|
# attribute => 'Datatype' |
1070
|
|
|
|
|
|
|
# context => 'default' |
1071
|
|
|
|
|
|
|
# type => 'StringDetect' |
1072
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'maxspect', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
1073
|
0
|
|
|
|
|
|
return 1 |
1074
|
|
|
|
|
|
|
} |
1075
|
|
|
|
|
|
|
# attribute => 'Float' |
1076
|
|
|
|
|
|
|
# context => 'default' |
1077
|
|
|
|
|
|
|
# type => 'Float' |
1078
|
0
|
0
|
|
|
|
|
if ($self->testFloat($text, 0, undef, 0, 'default', 'Float')) { |
1079
|
0
|
|
|
|
|
|
return 1 |
1080
|
|
|
|
|
|
|
} |
1081
|
0
|
|
|
|
|
|
return 0; |
1082
|
|
|
|
|
|
|
}; |
1083
|
|
|
|
|
|
|
|
1084
|
|
|
|
|
|
|
sub parseshapeid { |
1085
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1086
|
|
|
|
|
|
|
# String => 'shapes' |
1087
|
|
|
|
|
|
|
# attribute => 'Datatype' |
1088
|
|
|
|
|
|
|
# context => 'default' |
1089
|
|
|
|
|
|
|
# type => 'keyword' |
1090
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'shapes', 0, undef, 0, 'default', 'Datatype')) { |
1091
|
0
|
|
|
|
|
|
return 1 |
1092
|
|
|
|
|
|
|
} |
1093
|
0
|
|
|
|
|
|
return 0; |
1094
|
|
|
|
|
|
|
}; |
1095
|
|
|
|
|
|
|
|
1096
|
|
|
|
|
|
|
sub parsestateid { |
1097
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1098
|
|
|
|
|
|
|
# String => 'states' |
1099
|
|
|
|
|
|
|
# attribute => 'Datatype' |
1100
|
|
|
|
|
|
|
# context => 'default' |
1101
|
|
|
|
|
|
|
# type => 'keyword' |
1102
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'states', 0, undef, 0, 'default', 'Datatype')) { |
1103
|
0
|
|
|
|
|
|
return 1 |
1104
|
|
|
|
|
|
|
} |
1105
|
0
|
|
|
|
|
|
return 0; |
1106
|
|
|
|
|
|
|
}; |
1107
|
|
|
|
|
|
|
|
1108
|
|
|
|
|
|
|
sub parsestring { |
1109
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1110
|
|
|
|
|
|
|
# attribute => 'String' |
1111
|
|
|
|
|
|
|
# char => '"' |
1112
|
|
|
|
|
|
|
# context => 'default' |
1113
|
|
|
|
|
|
|
# type => 'DetectChar' |
1114
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'default', 'String')) { |
1115
|
0
|
|
|
|
|
|
return 1 |
1116
|
|
|
|
|
|
|
} |
1117
|
|
|
|
|
|
|
# attribute => 'Char' |
1118
|
|
|
|
|
|
|
# char => '\' |
1119
|
|
|
|
|
|
|
# char1 => '"' |
1120
|
|
|
|
|
|
|
# context => '#stay' |
1121
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
1122
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '\\', '"', 0, 0, 0, undef, 0, '#stay', 'Char')) { |
1123
|
0
|
|
|
|
|
|
return 1 |
1124
|
|
|
|
|
|
|
} |
1125
|
|
|
|
|
|
|
# String => '\\(n|a|t|b)' |
1126
|
|
|
|
|
|
|
# attribute => 'Char' |
1127
|
|
|
|
|
|
|
# context => '#stay' |
1128
|
|
|
|
|
|
|
# type => 'RegExpr' |
1129
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\\\(n|a|t|b)', 0, 0, 0, undef, 0, '#stay', 'Char')) { |
1130
|
0
|
|
|
|
|
|
return 1 |
1131
|
|
|
|
|
|
|
} |
1132
|
|
|
|
|
|
|
# String => '\\fi(0|1|2)[0-9][0-9]' |
1133
|
|
|
|
|
|
|
# attribute => 'Char' |
1134
|
|
|
|
|
|
|
# context => '#stay' |
1135
|
|
|
|
|
|
|
# type => 'RegExpr' |
1136
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\\\fi(0|1|2)[0-9][0-9]', 0, 0, 0, undef, 0, '#stay', 'Char')) { |
1137
|
0
|
|
|
|
|
|
return 1 |
1138
|
|
|
|
|
|
|
} |
1139
|
|
|
|
|
|
|
# String => '\\f(u|I|b|B|n|[0-9][0-9])' |
1140
|
|
|
|
|
|
|
# attribute => 'Char' |
1141
|
|
|
|
|
|
|
# context => '#stay' |
1142
|
|
|
|
|
|
|
# type => 'RegExpr' |
1143
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\\\f(u|I|b|B|n|[0-9][0-9])', 0, 0, 0, undef, 0, '#stay', 'Char')) { |
1144
|
0
|
|
|
|
|
|
return 1 |
1145
|
|
|
|
|
|
|
} |
1146
|
0
|
|
|
|
|
|
return 0; |
1147
|
|
|
|
|
|
|
}; |
1148
|
|
|
|
|
|
|
|
1149
|
|
|
|
|
|
|
sub parsetextmode { |
1150
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1151
|
|
|
|
|
|
|
# String => '(center|left_justify|right_justify)' |
1152
|
|
|
|
|
|
|
# attribute => 'Datatype' |
1153
|
|
|
|
|
|
|
# context => 'default' |
1154
|
|
|
|
|
|
|
# type => 'RegExpr' |
1155
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(center|left_justify|right_justify)', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
1156
|
0
|
|
|
|
|
|
return 1 |
1157
|
|
|
|
|
|
|
} |
1158
|
0
|
|
|
|
|
|
return 0; |
1159
|
|
|
|
|
|
|
}; |
1160
|
|
|
|
|
|
|
|
1161
|
|
|
|
|
|
|
sub parseweight { |
1162
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1163
|
|
|
|
|
|
|
# String => '(medianbary|barymedian|bary|median)' |
1164
|
|
|
|
|
|
|
# attribute => 'Datatype' |
1165
|
|
|
|
|
|
|
# context => 'default' |
1166
|
|
|
|
|
|
|
# type => 'RegExpr' |
1167
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(medianbary|barymedian|bary|median)', 0, 0, 0, undef, 0, 'default', 'Datatype')) { |
1168
|
0
|
|
|
|
|
|
return 1 |
1169
|
|
|
|
|
|
|
} |
1170
|
0
|
|
|
|
|
|
return 0; |
1171
|
|
|
|
|
|
|
}; |
1172
|
|
|
|
|
|
|
|
1173
|
|
|
|
|
|
|
|
1174
|
|
|
|
|
|
|
1; |
1175
|
|
|
|
|
|
|
|
1176
|
|
|
|
|
|
|
__END__ |