calabash-android 0.4.7.pre8 → 0.4.7.pre9
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.
- checksums.yaml +4 -4
- data/lib/calabash-android/lib/TestServer.apk +0 -0
- data/lib/calabash-android/version.rb +1 -1
- data/test-server/instrumentation-backend/antlr/UIQuery.g +10 -2
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/HttpServer.java +1 -1
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/Query.java +1 -4
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/UIQuery.tokens +16 -15
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/antlr/UIQueryLexer.java +547 -355
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/antlr/UIQueryParser.java +29 -28
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/ast/UIQueryASTClassName.java +8 -3
- metadata +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
// $ANTLR 3.4 antlr/UIQuery.g 2013-
|
1
|
+
// $ANTLR 3.4 antlr/UIQuery.g 2013-06-26 21:55:04
|
2
2
|
|
3
3
|
package sh.calaba.instrumentationbackend.query.antlr;
|
4
4
|
|
@@ -14,7 +14,7 @@ import org.antlr.runtime.tree.*;
|
|
14
14
|
@SuppressWarnings({"all", "warnings", "unchecked"})
|
15
15
|
public class UIQueryParser extends Parser {
|
16
16
|
public static final String[] tokenNames = new String[] {
|
17
|
-
"<invalid>", "<EOR>", "<DOWN>", "<UP>", "ALL", "BEGINPRED", "BOOL", "DIRECTION", "ENDPRED", "ESC_SEQ", "FILTER_COLON", "HEX_DIGIT", "INT", "NAME", "NIL", "OCTAL_ESC", "QUALIFIED_NAME", "RELATION", "STRING", "UNICODE_ESC", "VISIBLE", "WHITE", "WILDCARD"
|
17
|
+
"<invalid>", "<EOR>", "<DOWN>", "<UP>", "ALL", "BEGINPRED", "BOOL", "DIRECTION", "DOUBLE_ESC_SEQ", "ENDPRED", "ESC_SEQ", "FILTER_COLON", "HEX_DIGIT", "INT", "NAME", "NIL", "OCTAL_ESC", "QUALIFIED_NAME", "RELATION", "STRING", "UNICODE_ESC", "VISIBLE", "WHITE", "WILDCARD"
|
18
18
|
};
|
19
19
|
|
20
20
|
public static final int EOF=-1;
|
@@ -22,21 +22,22 @@ public class UIQueryParser extends Parser {
|
|
22
22
|
public static final int BEGINPRED=5;
|
23
23
|
public static final int BOOL=6;
|
24
24
|
public static final int DIRECTION=7;
|
25
|
-
public static final int
|
26
|
-
public static final int
|
27
|
-
public static final int
|
28
|
-
public static final int
|
29
|
-
public static final int
|
30
|
-
public static final int
|
31
|
-
public static final int
|
32
|
-
public static final int
|
33
|
-
public static final int
|
34
|
-
public static final int
|
35
|
-
public static final int
|
36
|
-
public static final int
|
37
|
-
public static final int
|
38
|
-
public static final int
|
39
|
-
public static final int
|
25
|
+
public static final int DOUBLE_ESC_SEQ=8;
|
26
|
+
public static final int ENDPRED=9;
|
27
|
+
public static final int ESC_SEQ=10;
|
28
|
+
public static final int FILTER_COLON=11;
|
29
|
+
public static final int HEX_DIGIT=12;
|
30
|
+
public static final int INT=13;
|
31
|
+
public static final int NAME=14;
|
32
|
+
public static final int NIL=15;
|
33
|
+
public static final int OCTAL_ESC=16;
|
34
|
+
public static final int QUALIFIED_NAME=17;
|
35
|
+
public static final int RELATION=18;
|
36
|
+
public static final int STRING=19;
|
37
|
+
public static final int UNICODE_ESC=20;
|
38
|
+
public static final int VISIBLE=21;
|
39
|
+
public static final int WHITE=22;
|
40
|
+
public static final int WILDCARD=23;
|
40
41
|
|
41
42
|
// delegates
|
42
43
|
public Parser[] getDelegates() {
|
@@ -744,9 +745,9 @@ public TreeAdaptor getTreeAdaptor() {
|
|
744
745
|
|
745
746
|
|
746
747
|
|
747
|
-
public static final BitSet FOLLOW_expr_in_query56 = new BitSet(new long[]{
|
748
|
-
public static final BitSet FOLLOW_WHITE_in_query59 = new BitSet(new long[]{
|
749
|
-
public static final BitSet FOLLOW_expr_in_query62 = new BitSet(new long[]{
|
748
|
+
public static final BitSet FOLLOW_expr_in_query56 = new BitSet(new long[]{0x0000000000400002L});
|
749
|
+
public static final BitSet FOLLOW_WHITE_in_query59 = new BitSet(new long[]{0x0000000000A240B0L});
|
750
|
+
public static final BitSet FOLLOW_expr_in_query62 = new BitSet(new long[]{0x0000000000400002L});
|
750
751
|
public static final BitSet FOLLOW_className_in_expr80 = new BitSet(new long[]{0x0000000000000002L});
|
751
752
|
public static final BitSet FOLLOW_filter_in_expr84 = new BitSet(new long[]{0x0000000000000002L});
|
752
753
|
public static final BitSet FOLLOW_visibility_in_expr88 = new BitSet(new long[]{0x0000000000000002L});
|
@@ -757,15 +758,15 @@ public TreeAdaptor getTreeAdaptor() {
|
|
757
758
|
public static final BitSet FOLLOW_QUALIFIED_NAME_in_className150 = new BitSet(new long[]{0x0000000000000002L});
|
758
759
|
public static final BitSet FOLLOW_ALL_in_visibility188 = new BitSet(new long[]{0x0000000000000002L});
|
759
760
|
public static final BitSet FOLLOW_VISIBLE_in_visibility193 = new BitSet(new long[]{0x0000000000000002L});
|
760
|
-
public static final BitSet FOLLOW_NAME_in_filter220 = new BitSet(new long[]{
|
761
|
-
public static final BitSet FOLLOW_FILTER_COLON_in_filter222 = new BitSet(new long[]{
|
761
|
+
public static final BitSet FOLLOW_NAME_in_filter220 = new BitSet(new long[]{0x0000000000000800L});
|
762
|
+
public static final BitSet FOLLOW_FILTER_COLON_in_filter222 = new BitSet(new long[]{0x000000000008A040L});
|
762
763
|
public static final BitSet FOLLOW_set_in_filter225 = new BitSet(new long[]{0x0000000000000002L});
|
763
|
-
public static final BitSet FOLLOW_BEGINPRED_in_predicate258 = new BitSet(new long[]{
|
764
|
-
public static final BitSet FOLLOW_NAME_in_predicate261 = new BitSet(new long[]{
|
765
|
-
public static final BitSet FOLLOW_WHITE_in_predicate263 = new BitSet(new long[]{
|
766
|
-
public static final BitSet FOLLOW_RELATION_in_predicate266 = new BitSet(new long[]{
|
767
|
-
public static final BitSet FOLLOW_WHITE_in_predicate268 = new BitSet(new long[]{
|
768
|
-
public static final BitSet FOLLOW_set_in_predicate271 = new BitSet(new long[]{
|
764
|
+
public static final BitSet FOLLOW_BEGINPRED_in_predicate258 = new BitSet(new long[]{0x0000000000004000L});
|
765
|
+
public static final BitSet FOLLOW_NAME_in_predicate261 = new BitSet(new long[]{0x0000000000400000L});
|
766
|
+
public static final BitSet FOLLOW_WHITE_in_predicate263 = new BitSet(new long[]{0x0000000000040000L});
|
767
|
+
public static final BitSet FOLLOW_RELATION_in_predicate266 = new BitSet(new long[]{0x0000000000400000L});
|
768
|
+
public static final BitSet FOLLOW_WHITE_in_predicate268 = new BitSet(new long[]{0x000000000008A040L});
|
769
|
+
public static final BitSet FOLLOW_set_in_predicate271 = new BitSet(new long[]{0x0000000000000200L});
|
769
770
|
public static final BitSet FOLLOW_ENDPRED_in_predicate287 = new BitSet(new long[]{0x0000000000000002L});
|
770
771
|
|
771
772
|
}
|
@@ -10,8 +10,7 @@ public class UIQueryASTClassName implements UIQueryAST {
|
|
10
10
|
public final Class qualifiedClassName;
|
11
11
|
|
12
12
|
public UIQueryASTClassName(String simpleClassName)
|
13
|
-
{
|
14
|
-
if (simpleClassName == null) {throw new IllegalArgumentException("Cannot instantiate with null class");}
|
13
|
+
{
|
15
14
|
this.simpleClassName = simpleClassName;
|
16
15
|
this.qualifiedClassName = null;
|
17
16
|
}
|
@@ -112,6 +111,9 @@ public class UIQueryASTClassName implements UIQueryAST {
|
|
112
111
|
|
113
112
|
private boolean match(Object o)
|
114
113
|
{
|
114
|
+
if (this.simpleClassName == null && this.qualifiedClassName == null) {
|
115
|
+
return false;
|
116
|
+
}
|
115
117
|
return matchSimpleClassName(o,this.simpleClassName) ||
|
116
118
|
matchQualifiedClassName(o,this.qualifiedClassName);
|
117
119
|
}
|
@@ -122,11 +124,14 @@ public class UIQueryASTClassName implements UIQueryAST {
|
|
122
124
|
}
|
123
125
|
|
124
126
|
public static boolean matchSimpleClassName(Object o, String simpleClassName) {
|
125
|
-
// TODO Auto-generated method stub
|
126
127
|
return simpleClassName != null && simpleClassName.equalsIgnoreCase(o.getClass().getSimpleName());
|
127
128
|
}
|
128
129
|
|
129
130
|
public String toString() {
|
131
|
+
if (this.simpleClassName == null && this.qualifiedClassName == null) {
|
132
|
+
return "Class[null]";
|
133
|
+
}
|
134
|
+
|
130
135
|
if (this.simpleClassName != null)
|
131
136
|
{
|
132
137
|
return "Class["+this.simpleClassName+"]";
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-android
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.7.
|
4
|
+
version: 0.4.7.pre9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Maturana Larsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|