calabash-android 0.4.0.pre11 → 0.4.0.pre15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +27 -2
- data/lib/calabash-android/helpers.rb +5 -3
- data/lib/calabash-android/lib/TestServer.apk +0 -0
- data/lib/calabash-android/operations.rb +47 -17
- data/lib/calabash-android/version.rb +2 -1
- data/lib/calabash-android/wait_helpers.rb +93 -0
- data/test-server/instrumentation-backend/antlr/UIQuery.g +2 -1
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/activity/FinishOpenedActivities.java +19 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/activity/GetOpenedActivities.java +31 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/activity/GoBackToActivity.java +67 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/gestures/DragCoordinates.java +28 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/gestures/Swipe.java +11 -5
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/version/Version.java +37 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/antlr/UIQueryLexer.java +90 -71
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/antlr/UIQueryParser.java +75 -93
- metadata +8 -2
@@ -1,5 +1,6 @@
|
|
1
1
|
package sh.calaba.instrumentationbackend.actions.gestures;
|
2
2
|
|
3
|
+
import android.util.DisplayMetrics;
|
3
4
|
import sh.calaba.instrumentationbackend.InstrumentationBackend;
|
4
5
|
import sh.calaba.instrumentationbackend.Result;
|
5
6
|
import sh.calaba.instrumentationbackend.actions.Action;
|
@@ -11,13 +12,18 @@ public class Swipe implements Action {
|
|
11
12
|
@Override
|
12
13
|
public Result execute(String... args) {
|
13
14
|
String direction = args[0];
|
14
|
-
if(direction.equalsIgnoreCase("left")) {
|
15
|
-
InstrumentationBackend.solo.scrollToSide(Solo.LEFT);
|
16
|
-
} else {
|
17
|
-
InstrumentationBackend.solo.scrollToSide(Solo.RIGHT);
|
18
15
|
|
16
|
+
if (args.length == 1) {
|
17
|
+
if(direction.equalsIgnoreCase("left")) {
|
18
|
+
InstrumentationBackend.solo.scrollToSide(Solo.LEFT);
|
19
|
+
return Result.successResult();
|
20
|
+
} else if(direction.equalsIgnoreCase("right")) {
|
21
|
+
InstrumentationBackend.solo.scrollToSide(Solo.RIGHT);
|
22
|
+
return Result.successResult();
|
23
|
+
}
|
24
|
+
return Result.failedResult("Invalid direction to swipe: " + direction);
|
19
25
|
}
|
20
|
-
return Result.
|
26
|
+
return Result.failedResult("You must provide a direction. Either 'left' or 'right'");
|
21
27
|
}
|
22
28
|
|
23
29
|
@Override
|
@@ -0,0 +1,37 @@
|
|
1
|
+
package sh.calaba.instrumentationbackend.actions.version;
|
2
|
+
|
3
|
+
import sh.calaba.instrumentationbackend.Result;
|
4
|
+
import sh.calaba.instrumentationbackend.actions.Action;
|
5
|
+
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Generated Code.
|
9
|
+
* Do not edit.
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
public class Version implements Action {
|
13
|
+
|
14
|
+
/******
|
15
|
+
* Generate Version Number
|
16
|
+
* DO NOT EDIT
|
17
|
+
*
|
18
|
+
* Version number is changed by changing SERVER_VERSION
|
19
|
+
* in calabash-android/version.rb
|
20
|
+
*
|
21
|
+
* When doing so, this version will be copied here when
|
22
|
+
* test server is built.
|
23
|
+
*
|
24
|
+
*/
|
25
|
+
public static final String VERSION="0.4.0.pre15";
|
26
|
+
|
27
|
+
@Override
|
28
|
+
public Result execute(String... args) {
|
29
|
+
return new Result(true,VERSION);
|
30
|
+
}
|
31
|
+
|
32
|
+
@Override
|
33
|
+
public String key() {
|
34
|
+
return "version";
|
35
|
+
}
|
36
|
+
|
37
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// $ANTLR 3.4 antlr/UIQuery.g 2013-01-
|
1
|
+
// $ANTLR 3.4 antlr/UIQuery.g 2013-01-31 12:10:57
|
2
2
|
|
3
3
|
package sh.calaba.instrumentationbackend.query.antlr;
|
4
4
|
|
@@ -30,6 +30,25 @@ public class UIQueryLexer extends Lexer {
|
|
30
30
|
public static final int WHITE=20;
|
31
31
|
public static final int WILDCARD=21;
|
32
32
|
|
33
|
+
public String getErrorMessage(RecognitionException e, String[] tokenNames)
|
34
|
+
{
|
35
|
+
List stack = getRuleInvocationStack(e, this.getClass().getName());
|
36
|
+
String msg = null;
|
37
|
+
if ( e instanceof NoViableAltException ) {
|
38
|
+
NoViableAltException nvae = (NoViableAltException)e;
|
39
|
+
msg = " no viable alt; token="+e.token+" (decision="+nvae.decisionNumber+" state "+nvae.stateNumber+")"+" decision=<<"+nvae.grammarDecisionDescription+">>";
|
40
|
+
throw new RuntimeException(msg, e);
|
41
|
+
}
|
42
|
+
else {
|
43
|
+
msg = super.getErrorMessage(e, tokenNames);
|
44
|
+
}
|
45
|
+
return stack+" "+msg;
|
46
|
+
}
|
47
|
+
public String getTokenErrorDisplay(Token t) {
|
48
|
+
return t.toString();
|
49
|
+
}
|
50
|
+
|
51
|
+
|
33
52
|
// delegates
|
34
53
|
// delegators
|
35
54
|
public Lexer[] getDelegates() {
|
@@ -50,8 +69,8 @@ public class UIQueryLexer extends Lexer {
|
|
50
69
|
try {
|
51
70
|
int _type = WILDCARD;
|
52
71
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
53
|
-
// antlr/UIQuery.g:
|
54
|
-
// antlr/UIQuery.g:
|
72
|
+
// antlr/UIQuery.g:44:10: ( '*' )
|
73
|
+
// antlr/UIQuery.g:44:12: '*'
|
55
74
|
{
|
56
75
|
match('*');
|
57
76
|
|
@@ -71,13 +90,13 @@ public class UIQueryLexer extends Lexer {
|
|
71
90
|
try {
|
72
91
|
int _type = QUALIFIED_NAME;
|
73
92
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
74
|
-
// antlr/UIQuery.g:
|
75
|
-
// antlr/UIQuery.g:
|
93
|
+
// antlr/UIQuery.g:46:16: ( NAME ( '.' NAME )+ )
|
94
|
+
// antlr/UIQuery.g:46:18: NAME ( '.' NAME )+
|
76
95
|
{
|
77
96
|
mNAME();
|
78
97
|
|
79
98
|
|
80
|
-
// antlr/UIQuery.g:
|
99
|
+
// antlr/UIQuery.g:46:23: ( '.' NAME )+
|
81
100
|
int cnt1=0;
|
82
101
|
loop1:
|
83
102
|
do {
|
@@ -91,7 +110,7 @@ public class UIQueryLexer extends Lexer {
|
|
91
110
|
|
92
111
|
switch (alt1) {
|
93
112
|
case 1 :
|
94
|
-
// antlr/UIQuery.g:
|
113
|
+
// antlr/UIQuery.g:46:24: '.' NAME
|
95
114
|
{
|
96
115
|
match('.');
|
97
116
|
|
@@ -127,8 +146,8 @@ public class UIQueryLexer extends Lexer {
|
|
127
146
|
try {
|
128
147
|
int _type = ALL;
|
129
148
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
130
|
-
// antlr/UIQuery.g:
|
131
|
-
// antlr/UIQuery.g:
|
149
|
+
// antlr/UIQuery.g:50:5: ( 'all' )
|
150
|
+
// antlr/UIQuery.g:50:7: 'all'
|
132
151
|
{
|
133
152
|
match("all");
|
134
153
|
|
@@ -150,8 +169,8 @@ public class UIQueryLexer extends Lexer {
|
|
150
169
|
try {
|
151
170
|
int _type = VISIBLE;
|
152
171
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
153
|
-
// antlr/UIQuery.g:
|
154
|
-
// antlr/UIQuery.g:
|
172
|
+
// antlr/UIQuery.g:52:9: ( 'visible' )
|
173
|
+
// antlr/UIQuery.g:52:11: 'visible'
|
155
174
|
{
|
156
175
|
match("visible");
|
157
176
|
|
@@ -173,8 +192,8 @@ public class UIQueryLexer extends Lexer {
|
|
173
192
|
try {
|
174
193
|
int _type = FILTER_COLON;
|
175
194
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
176
|
-
// antlr/UIQuery.g:
|
177
|
-
// antlr/UIQuery.g:
|
195
|
+
// antlr/UIQuery.g:57:15: ( ':' )
|
196
|
+
// antlr/UIQuery.g:57:17: ':'
|
178
197
|
{
|
179
198
|
match(':');
|
180
199
|
|
@@ -194,8 +213,8 @@ public class UIQueryLexer extends Lexer {
|
|
194
213
|
try {
|
195
214
|
int _type = BEGINPRED;
|
196
215
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
197
|
-
// antlr/UIQuery.g:
|
198
|
-
// antlr/UIQuery.g:
|
216
|
+
// antlr/UIQuery.g:62:11: ( '{' )
|
217
|
+
// antlr/UIQuery.g:62:13: '{'
|
199
218
|
{
|
200
219
|
match('{');
|
201
220
|
|
@@ -215,8 +234,8 @@ public class UIQueryLexer extends Lexer {
|
|
215
234
|
try {
|
216
235
|
int _type = ENDPRED;
|
217
236
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
218
|
-
// antlr/UIQuery.g:
|
219
|
-
// antlr/UIQuery.g:
|
237
|
+
// antlr/UIQuery.g:64:11: ( '}' )
|
238
|
+
// antlr/UIQuery.g:64:13: '}'
|
220
239
|
{
|
221
240
|
match('}');
|
222
241
|
|
@@ -236,7 +255,7 @@ public class UIQueryLexer extends Lexer {
|
|
236
255
|
try {
|
237
256
|
int _type = RELATION;
|
238
257
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
239
|
-
// antlr/UIQuery.g:
|
258
|
+
// antlr/UIQuery.g:67:10: (| '=' | '>' | '>=' | '<' | '<=' | ( ( 'BEGINSWITH' | 'ENDSWITH' | 'CONTAINS' | 'LIKE' | 'beginswith' | 'endswith' | 'contains' | 'like' ) ( '[' ( 'a' .. 'z' | 'A' .. 'Z' )* ']' )? ) )
|
240
259
|
int alt5=7;
|
241
260
|
switch ( input.LA(1) ) {
|
242
261
|
case '=':
|
@@ -286,26 +305,26 @@ public class UIQueryLexer extends Lexer {
|
|
286
305
|
|
287
306
|
switch (alt5) {
|
288
307
|
case 1 :
|
289
|
-
// antlr/UIQuery.g:
|
308
|
+
// antlr/UIQuery.g:67:12:
|
290
309
|
{
|
291
310
|
}
|
292
311
|
break;
|
293
312
|
case 2 :
|
294
|
-
// antlr/UIQuery.g:
|
313
|
+
// antlr/UIQuery.g:67:14: '='
|
295
314
|
{
|
296
315
|
match('=');
|
297
316
|
|
298
317
|
}
|
299
318
|
break;
|
300
319
|
case 3 :
|
301
|
-
// antlr/UIQuery.g:
|
320
|
+
// antlr/UIQuery.g:67:20: '>'
|
302
321
|
{
|
303
322
|
match('>');
|
304
323
|
|
305
324
|
}
|
306
325
|
break;
|
307
326
|
case 4 :
|
308
|
-
// antlr/UIQuery.g:
|
327
|
+
// antlr/UIQuery.g:67:26: '>='
|
309
328
|
{
|
310
329
|
match(">=");
|
311
330
|
|
@@ -314,14 +333,14 @@ public class UIQueryLexer extends Lexer {
|
|
314
333
|
}
|
315
334
|
break;
|
316
335
|
case 5 :
|
317
|
-
// antlr/UIQuery.g:
|
336
|
+
// antlr/UIQuery.g:67:33: '<'
|
318
337
|
{
|
319
338
|
match('<');
|
320
339
|
|
321
340
|
}
|
322
341
|
break;
|
323
342
|
case 6 :
|
324
|
-
// antlr/UIQuery.g:
|
343
|
+
// antlr/UIQuery.g:67:39: '<='
|
325
344
|
{
|
326
345
|
match("<=");
|
327
346
|
|
@@ -330,12 +349,12 @@ public class UIQueryLexer extends Lexer {
|
|
330
349
|
}
|
331
350
|
break;
|
332
351
|
case 7 :
|
333
|
-
// antlr/UIQuery.g:
|
352
|
+
// antlr/UIQuery.g:68:4: ( ( 'BEGINSWITH' | 'ENDSWITH' | 'CONTAINS' | 'LIKE' | 'beginswith' | 'endswith' | 'contains' | 'like' ) ( '[' ( 'a' .. 'z' | 'A' .. 'Z' )* ']' )? )
|
334
353
|
{
|
335
|
-
// antlr/UIQuery.g:
|
336
|
-
// antlr/UIQuery.g:
|
354
|
+
// antlr/UIQuery.g:68:4: ( ( 'BEGINSWITH' | 'ENDSWITH' | 'CONTAINS' | 'LIKE' | 'beginswith' | 'endswith' | 'contains' | 'like' ) ( '[' ( 'a' .. 'z' | 'A' .. 'Z' )* ']' )? )
|
355
|
+
// antlr/UIQuery.g:68:5: ( 'BEGINSWITH' | 'ENDSWITH' | 'CONTAINS' | 'LIKE' | 'beginswith' | 'endswith' | 'contains' | 'like' ) ( '[' ( 'a' .. 'z' | 'A' .. 'Z' )* ']' )?
|
337
356
|
{
|
338
|
-
// antlr/UIQuery.g:
|
357
|
+
// antlr/UIQuery.g:68:5: ( 'BEGINSWITH' | 'ENDSWITH' | 'CONTAINS' | 'LIKE' | 'beginswith' | 'endswith' | 'contains' | 'like' )
|
339
358
|
int alt2=8;
|
340
359
|
switch ( input.LA(1) ) {
|
341
360
|
case 'B':
|
@@ -388,7 +407,7 @@ public class UIQueryLexer extends Lexer {
|
|
388
407
|
|
389
408
|
switch (alt2) {
|
390
409
|
case 1 :
|
391
|
-
// antlr/UIQuery.g:
|
410
|
+
// antlr/UIQuery.g:68:7: 'BEGINSWITH'
|
392
411
|
{
|
393
412
|
match("BEGINSWITH");
|
394
413
|
|
@@ -397,7 +416,7 @@ public class UIQueryLexer extends Lexer {
|
|
397
416
|
}
|
398
417
|
break;
|
399
418
|
case 2 :
|
400
|
-
// antlr/UIQuery.g:
|
419
|
+
// antlr/UIQuery.g:68:22: 'ENDSWITH'
|
401
420
|
{
|
402
421
|
match("ENDSWITH");
|
403
422
|
|
@@ -406,7 +425,7 @@ public class UIQueryLexer extends Lexer {
|
|
406
425
|
}
|
407
426
|
break;
|
408
427
|
case 3 :
|
409
|
-
// antlr/UIQuery.g:
|
428
|
+
// antlr/UIQuery.g:68:35: 'CONTAINS'
|
410
429
|
{
|
411
430
|
match("CONTAINS");
|
412
431
|
|
@@ -415,7 +434,7 @@ public class UIQueryLexer extends Lexer {
|
|
415
434
|
}
|
416
435
|
break;
|
417
436
|
case 4 :
|
418
|
-
// antlr/UIQuery.g:
|
437
|
+
// antlr/UIQuery.g:68:48: 'LIKE'
|
419
438
|
{
|
420
439
|
match("LIKE");
|
421
440
|
|
@@ -424,7 +443,7 @@ public class UIQueryLexer extends Lexer {
|
|
424
443
|
}
|
425
444
|
break;
|
426
445
|
case 5 :
|
427
|
-
// antlr/UIQuery.g:
|
446
|
+
// antlr/UIQuery.g:69:12: 'beginswith'
|
428
447
|
{
|
429
448
|
match("beginswith");
|
430
449
|
|
@@ -433,7 +452,7 @@ public class UIQueryLexer extends Lexer {
|
|
433
452
|
}
|
434
453
|
break;
|
435
454
|
case 6 :
|
436
|
-
// antlr/UIQuery.g:
|
455
|
+
// antlr/UIQuery.g:69:27: 'endswith'
|
437
456
|
{
|
438
457
|
match("endswith");
|
439
458
|
|
@@ -442,7 +461,7 @@ public class UIQueryLexer extends Lexer {
|
|
442
461
|
}
|
443
462
|
break;
|
444
463
|
case 7 :
|
445
|
-
// antlr/UIQuery.g:
|
464
|
+
// antlr/UIQuery.g:69:40: 'contains'
|
446
465
|
{
|
447
466
|
match("contains");
|
448
467
|
|
@@ -451,7 +470,7 @@ public class UIQueryLexer extends Lexer {
|
|
451
470
|
}
|
452
471
|
break;
|
453
472
|
case 8 :
|
454
|
-
// antlr/UIQuery.g:
|
473
|
+
// antlr/UIQuery.g:69:53: 'like'
|
455
474
|
{
|
456
475
|
match("like");
|
457
476
|
|
@@ -463,7 +482,7 @@ public class UIQueryLexer extends Lexer {
|
|
463
482
|
}
|
464
483
|
|
465
484
|
|
466
|
-
// antlr/UIQuery.g:
|
485
|
+
// antlr/UIQuery.g:69:61: ( '[' ( 'a' .. 'z' | 'A' .. 'Z' )* ']' )?
|
467
486
|
int alt4=2;
|
468
487
|
int LA4_0 = input.LA(1);
|
469
488
|
|
@@ -472,11 +491,11 @@ public class UIQueryLexer extends Lexer {
|
|
472
491
|
}
|
473
492
|
switch (alt4) {
|
474
493
|
case 1 :
|
475
|
-
// antlr/UIQuery.g:
|
494
|
+
// antlr/UIQuery.g:69:62: '[' ( 'a' .. 'z' | 'A' .. 'Z' )* ']'
|
476
495
|
{
|
477
496
|
match('[');
|
478
497
|
|
479
|
-
// antlr/UIQuery.g:
|
498
|
+
// antlr/UIQuery.g:69:66: ( 'a' .. 'z' | 'A' .. 'Z' )*
|
480
499
|
loop3:
|
481
500
|
do {
|
482
501
|
int alt3=2;
|
@@ -539,10 +558,10 @@ public class UIQueryLexer extends Lexer {
|
|
539
558
|
try {
|
540
559
|
int _type = INT;
|
541
560
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
542
|
-
// antlr/UIQuery.g:
|
543
|
-
// antlr/UIQuery.g:
|
561
|
+
// antlr/UIQuery.g:73:5: ( ( '0' .. '9' )+ )
|
562
|
+
// antlr/UIQuery.g:73:7: ( '0' .. '9' )+
|
544
563
|
{
|
545
|
-
// antlr/UIQuery.g:
|
564
|
+
// antlr/UIQuery.g:73:7: ( '0' .. '9' )+
|
546
565
|
int cnt6=0;
|
547
566
|
loop6:
|
548
567
|
do {
|
@@ -597,7 +616,7 @@ public class UIQueryLexer extends Lexer {
|
|
597
616
|
try {
|
598
617
|
int _type = BOOL;
|
599
618
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
600
|
-
// antlr/UIQuery.g:
|
619
|
+
// antlr/UIQuery.g:76:6: ( 'true' | 'false' )
|
601
620
|
int alt7=2;
|
602
621
|
int LA7_0 = input.LA(1);
|
603
622
|
|
@@ -616,7 +635,7 @@ public class UIQueryLexer extends Lexer {
|
|
616
635
|
}
|
617
636
|
switch (alt7) {
|
618
637
|
case 1 :
|
619
|
-
// antlr/UIQuery.g:
|
638
|
+
// antlr/UIQuery.g:76:8: 'true'
|
620
639
|
{
|
621
640
|
match("true");
|
622
641
|
|
@@ -625,7 +644,7 @@ public class UIQueryLexer extends Lexer {
|
|
625
644
|
}
|
626
645
|
break;
|
627
646
|
case 2 :
|
628
|
-
// antlr/UIQuery.g:
|
647
|
+
// antlr/UIQuery.g:76:17: 'false'
|
629
648
|
{
|
630
649
|
match("false");
|
631
650
|
|
@@ -649,7 +668,7 @@ public class UIQueryLexer extends Lexer {
|
|
649
668
|
try {
|
650
669
|
int _type = NIL;
|
651
670
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
652
|
-
// antlr/UIQuery.g:
|
671
|
+
// antlr/UIQuery.g:79:5: ( 'nil' | 'null' )
|
653
672
|
int alt8=2;
|
654
673
|
int LA8_0 = input.LA(1);
|
655
674
|
|
@@ -679,7 +698,7 @@ public class UIQueryLexer extends Lexer {
|
|
679
698
|
}
|
680
699
|
switch (alt8) {
|
681
700
|
case 1 :
|
682
|
-
// antlr/UIQuery.g:
|
701
|
+
// antlr/UIQuery.g:79:7: 'nil'
|
683
702
|
{
|
684
703
|
match("nil");
|
685
704
|
|
@@ -688,7 +707,7 @@ public class UIQueryLexer extends Lexer {
|
|
688
707
|
}
|
689
708
|
break;
|
690
709
|
case 2 :
|
691
|
-
// antlr/UIQuery.g:
|
710
|
+
// antlr/UIQuery.g:79:15: 'null'
|
692
711
|
{
|
693
712
|
match("null");
|
694
713
|
|
@@ -712,8 +731,8 @@ public class UIQueryLexer extends Lexer {
|
|
712
731
|
try {
|
713
732
|
int _type = NAME;
|
714
733
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
715
|
-
// antlr/UIQuery.g:
|
716
|
-
// antlr/UIQuery.g:
|
734
|
+
// antlr/UIQuery.g:82:7: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* )
|
735
|
+
// antlr/UIQuery.g:82:9: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
|
717
736
|
{
|
718
737
|
if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
|
719
738
|
input.consume();
|
@@ -725,7 +744,7 @@ public class UIQueryLexer extends Lexer {
|
|
725
744
|
}
|
726
745
|
|
727
746
|
|
728
|
-
// antlr/UIQuery.g:
|
747
|
+
// antlr/UIQuery.g:82:33: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
|
729
748
|
loop9:
|
730
749
|
do {
|
731
750
|
int alt9=2;
|
@@ -775,12 +794,12 @@ public class UIQueryLexer extends Lexer {
|
|
775
794
|
try {
|
776
795
|
int _type = STRING;
|
777
796
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
778
|
-
// antlr/UIQuery.g:
|
779
|
-
// antlr/UIQuery.g:
|
797
|
+
// antlr/UIQuery.g:86:5: ( '\\'' ( ESC_SEQ |~ ( '\\\\' | '\\'' ) )* '\\'' )
|
798
|
+
// antlr/UIQuery.g:86:8: '\\'' ( ESC_SEQ |~ ( '\\\\' | '\\'' ) )* '\\''
|
780
799
|
{
|
781
800
|
match('\'');
|
782
801
|
|
783
|
-
// antlr/UIQuery.g:
|
802
|
+
// antlr/UIQuery.g:86:13: ( ESC_SEQ |~ ( '\\\\' | '\\'' ) )*
|
784
803
|
loop10:
|
785
804
|
do {
|
786
805
|
int alt10=3;
|
@@ -796,7 +815,7 @@ public class UIQueryLexer extends Lexer {
|
|
796
815
|
|
797
816
|
switch (alt10) {
|
798
817
|
case 1 :
|
799
|
-
// antlr/UIQuery.g:
|
818
|
+
// antlr/UIQuery.g:86:15: ESC_SEQ
|
800
819
|
{
|
801
820
|
mESC_SEQ();
|
802
821
|
|
@@ -804,7 +823,7 @@ public class UIQueryLexer extends Lexer {
|
|
804
823
|
}
|
805
824
|
break;
|
806
825
|
case 2 :
|
807
|
-
// antlr/UIQuery.g:
|
826
|
+
// antlr/UIQuery.g:86:25: ~ ( '\\\\' | '\\'' )
|
808
827
|
{
|
809
828
|
if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '&')||(input.LA(1) >= '(' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\uFFFF') ) {
|
810
829
|
input.consume();
|
@@ -843,10 +862,10 @@ public class UIQueryLexer extends Lexer {
|
|
843
862
|
try {
|
844
863
|
int _type = WHITE;
|
845
864
|
int _channel = DEFAULT_TOKEN_CHANNEL;
|
846
|
-
// antlr/UIQuery.g:
|
847
|
-
// antlr/UIQuery.g:
|
865
|
+
// antlr/UIQuery.g:89:9: ( ( ' ' )+ )
|
866
|
+
// antlr/UIQuery.g:89:11: ( ' ' )+
|
848
867
|
{
|
849
|
-
// antlr/UIQuery.g:
|
868
|
+
// antlr/UIQuery.g:89:11: ( ' ' )+
|
850
869
|
int cnt11=0;
|
851
870
|
loop11:
|
852
871
|
do {
|
@@ -860,7 +879,7 @@ public class UIQueryLexer extends Lexer {
|
|
860
879
|
|
861
880
|
switch (alt11) {
|
862
881
|
case 1 :
|
863
|
-
// antlr/UIQuery.g:
|
882
|
+
// antlr/UIQuery.g:89:11: ' '
|
864
883
|
{
|
865
884
|
match(' ');
|
866
885
|
|
@@ -891,7 +910,7 @@ public class UIQueryLexer extends Lexer {
|
|
891
910
|
// $ANTLR start "HEX_DIGIT"
|
892
911
|
public final void mHEX_DIGIT() throws RecognitionException {
|
893
912
|
try {
|
894
|
-
// antlr/UIQuery.g:
|
913
|
+
// antlr/UIQuery.g:92:11: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
|
895
914
|
// antlr/UIQuery.g:
|
896
915
|
{
|
897
916
|
if ( (input.LA(1) >= '0' && input.LA(1) <= '9')||(input.LA(1) >= 'A' && input.LA(1) <= 'F')||(input.LA(1) >= 'a' && input.LA(1) <= 'f') ) {
|
@@ -917,7 +936,7 @@ public class UIQueryLexer extends Lexer {
|
|
917
936
|
// $ANTLR start "ESC_SEQ"
|
918
937
|
public final void mESC_SEQ() throws RecognitionException {
|
919
938
|
try {
|
920
|
-
// antlr/UIQuery.g:
|
939
|
+
// antlr/UIQuery.g:96:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\'' | '\\\\' ) | UNICODE_ESC | OCTAL_ESC )
|
921
940
|
int alt12=3;
|
922
941
|
int LA12_0 = input.LA(1);
|
923
942
|
|
@@ -969,7 +988,7 @@ public class UIQueryLexer extends Lexer {
|
|
969
988
|
}
|
970
989
|
switch (alt12) {
|
971
990
|
case 1 :
|
972
|
-
// antlr/UIQuery.g:
|
991
|
+
// antlr/UIQuery.g:96:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\'' | '\\\\' )
|
973
992
|
{
|
974
993
|
match('\\');
|
975
994
|
|
@@ -986,7 +1005,7 @@ public class UIQueryLexer extends Lexer {
|
|
986
1005
|
}
|
987
1006
|
break;
|
988
1007
|
case 2 :
|
989
|
-
// antlr/UIQuery.g:
|
1008
|
+
// antlr/UIQuery.g:97:9: UNICODE_ESC
|
990
1009
|
{
|
991
1010
|
mUNICODE_ESC();
|
992
1011
|
|
@@ -994,7 +1013,7 @@ public class UIQueryLexer extends Lexer {
|
|
994
1013
|
}
|
995
1014
|
break;
|
996
1015
|
case 3 :
|
997
|
-
// antlr/UIQuery.g:
|
1016
|
+
// antlr/UIQuery.g:98:9: OCTAL_ESC
|
998
1017
|
{
|
999
1018
|
mOCTAL_ESC();
|
1000
1019
|
|
@@ -1014,7 +1033,7 @@ public class UIQueryLexer extends Lexer {
|
|
1014
1033
|
// $ANTLR start "OCTAL_ESC"
|
1015
1034
|
public final void mOCTAL_ESC() throws RecognitionException {
|
1016
1035
|
try {
|
1017
|
-
// antlr/UIQuery.g:
|
1036
|
+
// antlr/UIQuery.g:103:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
|
1018
1037
|
int alt13=3;
|
1019
1038
|
int LA13_0 = input.LA(1);
|
1020
1039
|
|
@@ -1065,7 +1084,7 @@ public class UIQueryLexer extends Lexer {
|
|
1065
1084
|
}
|
1066
1085
|
switch (alt13) {
|
1067
1086
|
case 1 :
|
1068
|
-
// antlr/UIQuery.g:
|
1087
|
+
// antlr/UIQuery.g:103:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
|
1069
1088
|
{
|
1070
1089
|
match('\\');
|
1071
1090
|
|
@@ -1102,7 +1121,7 @@ public class UIQueryLexer extends Lexer {
|
|
1102
1121
|
}
|
1103
1122
|
break;
|
1104
1123
|
case 2 :
|
1105
|
-
// antlr/UIQuery.g:
|
1124
|
+
// antlr/UIQuery.g:104:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
|
1106
1125
|
{
|
1107
1126
|
match('\\');
|
1108
1127
|
|
@@ -1129,7 +1148,7 @@ public class UIQueryLexer extends Lexer {
|
|
1129
1148
|
}
|
1130
1149
|
break;
|
1131
1150
|
case 3 :
|
1132
|
-
// antlr/UIQuery.g:
|
1151
|
+
// antlr/UIQuery.g:105:9: '\\\\' ( '0' .. '7' )
|
1133
1152
|
{
|
1134
1153
|
match('\\');
|
1135
1154
|
|
@@ -1158,8 +1177,8 @@ public class UIQueryLexer extends Lexer {
|
|
1158
1177
|
// $ANTLR start "UNICODE_ESC"
|
1159
1178
|
public final void mUNICODE_ESC() throws RecognitionException {
|
1160
1179
|
try {
|
1161
|
-
// antlr/UIQuery.g:
|
1162
|
-
// antlr/UIQuery.g:
|
1180
|
+
// antlr/UIQuery.g:110:5: ( '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT )
|
1181
|
+
// antlr/UIQuery.g:110:9: '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
|
1163
1182
|
{
|
1164
1183
|
match('\\');
|
1165
1184
|
|