RuntimeCfgLexer.g4 39.1 KB
Newer Older
1
2
3
4
5
6
7
8
lexer grammar RuntimeCfgLexer;

@header {
}

@members{
}

9
// Common fragments
10

11
12
fragment FR_WS:		[ \t\r\n\f]+;
fragment FR_LINE_COMMENT:
13
14
	'//' ~[\r\n]*
|	'#' ~[\r\n]*
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
;
fragment FR_BLOCK_COMMENT:	'/*' .*? '*/';
fragment FR_DIGIT:		[0-9];
fragment FR_INT:		'0'|[1-9][0-9]*;
// float fractional part
fragment FR_FRAC:		'.' FR_DIGIT+;
// float exponent part
fragment FR_EXP:		[Ee] [+-]? FR_INT;
fragment FR_FLOAT:
(	FR_INT FR_FRAC
|	FR_INT FR_FRAC? FR_EXP
|	       FR_FRAC  FR_EXP
);
fragment FR_HOSTNAME:
	('A'..'Z' | 'a'..'z' | '0'..'9' | ':')
	(	'A'..'Z' | 'a'..'z' | '0'..'9' | ':' | '%' | '.'
	|	('_' | '-') ('A'..'Z' | 'a'..'z' | '0'..'9')
	)*
;
fragment FR_LETTER:	[A-Za-z];
fragment FR_TTCN3IDENTIFIER:	FR_LETTER (FR_LETTER | FR_DIGIT+ | '_')*;
fragment FR_BINDIGIT:	[01];
fragment FR_HEXDIGIT:	[0-9A-Fa-f];
fragment FR_OCTDIGIT:	FR_HEXDIGIT FR_HEXDIGIT;
fragment FR_BINDIGITMATCH:	( FR_BINDIGIT | '?' | '*' );
fragment FR_HEXDIGITMATCH:	( FR_HEXDIGIT | '?' | '*' );
fragment FR_OCTDIGITMATCH:	( FR_OCTDIGIT | '?' | '*' );
fragment FR_STRING:
'"'
(	'\\' .
|	'""'
|	~( '\\' | '"' )
)*
'"'
;
fragment FR_MACRO:
	'$' FR_TTCN3IDENTIFIER
|	'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? '}'
;
54
55
56
57
58
59
60
61
62
63
fragment FR_MACRO_ID:			'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'identifier' FR_WS? '}';
fragment FR_MACRO_INT:			'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'integer' FR_WS? '}';
fragment FR_MACRO_BOOL:			'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'boolean' FR_WS? '}';
fragment FR_MACRO_FLOAT:		'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'float' FR_WS? '}';
fragment FR_MACRO_EXP_CSTR:		'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'charstring' FR_WS? '}';
fragment FR_MACRO_HOSTNAME: 	'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'hostname' FR_WS? '}';
fragment FR_MACRO_BSTR:			'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'bitstring' FR_WS? '}';
fragment FR_MACRO_HSTR:			'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'hexstring' FR_WS? '}';
fragment FR_MACRO_OSTR:			'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'octetstring' FR_WS? '}';
fragment FR_MACRO_BINARY:		'$' '{' FR_WS? FR_TTCN3IDENTIFIER FR_WS? ',' FR_WS? 'binaryoctet' FR_WS? '}';
64
65
66
67
68
69
70
71
72
73
74
fragment FR_IPV6:
	( 'A'..'F' | 'a'..'f' | '0'..'9' )*
	':'
	( 'A'..'F' | 'a'..'f' | '0'..'9' | ':' )+
	(
		( '0'..'9' )
		( '0'..'9' | '.' )*
	)?
	( '%' ( 'A'..'Z' | 'a'..'z' | '0'..'9' )+ )?
	( '/' ( '0'..'9' )+ )?
;
75
76
77

// DEFAULT MODE
// These lexer rules are used only before the first section
78

79
80
81
WS:	FR_WS -> channel(HIDDEN);
LINE_COMMENT: FR_LINE_COMMENT -> channel(HIDDEN);
BLOCK_COMMENT:	FR_BLOCK_COMMENT -> channel(HIDDEN);
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134

MAIN_CONTROLLER_SECTION:	'[MAIN_CONTROLLER]'
	-> mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION:			'[INCLUDE]'
	-> mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION:	'[ORDERED_INCLUDE]'
	-> mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION:			'[EXECUTE]'
	-> mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION:				'[DEFINE]'
	-> mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION:	'[EXTERNAL_COMMANDS]'
	-> mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION:'[TESTPORT_PARAMETERS]'
	-> mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION:				'[GROUPS]'
	-> mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION:	'[MODULE_PARAMETERS]'
	-> mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION:			'[COMPONENTS]'
	-> mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION:			'[LOGGING]'
	-> mode(LOGGING_SECTION_MODE);
PROFILER_SECTION:			'[PROFILER]'
	-> mode(PROFILER_SECTION_MODE);

//main controller
mode MAIN_CONTROLLER_SECTION_MODE;
MAIN_CONTROLLER1:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION1:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION1:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION1:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION1:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION1:		'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION1:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION1: 				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION1:		'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION1:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION1:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION1:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

135
136
137
WS1:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT1:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT1:	FR_BLOCK_COMMENT -> type(BLOCK_COMMENT), channel(HIDDEN);
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
SEMICOLON:		';';
PLUS:			'+';
MINUS:			'-';
STAR:			'*';
SLASH:			'/';
LPAREN:			'(';
RPAREN:			')';

KILLTIMER:			( 'killtimer' | 'Killtimer' | 'killTimer' | 'KillTimer' );
LOCALADDRESS:		( 'localaddress' | 'Localaddress' | 'localAddress' | 'LocalAddress');
NUMHCS:				( 'numhcs' | 'Numhcs' | 'numHCs' | 'NumHCs' );
TCPPORT:			( 'tcpport' | 'TCPport' | 'tcpPort' | 'TCPPort' );
UNIXSOCKETS:		( 'UnixSocketsEnabled' | 'UnixSocketsenabled' | 'UnixsocketsEnabled' | 'Unixsocketsenabled' | 'unixSocketsEnabled' | 'unixSocketsenabled' | 'unixsocketsEnabled' | 'unixsocketsenabled' );
ASSIGNMENTCHAR:		':'? '=';
YES: 				( 'yes' | 'Yes' | 'YES' );
NO: 				( 'no' | 'No' | 'NO' );
NATURAL_NUMBER:		FR_INT;
STRINGOP:			'&'	'='?;
FLOAT:				FR_FLOAT;

DNSNAME:
159
160
(	FR_HOSTNAME
	('/' FR_DIGIT+)?
161
162
163
164
165
166
167
168
);
TTCN3IDENTIFIER:	FR_TTCN3IDENTIFIER;
STRING:				FR_STRING;
MACRO:				FR_MACRO;
MACRO_HOSTNAME: 	FR_MACRO_HOSTNAME;
MACRO_INT:			FR_MACRO_INT;
MACRO_EXP_CSTR:		FR_MACRO_EXP_CSTR;
MACRO_FLOAT:		FR_MACRO_FLOAT;
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

//include section
mode INCLUDE_SECTION_MODE;
MAIN_CONTROLLER2:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION2:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION2:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION2:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION2:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION2:		'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION2:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION2:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION2:		'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION2:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION2:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION2:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

197
198
199
WS2:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT2:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT2:	FR_BLOCK_COMMENT -> type(BLOCK_COMMENT), channel(HIDDEN);
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230

//same as STRING, but it is handled differently
INCLUDE_FILENAME:		'"' .*? '"';

//execute section
mode EXECUTE_SECTION_MODE;
MAIN_CONTROLLER3:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION3:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION3:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION3:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION3:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION3:		'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION3:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION3:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION3:		'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION3:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION3:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION3:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

231
232
233
WS3:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT3:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT3:		FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
234
SEMICOLON3:			';' -> type(SEMICOLON);
235
DOT:				'.';
236
STAR3:				'*' -> type(STAR);
237
TTCN3IDENTIFIER3:	FR_TTCN3IDENTIFIER -> type(TTCN3IDENTIFIER);
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265

//ordered include section
mode ORDERED_INCLUDE_SECTION_MODE;
MAIN_CONTROLLER4:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION4:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION4:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION4:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION4:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION4:		'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION4:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION4:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION4:		'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION4:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION4:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION4:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

266
267
268
WS4:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT4:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT4:	FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299

//same as STRING, but it is handled differently
ORDERED_INCLUDE_FILENAME:		'"' .*? '"';

// define section
mode DEFINE_SECTION_MODE;
MAIN_CONTROLLER5:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION5:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION5:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION5:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION5:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION5:		'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION5:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION5:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION5:		'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION5:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION5:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION5:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

300
301
302
WS5:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT5:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT5:	FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
303
IPV6:				FR_IPV6;
304
TTCN3IDENTIFIER5:	FR_TTCN3IDENTIFIER -> type(TTCN3IDENTIFIER);
305
306
307
BEGINCHAR:			'{';
ENDCHAR:			'}';
MACRORVALUE:		[0-9|A-Z|a-z|.|_|-]+;
308
ASSIGNMENTCHAR5:	':'? '=' -> type(ASSIGNMENTCHAR);
309
COLON:				':';
310
STRING5:			FR_STRING -> type(STRING);
311

312
MACRO_ID:			FR_MACRO_ID;
313
MACRO_INT5:			FR_MACRO_INT -> type(MACRO_INT);
314
MACRO_BOOL:			FR_MACRO_BOOL;
315
316
MACRO_FLOAT5:		FR_MACRO_FLOAT -> type(MACRO_FLOAT);
MACRO_EXP_CSTR5:	FR_MACRO_EXP_CSTR -> type(MACRO_EXP_CSTR);
317
318
319
320
MACRO_BSTR:			FR_MACRO_BSTR;
MACRO_HSTR:			FR_MACRO_HSTR;
MACRO_OSTR:			FR_MACRO_OSTR;
MACRO_BINARY:		FR_MACRO_BINARY;
321
MACRO_HOSTNAME5: 	FR_MACRO_HOSTNAME -> type(MACRO_HOSTNAME);
322
MACRO5:				FR_MACRO -> type(MACRO);
323
324
325
326
327
328
329
BITSTRING:			'\'' FR_BINDIGIT* '\'' 'B';
HEXSTRING:			'\'' FR_HEXDIGIT* '\'' 'H';
OCTETSTRING:		'\'' FR_OCTDIGIT* '\'' 'O';
BITSTRINGMATCH:		'\'' FR_BINDIGITMATCH* '\'' 'B';
HEXSTRINGMATCH:		'\'' FR_HEXDIGITMATCH* '\'' 'H';
OCTETSTRINGMATCH:	'\'' FR_OCTDIGITMATCH* '\'' 'O';
COMMA:				',';
330
STAR5:				'*' -> type(STAR);
331
332
333
FSTRING:
(	'\\"' // \" is handled separately in the structured definitions
|	'\\' .   // Handle escaped characters
334
335
|	~[{}"\\$\n\r\t #/,:=*]+  // Anything except {,},'"',\,$,#,/,',',:,=,* and whitespace
                             // comparing to titan.core [,:=*] is excluded, but pr_SimpleValue accepts ASSIGNMENTCHAR, COLON and COMMA, * is a multiplication operator
336
337
|	'/'
);
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365

//external command section
mode EXTERNAL_COMMANDS_SECTION_MODE;
MAIN_CONTROLLER6:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION6:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION6:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION6:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION6:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION6:		'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION6:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION6:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION6:		'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION6:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION6:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION6:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

366
367
368
WS6:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT6:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT6:		FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
369
SEMICOLON6: 		';' -> type(SEMICOLON);
Arpad Lovassy's avatar
Arpad Lovassy committed
370
ASSIGNMENTCHAR6:	':'? '=' -> type(ASSIGNMENTCHAR);
371
STRING6:			FR_STRING -> type(STRING);
372
STRINGOP6:			'&' -> type(STRINGOP);
373
374
375
376
377
378
379
380
BEGINCONTROLPART:	( 'begincontrolpart' | 'Begincontrolpart' | 'beginControlpart' | 'BeginControlpart'
| 'begincontrolPart' | 'BeginControlPart' | 'beginControlPart' | 'BegincontrolPart' );
ENDCONTROLPART:	( 'endcontrolpart' | 'Endcontrolpart' | 'endControlpart' | 'EndControlpart'
| 'endcontrolPart' | 'EndControlPart' | 'endControlPart' | 'EndcontrolPart' );
BEGINTESTCASE:		( 'begintestcase' | 'Begintestcase' | 'beginTestcase' | 'BeginTestcase' | 'begintestCase'
| 'BeginTestCase' | 'beginTestCase' | 'BegintestCase' );
ENDTESTCASE:		( 'endtestcase' | 'Endtestcase' | 'endTestcase' | 'EndTestcase' | 'endtestCase'
| 'EndTestCase' | 'endTestCase' | 'EndtestCase' );
381

382
MACRO_EXP_CSTR6:	FR_MACRO_EXP_CSTR -> type(MACRO_EXP_CSTR);
383
MACRO6:				FR_MACRO -> type(MACRO);
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411

//testport parameters
mode TESTPORT_PARAMETERS_SECTION_MODE;
MAIN_CONTROLLER7:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION7:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION7:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION7:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION7:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION7:		'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION7:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION7:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION7:		'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION7:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION7:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION7:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

412
413
414
415
WS7:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT7:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT7:		FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
TTCN3IDENTIFIER7:	FR_TTCN3IDENTIFIER -> type(TTCN3IDENTIFIER);
416
417
418
419
STAR7:				'*' -> type(STAR);
PLUS7:				'+' -> type(PLUS);
MINUS7:				'-' -> type(MINUS);
SLASH7:				'/' -> type(SLASH);
420
421
SQUAREOPEN:			'[';
SQUARECLOSE:		']';
422
423
424
NATURAL_NUMBER7:	[0-9]+ -> type(NATURAL_NUMBER);
SEMICOLON7:			';' -> type(SEMICOLON);
DOT7:				'.' -> type(DOT);
Arpad Lovassy's avatar
Arpad Lovassy committed
425
ASSIGNMENTCHAR7:	':'? '=' -> type(ASSIGNMENTCHAR);
426
427
428
429
LPAREN7:			'('
 -> type(LPAREN);
RPAREN7:			')'
 -> type(RPAREN);
430
431
MTCKEYWORD:			'mtc';
SYSTEMKEYWORD:		'system';
432
433
434
STRING7:			FR_STRING -> type(STRING);
STRINGOP7:			'&'	'='? -> type(STRINGOP);
MACRO7:				FR_MACRO -> type(MACRO);
435
436
437
MACRO_INT7:			FR_MACRO_INT -> type(MACRO_INT);
MACRO_ID7:			FR_MACRO_ID -> type(MACRO_ID);
MACRO_EXP_CSTR7:	FR_MACRO_EXP_CSTR -> type(MACRO_EXP_CSTR);
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465

//groups parameters
mode GROUPS_SECTION_MODE;
MAIN_CONTROLLER8:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION8:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION8:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION8:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION8:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION8:		'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION8:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION8:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION8:		'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION8:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION8:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION8:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

466
467
468
469
WS8:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT8:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT8:		FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
TTCN3IDENTIFIER8:	FR_TTCN3IDENTIFIER -> type(TTCN3IDENTIFIER);
470
SEMICOLON8:			';' -> type(SEMICOLON);
Arpad Lovassy's avatar
Arpad Lovassy committed
471
ASSIGNMENTCHAR8:	':'? '=' -> type(ASSIGNMENTCHAR);
472
473
STAR8:				'*' -> type(STAR);
COMMA8:				',' -> type(COMMA);
474
475
NATURAL_NUMBER8:	FR_INT -> type(NATURAL_NUMBER);
FLOAT8:				FR_FLOAT -> type(FLOAT);
476
477

DNSNAME8:
478
479
(	FR_HOSTNAME
	('/' FR_DIGIT+)?
480
) -> type(DNSNAME);
481
MACRO_ID8:		FR_MACRO_ID -> type(MACRO_ID);
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509

//module parameters
mode MODULE_PARAMETERS_SECTION_MODE;
MAIN_CONTROLLER9:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION9:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION9:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION9:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION9:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION9:		'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION9:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION9:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION9:		'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION9:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION9:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION9:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

510
511
512
WS9:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT9:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT9:		FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
513
514
SEMICOLON9:			';' -> type(SEMICOLON);
ASSIGNMENTCHAR9:	':'? '=' -> type(ASSIGNMENTCHAR);
515
CONCATCHAR:			'&=';
516
517
518
519
520
521
DOT9:				'.' -> type(DOT);
STAR9:				'*' -> type(STAR);
LPAREN9:			'('
	-> type(LPAREN);
RPAREN9:			')'
	-> type(RPAREN);
522
DOTDOT:				'..';
523
524
525
526
527
528
529
530
531
532
533
534
535
PLUS9:				'+' -> type(PLUS);
MINUS9:				'-' -> type(MINUS);
SLASH9:				'/' -> type(SLASH);
BEGINCHAR9:			'{'
	-> type(BEGINCHAR);
ENDCHAR9:			'}'
	-> type(ENDCHAR);
STRINGOP9:			'&' -> type(STRINGOP);
COMMA9:				',' -> type(COMMA);
SQUAREOPEN9:		'['
	-> type(SQUAREOPEN);
SQUARECLOSE9:		']'
	-> type(SQUARECLOSE);
536
537
538
539
540
541
542
543
544
545
546
547
AND:				'&';
EXCLUSIVE:			'!';

NONE_VERDICT:		'none';
PASS_VERDICT:		'pass';
INCONC_VERDICT:		'inconc';
FAIL_VERDICT:		'fail';
ERROR_VERDICT:		'error';
CHARKEYWORD:		'char';
OBJIDKEYWORD:		'objid';
OMITKEYWORD:		'omit';
NULLKEYWORD:		( 'null' | 'NULL' );
548
549
MTCKEYWORD9:		'mtc' -> type(MTCKEYWORD);
SYSTEMKEYWORD9:		'system' -> type(SYSTEMKEYWORD);
550
551
552
553
554
555
556
557
558
559
560
561
562
INFINITYKEYWORD:	'infinity';
NANKEYWORD:			'not_a_number';
IFPRESENTKEYWORD:	'ifpresent';
LENGTHKEYWORD:		'length';
COMPLEMENTKEYWORD:	'complement';
PATTERNKEYWORD:		'pattern';
PERMUTATIONKEYWORD:	'permutation';
SUPERSETKEYWORD:	'superset';
SUBSETKEYWORD:		'subset';
NOCASEKEYWORD:		'@nocase';
TRUE:				'true';
FALSE:				'false';
ANYVALUE:			'?';
563
564
565
566
567
568
569
570
571
TTCN3IDENTIFIER9:	FR_TTCN3IDENTIFIER -> type(TTCN3IDENTIFIER);
NATURAL_NUMBER9:	FR_INT -> type(NATURAL_NUMBER);
FLOAT9:				FR_FLOAT -> type(FLOAT);
BITSTRING9:			'\'' FR_BINDIGIT* '\'' 'B' -> type(BITSTRING);
HEXSTRING9:			'\'' FR_HEXDIGIT* '\'' 'H' -> type(HEXSTRING);
OCTETSTRING9:		'\'' FR_OCTDIGIT* '\'' 'O' -> type(OCTETSTRING);
BITSTRINGMATCH9:	'\'' FR_BINDIGITMATCH* '\'' 'B' -> type(BITSTRINGMATCH);
HEXSTRINGMATCH9:	'\'' FR_HEXDIGITMATCH* '\'' 'H' -> type(HEXSTRINGMATCH);
OCTETSTRINGMATCH9:	'\'' FR_OCTDIGITMATCH* '\'' 'O' -> type(OCTETSTRINGMATCH);
572
573
574
575
576
577
578
579
580
MACRO_ID9:			FR_MACRO_ID -> type(MACRO_ID);
MACRO_INT9:			FR_MACRO_INT -> type(MACRO_INT);
MACRO_BOOL9:		FR_MACRO_BOOL -> type(MACRO_BOOL);
MACRO_FLOAT9:		FR_MACRO_FLOAT -> type(MACRO_FLOAT);
MACRO_EXP_CSTR9:	FR_MACRO_EXP_CSTR -> type(MACRO_EXP_CSTR);
MACRO_BSTR9:		FR_MACRO_BSTR -> type(MACRO_BSTR);
MACRO_HSTR9:		FR_MACRO_HSTR -> type(MACRO_HSTR);
MACRO_OSTR9:		FR_MACRO_OSTR -> type(MACRO_OSTR);
MACRO_BINARY9:		FR_MACRO_BINARY -> type(MACRO_BINARY);
581
582
MACRO9:				FR_MACRO -> type(MACRO);
STRING9:			FR_STRING -> type(STRING);
583
UID:				[uU][+]?[0-9A-Fa-f]+;
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611

//components section
mode COMPONENTS_SECTION_MODE;
MAIN_CONTROLLER10:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION10:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION10:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION10:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION10:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION10:	'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION10:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION10:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION10:	'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION10:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION10:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION10:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

612
613
614
WS10:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT10:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT10:		FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
615
616
SEMICOLON10:			';' -> type(SEMICOLON);
STAR10:					'*' -> type(STAR);
Arpad Lovassy's avatar
Arpad Lovassy committed
617
ASSIGNMENTCHAR10:		':'? '=' -> type(ASSIGNMENTCHAR);
618
IPV6_10:			FR_IPV6 -> type(IPV6);
619
620
621
622
NATURAL_NUMBER10:	FR_INT -> type(NATURAL_NUMBER);
FLOAT10:			FR_FLOAT -> type(FLOAT);

TTCN3IDENTIFIER10:	FR_TTCN3IDENTIFIER -> type(TTCN3IDENTIFIER);
623
624

DNSNAME10:
625
626
(	FR_HOSTNAME
	('/' FR_DIGIT+)?
627
) -> type(DNSNAME);
628
629
MACRO_ID10:				FR_MACRO_ID -> type(MACRO_ID);
MACRO_HOSTNAME10: 		FR_MACRO_HOSTNAME -> type(MACRO_HOSTNAME);
630
MACRO10:				FR_MACRO -> type(MACRO);
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658

//logging section
mode LOGGING_SECTION_MODE;
MAIN_CONTROLLER11:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION11:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION11:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION11:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION11:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION11:	'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION11:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION11:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION11:	'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION11:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION11:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION11:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

659
660
661
WS11:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT11:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT11:	FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712

TTCN_EXECUTOR1:		'TTCN_EXECUTOR';	TTCN_ERROR1:	'TTCN_ERROR';		TTCN_WARNING1:		'TTCN_WARNING';
TTCN_PORTEVENT1:	'TTCN_PORTEVENT';	TTCN_TIMEROP1:	'TTCN_TIMEROP';		TTCN_VERDICTOP1:	'TTCN_VERDICTOP';
TTCN_DEFAULTOP1:	'TTCN_DEFAULTOP';	TTCN_ACTION1:	'TTCN_ACTION';		TTCN_TESTCASE1:		'TTCN_TESTCASE';
TTCN_FUNCTION1:		'TTCN_FUNCTION';	TTCN_USER1:		'TTCN_USER';		TTCN_STATISTICS1:	'TTCN_STATISTICS';
TTCN_PARALLEL1:		'TTCN_PARALLEL';	TTCN_MATCHING1:	'TTCN_MATCHING';	TTCN_DEBUG1:	 	'TTCN_DEBUG';

TTCN_EXECUTOR2:		'EXECUTOR';		TTCN_ERROR2:	'ERROR';		TTCN_WARNING2:		'WARNING';
TTCN_PORTEVENT2:	'PORTEVENT';	TTCN_TIMEROP2:	'TIMEROP';		TTCN_VERDICTOP2:	'VERDICTOP';
TTCN_DEFAULTOP2:	'DEFAULTOP';	TTCN_ACTION2:	'ACTION';		TTCN_TESTCASE2:		'TESTCASE';
TTCN_FUNCTION2:		'FUNCTION';		TTCN_USER2:		'USER';			TTCN_STATISTICS2:	'STATISTICS';
TTCN_PARALLEL2:		'PARALLEL';		TTCN_MATCHING2:	'MATCHING';		TTCN_DEBUG2:		'DEBUG';
LOG_ALL: 'LOG_ALL';	LOG_NOTHING: 'LOG_NOTHING';

/* loggingbit second level*/
ACTION_UNQUALIFIED: 'ACTION_UNQUALIFIED'; DEBUG_ENCDEC: 'DEBUG_ENCDEC';
DEBUG_TESTPORT: 'DEBUG_TESTPORT'; DEBUG_UNQUALIFIED: 'DEBUG_UNQUALIFIED';
DEFAULTOP_ACTIVATE: 'DEFAULTOP_ACTIVATE'; DEFAULTOP_DEACTIVATE: 'DEFAULTOP_DEACTIVATE';
DEFAULTOP_EXIT: 'DEFAULTOP_EXIT'; DEFAULTOP_UNQUALIFIED: 'DEFAULTOP_UNQUALIFIED';
ERROR_UNQUALIFIED: 'ERROR_UNQUALIFIED'; EXECUTOR_COMPONENT: 'EXECUTOR_COMPONENT';
EXECUTOR_CONFIGDATA: 'EXECUTOR_CONFIGDATA'; EXECUTOR_EXTCOMMAND: 'EXECUTOR_EXTCOMMAND';
EXECUTOR_LOGOPTIONS: 'EXECUTOR_LOGOPTIONS'; EXECUTOR_RUNTIME: 'EXECUTOR_RUNTIME';
EXECUTOR_UNQUALIFIED: 'EXECUTOR_UNQUALIFIED'; FUNCTION_RND: 'FUNCTION_RND';
FUNCTION_UNQUALIFIED: 'FUNCTION_UNQUALIFIED'; MATCHING_DONE: 'MATCHING_DONE';
MATCHING_MCSUCCESS: 'MATCHING_MCSUCCESS'; MATCHING_MCUNSUCC: 'MATCHING_MCUNSUCC';
MATCHING_MMSUCCESS: 'MATCHING_MMSUCCESS'; MATCHING_MMUNSUCC: 'MATCHING_MMUNSUCC';
MATCHING_PCSUCCESS: 'MATCHING_PCSUCCESS'; MATCHING_PCUNSUCC: 'MATCHING_PCUNSUCC';
MATCHING_PMSUCCESS: 'MATCHING_PMSUCCESS'; MATCHING_PMUNSUCC: 'MATCHING_PMUNSUCC';
MATCHING_PROBLEM: 'MATCHING_PROBLEM'; MATCHING_TIMEOUT: 'MATCHING_TIMEOUT';
MATCHING_UNQUALIFIED: 'MATCHING_UNQUALIFIED'; PARALLEL_PORTCONN: 'PARALLEL_PORTCONN';
PARALLEL_PORTMAP: 'PARALLEL_PORTMAP'; PARALLEL_PTC: 'PARALLEL_PTC';
PARALLEL_UNQUALIFIED: 'PARALLEL_UNQUALIFIED'; PORTEVENT_DUALRECV: 'PORTEVENT_DUALRECV';
PORTEVENT_DUALSEND: 'PORTEVENT_DUALSEND'; PORTEVENT_MCRECV: 'PORTEVENT_MCRECV';
PORTEVENT_MCSEND: 'PORTEVENT_MCSEND'; PORTEVENT_MMRECV: 'PORTEVENT_MMRECV';
PORTEVENT_MMSEND: 'PORTEVENT_MMSEND'; PORTEVENT_MQUEUE: 'PORTEVENT_MQUEUE';
PORTEVENT_PCIN: 'PORTEVENT_PCIN'; PORTEVENT_PCOUT: 'PORTEVENT_PCOUT';
PORTEVENT_PMIN: 'PORTEVENT_PMIN'; PORTEVENT_PMOUT: 'PORTEVENT_PMOUT';
PORTEVENT_PQUEUE: 'PORTEVENT_PQUEUE'; PORTEVENT_STATE: 'PORTEVENT_STATE';
PORTEVENT_UNQUALIFIED: 'PORTEVENT_UNQUALIFIED'; STATISTICS_UNQUALIFIED: 'STATISTICS_UNQUALIFIED';
STATISTICS_VERDICT: 'STATISTICS_VERDICT'; TESTCASE_FINISH: 'TESTCASE_FINISH';
TESTCASE_START: 'TESTCASE_START'; TESTCASE_UNQUALIFIED: 'TESTCASE_UNQUALIFIED';
TIMEROP_GUARD: 'TIMEROP_GUARD'; TIMEROP_READ: 'TIMEROP_READ';
TIMEROP_START: 'TIMEROP_START'; TIMEROP_STOP: 'TIMEROP_STOP';
TIMEROP_TIMEOUT: 'TIMEROP_TIMEOUT'; TIMEROP_UNQUALIFIED: 'TIMEROP_UNQUALIFIED';
USER_UNQUALIFIED: 'USER_UNQUALIFIED'; VERDICTOP_FINAL: 'VERDICTOP_FINAL';
VERDICTOP_GETVERDICT: 'VERDICTOP_GETVERDICT'; VERDICTOP_SETVERDICT: 'VERDICTOP_SETVERDICT';
VERDICTOP_UNQUALIFIED: 'VERDICTOP_UNQUALIFIED'; WARNING_UNQUALIFIED: 'WARNING_UNQUALIFIED';

COMPACT: 'Compact' | 'compact';
DETAILED: 'Detailed' | 'detailed';
SUBCATEGORIES: 'SubCategories' | 'Subcategories' | 'subCategories' | 'subcategories';
713
714
MTCKEYWORD11:		'mtc' -> type(MTCKEYWORD);
SYSTEMKEYWORD11:	'system' -> type(SYSTEMKEYWORD);
715
716
717
718
719
LOGGERPLUGINS: 'LoggerPlugins' | 'Loggerplugins' | 'loggerPlugins' | 'loggerplugins';

APPENDFILE: 'appendfile' | 'Appendfile' | 'appendFile' | 'AppendFile';
CONSOLEMASK: 'consolemask' | 'Consolemask' | 'consoleMask' | 'ConsoleMask';
DISKFULLACTION: 'diskfullaction' | 'diskfullAction' | 'diskFullaction' | 'diskFullAction' | 'Diskfullaction' | 'DiskfullAction' | 'DiskFullaction' | 'DiskFullAction';
720
721
722
723
DISKFULLACTIONVALUE_ERROR: 'error' | 'Error';
DISKFULLACTIONVALUE_STOP: 'stop' | 'Stop';
DISKFULLACTIONVALUE_DELETE: 'delete' | 'Delete';
DISKFULLACTIONVALUE_RETRY: 'retry' | 'Retry';
724
725
726
727
728
729
730
FILEMASK: 'filemask' | 'Filemask' | 'fileMask' | 'FileMask';
LOGFILENAME: 'filename' | 'Filename' | 'fileName' | 'FileName' | 'logfile' | 'Logfile' |'logFile' | 'LogFile';
EMERGENCYLOGGING: 'EmergencyLogging' | 'Emergencylogging' | 'emergencylogging' | 'emergencyLogging';
EMERGENCYLOGGINGBEHAVIOUR: 'EmergencyLoggingBehaviour' | 'EmergencyLoggingbehaviour' | 'Emergencyloggingbehaviour' | 'emergencyLoggingBehaviour' | 'emergencyloggingBehaviour'
| 'emergencyloggingbehaviour' | 'emergencyLogginglbehaviour' | 'EmergencyloggingBehaviour';
EMERGENCYLOGGINGMASK: 'EmergencyLoggingMask' | 'EmergencyLoggingmask' | 'Emergencyloggingmask' | 'emergencyLoggingMask' | 'emergencyloggingMask'
| 'emergencyloggingmask' | 'emergencyLoggingmask' | 'EmergencyloggingMask';
731
EMERGENCYLOGGINGFORFAILVERDICT: [Ee] 'mergency' [Ll] 'ogging' [Ff] 'or' [Ff] 'ail' [Vv] 'erdict';
732
733
BUFFERALL: 'BufferAll' | 'Bufferall' | 'bufferAll' | 'bufferall';
BUFFERMASKED: 'BufferMasked' | 'Buffermasked' | 'bufferMasked' |'buffermasked';
734
735
736
737
738
739
740
LOGENTITYNAME: 'logentityname' | 'Logentityname' | 'logEntityname' | 'LogEntityname' | 'logentityName' | 'LogentityName' | 'logEntityName' | 'LogEntityName';
LOGEVENTTYPES: 'logeventtypes' | 'Logeventtypes' | 'logEventtypes' | 'LogEventtypes' | 'logeventTypes' | 'LogEventTypes' | 'logEventTypes' | 'LogeventTypes';
LOGFILENUMBER: 'logfilenumber' | 'logfileNumber' | 'logFilenumber' | 'logFileNumber' | 'Logfilenumber' | 'LogfileNumber' | 'LogFilenumber' | 'LogFileNumber';
LOGFILESIZE: 'logfilesize' | 'logfileSize' | 'logFilesize' | 'logFileSize' | 'Logfilesize' | 'LogfileSize' | 'LogFilesize' | 'LogFileSize';
MATCHINGHINTS: 'matchinghints' | 'Matchinghints' | 'matchingHints' | 'MatchingHints';
SOURCEINFOFORMAT: 'logsourceinfo' | 'Logsourceinfo' | 'logSourceinfo' | 'LogSourceinfo' | 'logsourceInfo' | 'LogsourceInfo' | 'logSourceInfo' | 'LogSourceInfo'
| 'sourceinfoformat' | 'Sourceinfoformat' | 'sourceInfoformat' | 'SourceInfoformat' | 'sourceinfoFormat' | 'SourceinfoFormat' | 'sourceInfoFormat' | 'SourceInfoFormat';
741
742
743
SOURCEINFOVALUE_NONE: 'none' | 'None' | 'NONE';
SOURCEINFOVALUE_SINGLE: 'single' | 'Single' | 'SINGLE';
SOURCEINFOVALUE_STACK: 'stack' | 'Stack' | 'STACK';
744
745
746
747
748
749
750
751
TIMESTAMPFORMAT: 'timestampformat' | 'Timestampformat' | 'timeStampformat' | 'TimeStampformat' | 'timestampFormat' | 'TimestampFormat' | 'timeStampFormat' | 'TimeStampFormat';
CONSOLETIMESTAMPFORMAT: 'consoletimestampformat' | 'Consoletimestampformat' | 'ConsoleTimestampformat' | 'ConsoleTimeStampformat' |
'ConsoleTimeStampFormat' | 'consoleTimestampformat' | 'consoleTimeStampformat' | 'consoleTimeStampFormat' | 'consoletimeStampformat' | 'consoletimestampFormat';
TIMESTAMPVALUE: 'time' | 'Time' | 'TIME' | 'datetime' | 'DateTime' | 'Datetime' | 'DATETIME' | 'seconds' | 'Seconds' | 'SECONDS';
YESNO: 'yes' | 'Yes' | 'YES' | 'no' | 'No' | 'NO';

SEMICOLON11:			';' -> type(SEMICOLON);
STAR11:					'*' -> type(STAR);
Arpad Lovassy's avatar
Arpad Lovassy committed
752
ASSIGNMENTCHAR11:		':'? '=' -> type(ASSIGNMENTCHAR);
753
754
755
756
757
758
759
DOT11:					'.' -> type(DOT);
BEGINCHAR11:			'{'
	-> type(BEGINCHAR);
ENDCHAR11:				'}'
	-> type(ENDCHAR);
COMMA11:				',' -> type(COMMA);
STRINGOP11:				'&'	'='? -> type(STRINGOP);
760
LOGICALOR:				'|';
761
762
763
764
765
766
767
768
TRUE11:					'true' -> type(TRUE);
FALSE11:				'false' -> type(FALSE);
LPAREN11:				'('
	-> type(LPAREN);
RPAREN11:				')'
	-> type(RPAREN);


769
770
771
TTCN3IDENTIFIER11:	FR_TTCN3IDENTIFIER -> type(TTCN3IDENTIFIER);
NATURAL_NUMBER11:	FR_INT -> type(NATURAL_NUMBER);
FLOAT11:			FR_FLOAT -> type(FLOAT);
772

773
774
775
776
MACRO_BOOL11:		FR_MACRO_BOOL -> type(MACRO_BOOL);
MACRO_ID11:			FR_MACRO_ID -> type(MACRO_ID);
MACRO_INT11:		FR_MACRO_INT -> type(MACRO_INT);
MACRO_EXP_CSTR11:	FR_MACRO_EXP_CSTR -> type(MACRO_EXP_CSTR);
777
778
MACRO11:			FR_MACRO -> type(MACRO);
STRING11:			FR_STRING -> type(STRING);
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806

//profiler section
mode PROFILER_SECTION_MODE;
MAIN_CONTROLLER12:				'[MAIN_CONTROLLER]'
	-> type(MAIN_CONTROLLER_SECTION),mode(MAIN_CONTROLLER_SECTION_MODE);
INCLUDE_SECTION12:				'[INCLUDE]'
	-> type(INCLUDE_SECTION),mode(INCLUDE_SECTION_MODE);
ORDERED_INCLUDE_SECTION12:		'[ORDERED_INCLUDE]'
	-> type(ORDERED_INCLUDE_SECTION),mode(ORDERED_INCLUDE_SECTION_MODE);
EXECUTE_SECTION12:				'[EXECUTE]'
	-> type(EXECUTE_SECTION),mode(EXECUTE_SECTION_MODE);
DEFINE_SECTION12:				'[DEFINE]'
	-> type(DEFINE_SECTION),mode(DEFINE_SECTION_MODE);
EXTERNAL_COMMANDS_SECTION12:	'[EXTERNAL_COMMANDS]'
	-> type(EXTERNAL_COMMANDS_SECTION),mode(EXTERNAL_COMMANDS_SECTION_MODE);
TESTPORT_PARAMETERS_SECTION12:	'[TESTPORT_PARAMETERS]'
	-> type(TESTPORT_PARAMETERS_SECTION),mode(TESTPORT_PARAMETERS_SECTION_MODE);
GROUPS_SECTION12:				'[GROUPS]'
	-> type(GROUPS_SECTION),mode(GROUPS_SECTION_MODE);
MODULE_PARAMETERS_SECTION12:	'[MODULE_PARAMETERS]'
	-> type(MODULE_PARAMETERS_SECTION),mode(MODULE_PARAMETERS_SECTION_MODE);
COMPONENTS_SECTION12:			'[COMPONENTS]'
	-> type(COMPONENTS_SECTION),mode(COMPONENTS_SECTION_MODE);
LOGGING_SECTION12:				'[LOGGING]'
	-> type(LOGGING_SECTION),mode(LOGGING_SECTION_MODE);
PROFILER_SECTION12:				'[PROFILER]'
	-> type(PROFILER_SECTION),mode(PROFILER_SECTION_MODE);

807
808
809
WS12:	FR_WS -> type(WS), channel(HIDDEN);
LINE_COMMENT12:	FR_LINE_COMMENT -> type(LINE_COMMENT), channel(HIDDEN);
BLOCK_COMMENT12:		FR_BLOCK_COMMENT-> type(BLOCK_COMMENT), channel(HIDDEN);
810
811

CONCATCHAR12:			'&=' -> type(CONCATCHAR);
812
HEXFILTER:				FR_HEXDIGIT+;
813
SEMICOLON12:			';' -> type(SEMICOLON);
Arpad Lovassy's avatar
Arpad Lovassy committed
814
ASSIGNMENTCHAR12:		':'? '=' -> type(ASSIGNMENTCHAR);
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
LOGICALOR12:			'|' -> type(LOGICALOR);
AND12:					'&' -> type(AND);
/* settings */
DISABLEPROFILER: 'DisableProfiler'; DISABLECOVERAGE: 'DisableCoverage'; DATABASEFILE: 'DatabaseFile';
AGGREGATEDATA: 'AggregateData'; STATISTICSFILE: 'StatisticsFile'; DISABLESTATISTICS: 'DisableStatistics';
STATISTICSFILTER: 'StatisticsFilter'; STARTAUTOMATICALLY: 'StartAutomatically';
NETLINETIMES: 'NetLineTimes'; NETFUNCTIONTIMES: 'NetFunctionTimes';

/* statistics filters (single) */
NUMBEROFLINES: 'NumberOfLines'; LINEDATARAW: 'LineDataRaw'; FUNCDATARAW: 'FuncDataRaw';
LINEAVGRAW: 'LineAvgRaw'; FUNCAVGRAW: 'FuncAvgRaw';
LINETIMESSORTEDBYMOD: 'LineTimesSortedByMod'; FUNCTIMESSORTEDBYMOD: 'FuncTimesSortedByMod';
LINETIMESSORTEDTOTAL: 'LineTimesSortedTotal'; FUNCTIMESSORTEDTOTAL: 'FuncTimesSortedTotal';
LINECOUNTSORTEDBYMOD: 'LineCountSortedByMod'; FUNCCOUNTSORTEDBYMOD: 'FuncCountSortedByMod';
LINECOUNTSORTEDTOTAL: 'LineCountSortedTotal'; FUNCCOUNTSORTEDTOTAL: 'FuncCountSortedTotal';
LINEAVGSORTEDBYMOD: 'LineAvgSortedByMod'; FUNCAVGSORTEDBYMOD: 'FuncAvgSortedByMod';
LINEAVGSORTEDTOTAL: 'LineAvgSortedTotal'; FUNCAVGSORTEDTOTAL: 'FuncAvgSortedTotal';
TOP10LINETIMES: 'Top10LineTimes'; TOP10FUNCTIMES: 'Top10FuncTimes';
TOP10LINECOUNT: 'Top10LineCount'; TOP10FUNCCOUNT: 'Top10FuncCount';
TOP10LINEAVG: 'Top10LineAvg'; TOP10FUNCAVG: 'Top10FuncAvg';
UNUSEDLINES: 'UnusedLines'; UNUSEDFUNC: 'UnusedFunc';

/* statistics filters (grouped) */
ALLRAWDATA: 'AllRawData';
LINEDATASORTEDBYMOD: 'LineDataSortedByMod'; FUNCDATASORTEDBYMOD: 'FuncDataSortedByMod';
LINEDATASORTEDTOTAL: 'LineDataSortedTotal'; FUNCDATASORTEDTOTAL: 'FuncDataSortedTotal';
LINEDATASORTED: 'LineDataSorted'; FUNCDATASORTED: 'FuncDataSorted'; ALLDATASORTED: 'AllDataSorted';
TOP10LINEDATA: 'Top10LineData'; TOP10FUNCDATA: 'Top10FuncData'; TOP10ALLDATA: 'Top10AllData';
UNUSEDATA: 'UnusedData'; ALL: 'All';

845
846
847
848
849
TRUE12:				'true' -> type(TRUE);
FALSE12:			'false' -> type(FALSE);
STRING12:			FR_STRING -> type(STRING);
TTCN3IDENTIFIER12:	FR_TTCN3IDENTIFIER -> type(TTCN3IDENTIFIER);
MACRO12:			FR_MACRO -> type(MACRO);