rsense-core 0.5.0
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 +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +1 -0
- data/README.md +35 -0
- data/Rakefile +84 -0
- data/TypeAnnotation.tokens +41 -0
- data/build.xml +84 -0
- data/build_lib/antlr-3.2.jar +0 -0
- data/lib/jars/ant-1.7.0.jar +0 -0
- data/lib/jars/ant-launcher-1.7.0.jar +0 -0
- data/lib/jars/antlr-runtime-3.2.jar +0 -0
- data/lib/jars/bsf-2.3.0.jar +0 -0
- data/lib/rsense-core.rb +28 -0
- data/lib/rsense.jar +0 -0
- data/lib/rsense/core.rb +5 -0
- data/lib/rsense/core/version.rb +5 -0
- data/lib/rsense/parser.rb +6 -0
- data/lib/rsense/ruby.rb +19 -0
- data/lib/rsense/typing.rb +13 -0
- data/lib/rsense/typing/annotation.rb +20 -0
- data/lib/rsense/typing/runtime.rb +23 -0
- data/lib/rsense/typing/vertex.rb +15 -0
- data/lib/rsense/util.rb +9 -0
- data/rsense-core.gemspec +30 -0
- data/src/org/cx4a/rsense/CodeAssist.java +744 -0
- data/src/org/cx4a/rsense/CodeAssistError.java +31 -0
- data/src/org/cx4a/rsense/CodeAssistResult.java +42 -0
- data/src/org/cx4a/rsense/CodeCompletionResult.java +65 -0
- data/src/org/cx4a/rsense/FindDefinitionResult.java +24 -0
- data/src/org/cx4a/rsense/LoadResult.java +19 -0
- data/src/org/cx4a/rsense/Main.java +916 -0
- data/src/org/cx4a/rsense/Options.java +353 -0
- data/src/org/cx4a/rsense/Project.java +103 -0
- data/src/org/cx4a/rsense/TypeInferenceResult.java +25 -0
- data/src/org/cx4a/rsense/WhereResult.java +19 -0
- data/src/org/cx4a/rsense/parser/TypeAnnotation.g +221 -0
- data/src/org/cx4a/rsense/parser/TypeAnnotationLexer.java +1759 -0
- data/src/org/cx4a/rsense/parser/TypeAnnotationParser.java +2025 -0
- data/src/org/cx4a/rsense/ruby/Block.java +10 -0
- data/src/org/cx4a/rsense/ruby/Context.java +75 -0
- data/src/org/cx4a/rsense/ruby/DynamicMethod.java +10 -0
- data/src/org/cx4a/rsense/ruby/DynamicScope.java +51 -0
- data/src/org/cx4a/rsense/ruby/Frame.java +95 -0
- data/src/org/cx4a/rsense/ruby/IRubyObject.java +17 -0
- data/src/org/cx4a/rsense/ruby/LocalScope.java +43 -0
- data/src/org/cx4a/rsense/ruby/MetaClass.java +50 -0
- data/src/org/cx4a/rsense/ruby/Ruby.java +242 -0
- data/src/org/cx4a/rsense/ruby/RubyClass.java +146 -0
- data/src/org/cx4a/rsense/ruby/RubyModule.java +255 -0
- data/src/org/cx4a/rsense/ruby/RubyObject.java +94 -0
- data/src/org/cx4a/rsense/ruby/Scope.java +7 -0
- data/src/org/cx4a/rsense/ruby/SpecialObject.java +15 -0
- data/src/org/cx4a/rsense/ruby/Visibility.java +17 -0
- data/src/org/cx4a/rsense/typing/Graph.java +1690 -0
- data/src/org/cx4a/rsense/typing/Propagation.java +73 -0
- data/src/org/cx4a/rsense/typing/Template.java +84 -0
- data/src/org/cx4a/rsense/typing/TemplateAttribute.java +158 -0
- data/src/org/cx4a/rsense/typing/TypeSet.java +48 -0
- data/src/org/cx4a/rsense/typing/annotation/ClassType.java +57 -0
- data/src/org/cx4a/rsense/typing/annotation/MethodType.java +79 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeAnnotation.java +4 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeAny.java +7 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeApplication.java +37 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeConstraint.java +29 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeExpression.java +11 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeIdentity.java +59 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeOptional.java +22 -0
- data/src/org/cx4a/rsense/typing/annotation/TypePragma.java +22 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeSplat.java +22 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeTuple.java +35 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeUnion.java +23 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeVariable.java +44 -0
- data/src/org/cx4a/rsense/typing/runtime/AliasMethod.java +94 -0
- data/src/org/cx4a/rsense/typing/runtime/AnnotationHelper.java +69 -0
- data/src/org/cx4a/rsense/typing/runtime/AnnotationResolver.java +523 -0
- data/src/org/cx4a/rsense/typing/runtime/Array.java +84 -0
- data/src/org/cx4a/rsense/typing/runtime/ClassTag.java +27 -0
- data/src/org/cx4a/rsense/typing/runtime/DefaultMethod.java +115 -0
- data/src/org/cx4a/rsense/typing/runtime/Hash.java +131 -0
- data/src/org/cx4a/rsense/typing/runtime/LoopTag.java +21 -0
- data/src/org/cx4a/rsense/typing/runtime/Method.java +32 -0
- data/src/org/cx4a/rsense/typing/runtime/MonomorphicObject.java +77 -0
- data/src/org/cx4a/rsense/typing/runtime/ObjectAllocator.java +40 -0
- data/src/org/cx4a/rsense/typing/runtime/PolymorphicObject.java +90 -0
- data/src/org/cx4a/rsense/typing/runtime/Proc.java +100 -0
- data/src/org/cx4a/rsense/typing/runtime/RuntimeHelper.java +1339 -0
- data/src/org/cx4a/rsense/typing/runtime/SpecialMethod.java +119 -0
- data/src/org/cx4a/rsense/typing/runtime/TypeVarMap.java +112 -0
- data/src/org/cx4a/rsense/typing/runtime/VertexHolder.java +48 -0
- data/src/org/cx4a/rsense/typing/vertex/CallVertex.java +122 -0
- data/src/org/cx4a/rsense/typing/vertex/MultipleAsgnVertex.java +23 -0
- data/src/org/cx4a/rsense/typing/vertex/PassThroughVertex.java +20 -0
- data/src/org/cx4a/rsense/typing/vertex/SValueVertex.java +24 -0
- data/src/org/cx4a/rsense/typing/vertex/SplatVertex.java +24 -0
- data/src/org/cx4a/rsense/typing/vertex/ToAryVertex.java +24 -0
- data/src/org/cx4a/rsense/typing/vertex/TypeVarVertex.java +22 -0
- data/src/org/cx4a/rsense/typing/vertex/Vertex.java +221 -0
- data/src/org/cx4a/rsense/typing/vertex/YieldVertex.java +70 -0
- data/src/org/cx4a/rsense/util/HereDocReader.java +48 -0
- data/src/org/cx4a/rsense/util/Logger.java +111 -0
- data/src/org/cx4a/rsense/util/NodeUtil.java +198 -0
- data/src/org/cx4a/rsense/util/SourceLocation.java +70 -0
- data/src/org/cx4a/rsense/util/StringUtil.java +63 -0
- data/src/resources/org/cx4a/rsense/rsense.properties +1 -0
- data/stubs/1.8/_builtin.rb +3006 -0
- data/stubs/1.8/bigdecimal.rb +131 -0
- data/stubs/1.8/cgi.rb +257 -0
- data/stubs/1.8/date.rb +147 -0
- data/stubs/1.8/optparse.rb +113 -0
- data/stubs/1.8/rational.rb +47 -0
- data/stubs/1.8/set.rb +94 -0
- data/stubs/1.8/socket.rb +461 -0
- data/stubs/1.8/stringio.rb +129 -0
- data/test/data/a file.rb +1 -0
- data/test/data/benchmark.rb +12 -0
- data/test/data/crlf.rb +5 -0
- data/test/data/test.rb +19 -0
- data/test/script/all.rsense +2 -0
- data/test/script/array_dynamic.rsense +25 -0
- data/test/script/block_nested.rsense +7 -0
- data/test/script/builtin.rsense +785 -0
- data/test/script/class_method_partial_update.rsense +52 -0
- data/test/script/class_partial_update.rsense +17 -0
- data/test/script/find-definition.rsense +72 -0
- data/test/script/method_arg_onearg.rsense +6 -0
- data/test/script/method_arg_optional.rsense +7 -0
- data/test/script/method_partial_update.rsense +14 -0
- data/test/script/method_yield_arrayarg.rsense +8 -0
- data/test/script/method_yield_arrayarg_expand.rsense +8 -0
- data/test/script/method_yield_arrayarg_splat.rsense +17 -0
- data/test/script/misc.rsense +2 -0
- data/test/script/proc_higher_order.rsense +22 -0
- data/test/script/regression.rsense +95 -0
- data/test/script/stdlib.rsense +66 -0
- data/test/script/where.rsense +41 -0
- metadata +315 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
package org.cx4a.rsense;
|
|
2
|
+
|
|
3
|
+
import org.cx4a.rsense.typing.TypeSet;
|
|
4
|
+
|
|
5
|
+
public class TypeInferenceResult extends CodeAssistResult {
|
|
6
|
+
private TypeSet typeSet = TypeSet.EMPTY;
|
|
7
|
+
|
|
8
|
+
public TypeInferenceResult() {
|
|
9
|
+
super();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public void setTypeSet(TypeSet typeSet) {
|
|
13
|
+
this.typeSet = typeSet;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public TypeSet getTypeSet() {
|
|
17
|
+
return typeSet;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public static TypeInferenceResult failWithException(String message, Throwable cause) {
|
|
21
|
+
TypeInferenceResult result = new TypeInferenceResult();
|
|
22
|
+
result.addError(new CodeAssistError(message, cause));
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
package org.cx4a.rsense;
|
|
2
|
+
|
|
3
|
+
public class WhereResult extends CodeAssistResult {
|
|
4
|
+
private String name;
|
|
5
|
+
|
|
6
|
+
public String getName() {
|
|
7
|
+
return name;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public void setName(String name) {
|
|
11
|
+
this.name = name;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public static WhereResult failWithException(String message, Throwable cause) {
|
|
15
|
+
WhereResult result = new WhereResult();
|
|
16
|
+
result.addError(new CodeAssistError(message, cause));
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
grammar TypeAnnotation;
|
|
2
|
+
|
|
3
|
+
options {
|
|
4
|
+
backtrack=true;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@header {
|
|
8
|
+
package org.cx4a.rsense.parser;
|
|
9
|
+
|
|
10
|
+
import java.util.List;
|
|
11
|
+
import java.util.ArrayList;
|
|
12
|
+
import java.util.Collections;
|
|
13
|
+
|
|
14
|
+
import org.cx4a.rsense.typing.annotation.TypeAnnotation;
|
|
15
|
+
import org.cx4a.rsense.typing.annotation.MethodType;
|
|
16
|
+
import org.cx4a.rsense.typing.annotation.ClassType;
|
|
17
|
+
import org.cx4a.rsense.typing.annotation.TypeExpression;
|
|
18
|
+
import org.cx4a.rsense.typing.annotation.TypeVariable;
|
|
19
|
+
import org.cx4a.rsense.typing.annotation.TypeUnion;
|
|
20
|
+
import org.cx4a.rsense.typing.annotation.TypeIdentity;
|
|
21
|
+
import org.cx4a.rsense.typing.annotation.TypeAny;
|
|
22
|
+
import org.cx4a.rsense.typing.annotation.TypeOptional;
|
|
23
|
+
import org.cx4a.rsense.typing.annotation.TypeTuple;
|
|
24
|
+
import org.cx4a.rsense.typing.annotation.TypeSplat;
|
|
25
|
+
import org.cx4a.rsense.typing.annotation.TypeApplication;
|
|
26
|
+
import org.cx4a.rsense.typing.annotation.TypeConstraint;
|
|
27
|
+
import org.cx4a.rsense.typing.annotation.TypePragma;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@lexer::header {
|
|
31
|
+
package org.cx4a.rsense.parser;
|
|
32
|
+
|
|
33
|
+
import org.cx4a.rsense.typing.annotation.TypeAnnotation;
|
|
34
|
+
import org.cx4a.rsense.typing.annotation.MethodType;
|
|
35
|
+
import org.cx4a.rsense.typing.annotation.TypeExpression;
|
|
36
|
+
import org.cx4a.rsense.typing.annotation.TypeVariable;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@members {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
type returns [TypeAnnotation value]
|
|
43
|
+
: method_type { $value = $method_type.value; }
|
|
44
|
+
| class_type { $value = $class_type.value; }
|
|
45
|
+
;
|
|
46
|
+
|
|
47
|
+
method_type returns [MethodType value]
|
|
48
|
+
: name=('::'? ((ID|CONST_ID) ('.'|'::'))* method_name) ('<' type_var_list? ('|' constraint_list)? '>')? method_sig {
|
|
49
|
+
$value = new MethodType($name.text, $type_var_list.value, $constraint_list.value, $method_sig.value);
|
|
50
|
+
}
|
|
51
|
+
;
|
|
52
|
+
|
|
53
|
+
method_sig returns [MethodType.Signature value]
|
|
54
|
+
: '(' ')' block? '->' type_expr { $value = new MethodType.Signature(null, $block.value, $type_expr.value); }
|
|
55
|
+
| t1=type_expr block? '->' t2=type_expr { $value = new MethodType.Signature($t1.value, $block.value, $t2.value); }
|
|
56
|
+
;
|
|
57
|
+
|
|
58
|
+
block returns [MethodType.Block value]
|
|
59
|
+
: '{' method_sig '}' { $value = new MethodType.Block($method_sig.value); }
|
|
60
|
+
;
|
|
61
|
+
|
|
62
|
+
method_name
|
|
63
|
+
: METHOD_NAME
|
|
64
|
+
| ID
|
|
65
|
+
| CONST_ID
|
|
66
|
+
;
|
|
67
|
+
|
|
68
|
+
class_type returns [ClassType value]
|
|
69
|
+
: name=('::'? (CONST_ID '::')* CONST_ID) ('<' type_var_list? ('|' constraint_list)? '>')? pragma_list? {
|
|
70
|
+
$value = new ClassType($name.text, $type_var_list.value, $constraint_list.value, $pragma_list.value);
|
|
71
|
+
}
|
|
72
|
+
;
|
|
73
|
+
|
|
74
|
+
constraint_list returns [List<TypeConstraint> value]
|
|
75
|
+
: e1=type_expr '<=' e2=type_expr (',' rest=constraint_list)? {
|
|
76
|
+
$value = new ArrayList<TypeConstraint>();
|
|
77
|
+
$value.add(new TypeConstraint(TypeExpression.Type.SUBTYPE_CONS, $e1.value, $e2.value));
|
|
78
|
+
if ($rest.value != null) {
|
|
79
|
+
$value.addAll($rest.value);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
;
|
|
83
|
+
|
|
84
|
+
pragma_list returns [List<TypePragma> value]
|
|
85
|
+
: pragma (',' rest=pragma_list)? {
|
|
86
|
+
$value = new ArrayList<TypePragma>();
|
|
87
|
+
$value.add($pragma.value);
|
|
88
|
+
if ($rest.value != null) {
|
|
89
|
+
$value.addAll($rest.value);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
;
|
|
93
|
+
|
|
94
|
+
pragma returns [TypePragma value]
|
|
95
|
+
: '!nobody' { $value = new TypePragma(TypeExpression.Type.NOBODY_PRAGMA); }
|
|
96
|
+
;
|
|
97
|
+
|
|
98
|
+
type_expr returns [TypeExpression value]
|
|
99
|
+
: single_type_expr or_type_list? {
|
|
100
|
+
if ($or_type_list.value != null) {
|
|
101
|
+
TypeUnion union = new TypeUnion();
|
|
102
|
+
union.add($single_type_expr.value);
|
|
103
|
+
union.addAll($or_type_list.value);
|
|
104
|
+
$value = union;
|
|
105
|
+
} else {
|
|
106
|
+
$value = $single_type_expr.value;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
;
|
|
110
|
+
|
|
111
|
+
type_expr_comma_list returns [List<TypeExpression> value]
|
|
112
|
+
: type_expr (',' rest=type_expr_comma_list)? {
|
|
113
|
+
$value = new ArrayList<TypeExpression>();
|
|
114
|
+
$value.add($type_expr.value);
|
|
115
|
+
if ($rest.value != null) {
|
|
116
|
+
$value.addAll($rest.value);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
;
|
|
120
|
+
|
|
121
|
+
tuple returns [TypeTuple value]
|
|
122
|
+
: '(' type_expr_comma_list ')' {
|
|
123
|
+
$value = new TypeTuple($type_expr_comma_list.value);
|
|
124
|
+
}
|
|
125
|
+
| '[' type_expr_comma_list ']' { // syntax sugar
|
|
126
|
+
$value = new TypeTuple($type_expr_comma_list.value);
|
|
127
|
+
}
|
|
128
|
+
;
|
|
129
|
+
|
|
130
|
+
single_type_expr returns [TypeExpression value]
|
|
131
|
+
: type_var { $value = $type_var.value; }
|
|
132
|
+
| type_ident ('<' type_expr_comma_list '>')? {
|
|
133
|
+
if ($type_expr_comma_list.value != null) {
|
|
134
|
+
$value = new TypeApplication($type_ident.value, $type_expr_comma_list.value);
|
|
135
|
+
} else {
|
|
136
|
+
$value = $type_ident.value;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
| tuple { $value = $tuple.value; }
|
|
140
|
+
| '?' (expr=single_type_expr? | '(' expr=type_expr ')') {
|
|
141
|
+
if ($expr.value != null) {
|
|
142
|
+
$value = new TypeOptional($expr.value);
|
|
143
|
+
} else {
|
|
144
|
+
$value = new TypeAny();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
| '*' (expr=single_type_expr | '(' expr=type_expr ')') { $value = new TypeSplat($expr.value); }
|
|
148
|
+
;
|
|
149
|
+
|
|
150
|
+
or_type_list returns [List<TypeExpression> value]
|
|
151
|
+
: 'or' single_type_expr rest=or_type_list? {
|
|
152
|
+
$value = new ArrayList<TypeExpression>();
|
|
153
|
+
$value.add($single_type_expr.value);
|
|
154
|
+
if ($rest.value != null) {
|
|
155
|
+
$value.addAll($rest.value);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
;
|
|
159
|
+
|
|
160
|
+
type_ident returns [TypeIdentity value]
|
|
161
|
+
: CONST_ID ('::' id=type_ident)? {
|
|
162
|
+
if ($id.value != null) {
|
|
163
|
+
$value = TypeIdentity.newScopedIdentity($CONST_ID.text, $id.value);
|
|
164
|
+
} else {
|
|
165
|
+
$value = TypeIdentity.newRelativeIdentity($CONST_ID.text);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
| '::' id=type_ident {
|
|
169
|
+
$value = TypeIdentity.newAbsoluteIdentity($id.value);
|
|
170
|
+
}
|
|
171
|
+
;
|
|
172
|
+
|
|
173
|
+
type_var returns [TypeVariable value]
|
|
174
|
+
: ID { $value = new TypeVariable($ID.text); }
|
|
175
|
+
;
|
|
176
|
+
|
|
177
|
+
type_var_list returns [List<TypeVariable> value]
|
|
178
|
+
: type_var (',' rest=type_var_list)? {
|
|
179
|
+
$value = new ArrayList<TypeVariable>();
|
|
180
|
+
$value.add($type_var.value);
|
|
181
|
+
if ($rest.value != null) {
|
|
182
|
+
$value.addAll($rest.value);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
;
|
|
186
|
+
|
|
187
|
+
ID
|
|
188
|
+
: ('a'..'z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* '\''*
|
|
189
|
+
;
|
|
190
|
+
|
|
191
|
+
CONST_ID
|
|
192
|
+
: 'A'..'Z' ('a'..'z'|'A'..'Z'|'0'..'9'|'_')*
|
|
193
|
+
;
|
|
194
|
+
|
|
195
|
+
METHOD_NAME
|
|
196
|
+
: '"' METHOD_NAME_UNQUOTED '"'
|
|
197
|
+
| METHOD_NAME_UNQUOTED
|
|
198
|
+
;
|
|
199
|
+
|
|
200
|
+
fragment METHOD_NAME_UNQUOTED
|
|
201
|
+
: ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* ('!'|'?'|'=')?
|
|
202
|
+
| ('..'|'...')
|
|
203
|
+
| ('+'|'+@')
|
|
204
|
+
| ('-'|'-@')
|
|
205
|
+
| ('*'|'**')
|
|
206
|
+
| '/'
|
|
207
|
+
| '%'
|
|
208
|
+
| '|'
|
|
209
|
+
| '^'
|
|
210
|
+
| '&'
|
|
211
|
+
| ('<'|'<<'|'<='|'<=>')
|
|
212
|
+
| ('>'|'>>'|'>=')
|
|
213
|
+
| ('='|'=='|'==='|'=~')
|
|
214
|
+
| ('!'|'!='|'!~'|'!@')
|
|
215
|
+
| ('~'|'~@')
|
|
216
|
+
| ('[]'|'[]=')
|
|
217
|
+
| '::'
|
|
218
|
+
| '`'
|
|
219
|
+
;
|
|
220
|
+
|
|
221
|
+
WHITEESPACE : (' '|'\t'|'\f'|'\n'|'\r') { $channel=HIDDEN; } ;
|
|
@@ -0,0 +1,1759 @@
|
|
|
1
|
+
// $ANTLR 3.2 Sep 23, 2009 12:02:23 /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g 2014-05-11 02:00:52
|
|
2
|
+
|
|
3
|
+
package org.cx4a.rsense.parser;
|
|
4
|
+
|
|
5
|
+
import org.cx4a.rsense.typing.annotation.TypeAnnotation;
|
|
6
|
+
import org.cx4a.rsense.typing.annotation.MethodType;
|
|
7
|
+
import org.cx4a.rsense.typing.annotation.TypeExpression;
|
|
8
|
+
import org.cx4a.rsense.typing.annotation.TypeVariable;
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import org.antlr.runtime.*;
|
|
12
|
+
import java.util.Stack;
|
|
13
|
+
import java.util.List;
|
|
14
|
+
import java.util.ArrayList;
|
|
15
|
+
|
|
16
|
+
public class TypeAnnotationLexer extends Lexer {
|
|
17
|
+
public static final int T__26=26;
|
|
18
|
+
public static final int T__25=25;
|
|
19
|
+
public static final int T__24=24;
|
|
20
|
+
public static final int T__23=23;
|
|
21
|
+
public static final int T__22=22;
|
|
22
|
+
public static final int T__21=21;
|
|
23
|
+
public static final int T__20=20;
|
|
24
|
+
public static final int WHITEESPACE=8;
|
|
25
|
+
public static final int ID=4;
|
|
26
|
+
public static final int EOF=-1;
|
|
27
|
+
public static final int T__9=9;
|
|
28
|
+
public static final int CONST_ID=5;
|
|
29
|
+
public static final int METHOD_NAME=6;
|
|
30
|
+
public static final int T__19=19;
|
|
31
|
+
public static final int T__16=16;
|
|
32
|
+
public static final int T__15=15;
|
|
33
|
+
public static final int METHOD_NAME_UNQUOTED=7;
|
|
34
|
+
public static final int T__18=18;
|
|
35
|
+
public static final int T__17=17;
|
|
36
|
+
public static final int T__12=12;
|
|
37
|
+
public static final int T__11=11;
|
|
38
|
+
public static final int T__14=14;
|
|
39
|
+
public static final int T__13=13;
|
|
40
|
+
public static final int T__10=10;
|
|
41
|
+
|
|
42
|
+
// delegates
|
|
43
|
+
// delegators
|
|
44
|
+
|
|
45
|
+
public TypeAnnotationLexer() {;}
|
|
46
|
+
public TypeAnnotationLexer(CharStream input) {
|
|
47
|
+
this(input, new RecognizerSharedState());
|
|
48
|
+
}
|
|
49
|
+
public TypeAnnotationLexer(CharStream input, RecognizerSharedState state) {
|
|
50
|
+
super(input,state);
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
public String getGrammarFileName() { return "/Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g"; }
|
|
54
|
+
|
|
55
|
+
// $ANTLR start "T__9"
|
|
56
|
+
public final void mT__9() throws RecognitionException {
|
|
57
|
+
try {
|
|
58
|
+
int _type = T__9;
|
|
59
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
60
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:12:6: ( '::' )
|
|
61
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:12:8: '::'
|
|
62
|
+
{
|
|
63
|
+
match("::");
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
state.type = _type;
|
|
69
|
+
state.channel = _channel;
|
|
70
|
+
}
|
|
71
|
+
finally {
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// $ANTLR end "T__9"
|
|
75
|
+
|
|
76
|
+
// $ANTLR start "T__10"
|
|
77
|
+
public final void mT__10() throws RecognitionException {
|
|
78
|
+
try {
|
|
79
|
+
int _type = T__10;
|
|
80
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
81
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:13:7: ( '.' )
|
|
82
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:13:9: '.'
|
|
83
|
+
{
|
|
84
|
+
match('.');
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
state.type = _type;
|
|
89
|
+
state.channel = _channel;
|
|
90
|
+
}
|
|
91
|
+
finally {
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// $ANTLR end "T__10"
|
|
95
|
+
|
|
96
|
+
// $ANTLR start "T__11"
|
|
97
|
+
public final void mT__11() throws RecognitionException {
|
|
98
|
+
try {
|
|
99
|
+
int _type = T__11;
|
|
100
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
101
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:14:7: ( '<' )
|
|
102
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:14:9: '<'
|
|
103
|
+
{
|
|
104
|
+
match('<');
|
|
105
|
+
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
state.type = _type;
|
|
109
|
+
state.channel = _channel;
|
|
110
|
+
}
|
|
111
|
+
finally {
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// $ANTLR end "T__11"
|
|
115
|
+
|
|
116
|
+
// $ANTLR start "T__12"
|
|
117
|
+
public final void mT__12() throws RecognitionException {
|
|
118
|
+
try {
|
|
119
|
+
int _type = T__12;
|
|
120
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
121
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:15:7: ( '|' )
|
|
122
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:15:9: '|'
|
|
123
|
+
{
|
|
124
|
+
match('|');
|
|
125
|
+
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
state.type = _type;
|
|
129
|
+
state.channel = _channel;
|
|
130
|
+
}
|
|
131
|
+
finally {
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// $ANTLR end "T__12"
|
|
135
|
+
|
|
136
|
+
// $ANTLR start "T__13"
|
|
137
|
+
public final void mT__13() throws RecognitionException {
|
|
138
|
+
try {
|
|
139
|
+
int _type = T__13;
|
|
140
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
141
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:16:7: ( '>' )
|
|
142
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:16:9: '>'
|
|
143
|
+
{
|
|
144
|
+
match('>');
|
|
145
|
+
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
state.type = _type;
|
|
149
|
+
state.channel = _channel;
|
|
150
|
+
}
|
|
151
|
+
finally {
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// $ANTLR end "T__13"
|
|
155
|
+
|
|
156
|
+
// $ANTLR start "T__14"
|
|
157
|
+
public final void mT__14() throws RecognitionException {
|
|
158
|
+
try {
|
|
159
|
+
int _type = T__14;
|
|
160
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
161
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:17:7: ( '(' )
|
|
162
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:17:9: '('
|
|
163
|
+
{
|
|
164
|
+
match('(');
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
state.type = _type;
|
|
169
|
+
state.channel = _channel;
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// $ANTLR end "T__14"
|
|
175
|
+
|
|
176
|
+
// $ANTLR start "T__15"
|
|
177
|
+
public final void mT__15() throws RecognitionException {
|
|
178
|
+
try {
|
|
179
|
+
int _type = T__15;
|
|
180
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
181
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:18:7: ( ')' )
|
|
182
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:18:9: ')'
|
|
183
|
+
{
|
|
184
|
+
match(')');
|
|
185
|
+
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
state.type = _type;
|
|
189
|
+
state.channel = _channel;
|
|
190
|
+
}
|
|
191
|
+
finally {
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
// $ANTLR end "T__15"
|
|
195
|
+
|
|
196
|
+
// $ANTLR start "T__16"
|
|
197
|
+
public final void mT__16() throws RecognitionException {
|
|
198
|
+
try {
|
|
199
|
+
int _type = T__16;
|
|
200
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
201
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:19:7: ( '->' )
|
|
202
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:19:9: '->'
|
|
203
|
+
{
|
|
204
|
+
match("->");
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
state.type = _type;
|
|
210
|
+
state.channel = _channel;
|
|
211
|
+
}
|
|
212
|
+
finally {
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
// $ANTLR end "T__16"
|
|
216
|
+
|
|
217
|
+
// $ANTLR start "T__17"
|
|
218
|
+
public final void mT__17() throws RecognitionException {
|
|
219
|
+
try {
|
|
220
|
+
int _type = T__17;
|
|
221
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
222
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:20:7: ( '{' )
|
|
223
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:20:9: '{'
|
|
224
|
+
{
|
|
225
|
+
match('{');
|
|
226
|
+
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
state.type = _type;
|
|
230
|
+
state.channel = _channel;
|
|
231
|
+
}
|
|
232
|
+
finally {
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
// $ANTLR end "T__17"
|
|
236
|
+
|
|
237
|
+
// $ANTLR start "T__18"
|
|
238
|
+
public final void mT__18() throws RecognitionException {
|
|
239
|
+
try {
|
|
240
|
+
int _type = T__18;
|
|
241
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
242
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:21:7: ( '}' )
|
|
243
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:21:9: '}'
|
|
244
|
+
{
|
|
245
|
+
match('}');
|
|
246
|
+
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
state.type = _type;
|
|
250
|
+
state.channel = _channel;
|
|
251
|
+
}
|
|
252
|
+
finally {
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
// $ANTLR end "T__18"
|
|
256
|
+
|
|
257
|
+
// $ANTLR start "T__19"
|
|
258
|
+
public final void mT__19() throws RecognitionException {
|
|
259
|
+
try {
|
|
260
|
+
int _type = T__19;
|
|
261
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
262
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:22:7: ( '<=' )
|
|
263
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:22:9: '<='
|
|
264
|
+
{
|
|
265
|
+
match("<=");
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
state.type = _type;
|
|
271
|
+
state.channel = _channel;
|
|
272
|
+
}
|
|
273
|
+
finally {
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
// $ANTLR end "T__19"
|
|
277
|
+
|
|
278
|
+
// $ANTLR start "T__20"
|
|
279
|
+
public final void mT__20() throws RecognitionException {
|
|
280
|
+
try {
|
|
281
|
+
int _type = T__20;
|
|
282
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
283
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:23:7: ( ',' )
|
|
284
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:23:9: ','
|
|
285
|
+
{
|
|
286
|
+
match(',');
|
|
287
|
+
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
state.type = _type;
|
|
291
|
+
state.channel = _channel;
|
|
292
|
+
}
|
|
293
|
+
finally {
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
// $ANTLR end "T__20"
|
|
297
|
+
|
|
298
|
+
// $ANTLR start "T__21"
|
|
299
|
+
public final void mT__21() throws RecognitionException {
|
|
300
|
+
try {
|
|
301
|
+
int _type = T__21;
|
|
302
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
303
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:24:7: ( '!nobody' )
|
|
304
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:24:9: '!nobody'
|
|
305
|
+
{
|
|
306
|
+
match("!nobody");
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
state.type = _type;
|
|
312
|
+
state.channel = _channel;
|
|
313
|
+
}
|
|
314
|
+
finally {
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
// $ANTLR end "T__21"
|
|
318
|
+
|
|
319
|
+
// $ANTLR start "T__22"
|
|
320
|
+
public final void mT__22() throws RecognitionException {
|
|
321
|
+
try {
|
|
322
|
+
int _type = T__22;
|
|
323
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
324
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:25:7: ( '[' )
|
|
325
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:25:9: '['
|
|
326
|
+
{
|
|
327
|
+
match('[');
|
|
328
|
+
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
state.type = _type;
|
|
332
|
+
state.channel = _channel;
|
|
333
|
+
}
|
|
334
|
+
finally {
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
// $ANTLR end "T__22"
|
|
338
|
+
|
|
339
|
+
// $ANTLR start "T__23"
|
|
340
|
+
public final void mT__23() throws RecognitionException {
|
|
341
|
+
try {
|
|
342
|
+
int _type = T__23;
|
|
343
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
344
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:26:7: ( ']' )
|
|
345
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:26:9: ']'
|
|
346
|
+
{
|
|
347
|
+
match(']');
|
|
348
|
+
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
state.type = _type;
|
|
352
|
+
state.channel = _channel;
|
|
353
|
+
}
|
|
354
|
+
finally {
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
// $ANTLR end "T__23"
|
|
358
|
+
|
|
359
|
+
// $ANTLR start "T__24"
|
|
360
|
+
public final void mT__24() throws RecognitionException {
|
|
361
|
+
try {
|
|
362
|
+
int _type = T__24;
|
|
363
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
364
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:27:7: ( '?' )
|
|
365
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:27:9: '?'
|
|
366
|
+
{
|
|
367
|
+
match('?');
|
|
368
|
+
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
state.type = _type;
|
|
372
|
+
state.channel = _channel;
|
|
373
|
+
}
|
|
374
|
+
finally {
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
// $ANTLR end "T__24"
|
|
378
|
+
|
|
379
|
+
// $ANTLR start "T__25"
|
|
380
|
+
public final void mT__25() throws RecognitionException {
|
|
381
|
+
try {
|
|
382
|
+
int _type = T__25;
|
|
383
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
384
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:28:7: ( '*' )
|
|
385
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:28:9: '*'
|
|
386
|
+
{
|
|
387
|
+
match('*');
|
|
388
|
+
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
state.type = _type;
|
|
392
|
+
state.channel = _channel;
|
|
393
|
+
}
|
|
394
|
+
finally {
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
// $ANTLR end "T__25"
|
|
398
|
+
|
|
399
|
+
// $ANTLR start "T__26"
|
|
400
|
+
public final void mT__26() throws RecognitionException {
|
|
401
|
+
try {
|
|
402
|
+
int _type = T__26;
|
|
403
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
404
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:29:7: ( 'or' )
|
|
405
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:29:9: 'or'
|
|
406
|
+
{
|
|
407
|
+
match("or");
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
state.type = _type;
|
|
413
|
+
state.channel = _channel;
|
|
414
|
+
}
|
|
415
|
+
finally {
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
// $ANTLR end "T__26"
|
|
419
|
+
|
|
420
|
+
// $ANTLR start "ID"
|
|
421
|
+
public final void mID() throws RecognitionException {
|
|
422
|
+
try {
|
|
423
|
+
int _type = ID;
|
|
424
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
425
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:188:5: ( ( 'a' .. 'z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* ( '\\'' )* )
|
|
426
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:188:7: ( 'a' .. 'z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* ( '\\'' )*
|
|
427
|
+
{
|
|
428
|
+
if ( input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
|
|
429
|
+
input.consume();
|
|
430
|
+
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
MismatchedSetException mse = new MismatchedSetException(null,input);
|
|
434
|
+
recover(mse);
|
|
435
|
+
throw mse;}
|
|
436
|
+
|
|
437
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:188:22: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
|
|
438
|
+
loop1:
|
|
439
|
+
do {
|
|
440
|
+
int alt1=2;
|
|
441
|
+
int LA1_0 = input.LA(1);
|
|
442
|
+
|
|
443
|
+
if ( ((LA1_0>='0' && LA1_0<='9')||(LA1_0>='A' && LA1_0<='Z')||LA1_0=='_'||(LA1_0>='a' && LA1_0<='z')) ) {
|
|
444
|
+
alt1=1;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
switch (alt1) {
|
|
449
|
+
case 1 :
|
|
450
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:
|
|
451
|
+
{
|
|
452
|
+
if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
|
|
453
|
+
input.consume();
|
|
454
|
+
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
MismatchedSetException mse = new MismatchedSetException(null,input);
|
|
458
|
+
recover(mse);
|
|
459
|
+
throw mse;}
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
}
|
|
463
|
+
break;
|
|
464
|
+
|
|
465
|
+
default :
|
|
466
|
+
break loop1;
|
|
467
|
+
}
|
|
468
|
+
} while (true);
|
|
469
|
+
|
|
470
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:188:56: ( '\\'' )*
|
|
471
|
+
loop2:
|
|
472
|
+
do {
|
|
473
|
+
int alt2=2;
|
|
474
|
+
int LA2_0 = input.LA(1);
|
|
475
|
+
|
|
476
|
+
if ( (LA2_0=='\'') ) {
|
|
477
|
+
alt2=1;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
switch (alt2) {
|
|
482
|
+
case 1 :
|
|
483
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:188:56: '\\''
|
|
484
|
+
{
|
|
485
|
+
match('\'');
|
|
486
|
+
|
|
487
|
+
}
|
|
488
|
+
break;
|
|
489
|
+
|
|
490
|
+
default :
|
|
491
|
+
break loop2;
|
|
492
|
+
}
|
|
493
|
+
} while (true);
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
state.type = _type;
|
|
499
|
+
state.channel = _channel;
|
|
500
|
+
}
|
|
501
|
+
finally {
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
// $ANTLR end "ID"
|
|
505
|
+
|
|
506
|
+
// $ANTLR start "CONST_ID"
|
|
507
|
+
public final void mCONST_ID() throws RecognitionException {
|
|
508
|
+
try {
|
|
509
|
+
int _type = CONST_ID;
|
|
510
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
511
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:192:5: ( 'A' .. 'Z' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* )
|
|
512
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:192:7: 'A' .. 'Z' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
|
|
513
|
+
{
|
|
514
|
+
matchRange('A','Z');
|
|
515
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:192:16: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
|
|
516
|
+
loop3:
|
|
517
|
+
do {
|
|
518
|
+
int alt3=2;
|
|
519
|
+
int LA3_0 = input.LA(1);
|
|
520
|
+
|
|
521
|
+
if ( ((LA3_0>='0' && LA3_0<='9')||(LA3_0>='A' && LA3_0<='Z')||LA3_0=='_'||(LA3_0>='a' && LA3_0<='z')) ) {
|
|
522
|
+
alt3=1;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
switch (alt3) {
|
|
527
|
+
case 1 :
|
|
528
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:
|
|
529
|
+
{
|
|
530
|
+
if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
|
|
531
|
+
input.consume();
|
|
532
|
+
|
|
533
|
+
}
|
|
534
|
+
else {
|
|
535
|
+
MismatchedSetException mse = new MismatchedSetException(null,input);
|
|
536
|
+
recover(mse);
|
|
537
|
+
throw mse;}
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
}
|
|
541
|
+
break;
|
|
542
|
+
|
|
543
|
+
default :
|
|
544
|
+
break loop3;
|
|
545
|
+
}
|
|
546
|
+
} while (true);
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
state.type = _type;
|
|
552
|
+
state.channel = _channel;
|
|
553
|
+
}
|
|
554
|
+
finally {
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
// $ANTLR end "CONST_ID"
|
|
558
|
+
|
|
559
|
+
// $ANTLR start "METHOD_NAME"
|
|
560
|
+
public final void mMETHOD_NAME() throws RecognitionException {
|
|
561
|
+
try {
|
|
562
|
+
int _type = METHOD_NAME;
|
|
563
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
564
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:196:5: ( '\"' METHOD_NAME_UNQUOTED '\"' | METHOD_NAME_UNQUOTED )
|
|
565
|
+
int alt4=2;
|
|
566
|
+
int LA4_0 = input.LA(1);
|
|
567
|
+
|
|
568
|
+
if ( (LA4_0=='\"') ) {
|
|
569
|
+
alt4=1;
|
|
570
|
+
}
|
|
571
|
+
else if ( (LA4_0=='!'||(LA4_0>='%' && LA4_0<='&')||(LA4_0>='*' && LA4_0<='+')||(LA4_0>='-' && LA4_0<='/')||LA4_0==':'||(LA4_0>='<' && LA4_0<='>')||(LA4_0>='A' && LA4_0<='[')||(LA4_0>='^' && LA4_0<='z')||LA4_0=='|'||LA4_0=='~') ) {
|
|
572
|
+
alt4=2;
|
|
573
|
+
}
|
|
574
|
+
else {
|
|
575
|
+
NoViableAltException nvae =
|
|
576
|
+
new NoViableAltException("", 4, 0, input);
|
|
577
|
+
|
|
578
|
+
throw nvae;
|
|
579
|
+
}
|
|
580
|
+
switch (alt4) {
|
|
581
|
+
case 1 :
|
|
582
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:196:7: '\"' METHOD_NAME_UNQUOTED '\"'
|
|
583
|
+
{
|
|
584
|
+
match('\"');
|
|
585
|
+
mMETHOD_NAME_UNQUOTED();
|
|
586
|
+
match('\"');
|
|
587
|
+
|
|
588
|
+
}
|
|
589
|
+
break;
|
|
590
|
+
case 2 :
|
|
591
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:197:7: METHOD_NAME_UNQUOTED
|
|
592
|
+
{
|
|
593
|
+
mMETHOD_NAME_UNQUOTED();
|
|
594
|
+
|
|
595
|
+
}
|
|
596
|
+
break;
|
|
597
|
+
|
|
598
|
+
}
|
|
599
|
+
state.type = _type;
|
|
600
|
+
state.channel = _channel;
|
|
601
|
+
}
|
|
602
|
+
finally {
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
// $ANTLR end "METHOD_NAME"
|
|
606
|
+
|
|
607
|
+
// $ANTLR start "METHOD_NAME_UNQUOTED"
|
|
608
|
+
public final void mMETHOD_NAME_UNQUOTED() throws RecognitionException {
|
|
609
|
+
try {
|
|
610
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:201:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* ( '!' | '?' | '=' )? | ( '..' | '...' ) | ( '+' | '+@' ) | ( '-' | '-@' ) | ( '*' | '**' ) | '/' | '%' | '|' | '^' | '&' | ( '<' | '<<' | '<=' | '<=>' ) | ( '>' | '>>' | '>=' ) | ( '=' | '==' | '===' | '=~' ) | ( '!' | '!=' | '!~' | '!@' ) | ( '~' | '~@' ) | ( '[]' | '[]=' ) | '::' | '`' )
|
|
611
|
+
int alt17=18;
|
|
612
|
+
switch ( input.LA(1) ) {
|
|
613
|
+
case 'A':
|
|
614
|
+
case 'B':
|
|
615
|
+
case 'C':
|
|
616
|
+
case 'D':
|
|
617
|
+
case 'E':
|
|
618
|
+
case 'F':
|
|
619
|
+
case 'G':
|
|
620
|
+
case 'H':
|
|
621
|
+
case 'I':
|
|
622
|
+
case 'J':
|
|
623
|
+
case 'K':
|
|
624
|
+
case 'L':
|
|
625
|
+
case 'M':
|
|
626
|
+
case 'N':
|
|
627
|
+
case 'O':
|
|
628
|
+
case 'P':
|
|
629
|
+
case 'Q':
|
|
630
|
+
case 'R':
|
|
631
|
+
case 'S':
|
|
632
|
+
case 'T':
|
|
633
|
+
case 'U':
|
|
634
|
+
case 'V':
|
|
635
|
+
case 'W':
|
|
636
|
+
case 'X':
|
|
637
|
+
case 'Y':
|
|
638
|
+
case 'Z':
|
|
639
|
+
case '_':
|
|
640
|
+
case 'a':
|
|
641
|
+
case 'b':
|
|
642
|
+
case 'c':
|
|
643
|
+
case 'd':
|
|
644
|
+
case 'e':
|
|
645
|
+
case 'f':
|
|
646
|
+
case 'g':
|
|
647
|
+
case 'h':
|
|
648
|
+
case 'i':
|
|
649
|
+
case 'j':
|
|
650
|
+
case 'k':
|
|
651
|
+
case 'l':
|
|
652
|
+
case 'm':
|
|
653
|
+
case 'n':
|
|
654
|
+
case 'o':
|
|
655
|
+
case 'p':
|
|
656
|
+
case 'q':
|
|
657
|
+
case 'r':
|
|
658
|
+
case 's':
|
|
659
|
+
case 't':
|
|
660
|
+
case 'u':
|
|
661
|
+
case 'v':
|
|
662
|
+
case 'w':
|
|
663
|
+
case 'x':
|
|
664
|
+
case 'y':
|
|
665
|
+
case 'z':
|
|
666
|
+
{
|
|
667
|
+
alt17=1;
|
|
668
|
+
}
|
|
669
|
+
break;
|
|
670
|
+
case '.':
|
|
671
|
+
{
|
|
672
|
+
alt17=2;
|
|
673
|
+
}
|
|
674
|
+
break;
|
|
675
|
+
case '+':
|
|
676
|
+
{
|
|
677
|
+
alt17=3;
|
|
678
|
+
}
|
|
679
|
+
break;
|
|
680
|
+
case '-':
|
|
681
|
+
{
|
|
682
|
+
alt17=4;
|
|
683
|
+
}
|
|
684
|
+
break;
|
|
685
|
+
case '*':
|
|
686
|
+
{
|
|
687
|
+
alt17=5;
|
|
688
|
+
}
|
|
689
|
+
break;
|
|
690
|
+
case '/':
|
|
691
|
+
{
|
|
692
|
+
alt17=6;
|
|
693
|
+
}
|
|
694
|
+
break;
|
|
695
|
+
case '%':
|
|
696
|
+
{
|
|
697
|
+
alt17=7;
|
|
698
|
+
}
|
|
699
|
+
break;
|
|
700
|
+
case '|':
|
|
701
|
+
{
|
|
702
|
+
alt17=8;
|
|
703
|
+
}
|
|
704
|
+
break;
|
|
705
|
+
case '^':
|
|
706
|
+
{
|
|
707
|
+
alt17=9;
|
|
708
|
+
}
|
|
709
|
+
break;
|
|
710
|
+
case '&':
|
|
711
|
+
{
|
|
712
|
+
alt17=10;
|
|
713
|
+
}
|
|
714
|
+
break;
|
|
715
|
+
case '<':
|
|
716
|
+
{
|
|
717
|
+
alt17=11;
|
|
718
|
+
}
|
|
719
|
+
break;
|
|
720
|
+
case '>':
|
|
721
|
+
{
|
|
722
|
+
alt17=12;
|
|
723
|
+
}
|
|
724
|
+
break;
|
|
725
|
+
case '=':
|
|
726
|
+
{
|
|
727
|
+
alt17=13;
|
|
728
|
+
}
|
|
729
|
+
break;
|
|
730
|
+
case '!':
|
|
731
|
+
{
|
|
732
|
+
alt17=14;
|
|
733
|
+
}
|
|
734
|
+
break;
|
|
735
|
+
case '~':
|
|
736
|
+
{
|
|
737
|
+
alt17=15;
|
|
738
|
+
}
|
|
739
|
+
break;
|
|
740
|
+
case '[':
|
|
741
|
+
{
|
|
742
|
+
alt17=16;
|
|
743
|
+
}
|
|
744
|
+
break;
|
|
745
|
+
case ':':
|
|
746
|
+
{
|
|
747
|
+
alt17=17;
|
|
748
|
+
}
|
|
749
|
+
break;
|
|
750
|
+
case '`':
|
|
751
|
+
{
|
|
752
|
+
alt17=18;
|
|
753
|
+
}
|
|
754
|
+
break;
|
|
755
|
+
default:
|
|
756
|
+
NoViableAltException nvae =
|
|
757
|
+
new NoViableAltException("", 17, 0, input);
|
|
758
|
+
|
|
759
|
+
throw nvae;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
switch (alt17) {
|
|
763
|
+
case 1 :
|
|
764
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:201:7: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* ( '!' | '?' | '=' )?
|
|
765
|
+
{
|
|
766
|
+
if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
|
|
767
|
+
input.consume();
|
|
768
|
+
|
|
769
|
+
}
|
|
770
|
+
else {
|
|
771
|
+
MismatchedSetException mse = new MismatchedSetException(null,input);
|
|
772
|
+
recover(mse);
|
|
773
|
+
throw mse;}
|
|
774
|
+
|
|
775
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:201:31: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
|
|
776
|
+
loop5:
|
|
777
|
+
do {
|
|
778
|
+
int alt5=2;
|
|
779
|
+
int LA5_0 = input.LA(1);
|
|
780
|
+
|
|
781
|
+
if ( ((LA5_0>='0' && LA5_0<='9')||(LA5_0>='A' && LA5_0<='Z')||LA5_0=='_'||(LA5_0>='a' && LA5_0<='z')) ) {
|
|
782
|
+
alt5=1;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
switch (alt5) {
|
|
787
|
+
case 1 :
|
|
788
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:
|
|
789
|
+
{
|
|
790
|
+
if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
|
|
791
|
+
input.consume();
|
|
792
|
+
|
|
793
|
+
}
|
|
794
|
+
else {
|
|
795
|
+
MismatchedSetException mse = new MismatchedSetException(null,input);
|
|
796
|
+
recover(mse);
|
|
797
|
+
throw mse;}
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
}
|
|
801
|
+
break;
|
|
802
|
+
|
|
803
|
+
default :
|
|
804
|
+
break loop5;
|
|
805
|
+
}
|
|
806
|
+
} while (true);
|
|
807
|
+
|
|
808
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:201:65: ( '!' | '?' | '=' )?
|
|
809
|
+
int alt6=2;
|
|
810
|
+
int LA6_0 = input.LA(1);
|
|
811
|
+
|
|
812
|
+
if ( (LA6_0=='!'||LA6_0=='='||LA6_0=='?') ) {
|
|
813
|
+
alt6=1;
|
|
814
|
+
}
|
|
815
|
+
switch (alt6) {
|
|
816
|
+
case 1 :
|
|
817
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:
|
|
818
|
+
{
|
|
819
|
+
if ( input.LA(1)=='!'||input.LA(1)=='='||input.LA(1)=='?' ) {
|
|
820
|
+
input.consume();
|
|
821
|
+
|
|
822
|
+
}
|
|
823
|
+
else {
|
|
824
|
+
MismatchedSetException mse = new MismatchedSetException(null,input);
|
|
825
|
+
recover(mse);
|
|
826
|
+
throw mse;}
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
}
|
|
830
|
+
break;
|
|
831
|
+
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
}
|
|
836
|
+
break;
|
|
837
|
+
case 2 :
|
|
838
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:202:7: ( '..' | '...' )
|
|
839
|
+
{
|
|
840
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:202:7: ( '..' | '...' )
|
|
841
|
+
int alt7=2;
|
|
842
|
+
int LA7_0 = input.LA(1);
|
|
843
|
+
|
|
844
|
+
if ( (LA7_0=='.') ) {
|
|
845
|
+
int LA7_1 = input.LA(2);
|
|
846
|
+
|
|
847
|
+
if ( (LA7_1=='.') ) {
|
|
848
|
+
int LA7_2 = input.LA(3);
|
|
849
|
+
|
|
850
|
+
if ( (LA7_2=='.') ) {
|
|
851
|
+
alt7=2;
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
alt7=1;}
|
|
855
|
+
}
|
|
856
|
+
else {
|
|
857
|
+
NoViableAltException nvae =
|
|
858
|
+
new NoViableAltException("", 7, 1, input);
|
|
859
|
+
|
|
860
|
+
throw nvae;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
else {
|
|
864
|
+
NoViableAltException nvae =
|
|
865
|
+
new NoViableAltException("", 7, 0, input);
|
|
866
|
+
|
|
867
|
+
throw nvae;
|
|
868
|
+
}
|
|
869
|
+
switch (alt7) {
|
|
870
|
+
case 1 :
|
|
871
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:202:8: '..'
|
|
872
|
+
{
|
|
873
|
+
match("..");
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
}
|
|
877
|
+
break;
|
|
878
|
+
case 2 :
|
|
879
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:202:13: '...'
|
|
880
|
+
{
|
|
881
|
+
match("...");
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
}
|
|
885
|
+
break;
|
|
886
|
+
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
}
|
|
891
|
+
break;
|
|
892
|
+
case 3 :
|
|
893
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:203:7: ( '+' | '+@' )
|
|
894
|
+
{
|
|
895
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:203:7: ( '+' | '+@' )
|
|
896
|
+
int alt8=2;
|
|
897
|
+
int LA8_0 = input.LA(1);
|
|
898
|
+
|
|
899
|
+
if ( (LA8_0=='+') ) {
|
|
900
|
+
int LA8_1 = input.LA(2);
|
|
901
|
+
|
|
902
|
+
if ( (LA8_1=='@') ) {
|
|
903
|
+
alt8=2;
|
|
904
|
+
}
|
|
905
|
+
else {
|
|
906
|
+
alt8=1;}
|
|
907
|
+
}
|
|
908
|
+
else {
|
|
909
|
+
NoViableAltException nvae =
|
|
910
|
+
new NoViableAltException("", 8, 0, input);
|
|
911
|
+
|
|
912
|
+
throw nvae;
|
|
913
|
+
}
|
|
914
|
+
switch (alt8) {
|
|
915
|
+
case 1 :
|
|
916
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:203:8: '+'
|
|
917
|
+
{
|
|
918
|
+
match('+');
|
|
919
|
+
|
|
920
|
+
}
|
|
921
|
+
break;
|
|
922
|
+
case 2 :
|
|
923
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:203:12: '+@'
|
|
924
|
+
{
|
|
925
|
+
match("+@");
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
}
|
|
929
|
+
break;
|
|
930
|
+
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
}
|
|
935
|
+
break;
|
|
936
|
+
case 4 :
|
|
937
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:204:7: ( '-' | '-@' )
|
|
938
|
+
{
|
|
939
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:204:7: ( '-' | '-@' )
|
|
940
|
+
int alt9=2;
|
|
941
|
+
int LA9_0 = input.LA(1);
|
|
942
|
+
|
|
943
|
+
if ( (LA9_0=='-') ) {
|
|
944
|
+
int LA9_1 = input.LA(2);
|
|
945
|
+
|
|
946
|
+
if ( (LA9_1=='@') ) {
|
|
947
|
+
alt9=2;
|
|
948
|
+
}
|
|
949
|
+
else {
|
|
950
|
+
alt9=1;}
|
|
951
|
+
}
|
|
952
|
+
else {
|
|
953
|
+
NoViableAltException nvae =
|
|
954
|
+
new NoViableAltException("", 9, 0, input);
|
|
955
|
+
|
|
956
|
+
throw nvae;
|
|
957
|
+
}
|
|
958
|
+
switch (alt9) {
|
|
959
|
+
case 1 :
|
|
960
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:204:8: '-'
|
|
961
|
+
{
|
|
962
|
+
match('-');
|
|
963
|
+
|
|
964
|
+
}
|
|
965
|
+
break;
|
|
966
|
+
case 2 :
|
|
967
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:204:12: '-@'
|
|
968
|
+
{
|
|
969
|
+
match("-@");
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
}
|
|
973
|
+
break;
|
|
974
|
+
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
}
|
|
979
|
+
break;
|
|
980
|
+
case 5 :
|
|
981
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:205:7: ( '*' | '**' )
|
|
982
|
+
{
|
|
983
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:205:7: ( '*' | '**' )
|
|
984
|
+
int alt10=2;
|
|
985
|
+
int LA10_0 = input.LA(1);
|
|
986
|
+
|
|
987
|
+
if ( (LA10_0=='*') ) {
|
|
988
|
+
int LA10_1 = input.LA(2);
|
|
989
|
+
|
|
990
|
+
if ( (LA10_1=='*') ) {
|
|
991
|
+
alt10=2;
|
|
992
|
+
}
|
|
993
|
+
else {
|
|
994
|
+
alt10=1;}
|
|
995
|
+
}
|
|
996
|
+
else {
|
|
997
|
+
NoViableAltException nvae =
|
|
998
|
+
new NoViableAltException("", 10, 0, input);
|
|
999
|
+
|
|
1000
|
+
throw nvae;
|
|
1001
|
+
}
|
|
1002
|
+
switch (alt10) {
|
|
1003
|
+
case 1 :
|
|
1004
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:205:8: '*'
|
|
1005
|
+
{
|
|
1006
|
+
match('*');
|
|
1007
|
+
|
|
1008
|
+
}
|
|
1009
|
+
break;
|
|
1010
|
+
case 2 :
|
|
1011
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:205:12: '**'
|
|
1012
|
+
{
|
|
1013
|
+
match("**");
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
}
|
|
1017
|
+
break;
|
|
1018
|
+
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
}
|
|
1023
|
+
break;
|
|
1024
|
+
case 6 :
|
|
1025
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:206:7: '/'
|
|
1026
|
+
{
|
|
1027
|
+
match('/');
|
|
1028
|
+
|
|
1029
|
+
}
|
|
1030
|
+
break;
|
|
1031
|
+
case 7 :
|
|
1032
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:207:7: '%'
|
|
1033
|
+
{
|
|
1034
|
+
match('%');
|
|
1035
|
+
|
|
1036
|
+
}
|
|
1037
|
+
break;
|
|
1038
|
+
case 8 :
|
|
1039
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:208:7: '|'
|
|
1040
|
+
{
|
|
1041
|
+
match('|');
|
|
1042
|
+
|
|
1043
|
+
}
|
|
1044
|
+
break;
|
|
1045
|
+
case 9 :
|
|
1046
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:209:7: '^'
|
|
1047
|
+
{
|
|
1048
|
+
match('^');
|
|
1049
|
+
|
|
1050
|
+
}
|
|
1051
|
+
break;
|
|
1052
|
+
case 10 :
|
|
1053
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:210:7: '&'
|
|
1054
|
+
{
|
|
1055
|
+
match('&');
|
|
1056
|
+
|
|
1057
|
+
}
|
|
1058
|
+
break;
|
|
1059
|
+
case 11 :
|
|
1060
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:211:7: ( '<' | '<<' | '<=' | '<=>' )
|
|
1061
|
+
{
|
|
1062
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:211:7: ( '<' | '<<' | '<=' | '<=>' )
|
|
1063
|
+
int alt11=4;
|
|
1064
|
+
int LA11_0 = input.LA(1);
|
|
1065
|
+
|
|
1066
|
+
if ( (LA11_0=='<') ) {
|
|
1067
|
+
switch ( input.LA(2) ) {
|
|
1068
|
+
case '<':
|
|
1069
|
+
{
|
|
1070
|
+
alt11=2;
|
|
1071
|
+
}
|
|
1072
|
+
break;
|
|
1073
|
+
case '=':
|
|
1074
|
+
{
|
|
1075
|
+
int LA11_3 = input.LA(3);
|
|
1076
|
+
|
|
1077
|
+
if ( (LA11_3=='>') ) {
|
|
1078
|
+
alt11=4;
|
|
1079
|
+
}
|
|
1080
|
+
else {
|
|
1081
|
+
alt11=3;}
|
|
1082
|
+
}
|
|
1083
|
+
break;
|
|
1084
|
+
default:
|
|
1085
|
+
alt11=1;}
|
|
1086
|
+
|
|
1087
|
+
}
|
|
1088
|
+
else {
|
|
1089
|
+
NoViableAltException nvae =
|
|
1090
|
+
new NoViableAltException("", 11, 0, input);
|
|
1091
|
+
|
|
1092
|
+
throw nvae;
|
|
1093
|
+
}
|
|
1094
|
+
switch (alt11) {
|
|
1095
|
+
case 1 :
|
|
1096
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:211:8: '<'
|
|
1097
|
+
{
|
|
1098
|
+
match('<');
|
|
1099
|
+
|
|
1100
|
+
}
|
|
1101
|
+
break;
|
|
1102
|
+
case 2 :
|
|
1103
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:211:12: '<<'
|
|
1104
|
+
{
|
|
1105
|
+
match("<<");
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
}
|
|
1109
|
+
break;
|
|
1110
|
+
case 3 :
|
|
1111
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:211:17: '<='
|
|
1112
|
+
{
|
|
1113
|
+
match("<=");
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
}
|
|
1117
|
+
break;
|
|
1118
|
+
case 4 :
|
|
1119
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:211:22: '<=>'
|
|
1120
|
+
{
|
|
1121
|
+
match("<=>");
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
}
|
|
1125
|
+
break;
|
|
1126
|
+
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
}
|
|
1131
|
+
break;
|
|
1132
|
+
case 12 :
|
|
1133
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:212:7: ( '>' | '>>' | '>=' )
|
|
1134
|
+
{
|
|
1135
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:212:7: ( '>' | '>>' | '>=' )
|
|
1136
|
+
int alt12=3;
|
|
1137
|
+
int LA12_0 = input.LA(1);
|
|
1138
|
+
|
|
1139
|
+
if ( (LA12_0=='>') ) {
|
|
1140
|
+
switch ( input.LA(2) ) {
|
|
1141
|
+
case '>':
|
|
1142
|
+
{
|
|
1143
|
+
alt12=2;
|
|
1144
|
+
}
|
|
1145
|
+
break;
|
|
1146
|
+
case '=':
|
|
1147
|
+
{
|
|
1148
|
+
alt12=3;
|
|
1149
|
+
}
|
|
1150
|
+
break;
|
|
1151
|
+
default:
|
|
1152
|
+
alt12=1;}
|
|
1153
|
+
|
|
1154
|
+
}
|
|
1155
|
+
else {
|
|
1156
|
+
NoViableAltException nvae =
|
|
1157
|
+
new NoViableAltException("", 12, 0, input);
|
|
1158
|
+
|
|
1159
|
+
throw nvae;
|
|
1160
|
+
}
|
|
1161
|
+
switch (alt12) {
|
|
1162
|
+
case 1 :
|
|
1163
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:212:8: '>'
|
|
1164
|
+
{
|
|
1165
|
+
match('>');
|
|
1166
|
+
|
|
1167
|
+
}
|
|
1168
|
+
break;
|
|
1169
|
+
case 2 :
|
|
1170
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:212:12: '>>'
|
|
1171
|
+
{
|
|
1172
|
+
match(">>");
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
}
|
|
1176
|
+
break;
|
|
1177
|
+
case 3 :
|
|
1178
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:212:17: '>='
|
|
1179
|
+
{
|
|
1180
|
+
match(">=");
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
}
|
|
1184
|
+
break;
|
|
1185
|
+
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
}
|
|
1190
|
+
break;
|
|
1191
|
+
case 13 :
|
|
1192
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:213:7: ( '=' | '==' | '===' | '=~' )
|
|
1193
|
+
{
|
|
1194
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:213:7: ( '=' | '==' | '===' | '=~' )
|
|
1195
|
+
int alt13=4;
|
|
1196
|
+
int LA13_0 = input.LA(1);
|
|
1197
|
+
|
|
1198
|
+
if ( (LA13_0=='=') ) {
|
|
1199
|
+
switch ( input.LA(2) ) {
|
|
1200
|
+
case '=':
|
|
1201
|
+
{
|
|
1202
|
+
int LA13_2 = input.LA(3);
|
|
1203
|
+
|
|
1204
|
+
if ( (LA13_2=='=') ) {
|
|
1205
|
+
alt13=3;
|
|
1206
|
+
}
|
|
1207
|
+
else {
|
|
1208
|
+
alt13=2;}
|
|
1209
|
+
}
|
|
1210
|
+
break;
|
|
1211
|
+
case '~':
|
|
1212
|
+
{
|
|
1213
|
+
alt13=4;
|
|
1214
|
+
}
|
|
1215
|
+
break;
|
|
1216
|
+
default:
|
|
1217
|
+
alt13=1;}
|
|
1218
|
+
|
|
1219
|
+
}
|
|
1220
|
+
else {
|
|
1221
|
+
NoViableAltException nvae =
|
|
1222
|
+
new NoViableAltException("", 13, 0, input);
|
|
1223
|
+
|
|
1224
|
+
throw nvae;
|
|
1225
|
+
}
|
|
1226
|
+
switch (alt13) {
|
|
1227
|
+
case 1 :
|
|
1228
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:213:8: '='
|
|
1229
|
+
{
|
|
1230
|
+
match('=');
|
|
1231
|
+
|
|
1232
|
+
}
|
|
1233
|
+
break;
|
|
1234
|
+
case 2 :
|
|
1235
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:213:12: '=='
|
|
1236
|
+
{
|
|
1237
|
+
match("==");
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
}
|
|
1241
|
+
break;
|
|
1242
|
+
case 3 :
|
|
1243
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:213:17: '==='
|
|
1244
|
+
{
|
|
1245
|
+
match("===");
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
}
|
|
1249
|
+
break;
|
|
1250
|
+
case 4 :
|
|
1251
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:213:23: '=~'
|
|
1252
|
+
{
|
|
1253
|
+
match("=~");
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
}
|
|
1257
|
+
break;
|
|
1258
|
+
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
}
|
|
1263
|
+
break;
|
|
1264
|
+
case 14 :
|
|
1265
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:214:7: ( '!' | '!=' | '!~' | '!@' )
|
|
1266
|
+
{
|
|
1267
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:214:7: ( '!' | '!=' | '!~' | '!@' )
|
|
1268
|
+
int alt14=4;
|
|
1269
|
+
int LA14_0 = input.LA(1);
|
|
1270
|
+
|
|
1271
|
+
if ( (LA14_0=='!') ) {
|
|
1272
|
+
switch ( input.LA(2) ) {
|
|
1273
|
+
case '=':
|
|
1274
|
+
{
|
|
1275
|
+
alt14=2;
|
|
1276
|
+
}
|
|
1277
|
+
break;
|
|
1278
|
+
case '~':
|
|
1279
|
+
{
|
|
1280
|
+
alt14=3;
|
|
1281
|
+
}
|
|
1282
|
+
break;
|
|
1283
|
+
case '@':
|
|
1284
|
+
{
|
|
1285
|
+
alt14=4;
|
|
1286
|
+
}
|
|
1287
|
+
break;
|
|
1288
|
+
default:
|
|
1289
|
+
alt14=1;}
|
|
1290
|
+
|
|
1291
|
+
}
|
|
1292
|
+
else {
|
|
1293
|
+
NoViableAltException nvae =
|
|
1294
|
+
new NoViableAltException("", 14, 0, input);
|
|
1295
|
+
|
|
1296
|
+
throw nvae;
|
|
1297
|
+
}
|
|
1298
|
+
switch (alt14) {
|
|
1299
|
+
case 1 :
|
|
1300
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:214:8: '!'
|
|
1301
|
+
{
|
|
1302
|
+
match('!');
|
|
1303
|
+
|
|
1304
|
+
}
|
|
1305
|
+
break;
|
|
1306
|
+
case 2 :
|
|
1307
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:214:12: '!='
|
|
1308
|
+
{
|
|
1309
|
+
match("!=");
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
}
|
|
1313
|
+
break;
|
|
1314
|
+
case 3 :
|
|
1315
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:214:17: '!~'
|
|
1316
|
+
{
|
|
1317
|
+
match("!~");
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
}
|
|
1321
|
+
break;
|
|
1322
|
+
case 4 :
|
|
1323
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:214:22: '!@'
|
|
1324
|
+
{
|
|
1325
|
+
match("!@");
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
}
|
|
1329
|
+
break;
|
|
1330
|
+
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
}
|
|
1335
|
+
break;
|
|
1336
|
+
case 15 :
|
|
1337
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:215:7: ( '~' | '~@' )
|
|
1338
|
+
{
|
|
1339
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:215:7: ( '~' | '~@' )
|
|
1340
|
+
int alt15=2;
|
|
1341
|
+
int LA15_0 = input.LA(1);
|
|
1342
|
+
|
|
1343
|
+
if ( (LA15_0=='~') ) {
|
|
1344
|
+
int LA15_1 = input.LA(2);
|
|
1345
|
+
|
|
1346
|
+
if ( (LA15_1=='@') ) {
|
|
1347
|
+
alt15=2;
|
|
1348
|
+
}
|
|
1349
|
+
else {
|
|
1350
|
+
alt15=1;}
|
|
1351
|
+
}
|
|
1352
|
+
else {
|
|
1353
|
+
NoViableAltException nvae =
|
|
1354
|
+
new NoViableAltException("", 15, 0, input);
|
|
1355
|
+
|
|
1356
|
+
throw nvae;
|
|
1357
|
+
}
|
|
1358
|
+
switch (alt15) {
|
|
1359
|
+
case 1 :
|
|
1360
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:215:8: '~'
|
|
1361
|
+
{
|
|
1362
|
+
match('~');
|
|
1363
|
+
|
|
1364
|
+
}
|
|
1365
|
+
break;
|
|
1366
|
+
case 2 :
|
|
1367
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:215:12: '~@'
|
|
1368
|
+
{
|
|
1369
|
+
match("~@");
|
|
1370
|
+
|
|
1371
|
+
|
|
1372
|
+
}
|
|
1373
|
+
break;
|
|
1374
|
+
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
}
|
|
1379
|
+
break;
|
|
1380
|
+
case 16 :
|
|
1381
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:216:7: ( '[]' | '[]=' )
|
|
1382
|
+
{
|
|
1383
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:216:7: ( '[]' | '[]=' )
|
|
1384
|
+
int alt16=2;
|
|
1385
|
+
int LA16_0 = input.LA(1);
|
|
1386
|
+
|
|
1387
|
+
if ( (LA16_0=='[') ) {
|
|
1388
|
+
int LA16_1 = input.LA(2);
|
|
1389
|
+
|
|
1390
|
+
if ( (LA16_1==']') ) {
|
|
1391
|
+
int LA16_2 = input.LA(3);
|
|
1392
|
+
|
|
1393
|
+
if ( (LA16_2=='=') ) {
|
|
1394
|
+
alt16=2;
|
|
1395
|
+
}
|
|
1396
|
+
else {
|
|
1397
|
+
alt16=1;}
|
|
1398
|
+
}
|
|
1399
|
+
else {
|
|
1400
|
+
NoViableAltException nvae =
|
|
1401
|
+
new NoViableAltException("", 16, 1, input);
|
|
1402
|
+
|
|
1403
|
+
throw nvae;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
else {
|
|
1407
|
+
NoViableAltException nvae =
|
|
1408
|
+
new NoViableAltException("", 16, 0, input);
|
|
1409
|
+
|
|
1410
|
+
throw nvae;
|
|
1411
|
+
}
|
|
1412
|
+
switch (alt16) {
|
|
1413
|
+
case 1 :
|
|
1414
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:216:8: '[]'
|
|
1415
|
+
{
|
|
1416
|
+
match("[]");
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
}
|
|
1420
|
+
break;
|
|
1421
|
+
case 2 :
|
|
1422
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:216:13: '[]='
|
|
1423
|
+
{
|
|
1424
|
+
match("[]=");
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
}
|
|
1428
|
+
break;
|
|
1429
|
+
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
}
|
|
1434
|
+
break;
|
|
1435
|
+
case 17 :
|
|
1436
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:217:7: '::'
|
|
1437
|
+
{
|
|
1438
|
+
match("::");
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
}
|
|
1442
|
+
break;
|
|
1443
|
+
case 18 :
|
|
1444
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:218:7: '`'
|
|
1445
|
+
{
|
|
1446
|
+
match('`');
|
|
1447
|
+
|
|
1448
|
+
}
|
|
1449
|
+
break;
|
|
1450
|
+
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
finally {
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
// $ANTLR end "METHOD_NAME_UNQUOTED"
|
|
1457
|
+
|
|
1458
|
+
// $ANTLR start "WHITEESPACE"
|
|
1459
|
+
public final void mWHITEESPACE() throws RecognitionException {
|
|
1460
|
+
try {
|
|
1461
|
+
int _type = WHITEESPACE;
|
|
1462
|
+
int _channel = DEFAULT_TOKEN_CHANNEL;
|
|
1463
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:221:13: ( ( ' ' | '\\t' | '\\f' | '\\n' | '\\r' ) )
|
|
1464
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:221:15: ( ' ' | '\\t' | '\\f' | '\\n' | '\\r' )
|
|
1465
|
+
{
|
|
1466
|
+
if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||(input.LA(1)>='\f' && input.LA(1)<='\r')||input.LA(1)==' ' ) {
|
|
1467
|
+
input.consume();
|
|
1468
|
+
|
|
1469
|
+
}
|
|
1470
|
+
else {
|
|
1471
|
+
MismatchedSetException mse = new MismatchedSetException(null,input);
|
|
1472
|
+
recover(mse);
|
|
1473
|
+
throw mse;}
|
|
1474
|
+
|
|
1475
|
+
_channel=HIDDEN;
|
|
1476
|
+
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
state.type = _type;
|
|
1480
|
+
state.channel = _channel;
|
|
1481
|
+
}
|
|
1482
|
+
finally {
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
// $ANTLR end "WHITEESPACE"
|
|
1486
|
+
|
|
1487
|
+
public void mTokens() throws RecognitionException {
|
|
1488
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:8: ( T__9 | T__10 | T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | ID | CONST_ID | METHOD_NAME | WHITEESPACE )
|
|
1489
|
+
int alt18=22;
|
|
1490
|
+
alt18 = dfa18.predict(input);
|
|
1491
|
+
switch (alt18) {
|
|
1492
|
+
case 1 :
|
|
1493
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:10: T__9
|
|
1494
|
+
{
|
|
1495
|
+
mT__9();
|
|
1496
|
+
|
|
1497
|
+
}
|
|
1498
|
+
break;
|
|
1499
|
+
case 2 :
|
|
1500
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:15: T__10
|
|
1501
|
+
{
|
|
1502
|
+
mT__10();
|
|
1503
|
+
|
|
1504
|
+
}
|
|
1505
|
+
break;
|
|
1506
|
+
case 3 :
|
|
1507
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:21: T__11
|
|
1508
|
+
{
|
|
1509
|
+
mT__11();
|
|
1510
|
+
|
|
1511
|
+
}
|
|
1512
|
+
break;
|
|
1513
|
+
case 4 :
|
|
1514
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:27: T__12
|
|
1515
|
+
{
|
|
1516
|
+
mT__12();
|
|
1517
|
+
|
|
1518
|
+
}
|
|
1519
|
+
break;
|
|
1520
|
+
case 5 :
|
|
1521
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:33: T__13
|
|
1522
|
+
{
|
|
1523
|
+
mT__13();
|
|
1524
|
+
|
|
1525
|
+
}
|
|
1526
|
+
break;
|
|
1527
|
+
case 6 :
|
|
1528
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:39: T__14
|
|
1529
|
+
{
|
|
1530
|
+
mT__14();
|
|
1531
|
+
|
|
1532
|
+
}
|
|
1533
|
+
break;
|
|
1534
|
+
case 7 :
|
|
1535
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:45: T__15
|
|
1536
|
+
{
|
|
1537
|
+
mT__15();
|
|
1538
|
+
|
|
1539
|
+
}
|
|
1540
|
+
break;
|
|
1541
|
+
case 8 :
|
|
1542
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:51: T__16
|
|
1543
|
+
{
|
|
1544
|
+
mT__16();
|
|
1545
|
+
|
|
1546
|
+
}
|
|
1547
|
+
break;
|
|
1548
|
+
case 9 :
|
|
1549
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:57: T__17
|
|
1550
|
+
{
|
|
1551
|
+
mT__17();
|
|
1552
|
+
|
|
1553
|
+
}
|
|
1554
|
+
break;
|
|
1555
|
+
case 10 :
|
|
1556
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:63: T__18
|
|
1557
|
+
{
|
|
1558
|
+
mT__18();
|
|
1559
|
+
|
|
1560
|
+
}
|
|
1561
|
+
break;
|
|
1562
|
+
case 11 :
|
|
1563
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:69: T__19
|
|
1564
|
+
{
|
|
1565
|
+
mT__19();
|
|
1566
|
+
|
|
1567
|
+
}
|
|
1568
|
+
break;
|
|
1569
|
+
case 12 :
|
|
1570
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:75: T__20
|
|
1571
|
+
{
|
|
1572
|
+
mT__20();
|
|
1573
|
+
|
|
1574
|
+
}
|
|
1575
|
+
break;
|
|
1576
|
+
case 13 :
|
|
1577
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:81: T__21
|
|
1578
|
+
{
|
|
1579
|
+
mT__21();
|
|
1580
|
+
|
|
1581
|
+
}
|
|
1582
|
+
break;
|
|
1583
|
+
case 14 :
|
|
1584
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:87: T__22
|
|
1585
|
+
{
|
|
1586
|
+
mT__22();
|
|
1587
|
+
|
|
1588
|
+
}
|
|
1589
|
+
break;
|
|
1590
|
+
case 15 :
|
|
1591
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:93: T__23
|
|
1592
|
+
{
|
|
1593
|
+
mT__23();
|
|
1594
|
+
|
|
1595
|
+
}
|
|
1596
|
+
break;
|
|
1597
|
+
case 16 :
|
|
1598
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:99: T__24
|
|
1599
|
+
{
|
|
1600
|
+
mT__24();
|
|
1601
|
+
|
|
1602
|
+
}
|
|
1603
|
+
break;
|
|
1604
|
+
case 17 :
|
|
1605
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:105: T__25
|
|
1606
|
+
{
|
|
1607
|
+
mT__25();
|
|
1608
|
+
|
|
1609
|
+
}
|
|
1610
|
+
break;
|
|
1611
|
+
case 18 :
|
|
1612
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:111: T__26
|
|
1613
|
+
{
|
|
1614
|
+
mT__26();
|
|
1615
|
+
|
|
1616
|
+
}
|
|
1617
|
+
break;
|
|
1618
|
+
case 19 :
|
|
1619
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:117: ID
|
|
1620
|
+
{
|
|
1621
|
+
mID();
|
|
1622
|
+
|
|
1623
|
+
}
|
|
1624
|
+
break;
|
|
1625
|
+
case 20 :
|
|
1626
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:120: CONST_ID
|
|
1627
|
+
{
|
|
1628
|
+
mCONST_ID();
|
|
1629
|
+
|
|
1630
|
+
}
|
|
1631
|
+
break;
|
|
1632
|
+
case 21 :
|
|
1633
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:129: METHOD_NAME
|
|
1634
|
+
{
|
|
1635
|
+
mMETHOD_NAME();
|
|
1636
|
+
|
|
1637
|
+
}
|
|
1638
|
+
break;
|
|
1639
|
+
case 22 :
|
|
1640
|
+
// /Users/ericwest/code/rsense-core/src/org/cx4a/rsense/parser/TypeAnnotation.g:1:141: WHITEESPACE
|
|
1641
|
+
{
|
|
1642
|
+
mWHITEESPACE();
|
|
1643
|
+
|
|
1644
|
+
}
|
|
1645
|
+
break;
|
|
1646
|
+
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
protected DFA18 dfa18 = new DFA18(this);
|
|
1653
|
+
static final String DFA18_eotS =
|
|
1654
|
+
"\2\uffff\1\27\1\31\1\uffff\1\33\2\uffff\1\24\3\uffff\1\24\1\36\2"+
|
|
1655
|
+
"\uffff\1\37\2\42\1\44\4\uffff\1\46\7\uffff\1\47\1\42\1\uffff\1\44"+
|
|
1656
|
+
"\4\uffff";
|
|
1657
|
+
static final String DFA18_eofS =
|
|
1658
|
+
"\50\uffff";
|
|
1659
|
+
static final String DFA18_minS =
|
|
1660
|
+
"\1\11\1\72\1\56\1\74\1\uffff\1\75\2\uffff\1\76\3\uffff\1\156\1\135"+
|
|
1661
|
+
"\2\uffff\1\52\3\41\4\uffff\1\76\7\uffff\2\41\1\uffff\1\41\4\uffff";
|
|
1662
|
+
static final String DFA18_maxS =
|
|
1663
|
+
"\1\176\1\72\1\56\1\75\1\uffff\1\76\2\uffff\1\76\3\uffff\1\156\1"+
|
|
1664
|
+
"\135\2\uffff\1\52\3\172\4\uffff\1\76\7\uffff\2\172\1\uffff\1\172"+
|
|
1665
|
+
"\4\uffff";
|
|
1666
|
+
static final String DFA18_acceptS =
|
|
1667
|
+
"\4\uffff\1\4\1\uffff\1\6\1\7\1\uffff\1\11\1\12\1\14\2\uffff\1\17"+
|
|
1668
|
+
"\1\20\4\uffff\1\25\1\26\1\1\1\2\1\uffff\1\3\1\4\1\5\1\10\1\15\1"+
|
|
1669
|
+
"\16\1\21\2\uffff\1\23\1\uffff\1\24\1\1\1\13\1\22";
|
|
1670
|
+
static final String DFA18_specialS =
|
|
1671
|
+
"\50\uffff}>";
|
|
1672
|
+
static final String[] DFA18_transitionS = {
|
|
1673
|
+
"\2\25\1\uffff\2\25\22\uffff\1\25\1\14\1\24\2\uffff\2\24\1\uffff"+
|
|
1674
|
+
"\1\6\1\7\1\20\1\24\1\13\1\10\1\2\1\24\12\uffff\1\1\1\uffff\1"+
|
|
1675
|
+
"\3\1\24\1\5\1\17\1\uffff\32\23\1\15\1\uffff\1\16\1\24\1\22\1"+
|
|
1676
|
+
"\24\16\22\1\21\13\22\1\11\1\4\1\12\1\24",
|
|
1677
|
+
"\1\26",
|
|
1678
|
+
"\1\24",
|
|
1679
|
+
"\1\24\1\30",
|
|
1680
|
+
"",
|
|
1681
|
+
"\2\24",
|
|
1682
|
+
"",
|
|
1683
|
+
"",
|
|
1684
|
+
"\1\34",
|
|
1685
|
+
"",
|
|
1686
|
+
"",
|
|
1687
|
+
"",
|
|
1688
|
+
"\1\35",
|
|
1689
|
+
"\1\24",
|
|
1690
|
+
"",
|
|
1691
|
+
"",
|
|
1692
|
+
"\1\24",
|
|
1693
|
+
"\1\24\16\uffff\12\41\3\uffff\1\24\1\uffff\1\24\1\uffff\32\41"+
|
|
1694
|
+
"\4\uffff\1\41\1\uffff\21\41\1\40\10\41",
|
|
1695
|
+
"\1\24\16\uffff\12\41\3\uffff\1\24\1\uffff\1\24\1\uffff\32\41"+
|
|
1696
|
+
"\4\uffff\1\41\1\uffff\32\41",
|
|
1697
|
+
"\1\24\16\uffff\12\43\3\uffff\1\24\1\uffff\1\24\1\uffff\32\43"+
|
|
1698
|
+
"\4\uffff\1\43\1\uffff\32\43",
|
|
1699
|
+
"",
|
|
1700
|
+
"",
|
|
1701
|
+
"",
|
|
1702
|
+
"",
|
|
1703
|
+
"\1\24",
|
|
1704
|
+
"",
|
|
1705
|
+
"",
|
|
1706
|
+
"",
|
|
1707
|
+
"",
|
|
1708
|
+
"",
|
|
1709
|
+
"",
|
|
1710
|
+
"",
|
|
1711
|
+
"\1\24\5\uffff\1\42\10\uffff\12\41\3\uffff\1\24\1\uffff\1\24"+
|
|
1712
|
+
"\1\uffff\32\41\4\uffff\1\41\1\uffff\32\41",
|
|
1713
|
+
"\1\24\16\uffff\12\41\3\uffff\1\24\1\uffff\1\24\1\uffff\32\41"+
|
|
1714
|
+
"\4\uffff\1\41\1\uffff\32\41",
|
|
1715
|
+
"",
|
|
1716
|
+
"\1\24\16\uffff\12\43\3\uffff\1\24\1\uffff\1\24\1\uffff\32\43"+
|
|
1717
|
+
"\4\uffff\1\43\1\uffff\32\43",
|
|
1718
|
+
"",
|
|
1719
|
+
"",
|
|
1720
|
+
"",
|
|
1721
|
+
""
|
|
1722
|
+
};
|
|
1723
|
+
|
|
1724
|
+
static final short[] DFA18_eot = DFA.unpackEncodedString(DFA18_eotS);
|
|
1725
|
+
static final short[] DFA18_eof = DFA.unpackEncodedString(DFA18_eofS);
|
|
1726
|
+
static final char[] DFA18_min = DFA.unpackEncodedStringToUnsignedChars(DFA18_minS);
|
|
1727
|
+
static final char[] DFA18_max = DFA.unpackEncodedStringToUnsignedChars(DFA18_maxS);
|
|
1728
|
+
static final short[] DFA18_accept = DFA.unpackEncodedString(DFA18_acceptS);
|
|
1729
|
+
static final short[] DFA18_special = DFA.unpackEncodedString(DFA18_specialS);
|
|
1730
|
+
static final short[][] DFA18_transition;
|
|
1731
|
+
|
|
1732
|
+
static {
|
|
1733
|
+
int numStates = DFA18_transitionS.length;
|
|
1734
|
+
DFA18_transition = new short[numStates][];
|
|
1735
|
+
for (int i=0; i<numStates; i++) {
|
|
1736
|
+
DFA18_transition[i] = DFA.unpackEncodedString(DFA18_transitionS[i]);
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
class DFA18 extends DFA {
|
|
1741
|
+
|
|
1742
|
+
public DFA18(BaseRecognizer recognizer) {
|
|
1743
|
+
this.recognizer = recognizer;
|
|
1744
|
+
this.decisionNumber = 18;
|
|
1745
|
+
this.eot = DFA18_eot;
|
|
1746
|
+
this.eof = DFA18_eof;
|
|
1747
|
+
this.min = DFA18_min;
|
|
1748
|
+
this.max = DFA18_max;
|
|
1749
|
+
this.accept = DFA18_accept;
|
|
1750
|
+
this.special = DFA18_special;
|
|
1751
|
+
this.transition = DFA18_transition;
|
|
1752
|
+
}
|
|
1753
|
+
public String getDescription() {
|
|
1754
|
+
return "1:1: Tokens : ( T__9 | T__10 | T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | ID | CONST_ID | METHOD_NAME | WHITEESPACE );";
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
}
|