aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/parser/antlr/internal/InternalAlloyLanguageParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/parser/antlr/internal/InternalAlloyLanguageParser.java')
-rw-r--r--Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/parser/antlr/internal/InternalAlloyLanguageParser.java8882
1 files changed, 8882 insertions, 0 deletions
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/parser/antlr/internal/InternalAlloyLanguageParser.java b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/parser/antlr/internal/InternalAlloyLanguageParser.java
new file mode 100644
index 00000000..1735afbd
--- /dev/null
+++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/parser/antlr/internal/InternalAlloyLanguageParser.java
@@ -0,0 +1,8882 @@
1package hu.bme.mit.inf.dslreasoner.parser.antlr.internal;
2
3import org.eclipse.xtext.*;
4import org.eclipse.xtext.parser.*;
5import org.eclipse.xtext.parser.impl.*;
6import org.eclipse.emf.ecore.util.EcoreUtil;
7import org.eclipse.emf.ecore.EObject;
8import org.eclipse.emf.common.util.Enumerator;
9import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
10import org.eclipse.xtext.parser.antlr.XtextTokenStream;
11import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
12import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
13import hu.bme.mit.inf.dslreasoner.services.AlloyLanguageGrammarAccess;
14
15
16
17import org.antlr.runtime.*;
18import java.util.Stack;
19import java.util.List;
20import java.util.ArrayList;
21import java.util.Map;
22import java.util.HashMap;
23@SuppressWarnings("all")
24public class InternalAlloyLanguageParser extends AbstractInternalAntlrParser {
25 public static final String[] tokenNames = new String[] {
26 "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'enum'", "'{'", "','", "'}'", "'abstract'", "'sig'", "'extends'", "'in'", "'+'", "':'", "'fun'", "'['", "']'", "'pred'", "'fact'", "'disj'", "'||'", "'or'", "'<=>'", "'iff'", "'=>'", "'implies'", "'else'", "'&&'", "'and'", "'='", "'!='", "'>'", "'>='", "'<'", "'<='", "'++'", "':>'", "'<:'", "'.'", "'-'", "'&'", "'->'", "'!'", "'not'", "'~'", "'^'", "'*'", "'#'", "'sum'", "'none'", "'iden'", "'univ'", "'Int'", "'('", "')'", "'run'", "'for'", "'exactly'", "'all'", "'no'", "'some'", "'lone'", "'one'", "'set'", "'plus'", "'sub'", "'mul'", "'rem'", "'div'"
27 };
28 public static final int T__50=50;
29 public static final int T__19=19;
30 public static final int T__15=15;
31 public static final int T__59=59;
32 public static final int T__16=16;
33 public static final int T__17=17;
34 public static final int T__18=18;
35 public static final int T__11=11;
36 public static final int T__55=55;
37 public static final int T__12=12;
38 public static final int T__56=56;
39 public static final int T__13=13;
40 public static final int T__57=57;
41 public static final int T__14=14;
42 public static final int T__58=58;
43 public static final int T__51=51;
44 public static final int T__52=52;
45 public static final int T__53=53;
46 public static final int T__54=54;
47 public static final int T__60=60;
48 public static final int T__61=61;
49 public static final int RULE_ID=4;
50 public static final int T__26=26;
51 public static final int T__27=27;
52 public static final int T__28=28;
53 public static final int RULE_INT=5;
54 public static final int T__29=29;
55 public static final int T__22=22;
56 public static final int T__66=66;
57 public static final int RULE_ML_COMMENT=7;
58 public static final int T__23=23;
59 public static final int T__67=67;
60 public static final int T__24=24;
61 public static final int T__68=68;
62 public static final int T__25=25;
63 public static final int T__69=69;
64 public static final int T__62=62;
65 public static final int T__63=63;
66 public static final int T__20=20;
67 public static final int T__64=64;
68 public static final int T__21=21;
69 public static final int T__65=65;
70 public static final int T__70=70;
71 public static final int T__71=71;
72 public static final int T__72=72;
73 public static final int RULE_STRING=6;
74 public static final int RULE_SL_COMMENT=8;
75 public static final int T__37=37;
76 public static final int T__38=38;
77 public static final int T__39=39;
78 public static final int T__33=33;
79 public static final int T__34=34;
80 public static final int T__35=35;
81 public static final int T__36=36;
82 public static final int T__73=73;
83 public static final int EOF=-1;
84 public static final int T__30=30;
85 public static final int T__74=74;
86 public static final int T__31=31;
87 public static final int T__75=75;
88 public static final int T__32=32;
89 public static final int RULE_WS=9;
90 public static final int RULE_ANY_OTHER=10;
91 public static final int T__48=48;
92 public static final int T__49=49;
93 public static final int T__44=44;
94 public static final int T__45=45;
95 public static final int T__46=46;
96 public static final int T__47=47;
97 public static final int T__40=40;
98 public static final int T__41=41;
99 public static final int T__42=42;
100 public static final int T__43=43;
101
102 // delegates
103 // delegators
104
105
106 public InternalAlloyLanguageParser(TokenStream input) {
107 this(input, new RecognizerSharedState());
108 }
109 public InternalAlloyLanguageParser(TokenStream input, RecognizerSharedState state) {
110 super(input, state);
111
112 }
113
114
115 public String[] getTokenNames() { return InternalAlloyLanguageParser.tokenNames; }
116 public String getGrammarFileName() { return "InternalAlloyLanguage.g"; }
117
118
119
120 private AlloyLanguageGrammarAccess grammarAccess;
121
122 public InternalAlloyLanguageParser(TokenStream input, AlloyLanguageGrammarAccess grammarAccess) {
123 this(input);
124 this.grammarAccess = grammarAccess;
125 registerRules(grammarAccess.getGrammar());
126 }
127
128 @Override
129 protected String getFirstRuleName() {
130 return "ALSDocument";
131 }
132
133 @Override
134 protected AlloyLanguageGrammarAccess getGrammarAccess() {
135 return grammarAccess;
136 }
137
138
139
140 // $ANTLR start "entryRuleALSDocument"
141 // InternalAlloyLanguage.g:68:1: entryRuleALSDocument returns [EObject current=null] : iv_ruleALSDocument= ruleALSDocument EOF ;
142 public final EObject entryRuleALSDocument() throws RecognitionException {
143 EObject current = null;
144
145 EObject iv_ruleALSDocument = null;
146
147
148 try {
149 // InternalAlloyLanguage.g:69:2: (iv_ruleALSDocument= ruleALSDocument EOF )
150 // InternalAlloyLanguage.g:70:2: iv_ruleALSDocument= ruleALSDocument EOF
151 {
152 if ( state.backtracking==0 ) {
153 newCompositeNode(grammarAccess.getALSDocumentRule());
154 }
155 pushFollow(FOLLOW_1);
156 iv_ruleALSDocument=ruleALSDocument();
157
158 state._fsp--;
159 if (state.failed) return current;
160 if ( state.backtracking==0 ) {
161 current =iv_ruleALSDocument;
162 }
163 match(input,EOF,FOLLOW_2); if (state.failed) return current;
164
165 }
166
167 }
168
169 catch (RecognitionException re) {
170 recover(input,re);
171 appendSkippedTokens();
172 }
173 finally {
174 }
175 return current;
176 }
177 // $ANTLR end "entryRuleALSDocument"
178
179
180 // $ANTLR start "ruleALSDocument"
181 // InternalAlloyLanguage.g:77:1: ruleALSDocument returns [EObject current=null] : ( ( ( (lv_enumDeclarations_0_0= ruleALSEnumDeclaration ) ) | ( (lv_signatureBodies_1_0= ruleALSSignatureBody ) ) | ( (lv_functionDefinitions_2_0= ruleALSFunctionDefinition ) ) | ( (lv_relationDefinitions_3_0= ruleALSRelationDefinition ) ) | ( (lv_factDeclarations_4_0= ruleALSFactDeclaration ) ) )+ ( (lv_runCommand_5_0= ruleALSRunCommand ) ) ) ;
182 public final EObject ruleALSDocument() throws RecognitionException {
183 EObject current = null;
184
185 EObject lv_enumDeclarations_0_0 = null;
186
187 EObject lv_signatureBodies_1_0 = null;
188
189 EObject lv_functionDefinitions_2_0 = null;
190
191 EObject lv_relationDefinitions_3_0 = null;
192
193 EObject lv_factDeclarations_4_0 = null;
194
195 EObject lv_runCommand_5_0 = null;
196
197
198 enterRule();
199
200 try {
201 // InternalAlloyLanguage.g:80:28: ( ( ( ( (lv_enumDeclarations_0_0= ruleALSEnumDeclaration ) ) | ( (lv_signatureBodies_1_0= ruleALSSignatureBody ) ) | ( (lv_functionDefinitions_2_0= ruleALSFunctionDefinition ) ) | ( (lv_relationDefinitions_3_0= ruleALSRelationDefinition ) ) | ( (lv_factDeclarations_4_0= ruleALSFactDeclaration ) ) )+ ( (lv_runCommand_5_0= ruleALSRunCommand ) ) ) )
202 // InternalAlloyLanguage.g:81:1: ( ( ( (lv_enumDeclarations_0_0= ruleALSEnumDeclaration ) ) | ( (lv_signatureBodies_1_0= ruleALSSignatureBody ) ) | ( (lv_functionDefinitions_2_0= ruleALSFunctionDefinition ) ) | ( (lv_relationDefinitions_3_0= ruleALSRelationDefinition ) ) | ( (lv_factDeclarations_4_0= ruleALSFactDeclaration ) ) )+ ( (lv_runCommand_5_0= ruleALSRunCommand ) ) )
203 {
204 // InternalAlloyLanguage.g:81:1: ( ( ( (lv_enumDeclarations_0_0= ruleALSEnumDeclaration ) ) | ( (lv_signatureBodies_1_0= ruleALSSignatureBody ) ) | ( (lv_functionDefinitions_2_0= ruleALSFunctionDefinition ) ) | ( (lv_relationDefinitions_3_0= ruleALSRelationDefinition ) ) | ( (lv_factDeclarations_4_0= ruleALSFactDeclaration ) ) )+ ( (lv_runCommand_5_0= ruleALSRunCommand ) ) )
205 // InternalAlloyLanguage.g:81:2: ( ( (lv_enumDeclarations_0_0= ruleALSEnumDeclaration ) ) | ( (lv_signatureBodies_1_0= ruleALSSignatureBody ) ) | ( (lv_functionDefinitions_2_0= ruleALSFunctionDefinition ) ) | ( (lv_relationDefinitions_3_0= ruleALSRelationDefinition ) ) | ( (lv_factDeclarations_4_0= ruleALSFactDeclaration ) ) )+ ( (lv_runCommand_5_0= ruleALSRunCommand ) )
206 {
207 // InternalAlloyLanguage.g:81:2: ( ( (lv_enumDeclarations_0_0= ruleALSEnumDeclaration ) ) | ( (lv_signatureBodies_1_0= ruleALSSignatureBody ) ) | ( (lv_functionDefinitions_2_0= ruleALSFunctionDefinition ) ) | ( (lv_relationDefinitions_3_0= ruleALSRelationDefinition ) ) | ( (lv_factDeclarations_4_0= ruleALSFactDeclaration ) ) )+
208 int cnt1=0;
209 loop1:
210 do {
211 int alt1=6;
212 switch ( input.LA(1) ) {
213 case 11:
214 {
215 alt1=1;
216 }
217 break;
218 case 15:
219 case 16:
220 case 65:
221 case 66:
222 case 67:
223 case 68:
224 case 69:
225 case 70:
226 {
227 alt1=2;
228 }
229 break;
230 case 21:
231 {
232 alt1=3;
233 }
234 break;
235 case 24:
236 {
237 alt1=4;
238 }
239 break;
240 case 25:
241 {
242 alt1=5;
243 }
244 break;
245
246 }
247
248 switch (alt1) {
249 case 1 :
250 // InternalAlloyLanguage.g:81:3: ( (lv_enumDeclarations_0_0= ruleALSEnumDeclaration ) )
251 {
252 // InternalAlloyLanguage.g:81:3: ( (lv_enumDeclarations_0_0= ruleALSEnumDeclaration ) )
253 // InternalAlloyLanguage.g:82:1: (lv_enumDeclarations_0_0= ruleALSEnumDeclaration )
254 {
255 // InternalAlloyLanguage.g:82:1: (lv_enumDeclarations_0_0= ruleALSEnumDeclaration )
256 // InternalAlloyLanguage.g:83:3: lv_enumDeclarations_0_0= ruleALSEnumDeclaration
257 {
258 if ( state.backtracking==0 ) {
259
260 newCompositeNode(grammarAccess.getALSDocumentAccess().getEnumDeclarationsALSEnumDeclarationParserRuleCall_0_0_0());
261
262 }
263 pushFollow(FOLLOW_3);
264 lv_enumDeclarations_0_0=ruleALSEnumDeclaration();
265
266 state._fsp--;
267 if (state.failed) return current;
268 if ( state.backtracking==0 ) {
269
270 if (current==null) {
271 current = createModelElementForParent(grammarAccess.getALSDocumentRule());
272 }
273 add(
274 current,
275 "enumDeclarations",
276 lv_enumDeclarations_0_0,
277 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSEnumDeclaration");
278 afterParserOrEnumRuleCall();
279
280 }
281
282 }
283
284
285 }
286
287
288 }
289 break;
290 case 2 :
291 // InternalAlloyLanguage.g:100:6: ( (lv_signatureBodies_1_0= ruleALSSignatureBody ) )
292 {
293 // InternalAlloyLanguage.g:100:6: ( (lv_signatureBodies_1_0= ruleALSSignatureBody ) )
294 // InternalAlloyLanguage.g:101:1: (lv_signatureBodies_1_0= ruleALSSignatureBody )
295 {
296 // InternalAlloyLanguage.g:101:1: (lv_signatureBodies_1_0= ruleALSSignatureBody )
297 // InternalAlloyLanguage.g:102:3: lv_signatureBodies_1_0= ruleALSSignatureBody
298 {
299 if ( state.backtracking==0 ) {
300
301 newCompositeNode(grammarAccess.getALSDocumentAccess().getSignatureBodiesALSSignatureBodyParserRuleCall_0_1_0());
302
303 }
304 pushFollow(FOLLOW_3);
305 lv_signatureBodies_1_0=ruleALSSignatureBody();
306
307 state._fsp--;
308 if (state.failed) return current;
309 if ( state.backtracking==0 ) {
310
311 if (current==null) {
312 current = createModelElementForParent(grammarAccess.getALSDocumentRule());
313 }
314 add(
315 current,
316 "signatureBodies",
317 lv_signatureBodies_1_0,
318 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSSignatureBody");
319 afterParserOrEnumRuleCall();
320
321 }
322
323 }
324
325
326 }
327
328
329 }
330 break;
331 case 3 :
332 // InternalAlloyLanguage.g:119:6: ( (lv_functionDefinitions_2_0= ruleALSFunctionDefinition ) )
333 {
334 // InternalAlloyLanguage.g:119:6: ( (lv_functionDefinitions_2_0= ruleALSFunctionDefinition ) )
335 // InternalAlloyLanguage.g:120:1: (lv_functionDefinitions_2_0= ruleALSFunctionDefinition )
336 {
337 // InternalAlloyLanguage.g:120:1: (lv_functionDefinitions_2_0= ruleALSFunctionDefinition )
338 // InternalAlloyLanguage.g:121:3: lv_functionDefinitions_2_0= ruleALSFunctionDefinition
339 {
340 if ( state.backtracking==0 ) {
341
342 newCompositeNode(grammarAccess.getALSDocumentAccess().getFunctionDefinitionsALSFunctionDefinitionParserRuleCall_0_2_0());
343
344 }
345 pushFollow(FOLLOW_3);
346 lv_functionDefinitions_2_0=ruleALSFunctionDefinition();
347
348 state._fsp--;
349 if (state.failed) return current;
350 if ( state.backtracking==0 ) {
351
352 if (current==null) {
353 current = createModelElementForParent(grammarAccess.getALSDocumentRule());
354 }
355 add(
356 current,
357 "functionDefinitions",
358 lv_functionDefinitions_2_0,
359 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSFunctionDefinition");
360 afterParserOrEnumRuleCall();
361
362 }
363
364 }
365
366
367 }
368
369
370 }
371 break;
372 case 4 :
373 // InternalAlloyLanguage.g:138:6: ( (lv_relationDefinitions_3_0= ruleALSRelationDefinition ) )
374 {
375 // InternalAlloyLanguage.g:138:6: ( (lv_relationDefinitions_3_0= ruleALSRelationDefinition ) )
376 // InternalAlloyLanguage.g:139:1: (lv_relationDefinitions_3_0= ruleALSRelationDefinition )
377 {
378 // InternalAlloyLanguage.g:139:1: (lv_relationDefinitions_3_0= ruleALSRelationDefinition )
379 // InternalAlloyLanguage.g:140:3: lv_relationDefinitions_3_0= ruleALSRelationDefinition
380 {
381 if ( state.backtracking==0 ) {
382
383 newCompositeNode(grammarAccess.getALSDocumentAccess().getRelationDefinitionsALSRelationDefinitionParserRuleCall_0_3_0());
384
385 }
386 pushFollow(FOLLOW_3);
387 lv_relationDefinitions_3_0=ruleALSRelationDefinition();
388
389 state._fsp--;
390 if (state.failed) return current;
391 if ( state.backtracking==0 ) {
392
393 if (current==null) {
394 current = createModelElementForParent(grammarAccess.getALSDocumentRule());
395 }
396 add(
397 current,
398 "relationDefinitions",
399 lv_relationDefinitions_3_0,
400 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSRelationDefinition");
401 afterParserOrEnumRuleCall();
402
403 }
404
405 }
406
407
408 }
409
410
411 }
412 break;
413 case 5 :
414 // InternalAlloyLanguage.g:157:6: ( (lv_factDeclarations_4_0= ruleALSFactDeclaration ) )
415 {
416 // InternalAlloyLanguage.g:157:6: ( (lv_factDeclarations_4_0= ruleALSFactDeclaration ) )
417 // InternalAlloyLanguage.g:158:1: (lv_factDeclarations_4_0= ruleALSFactDeclaration )
418 {
419 // InternalAlloyLanguage.g:158:1: (lv_factDeclarations_4_0= ruleALSFactDeclaration )
420 // InternalAlloyLanguage.g:159:3: lv_factDeclarations_4_0= ruleALSFactDeclaration
421 {
422 if ( state.backtracking==0 ) {
423
424 newCompositeNode(grammarAccess.getALSDocumentAccess().getFactDeclarationsALSFactDeclarationParserRuleCall_0_4_0());
425
426 }
427 pushFollow(FOLLOW_3);
428 lv_factDeclarations_4_0=ruleALSFactDeclaration();
429
430 state._fsp--;
431 if (state.failed) return current;
432 if ( state.backtracking==0 ) {
433
434 if (current==null) {
435 current = createModelElementForParent(grammarAccess.getALSDocumentRule());
436 }
437 add(
438 current,
439 "factDeclarations",
440 lv_factDeclarations_4_0,
441 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSFactDeclaration");
442 afterParserOrEnumRuleCall();
443
444 }
445
446 }
447
448
449 }
450
451
452 }
453 break;
454
455 default :
456 if ( cnt1 >= 1 ) break loop1;
457 if (state.backtracking>0) {state.failed=true; return current;}
458 EarlyExitException eee =
459 new EarlyExitException(1, input);
460 throw eee;
461 }
462 cnt1++;
463 } while (true);
464
465 // InternalAlloyLanguage.g:175:4: ( (lv_runCommand_5_0= ruleALSRunCommand ) )
466 // InternalAlloyLanguage.g:176:1: (lv_runCommand_5_0= ruleALSRunCommand )
467 {
468 // InternalAlloyLanguage.g:176:1: (lv_runCommand_5_0= ruleALSRunCommand )
469 // InternalAlloyLanguage.g:177:3: lv_runCommand_5_0= ruleALSRunCommand
470 {
471 if ( state.backtracking==0 ) {
472
473 newCompositeNode(grammarAccess.getALSDocumentAccess().getRunCommandALSRunCommandParserRuleCall_1_0());
474
475 }
476 pushFollow(FOLLOW_2);
477 lv_runCommand_5_0=ruleALSRunCommand();
478
479 state._fsp--;
480 if (state.failed) return current;
481 if ( state.backtracking==0 ) {
482
483 if (current==null) {
484 current = createModelElementForParent(grammarAccess.getALSDocumentRule());
485 }
486 set(
487 current,
488 "runCommand",
489 lv_runCommand_5_0,
490 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSRunCommand");
491 afterParserOrEnumRuleCall();
492
493 }
494
495 }
496
497
498 }
499
500
501 }
502
503
504 }
505
506 if ( state.backtracking==0 ) {
507 leaveRule();
508 }
509 }
510
511 catch (RecognitionException re) {
512 recover(input,re);
513 appendSkippedTokens();
514 }
515 finally {
516 }
517 return current;
518 }
519 // $ANTLR end "ruleALSDocument"
520
521
522 // $ANTLR start "entryRuleALSID"
523 // InternalAlloyLanguage.g:201:1: entryRuleALSID returns [String current=null] : iv_ruleALSID= ruleALSID EOF ;
524 public final String entryRuleALSID() throws RecognitionException {
525 String current = null;
526
527 AntlrDatatypeRuleToken iv_ruleALSID = null;
528
529
530 try {
531 // InternalAlloyLanguage.g:202:2: (iv_ruleALSID= ruleALSID EOF )
532 // InternalAlloyLanguage.g:203:2: iv_ruleALSID= ruleALSID EOF
533 {
534 if ( state.backtracking==0 ) {
535 newCompositeNode(grammarAccess.getALSIDRule());
536 }
537 pushFollow(FOLLOW_1);
538 iv_ruleALSID=ruleALSID();
539
540 state._fsp--;
541 if (state.failed) return current;
542 if ( state.backtracking==0 ) {
543 current =iv_ruleALSID.getText();
544 }
545 match(input,EOF,FOLLOW_2); if (state.failed) return current;
546
547 }
548
549 }
550
551 catch (RecognitionException re) {
552 recover(input,re);
553 appendSkippedTokens();
554 }
555 finally {
556 }
557 return current;
558 }
559 // $ANTLR end "entryRuleALSID"
560
561
562 // $ANTLR start "ruleALSID"
563 // InternalAlloyLanguage.g:210:1: ruleALSID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : this_ID_0= RULE_ID ;
564 public final AntlrDatatypeRuleToken ruleALSID() throws RecognitionException {
565 AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
566
567 Token this_ID_0=null;
568
569 enterRule();
570
571 try {
572 // InternalAlloyLanguage.g:213:28: (this_ID_0= RULE_ID )
573 // InternalAlloyLanguage.g:214:5: this_ID_0= RULE_ID
574 {
575 this_ID_0=(Token)match(input,RULE_ID,FOLLOW_2); if (state.failed) return current;
576 if ( state.backtracking==0 ) {
577
578 current.merge(this_ID_0);
579
580 }
581 if ( state.backtracking==0 ) {
582
583 newLeafNode(this_ID_0, grammarAccess.getALSIDAccess().getIDTerminalRuleCall());
584
585 }
586
587 }
588
589 if ( state.backtracking==0 ) {
590 leaveRule();
591 }
592 }
593
594 catch (RecognitionException re) {
595 recover(input,re);
596 appendSkippedTokens();
597 }
598 finally {
599 }
600 return current;
601 }
602 // $ANTLR end "ruleALSID"
603
604
605 // $ANTLR start "entryRuleALSTypeDeclaration"
606 // InternalAlloyLanguage.g:231:1: entryRuleALSTypeDeclaration returns [EObject current=null] : iv_ruleALSTypeDeclaration= ruleALSTypeDeclaration EOF ;
607 public final EObject entryRuleALSTypeDeclaration() throws RecognitionException {
608 EObject current = null;
609
610 EObject iv_ruleALSTypeDeclaration = null;
611
612
613 try {
614 // InternalAlloyLanguage.g:232:2: (iv_ruleALSTypeDeclaration= ruleALSTypeDeclaration EOF )
615 // InternalAlloyLanguage.g:233:2: iv_ruleALSTypeDeclaration= ruleALSTypeDeclaration EOF
616 {
617 if ( state.backtracking==0 ) {
618 newCompositeNode(grammarAccess.getALSTypeDeclarationRule());
619 }
620 pushFollow(FOLLOW_1);
621 iv_ruleALSTypeDeclaration=ruleALSTypeDeclaration();
622
623 state._fsp--;
624 if (state.failed) return current;
625 if ( state.backtracking==0 ) {
626 current =iv_ruleALSTypeDeclaration;
627 }
628 match(input,EOF,FOLLOW_2); if (state.failed) return current;
629
630 }
631
632 }
633
634 catch (RecognitionException re) {
635 recover(input,re);
636 appendSkippedTokens();
637 }
638 finally {
639 }
640 return current;
641 }
642 // $ANTLR end "entryRuleALSTypeDeclaration"
643
644
645 // $ANTLR start "ruleALSTypeDeclaration"
646 // InternalAlloyLanguage.g:240:1: ruleALSTypeDeclaration returns [EObject current=null] : (this_ALSEnumDeclaration_0= ruleALSEnumDeclaration | this_ALSSignatureDeclaration_1= ruleALSSignatureDeclaration ) ;
647 public final EObject ruleALSTypeDeclaration() throws RecognitionException {
648 EObject current = null;
649
650 EObject this_ALSEnumDeclaration_0 = null;
651
652 EObject this_ALSSignatureDeclaration_1 = null;
653
654
655 enterRule();
656
657 try {
658 // InternalAlloyLanguage.g:243:28: ( (this_ALSEnumDeclaration_0= ruleALSEnumDeclaration | this_ALSSignatureDeclaration_1= ruleALSSignatureDeclaration ) )
659 // InternalAlloyLanguage.g:244:1: (this_ALSEnumDeclaration_0= ruleALSEnumDeclaration | this_ALSSignatureDeclaration_1= ruleALSSignatureDeclaration )
660 {
661 // InternalAlloyLanguage.g:244:1: (this_ALSEnumDeclaration_0= ruleALSEnumDeclaration | this_ALSSignatureDeclaration_1= ruleALSSignatureDeclaration )
662 int alt2=2;
663 int LA2_0 = input.LA(1);
664
665 if ( (LA2_0==11) ) {
666 alt2=1;
667 }
668 else if ( (LA2_0==RULE_ID) ) {
669 alt2=2;
670 }
671 else {
672 if (state.backtracking>0) {state.failed=true; return current;}
673 NoViableAltException nvae =
674 new NoViableAltException("", 2, 0, input);
675
676 throw nvae;
677 }
678 switch (alt2) {
679 case 1 :
680 // InternalAlloyLanguage.g:245:5: this_ALSEnumDeclaration_0= ruleALSEnumDeclaration
681 {
682 if ( state.backtracking==0 ) {
683
684 newCompositeNode(grammarAccess.getALSTypeDeclarationAccess().getALSEnumDeclarationParserRuleCall_0());
685
686 }
687 pushFollow(FOLLOW_2);
688 this_ALSEnumDeclaration_0=ruleALSEnumDeclaration();
689
690 state._fsp--;
691 if (state.failed) return current;
692 if ( state.backtracking==0 ) {
693
694 current = this_ALSEnumDeclaration_0;
695 afterParserOrEnumRuleCall();
696
697 }
698
699 }
700 break;
701 case 2 :
702 // InternalAlloyLanguage.g:255:5: this_ALSSignatureDeclaration_1= ruleALSSignatureDeclaration
703 {
704 if ( state.backtracking==0 ) {
705
706 newCompositeNode(grammarAccess.getALSTypeDeclarationAccess().getALSSignatureDeclarationParserRuleCall_1());
707
708 }
709 pushFollow(FOLLOW_2);
710 this_ALSSignatureDeclaration_1=ruleALSSignatureDeclaration();
711
712 state._fsp--;
713 if (state.failed) return current;
714 if ( state.backtracking==0 ) {
715
716 current = this_ALSSignatureDeclaration_1;
717 afterParserOrEnumRuleCall();
718
719 }
720
721 }
722 break;
723
724 }
725
726
727 }
728
729 if ( state.backtracking==0 ) {
730 leaveRule();
731 }
732 }
733
734 catch (RecognitionException re) {
735 recover(input,re);
736 appendSkippedTokens();
737 }
738 finally {
739 }
740 return current;
741 }
742 // $ANTLR end "ruleALSTypeDeclaration"
743
744
745 // $ANTLR start "entryRuleALSEnumDeclaration"
746 // InternalAlloyLanguage.g:271:1: entryRuleALSEnumDeclaration returns [EObject current=null] : iv_ruleALSEnumDeclaration= ruleALSEnumDeclaration EOF ;
747 public final EObject entryRuleALSEnumDeclaration() throws RecognitionException {
748 EObject current = null;
749
750 EObject iv_ruleALSEnumDeclaration = null;
751
752
753 try {
754 // InternalAlloyLanguage.g:272:2: (iv_ruleALSEnumDeclaration= ruleALSEnumDeclaration EOF )
755 // InternalAlloyLanguage.g:273:2: iv_ruleALSEnumDeclaration= ruleALSEnumDeclaration EOF
756 {
757 if ( state.backtracking==0 ) {
758 newCompositeNode(grammarAccess.getALSEnumDeclarationRule());
759 }
760 pushFollow(FOLLOW_1);
761 iv_ruleALSEnumDeclaration=ruleALSEnumDeclaration();
762
763 state._fsp--;
764 if (state.failed) return current;
765 if ( state.backtracking==0 ) {
766 current =iv_ruleALSEnumDeclaration;
767 }
768 match(input,EOF,FOLLOW_2); if (state.failed) return current;
769
770 }
771
772 }
773
774 catch (RecognitionException re) {
775 recover(input,re);
776 appendSkippedTokens();
777 }
778 finally {
779 }
780 return current;
781 }
782 // $ANTLR end "entryRuleALSEnumDeclaration"
783
784
785 // $ANTLR start "ruleALSEnumDeclaration"
786 // InternalAlloyLanguage.g:280:1: ruleALSEnumDeclaration returns [EObject current=null] : (otherlv_0= 'enum' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '{' ( (lv_literal_3_0= ruleALSEnumLiteral ) ) (otherlv_4= ',' ( (lv_literal_5_0= ruleALSEnumLiteral ) ) )* otherlv_6= '}' ) ;
787 public final EObject ruleALSEnumDeclaration() throws RecognitionException {
788 EObject current = null;
789
790 Token otherlv_0=null;
791 Token otherlv_2=null;
792 Token otherlv_4=null;
793 Token otherlv_6=null;
794 AntlrDatatypeRuleToken lv_name_1_0 = null;
795
796 EObject lv_literal_3_0 = null;
797
798 EObject lv_literal_5_0 = null;
799
800
801 enterRule();
802
803 try {
804 // InternalAlloyLanguage.g:283:28: ( (otherlv_0= 'enum' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '{' ( (lv_literal_3_0= ruleALSEnumLiteral ) ) (otherlv_4= ',' ( (lv_literal_5_0= ruleALSEnumLiteral ) ) )* otherlv_6= '}' ) )
805 // InternalAlloyLanguage.g:284:1: (otherlv_0= 'enum' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '{' ( (lv_literal_3_0= ruleALSEnumLiteral ) ) (otherlv_4= ',' ( (lv_literal_5_0= ruleALSEnumLiteral ) ) )* otherlv_6= '}' )
806 {
807 // InternalAlloyLanguage.g:284:1: (otherlv_0= 'enum' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '{' ( (lv_literal_3_0= ruleALSEnumLiteral ) ) (otherlv_4= ',' ( (lv_literal_5_0= ruleALSEnumLiteral ) ) )* otherlv_6= '}' )
808 // InternalAlloyLanguage.g:284:3: otherlv_0= 'enum' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '{' ( (lv_literal_3_0= ruleALSEnumLiteral ) ) (otherlv_4= ',' ( (lv_literal_5_0= ruleALSEnumLiteral ) ) )* otherlv_6= '}'
809 {
810 otherlv_0=(Token)match(input,11,FOLLOW_4); if (state.failed) return current;
811 if ( state.backtracking==0 ) {
812
813 newLeafNode(otherlv_0, grammarAccess.getALSEnumDeclarationAccess().getEnumKeyword_0());
814
815 }
816 // InternalAlloyLanguage.g:288:1: ( (lv_name_1_0= ruleALSID ) )
817 // InternalAlloyLanguage.g:289:1: (lv_name_1_0= ruleALSID )
818 {
819 // InternalAlloyLanguage.g:289:1: (lv_name_1_0= ruleALSID )
820 // InternalAlloyLanguage.g:290:3: lv_name_1_0= ruleALSID
821 {
822 if ( state.backtracking==0 ) {
823
824 newCompositeNode(grammarAccess.getALSEnumDeclarationAccess().getNameALSIDParserRuleCall_1_0());
825
826 }
827 pushFollow(FOLLOW_5);
828 lv_name_1_0=ruleALSID();
829
830 state._fsp--;
831 if (state.failed) return current;
832 if ( state.backtracking==0 ) {
833
834 if (current==null) {
835 current = createModelElementForParent(grammarAccess.getALSEnumDeclarationRule());
836 }
837 set(
838 current,
839 "name",
840 lv_name_1_0,
841 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID");
842 afterParserOrEnumRuleCall();
843
844 }
845
846 }
847
848
849 }
850
851 otherlv_2=(Token)match(input,12,FOLLOW_4); if (state.failed) return current;
852 if ( state.backtracking==0 ) {
853
854 newLeafNode(otherlv_2, grammarAccess.getALSEnumDeclarationAccess().getLeftCurlyBracketKeyword_2());
855
856 }
857 // InternalAlloyLanguage.g:310:1: ( (lv_literal_3_0= ruleALSEnumLiteral ) )
858 // InternalAlloyLanguage.g:311:1: (lv_literal_3_0= ruleALSEnumLiteral )
859 {
860 // InternalAlloyLanguage.g:311:1: (lv_literal_3_0= ruleALSEnumLiteral )
861 // InternalAlloyLanguage.g:312:3: lv_literal_3_0= ruleALSEnumLiteral
862 {
863 if ( state.backtracking==0 ) {
864
865 newCompositeNode(grammarAccess.getALSEnumDeclarationAccess().getLiteralALSEnumLiteralParserRuleCall_3_0());
866
867 }
868 pushFollow(FOLLOW_6);
869 lv_literal_3_0=ruleALSEnumLiteral();
870
871 state._fsp--;
872 if (state.failed) return current;
873 if ( state.backtracking==0 ) {
874
875 if (current==null) {
876 current = createModelElementForParent(grammarAccess.getALSEnumDeclarationRule());
877 }
878 add(
879 current,
880 "literal",
881 lv_literal_3_0,
882 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSEnumLiteral");
883 afterParserOrEnumRuleCall();
884
885 }
886
887 }
888
889
890 }
891
892 // InternalAlloyLanguage.g:328:2: (otherlv_4= ',' ( (lv_literal_5_0= ruleALSEnumLiteral ) ) )*
893 loop3:
894 do {
895 int alt3=2;
896 int LA3_0 = input.LA(1);
897
898 if ( (LA3_0==13) ) {
899 alt3=1;
900 }
901
902
903 switch (alt3) {
904 case 1 :
905 // InternalAlloyLanguage.g:328:4: otherlv_4= ',' ( (lv_literal_5_0= ruleALSEnumLiteral ) )
906 {
907 otherlv_4=(Token)match(input,13,FOLLOW_4); if (state.failed) return current;
908 if ( state.backtracking==0 ) {
909
910 newLeafNode(otherlv_4, grammarAccess.getALSEnumDeclarationAccess().getCommaKeyword_4_0());
911
912 }
913 // InternalAlloyLanguage.g:332:1: ( (lv_literal_5_0= ruleALSEnumLiteral ) )
914 // InternalAlloyLanguage.g:333:1: (lv_literal_5_0= ruleALSEnumLiteral )
915 {
916 // InternalAlloyLanguage.g:333:1: (lv_literal_5_0= ruleALSEnumLiteral )
917 // InternalAlloyLanguage.g:334:3: lv_literal_5_0= ruleALSEnumLiteral
918 {
919 if ( state.backtracking==0 ) {
920
921 newCompositeNode(grammarAccess.getALSEnumDeclarationAccess().getLiteralALSEnumLiteralParserRuleCall_4_1_0());
922
923 }
924 pushFollow(FOLLOW_6);
925 lv_literal_5_0=ruleALSEnumLiteral();
926
927 state._fsp--;
928 if (state.failed) return current;
929 if ( state.backtracking==0 ) {
930
931 if (current==null) {
932 current = createModelElementForParent(grammarAccess.getALSEnumDeclarationRule());
933 }
934 add(
935 current,
936 "literal",
937 lv_literal_5_0,
938 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSEnumLiteral");
939 afterParserOrEnumRuleCall();
940
941 }
942
943 }
944
945
946 }
947
948
949 }
950 break;
951
952 default :
953 break loop3;
954 }
955 } while (true);
956
957 otherlv_6=(Token)match(input,14,FOLLOW_2); if (state.failed) return current;
958 if ( state.backtracking==0 ) {
959
960 newLeafNode(otherlv_6, grammarAccess.getALSEnumDeclarationAccess().getRightCurlyBracketKeyword_5());
961
962 }
963
964 }
965
966
967 }
968
969 if ( state.backtracking==0 ) {
970 leaveRule();
971 }
972 }
973
974 catch (RecognitionException re) {
975 recover(input,re);
976 appendSkippedTokens();
977 }
978 finally {
979 }
980 return current;
981 }
982 // $ANTLR end "ruleALSEnumDeclaration"
983
984
985 // $ANTLR start "entryRuleALSEnumLiteral"
986 // InternalAlloyLanguage.g:362:1: entryRuleALSEnumLiteral returns [EObject current=null] : iv_ruleALSEnumLiteral= ruleALSEnumLiteral EOF ;
987 public final EObject entryRuleALSEnumLiteral() throws RecognitionException {
988 EObject current = null;
989
990 EObject iv_ruleALSEnumLiteral = null;
991
992
993 try {
994 // InternalAlloyLanguage.g:363:2: (iv_ruleALSEnumLiteral= ruleALSEnumLiteral EOF )
995 // InternalAlloyLanguage.g:364:2: iv_ruleALSEnumLiteral= ruleALSEnumLiteral EOF
996 {
997 if ( state.backtracking==0 ) {
998 newCompositeNode(grammarAccess.getALSEnumLiteralRule());
999 }
1000 pushFollow(FOLLOW_1);
1001 iv_ruleALSEnumLiteral=ruleALSEnumLiteral();
1002
1003 state._fsp--;
1004 if (state.failed) return current;
1005 if ( state.backtracking==0 ) {
1006 current =iv_ruleALSEnumLiteral;
1007 }
1008 match(input,EOF,FOLLOW_2); if (state.failed) return current;
1009
1010 }
1011
1012 }
1013
1014 catch (RecognitionException re) {
1015 recover(input,re);
1016 appendSkippedTokens();
1017 }
1018 finally {
1019 }
1020 return current;
1021 }
1022 // $ANTLR end "entryRuleALSEnumLiteral"
1023
1024
1025 // $ANTLR start "ruleALSEnumLiteral"
1026 // InternalAlloyLanguage.g:371:1: ruleALSEnumLiteral returns [EObject current=null] : ( (lv_name_0_0= ruleALSID ) ) ;
1027 public final EObject ruleALSEnumLiteral() throws RecognitionException {
1028 EObject current = null;
1029
1030 AntlrDatatypeRuleToken lv_name_0_0 = null;
1031
1032
1033 enterRule();
1034
1035 try {
1036 // InternalAlloyLanguage.g:374:28: ( ( (lv_name_0_0= ruleALSID ) ) )
1037 // InternalAlloyLanguage.g:375:1: ( (lv_name_0_0= ruleALSID ) )
1038 {
1039 // InternalAlloyLanguage.g:375:1: ( (lv_name_0_0= ruleALSID ) )
1040 // InternalAlloyLanguage.g:376:1: (lv_name_0_0= ruleALSID )
1041 {
1042 // InternalAlloyLanguage.g:376:1: (lv_name_0_0= ruleALSID )
1043 // InternalAlloyLanguage.g:377:3: lv_name_0_0= ruleALSID
1044 {
1045 if ( state.backtracking==0 ) {
1046
1047 newCompositeNode(grammarAccess.getALSEnumLiteralAccess().getNameALSIDParserRuleCall_0());
1048
1049 }
1050 pushFollow(FOLLOW_2);
1051 lv_name_0_0=ruleALSID();
1052
1053 state._fsp--;
1054 if (state.failed) return current;
1055 if ( state.backtracking==0 ) {
1056
1057 if (current==null) {
1058 current = createModelElementForParent(grammarAccess.getALSEnumLiteralRule());
1059 }
1060 set(
1061 current,
1062 "name",
1063 lv_name_0_0,
1064 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID");
1065 afterParserOrEnumRuleCall();
1066
1067 }
1068
1069 }
1070
1071
1072 }
1073
1074
1075 }
1076
1077 if ( state.backtracking==0 ) {
1078 leaveRule();
1079 }
1080 }
1081
1082 catch (RecognitionException re) {
1083 recover(input,re);
1084 appendSkippedTokens();
1085 }
1086 finally {
1087 }
1088 return current;
1089 }
1090 // $ANTLR end "ruleALSEnumLiteral"
1091
1092
1093 // $ANTLR start "entryRuleALSSignatureDeclaration"
1094 // InternalAlloyLanguage.g:401:1: entryRuleALSSignatureDeclaration returns [EObject current=null] : iv_ruleALSSignatureDeclaration= ruleALSSignatureDeclaration EOF ;
1095 public final EObject entryRuleALSSignatureDeclaration() throws RecognitionException {
1096 EObject current = null;
1097
1098 EObject iv_ruleALSSignatureDeclaration = null;
1099
1100
1101 try {
1102 // InternalAlloyLanguage.g:402:2: (iv_ruleALSSignatureDeclaration= ruleALSSignatureDeclaration EOF )
1103 // InternalAlloyLanguage.g:403:2: iv_ruleALSSignatureDeclaration= ruleALSSignatureDeclaration EOF
1104 {
1105 if ( state.backtracking==0 ) {
1106 newCompositeNode(grammarAccess.getALSSignatureDeclarationRule());
1107 }
1108 pushFollow(FOLLOW_1);
1109 iv_ruleALSSignatureDeclaration=ruleALSSignatureDeclaration();
1110
1111 state._fsp--;
1112 if (state.failed) return current;
1113 if ( state.backtracking==0 ) {
1114 current =iv_ruleALSSignatureDeclaration;
1115 }
1116 match(input,EOF,FOLLOW_2); if (state.failed) return current;
1117
1118 }
1119
1120 }
1121
1122 catch (RecognitionException re) {
1123 recover(input,re);
1124 appendSkippedTokens();
1125 }
1126 finally {
1127 }
1128 return current;
1129 }
1130 // $ANTLR end "entryRuleALSSignatureDeclaration"
1131
1132
1133 // $ANTLR start "ruleALSSignatureDeclaration"
1134 // InternalAlloyLanguage.g:410:1: ruleALSSignatureDeclaration returns [EObject current=null] : ( (lv_name_0_0= ruleALSID ) ) ;
1135 public final EObject ruleALSSignatureDeclaration() throws RecognitionException {
1136 EObject current = null;
1137
1138 AntlrDatatypeRuleToken lv_name_0_0 = null;
1139
1140
1141 enterRule();
1142
1143 try {
1144 // InternalAlloyLanguage.g:413:28: ( ( (lv_name_0_0= ruleALSID ) ) )
1145 // InternalAlloyLanguage.g:414:1: ( (lv_name_0_0= ruleALSID ) )
1146 {
1147 // InternalAlloyLanguage.g:414:1: ( (lv_name_0_0= ruleALSID ) )
1148 // InternalAlloyLanguage.g:415:1: (lv_name_0_0= ruleALSID )
1149 {
1150 // InternalAlloyLanguage.g:415:1: (lv_name_0_0= ruleALSID )
1151 // InternalAlloyLanguage.g:416:3: lv_name_0_0= ruleALSID
1152 {
1153 if ( state.backtracking==0 ) {
1154
1155 newCompositeNode(grammarAccess.getALSSignatureDeclarationAccess().getNameALSIDParserRuleCall_0());
1156
1157 }
1158 pushFollow(FOLLOW_2);
1159 lv_name_0_0=ruleALSID();
1160
1161 state._fsp--;
1162 if (state.failed) return current;
1163 if ( state.backtracking==0 ) {
1164
1165 if (current==null) {
1166 current = createModelElementForParent(grammarAccess.getALSSignatureDeclarationRule());
1167 }
1168 set(
1169 current,
1170 "name",
1171 lv_name_0_0,
1172 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID");
1173 afterParserOrEnumRuleCall();
1174
1175 }
1176
1177 }
1178
1179
1180 }
1181
1182
1183 }
1184
1185 if ( state.backtracking==0 ) {
1186 leaveRule();
1187 }
1188 }
1189
1190 catch (RecognitionException re) {
1191 recover(input,re);
1192 appendSkippedTokens();
1193 }
1194 finally {
1195 }
1196 return current;
1197 }
1198 // $ANTLR end "ruleALSSignatureDeclaration"
1199
1200
1201 // $ANTLR start "entryRuleALSSignatureBody"
1202 // InternalAlloyLanguage.g:440:1: entryRuleALSSignatureBody returns [EObject current=null] : iv_ruleALSSignatureBody= ruleALSSignatureBody EOF ;
1203 public final EObject entryRuleALSSignatureBody() throws RecognitionException {
1204 EObject current = null;
1205
1206 EObject iv_ruleALSSignatureBody = null;
1207
1208
1209 try {
1210 // InternalAlloyLanguage.g:441:2: (iv_ruleALSSignatureBody= ruleALSSignatureBody EOF )
1211 // InternalAlloyLanguage.g:442:2: iv_ruleALSSignatureBody= ruleALSSignatureBody EOF
1212 {
1213 if ( state.backtracking==0 ) {
1214 newCompositeNode(grammarAccess.getALSSignatureBodyRule());
1215 }
1216 pushFollow(FOLLOW_1);
1217 iv_ruleALSSignatureBody=ruleALSSignatureBody();
1218
1219 state._fsp--;
1220 if (state.failed) return current;
1221 if ( state.backtracking==0 ) {
1222 current =iv_ruleALSSignatureBody;
1223 }
1224 match(input,EOF,FOLLOW_2); if (state.failed) return current;
1225
1226 }
1227
1228 }
1229
1230 catch (RecognitionException re) {
1231 recover(input,re);
1232 appendSkippedTokens();
1233 }
1234 finally {
1235 }
1236 return current;
1237 }
1238 // $ANTLR end "entryRuleALSSignatureBody"
1239
1240
1241 // $ANTLR start "ruleALSSignatureBody"
1242 // InternalAlloyLanguage.g:449:1: ruleALSSignatureBody returns [EObject current=null] : ( ( ( ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* ) ) ) otherlv_3= 'sig' ( (lv_declarations_4_0= ruleALSSignatureDeclaration ) ) (otherlv_5= ',' ( (lv_declarations_6_0= ruleALSSignatureDeclaration ) ) )* ( (otherlv_7= 'extends' ( (otherlv_8= RULE_ID ) ) ) | (otherlv_9= 'in' ( (otherlv_10= RULE_ID ) ) (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )* ) )? otherlv_13= '{' ( ( (lv_fields_14_0= ruleALSFieldDeclaration ) ) (otherlv_15= ',' ( (lv_fields_16_0= ruleALSFieldDeclaration ) ) )* )? otherlv_17= '}' ) ;
1243 public final EObject ruleALSSignatureBody() throws RecognitionException {
1244 EObject current = null;
1245
1246 Token lv_abstract_2_0=null;
1247 Token otherlv_3=null;
1248 Token otherlv_5=null;
1249 Token otherlv_7=null;
1250 Token otherlv_8=null;
1251 Token otherlv_9=null;
1252 Token otherlv_10=null;
1253 Token otherlv_11=null;
1254 Token otherlv_12=null;
1255 Token otherlv_13=null;
1256 Token otherlv_15=null;
1257 Token otherlv_17=null;
1258 Enumerator lv_multiplicity_1_0 = null;
1259
1260 EObject lv_declarations_4_0 = null;
1261
1262 EObject lv_declarations_6_0 = null;
1263
1264 EObject lv_fields_14_0 = null;
1265
1266 EObject lv_fields_16_0 = null;
1267
1268
1269 enterRule();
1270
1271 try {
1272 // InternalAlloyLanguage.g:452:28: ( ( ( ( ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* ) ) ) otherlv_3= 'sig' ( (lv_declarations_4_0= ruleALSSignatureDeclaration ) ) (otherlv_5= ',' ( (lv_declarations_6_0= ruleALSSignatureDeclaration ) ) )* ( (otherlv_7= 'extends' ( (otherlv_8= RULE_ID ) ) ) | (otherlv_9= 'in' ( (otherlv_10= RULE_ID ) ) (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )* ) )? otherlv_13= '{' ( ( (lv_fields_14_0= ruleALSFieldDeclaration ) ) (otherlv_15= ',' ( (lv_fields_16_0= ruleALSFieldDeclaration ) ) )* )? otherlv_17= '}' ) )
1273 // InternalAlloyLanguage.g:453:1: ( ( ( ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* ) ) ) otherlv_3= 'sig' ( (lv_declarations_4_0= ruleALSSignatureDeclaration ) ) (otherlv_5= ',' ( (lv_declarations_6_0= ruleALSSignatureDeclaration ) ) )* ( (otherlv_7= 'extends' ( (otherlv_8= RULE_ID ) ) ) | (otherlv_9= 'in' ( (otherlv_10= RULE_ID ) ) (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )* ) )? otherlv_13= '{' ( ( (lv_fields_14_0= ruleALSFieldDeclaration ) ) (otherlv_15= ',' ( (lv_fields_16_0= ruleALSFieldDeclaration ) ) )* )? otherlv_17= '}' )
1274 {
1275 // InternalAlloyLanguage.g:453:1: ( ( ( ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* ) ) ) otherlv_3= 'sig' ( (lv_declarations_4_0= ruleALSSignatureDeclaration ) ) (otherlv_5= ',' ( (lv_declarations_6_0= ruleALSSignatureDeclaration ) ) )* ( (otherlv_7= 'extends' ( (otherlv_8= RULE_ID ) ) ) | (otherlv_9= 'in' ( (otherlv_10= RULE_ID ) ) (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )* ) )? otherlv_13= '{' ( ( (lv_fields_14_0= ruleALSFieldDeclaration ) ) (otherlv_15= ',' ( (lv_fields_16_0= ruleALSFieldDeclaration ) ) )* )? otherlv_17= '}' )
1276 // InternalAlloyLanguage.g:453:2: ( ( ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* ) ) ) otherlv_3= 'sig' ( (lv_declarations_4_0= ruleALSSignatureDeclaration ) ) (otherlv_5= ',' ( (lv_declarations_6_0= ruleALSSignatureDeclaration ) ) )* ( (otherlv_7= 'extends' ( (otherlv_8= RULE_ID ) ) ) | (otherlv_9= 'in' ( (otherlv_10= RULE_ID ) ) (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )* ) )? otherlv_13= '{' ( ( (lv_fields_14_0= ruleALSFieldDeclaration ) ) (otherlv_15= ',' ( (lv_fields_16_0= ruleALSFieldDeclaration ) ) )* )? otherlv_17= '}'
1277 {
1278 // InternalAlloyLanguage.g:453:2: ( ( ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* ) ) )
1279 // InternalAlloyLanguage.g:455:1: ( ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* ) )
1280 {
1281 // InternalAlloyLanguage.g:455:1: ( ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* ) )
1282 // InternalAlloyLanguage.g:456:2: ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* )
1283 {
1284 getUnorderedGroupHelper().enter(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0());
1285 // InternalAlloyLanguage.g:459:2: ( ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )* )
1286 // InternalAlloyLanguage.g:460:3: ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )*
1287 {
1288 // InternalAlloyLanguage.g:460:3: ( ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) ) | ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) ) )*
1289 loop4:
1290 do {
1291 int alt4=3;
1292 int LA4_0 = input.LA(1);
1293
1294 if ( LA4_0 >= 65 && LA4_0 <= 70 && getUnorderedGroupHelper().canSelect(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 0) ) {
1295 alt4=1;
1296 }
1297 else if ( LA4_0 == 15 && getUnorderedGroupHelper().canSelect(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 1) ) {
1298 alt4=2;
1299 }
1300
1301
1302 switch (alt4) {
1303 case 1 :
1304 // InternalAlloyLanguage.g:462:4: ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) )
1305 {
1306 // InternalAlloyLanguage.g:462:4: ({...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) ) )
1307 // InternalAlloyLanguage.g:463:5: {...}? => ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) )
1308 {
1309 if ( ! getUnorderedGroupHelper().canSelect(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 0) ) {
1310 if (state.backtracking>0) {state.failed=true; return current;}
1311 throw new FailedPredicateException(input, "ruleALSSignatureBody", "getUnorderedGroupHelper().canSelect(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 0)");
1312 }
1313 // InternalAlloyLanguage.g:463:113: ( ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) ) )
1314 // InternalAlloyLanguage.g:464:6: ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) )
1315 {
1316 getUnorderedGroupHelper().select(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 0);
1317 // InternalAlloyLanguage.g:467:6: ({...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) ) )
1318 // InternalAlloyLanguage.g:467:7: {...}? => ( (lv_multiplicity_1_0= ruleALSMultiplicity ) )
1319 {
1320 if ( !((true)) ) {
1321 if (state.backtracking>0) {state.failed=true; return current;}
1322 throw new FailedPredicateException(input, "ruleALSSignatureBody", "true");
1323 }
1324 // InternalAlloyLanguage.g:467:16: ( (lv_multiplicity_1_0= ruleALSMultiplicity ) )
1325 // InternalAlloyLanguage.g:468:1: (lv_multiplicity_1_0= ruleALSMultiplicity )
1326 {
1327 // InternalAlloyLanguage.g:468:1: (lv_multiplicity_1_0= ruleALSMultiplicity )
1328 // InternalAlloyLanguage.g:469:3: lv_multiplicity_1_0= ruleALSMultiplicity
1329 {
1330 if ( state.backtracking==0 ) {
1331
1332 newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getMultiplicityALSMultiplicityEnumRuleCall_0_0_0());
1333
1334 }
1335 pushFollow(FOLLOW_7);
1336 lv_multiplicity_1_0=ruleALSMultiplicity();
1337
1338 state._fsp--;
1339 if (state.failed) return current;
1340 if ( state.backtracking==0 ) {
1341
1342 if (current==null) {
1343 current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule());
1344 }
1345 set(
1346 current,
1347 "multiplicity",
1348 lv_multiplicity_1_0,
1349 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity");
1350 afterParserOrEnumRuleCall();
1351
1352 }
1353
1354 }
1355
1356
1357 }
1358
1359
1360 }
1361
1362 getUnorderedGroupHelper().returnFromSelection(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0());
1363
1364 }
1365
1366
1367 }
1368
1369
1370 }
1371 break;
1372 case 2 :
1373 // InternalAlloyLanguage.g:492:4: ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) )
1374 {
1375 // InternalAlloyLanguage.g:492:4: ({...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) ) )
1376 // InternalAlloyLanguage.g:493:5: {...}? => ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) )
1377 {
1378 if ( ! getUnorderedGroupHelper().canSelect(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 1) ) {
1379 if (state.backtracking>0) {state.failed=true; return current;}
1380 throw new FailedPredicateException(input, "ruleALSSignatureBody", "getUnorderedGroupHelper().canSelect(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 1)");
1381 }
1382 // InternalAlloyLanguage.g:493:113: ( ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) ) )
1383 // InternalAlloyLanguage.g:494:6: ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) )
1384 {
1385 getUnorderedGroupHelper().select(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 1);
1386 // InternalAlloyLanguage.g:497:6: ({...}? => ( (lv_abstract_2_0= 'abstract' ) ) )
1387 // InternalAlloyLanguage.g:497:7: {...}? => ( (lv_abstract_2_0= 'abstract' ) )
1388 {
1389 if ( !((true)) ) {
1390 if (state.backtracking>0) {state.failed=true; return current;}
1391 throw new FailedPredicateException(input, "ruleALSSignatureBody", "true");
1392 }
1393 // InternalAlloyLanguage.g:497:16: ( (lv_abstract_2_0= 'abstract' ) )
1394 // InternalAlloyLanguage.g:498:1: (lv_abstract_2_0= 'abstract' )
1395 {
1396 // InternalAlloyLanguage.g:498:1: (lv_abstract_2_0= 'abstract' )
1397 // InternalAlloyLanguage.g:499:3: lv_abstract_2_0= 'abstract'
1398 {
1399 lv_abstract_2_0=(Token)match(input,15,FOLLOW_7); if (state.failed) return current;
1400 if ( state.backtracking==0 ) {
1401
1402 newLeafNode(lv_abstract_2_0, grammarAccess.getALSSignatureBodyAccess().getAbstractAbstractKeyword_0_1_0());
1403
1404 }
1405 if ( state.backtracking==0 ) {
1406
1407 if (current==null) {
1408 current = createModelElement(grammarAccess.getALSSignatureBodyRule());
1409 }
1410 setWithLastConsumed(current, "abstract", true, "abstract");
1411
1412 }
1413
1414 }
1415
1416
1417 }
1418
1419
1420 }
1421
1422 getUnorderedGroupHelper().returnFromSelection(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0());
1423
1424 }
1425
1426
1427 }
1428
1429
1430 }
1431 break;
1432
1433 default :
1434 break loop4;
1435 }
1436 } while (true);
1437
1438
1439 }
1440
1441
1442 }
1443
1444 getUnorderedGroupHelper().leave(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0());
1445
1446 }
1447
1448 otherlv_3=(Token)match(input,16,FOLLOW_4); if (state.failed) return current;
1449 if ( state.backtracking==0 ) {
1450
1451 newLeafNode(otherlv_3, grammarAccess.getALSSignatureBodyAccess().getSigKeyword_1());
1452
1453 }
1454 // InternalAlloyLanguage.g:530:1: ( (lv_declarations_4_0= ruleALSSignatureDeclaration ) )
1455 // InternalAlloyLanguage.g:531:1: (lv_declarations_4_0= ruleALSSignatureDeclaration )
1456 {
1457 // InternalAlloyLanguage.g:531:1: (lv_declarations_4_0= ruleALSSignatureDeclaration )
1458 // InternalAlloyLanguage.g:532:3: lv_declarations_4_0= ruleALSSignatureDeclaration
1459 {
1460 if ( state.backtracking==0 ) {
1461
1462 newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getDeclarationsALSSignatureDeclarationParserRuleCall_2_0());
1463
1464 }
1465 pushFollow(FOLLOW_8);
1466 lv_declarations_4_0=ruleALSSignatureDeclaration();
1467
1468 state._fsp--;
1469 if (state.failed) return current;
1470 if ( state.backtracking==0 ) {
1471
1472 if (current==null) {
1473 current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule());
1474 }
1475 add(
1476 current,
1477 "declarations",
1478 lv_declarations_4_0,
1479 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSSignatureDeclaration");
1480 afterParserOrEnumRuleCall();
1481
1482 }
1483
1484 }
1485
1486
1487 }
1488
1489 // InternalAlloyLanguage.g:548:2: (otherlv_5= ',' ( (lv_declarations_6_0= ruleALSSignatureDeclaration ) ) )*
1490 loop5:
1491 do {
1492 int alt5=2;
1493 int LA5_0 = input.LA(1);
1494
1495 if ( (LA5_0==13) ) {
1496 alt5=1;
1497 }
1498
1499
1500 switch (alt5) {
1501 case 1 :
1502 // InternalAlloyLanguage.g:548:4: otherlv_5= ',' ( (lv_declarations_6_0= ruleALSSignatureDeclaration ) )
1503 {
1504 otherlv_5=(Token)match(input,13,FOLLOW_4); if (state.failed) return current;
1505 if ( state.backtracking==0 ) {
1506
1507 newLeafNode(otherlv_5, grammarAccess.getALSSignatureBodyAccess().getCommaKeyword_3_0());
1508
1509 }
1510 // InternalAlloyLanguage.g:552:1: ( (lv_declarations_6_0= ruleALSSignatureDeclaration ) )
1511 // InternalAlloyLanguage.g:553:1: (lv_declarations_6_0= ruleALSSignatureDeclaration )
1512 {
1513 // InternalAlloyLanguage.g:553:1: (lv_declarations_6_0= ruleALSSignatureDeclaration )
1514 // InternalAlloyLanguage.g:554:3: lv_declarations_6_0= ruleALSSignatureDeclaration
1515 {
1516 if ( state.backtracking==0 ) {
1517
1518 newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getDeclarationsALSSignatureDeclarationParserRuleCall_3_1_0());
1519
1520 }
1521 pushFollow(FOLLOW_8);
1522 lv_declarations_6_0=ruleALSSignatureDeclaration();
1523
1524 state._fsp--;
1525 if (state.failed) return current;
1526 if ( state.backtracking==0 ) {
1527
1528 if (current==null) {
1529 current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule());
1530 }
1531 add(
1532 current,
1533 "declarations",
1534 lv_declarations_6_0,
1535 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSSignatureDeclaration");
1536 afterParserOrEnumRuleCall();
1537
1538 }
1539
1540 }
1541
1542
1543 }
1544
1545
1546 }
1547 break;
1548
1549 default :
1550 break loop5;
1551 }
1552 } while (true);
1553
1554 // InternalAlloyLanguage.g:570:4: ( (otherlv_7= 'extends' ( (otherlv_8= RULE_ID ) ) ) | (otherlv_9= 'in' ( (otherlv_10= RULE_ID ) ) (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )* ) )?
1555 int alt7=3;
1556 int LA7_0 = input.LA(1);
1557
1558 if ( (LA7_0==17) ) {
1559 alt7=1;
1560 }
1561 else if ( (LA7_0==18) ) {
1562 alt7=2;
1563 }
1564 switch (alt7) {
1565 case 1 :
1566 // InternalAlloyLanguage.g:570:5: (otherlv_7= 'extends' ( (otherlv_8= RULE_ID ) ) )
1567 {
1568 // InternalAlloyLanguage.g:570:5: (otherlv_7= 'extends' ( (otherlv_8= RULE_ID ) ) )
1569 // InternalAlloyLanguage.g:570:7: otherlv_7= 'extends' ( (otherlv_8= RULE_ID ) )
1570 {
1571 otherlv_7=(Token)match(input,17,FOLLOW_4); if (state.failed) return current;
1572 if ( state.backtracking==0 ) {
1573
1574 newLeafNode(otherlv_7, grammarAccess.getALSSignatureBodyAccess().getExtendsKeyword_4_0_0());
1575
1576 }
1577 // InternalAlloyLanguage.g:574:1: ( (otherlv_8= RULE_ID ) )
1578 // InternalAlloyLanguage.g:575:1: (otherlv_8= RULE_ID )
1579 {
1580 // InternalAlloyLanguage.g:575:1: (otherlv_8= RULE_ID )
1581 // InternalAlloyLanguage.g:576:3: otherlv_8= RULE_ID
1582 {
1583 if ( state.backtracking==0 ) {
1584
1585 if (current==null) {
1586 current = createModelElement(grammarAccess.getALSSignatureBodyRule());
1587 }
1588
1589 }
1590 otherlv_8=(Token)match(input,RULE_ID,FOLLOW_5); if (state.failed) return current;
1591 if ( state.backtracking==0 ) {
1592
1593 newLeafNode(otherlv_8, grammarAccess.getALSSignatureBodyAccess().getSupertypeALSSignatureDeclarationCrossReference_4_0_1_0());
1594
1595 }
1596
1597 }
1598
1599
1600 }
1601
1602
1603 }
1604
1605
1606 }
1607 break;
1608 case 2 :
1609 // InternalAlloyLanguage.g:588:6: (otherlv_9= 'in' ( (otherlv_10= RULE_ID ) ) (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )* )
1610 {
1611 // InternalAlloyLanguage.g:588:6: (otherlv_9= 'in' ( (otherlv_10= RULE_ID ) ) (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )* )
1612 // InternalAlloyLanguage.g:588:8: otherlv_9= 'in' ( (otherlv_10= RULE_ID ) ) (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )*
1613 {
1614 otherlv_9=(Token)match(input,18,FOLLOW_4); if (state.failed) return current;
1615 if ( state.backtracking==0 ) {
1616
1617 newLeafNode(otherlv_9, grammarAccess.getALSSignatureBodyAccess().getInKeyword_4_1_0());
1618
1619 }
1620 // InternalAlloyLanguage.g:592:1: ( (otherlv_10= RULE_ID ) )
1621 // InternalAlloyLanguage.g:593:1: (otherlv_10= RULE_ID )
1622 {
1623 // InternalAlloyLanguage.g:593:1: (otherlv_10= RULE_ID )
1624 // InternalAlloyLanguage.g:594:3: otherlv_10= RULE_ID
1625 {
1626 if ( state.backtracking==0 ) {
1627
1628 if (current==null) {
1629 current = createModelElement(grammarAccess.getALSSignatureBodyRule());
1630 }
1631
1632 }
1633 otherlv_10=(Token)match(input,RULE_ID,FOLLOW_9); if (state.failed) return current;
1634 if ( state.backtracking==0 ) {
1635
1636 newLeafNode(otherlv_10, grammarAccess.getALSSignatureBodyAccess().getSupersetALSSignatureDeclarationCrossReference_4_1_1_0());
1637
1638 }
1639
1640 }
1641
1642
1643 }
1644
1645 // InternalAlloyLanguage.g:605:2: (otherlv_11= '+' ( (otherlv_12= RULE_ID ) ) )*
1646 loop6:
1647 do {
1648 int alt6=2;
1649 int LA6_0 = input.LA(1);
1650
1651 if ( (LA6_0==19) ) {
1652 alt6=1;
1653 }
1654
1655
1656 switch (alt6) {
1657 case 1 :
1658 // InternalAlloyLanguage.g:605:4: otherlv_11= '+' ( (otherlv_12= RULE_ID ) )
1659 {
1660 otherlv_11=(Token)match(input,19,FOLLOW_4); if (state.failed) return current;
1661 if ( state.backtracking==0 ) {
1662
1663 newLeafNode(otherlv_11, grammarAccess.getALSSignatureBodyAccess().getPlusSignKeyword_4_1_2_0());
1664
1665 }
1666 // InternalAlloyLanguage.g:609:1: ( (otherlv_12= RULE_ID ) )
1667 // InternalAlloyLanguage.g:610:1: (otherlv_12= RULE_ID )
1668 {
1669 // InternalAlloyLanguage.g:610:1: (otherlv_12= RULE_ID )
1670 // InternalAlloyLanguage.g:611:3: otherlv_12= RULE_ID
1671 {
1672 if ( state.backtracking==0 ) {
1673
1674 if (current==null) {
1675 current = createModelElement(grammarAccess.getALSSignatureBodyRule());
1676 }
1677
1678 }
1679 otherlv_12=(Token)match(input,RULE_ID,FOLLOW_9); if (state.failed) return current;
1680 if ( state.backtracking==0 ) {
1681
1682 newLeafNode(otherlv_12, grammarAccess.getALSSignatureBodyAccess().getSupersetALSSignatureDeclarationCrossReference_4_1_2_1_0());
1683
1684 }
1685
1686 }
1687
1688
1689 }
1690
1691
1692 }
1693 break;
1694
1695 default :
1696 break loop6;
1697 }
1698 } while (true);
1699
1700
1701 }
1702
1703
1704 }
1705 break;
1706
1707 }
1708
1709 otherlv_13=(Token)match(input,12,FOLLOW_10); if (state.failed) return current;
1710 if ( state.backtracking==0 ) {
1711
1712 newLeafNode(otherlv_13, grammarAccess.getALSSignatureBodyAccess().getLeftCurlyBracketKeyword_5());
1713
1714 }
1715 // InternalAlloyLanguage.g:626:1: ( ( (lv_fields_14_0= ruleALSFieldDeclaration ) ) (otherlv_15= ',' ( (lv_fields_16_0= ruleALSFieldDeclaration ) ) )* )?
1716 int alt9=2;
1717 int LA9_0 = input.LA(1);
1718
1719 if ( (LA9_0==RULE_ID) ) {
1720 alt9=1;
1721 }
1722 switch (alt9) {
1723 case 1 :
1724 // InternalAlloyLanguage.g:626:2: ( (lv_fields_14_0= ruleALSFieldDeclaration ) ) (otherlv_15= ',' ( (lv_fields_16_0= ruleALSFieldDeclaration ) ) )*
1725 {
1726 // InternalAlloyLanguage.g:626:2: ( (lv_fields_14_0= ruleALSFieldDeclaration ) )
1727 // InternalAlloyLanguage.g:627:1: (lv_fields_14_0= ruleALSFieldDeclaration )
1728 {
1729 // InternalAlloyLanguage.g:627:1: (lv_fields_14_0= ruleALSFieldDeclaration )
1730 // InternalAlloyLanguage.g:628:3: lv_fields_14_0= ruleALSFieldDeclaration
1731 {
1732 if ( state.backtracking==0 ) {
1733
1734 newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getFieldsALSFieldDeclarationParserRuleCall_6_0_0());
1735
1736 }
1737 pushFollow(FOLLOW_6);
1738 lv_fields_14_0=ruleALSFieldDeclaration();
1739
1740 state._fsp--;
1741 if (state.failed) return current;
1742 if ( state.backtracking==0 ) {
1743
1744 if (current==null) {
1745 current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule());
1746 }
1747 add(
1748 current,
1749 "fields",
1750 lv_fields_14_0,
1751 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSFieldDeclaration");
1752 afterParserOrEnumRuleCall();
1753
1754 }
1755
1756 }
1757
1758
1759 }
1760
1761 // InternalAlloyLanguage.g:644:2: (otherlv_15= ',' ( (lv_fields_16_0= ruleALSFieldDeclaration ) ) )*
1762 loop8:
1763 do {
1764 int alt8=2;
1765 int LA8_0 = input.LA(1);
1766
1767 if ( (LA8_0==13) ) {
1768 alt8=1;
1769 }
1770
1771
1772 switch (alt8) {
1773 case 1 :
1774 // InternalAlloyLanguage.g:644:4: otherlv_15= ',' ( (lv_fields_16_0= ruleALSFieldDeclaration ) )
1775 {
1776 otherlv_15=(Token)match(input,13,FOLLOW_4); if (state.failed) return current;
1777 if ( state.backtracking==0 ) {
1778
1779 newLeafNode(otherlv_15, grammarAccess.getALSSignatureBodyAccess().getCommaKeyword_6_1_0());
1780
1781 }
1782 // InternalAlloyLanguage.g:648:1: ( (lv_fields_16_0= ruleALSFieldDeclaration ) )
1783 // InternalAlloyLanguage.g:649:1: (lv_fields_16_0= ruleALSFieldDeclaration )
1784 {
1785 // InternalAlloyLanguage.g:649:1: (lv_fields_16_0= ruleALSFieldDeclaration )
1786 // InternalAlloyLanguage.g:650:3: lv_fields_16_0= ruleALSFieldDeclaration
1787 {
1788 if ( state.backtracking==0 ) {
1789
1790 newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getFieldsALSFieldDeclarationParserRuleCall_6_1_1_0());
1791
1792 }
1793 pushFollow(FOLLOW_6);
1794 lv_fields_16_0=ruleALSFieldDeclaration();
1795
1796 state._fsp--;
1797 if (state.failed) return current;
1798 if ( state.backtracking==0 ) {
1799
1800 if (current==null) {
1801 current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule());
1802 }
1803 add(
1804 current,
1805 "fields",
1806 lv_fields_16_0,
1807 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSFieldDeclaration");
1808 afterParserOrEnumRuleCall();
1809
1810 }
1811
1812 }
1813
1814
1815 }
1816
1817
1818 }
1819 break;
1820
1821 default :
1822 break loop8;
1823 }
1824 } while (true);
1825
1826
1827 }
1828 break;
1829
1830 }
1831
1832 otherlv_17=(Token)match(input,14,FOLLOW_2); if (state.failed) return current;
1833 if ( state.backtracking==0 ) {
1834
1835 newLeafNode(otherlv_17, grammarAccess.getALSSignatureBodyAccess().getRightCurlyBracketKeyword_7());
1836
1837 }
1838
1839 }
1840
1841
1842 }
1843
1844 if ( state.backtracking==0 ) {
1845 leaveRule();
1846 }
1847 }
1848
1849 catch (RecognitionException re) {
1850 recover(input,re);
1851 appendSkippedTokens();
1852 }
1853 finally {
1854 }
1855 return current;
1856 }
1857 // $ANTLR end "ruleALSSignatureBody"
1858
1859
1860 // $ANTLR start "entryRuleALSFieldDeclaration"
1861 // InternalAlloyLanguage.g:678:1: entryRuleALSFieldDeclaration returns [EObject current=null] : iv_ruleALSFieldDeclaration= ruleALSFieldDeclaration EOF ;
1862 public final EObject entryRuleALSFieldDeclaration() throws RecognitionException {
1863 EObject current = null;
1864
1865 EObject iv_ruleALSFieldDeclaration = null;
1866
1867
1868 try {
1869 // InternalAlloyLanguage.g:679:2: (iv_ruleALSFieldDeclaration= ruleALSFieldDeclaration EOF )
1870 // InternalAlloyLanguage.g:680:2: iv_ruleALSFieldDeclaration= ruleALSFieldDeclaration EOF
1871 {
1872 if ( state.backtracking==0 ) {
1873 newCompositeNode(grammarAccess.getALSFieldDeclarationRule());
1874 }
1875 pushFollow(FOLLOW_1);
1876 iv_ruleALSFieldDeclaration=ruleALSFieldDeclaration();
1877
1878 state._fsp--;
1879 if (state.failed) return current;
1880 if ( state.backtracking==0 ) {
1881 current =iv_ruleALSFieldDeclaration;
1882 }
1883 match(input,EOF,FOLLOW_2); if (state.failed) return current;
1884
1885 }
1886
1887 }
1888
1889 catch (RecognitionException re) {
1890 recover(input,re);
1891 appendSkippedTokens();
1892 }
1893 finally {
1894 }
1895 return current;
1896 }
1897 // $ANTLR end "entryRuleALSFieldDeclaration"
1898
1899
1900 // $ANTLR start "ruleALSFieldDeclaration"
1901 // InternalAlloyLanguage.g:687:1: ruleALSFieldDeclaration returns [EObject current=null] : ( ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_multiplicity_2_0= ruleALSMultiplicity ) )? ( (lv_type_3_0= ruleALSTerm ) ) ) ;
1902 public final EObject ruleALSFieldDeclaration() throws RecognitionException {
1903 EObject current = null;
1904
1905 Token otherlv_1=null;
1906 AntlrDatatypeRuleToken lv_name_0_0 = null;
1907
1908 Enumerator lv_multiplicity_2_0 = null;
1909
1910 EObject lv_type_3_0 = null;
1911
1912
1913 enterRule();
1914
1915 try {
1916 // InternalAlloyLanguage.g:690:28: ( ( ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_multiplicity_2_0= ruleALSMultiplicity ) )? ( (lv_type_3_0= ruleALSTerm ) ) ) )
1917 // InternalAlloyLanguage.g:691:1: ( ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_multiplicity_2_0= ruleALSMultiplicity ) )? ( (lv_type_3_0= ruleALSTerm ) ) )
1918 {
1919 // InternalAlloyLanguage.g:691:1: ( ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_multiplicity_2_0= ruleALSMultiplicity ) )? ( (lv_type_3_0= ruleALSTerm ) ) )
1920 // InternalAlloyLanguage.g:691:2: ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_multiplicity_2_0= ruleALSMultiplicity ) )? ( (lv_type_3_0= ruleALSTerm ) )
1921 {
1922 // InternalAlloyLanguage.g:691:2: ( (lv_name_0_0= ruleALSID ) )
1923 // InternalAlloyLanguage.g:692:1: (lv_name_0_0= ruleALSID )
1924 {
1925 // InternalAlloyLanguage.g:692:1: (lv_name_0_0= ruleALSID )
1926 // InternalAlloyLanguage.g:693:3: lv_name_0_0= ruleALSID
1927 {
1928 if ( state.backtracking==0 ) {
1929
1930 newCompositeNode(grammarAccess.getALSFieldDeclarationAccess().getNameALSIDParserRuleCall_0_0());
1931
1932 }
1933 pushFollow(FOLLOW_11);
1934 lv_name_0_0=ruleALSID();
1935
1936 state._fsp--;
1937 if (state.failed) return current;
1938 if ( state.backtracking==0 ) {
1939
1940 if (current==null) {
1941 current = createModelElementForParent(grammarAccess.getALSFieldDeclarationRule());
1942 }
1943 set(
1944 current,
1945 "name",
1946 lv_name_0_0,
1947 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID");
1948 afterParserOrEnumRuleCall();
1949
1950 }
1951
1952 }
1953
1954
1955 }
1956
1957 otherlv_1=(Token)match(input,20,FOLLOW_12); if (state.failed) return current;
1958 if ( state.backtracking==0 ) {
1959
1960 newLeafNode(otherlv_1, grammarAccess.getALSFieldDeclarationAccess().getColonKeyword_1());
1961
1962 }
1963 // InternalAlloyLanguage.g:713:1: ( (lv_multiplicity_2_0= ruleALSMultiplicity ) )?
1964 int alt10=2;
1965 alt10 = dfa10.predict(input);
1966 switch (alt10) {
1967 case 1 :
1968 // InternalAlloyLanguage.g:714:1: (lv_multiplicity_2_0= ruleALSMultiplicity )
1969 {
1970 // InternalAlloyLanguage.g:714:1: (lv_multiplicity_2_0= ruleALSMultiplicity )
1971 // InternalAlloyLanguage.g:715:3: lv_multiplicity_2_0= ruleALSMultiplicity
1972 {
1973 if ( state.backtracking==0 ) {
1974
1975 newCompositeNode(grammarAccess.getALSFieldDeclarationAccess().getMultiplicityALSMultiplicityEnumRuleCall_2_0());
1976
1977 }
1978 pushFollow(FOLLOW_12);
1979 lv_multiplicity_2_0=ruleALSMultiplicity();
1980
1981 state._fsp--;
1982 if (state.failed) return current;
1983 if ( state.backtracking==0 ) {
1984
1985 if (current==null) {
1986 current = createModelElementForParent(grammarAccess.getALSFieldDeclarationRule());
1987 }
1988 set(
1989 current,
1990 "multiplicity",
1991 lv_multiplicity_2_0,
1992 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity");
1993 afterParserOrEnumRuleCall();
1994
1995 }
1996
1997 }
1998
1999
2000 }
2001 break;
2002
2003 }
2004
2005 // InternalAlloyLanguage.g:731:3: ( (lv_type_3_0= ruleALSTerm ) )
2006 // InternalAlloyLanguage.g:732:1: (lv_type_3_0= ruleALSTerm )
2007 {
2008 // InternalAlloyLanguage.g:732:1: (lv_type_3_0= ruleALSTerm )
2009 // InternalAlloyLanguage.g:733:3: lv_type_3_0= ruleALSTerm
2010 {
2011 if ( state.backtracking==0 ) {
2012
2013 newCompositeNode(grammarAccess.getALSFieldDeclarationAccess().getTypeALSTermParserRuleCall_3_0());
2014
2015 }
2016 pushFollow(FOLLOW_2);
2017 lv_type_3_0=ruleALSTerm();
2018
2019 state._fsp--;
2020 if (state.failed) return current;
2021 if ( state.backtracking==0 ) {
2022
2023 if (current==null) {
2024 current = createModelElementForParent(grammarAccess.getALSFieldDeclarationRule());
2025 }
2026 set(
2027 current,
2028 "type",
2029 lv_type_3_0,
2030 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
2031 afterParserOrEnumRuleCall();
2032
2033 }
2034
2035 }
2036
2037
2038 }
2039
2040
2041 }
2042
2043
2044 }
2045
2046 if ( state.backtracking==0 ) {
2047 leaveRule();
2048 }
2049 }
2050
2051 catch (RecognitionException re) {
2052 recover(input,re);
2053 appendSkippedTokens();
2054 }
2055 finally {
2056 }
2057 return current;
2058 }
2059 // $ANTLR end "ruleALSFieldDeclaration"
2060
2061
2062 // $ANTLR start "entryRuleALSFunctionDefinition"
2063 // InternalAlloyLanguage.g:759:1: entryRuleALSFunctionDefinition returns [EObject current=null] : iv_ruleALSFunctionDefinition= ruleALSFunctionDefinition EOF ;
2064 public final EObject entryRuleALSFunctionDefinition() throws RecognitionException {
2065 EObject current = null;
2066
2067 EObject iv_ruleALSFunctionDefinition = null;
2068
2069
2070 try {
2071 // InternalAlloyLanguage.g:760:2: (iv_ruleALSFunctionDefinition= ruleALSFunctionDefinition EOF )
2072 // InternalAlloyLanguage.g:761:2: iv_ruleALSFunctionDefinition= ruleALSFunctionDefinition EOF
2073 {
2074 if ( state.backtracking==0 ) {
2075 newCompositeNode(grammarAccess.getALSFunctionDefinitionRule());
2076 }
2077 pushFollow(FOLLOW_1);
2078 iv_ruleALSFunctionDefinition=ruleALSFunctionDefinition();
2079
2080 state._fsp--;
2081 if (state.failed) return current;
2082 if ( state.backtracking==0 ) {
2083 current =iv_ruleALSFunctionDefinition;
2084 }
2085 match(input,EOF,FOLLOW_2); if (state.failed) return current;
2086
2087 }
2088
2089 }
2090
2091 catch (RecognitionException re) {
2092 recover(input,re);
2093 appendSkippedTokens();
2094 }
2095 finally {
2096 }
2097 return current;
2098 }
2099 // $ANTLR end "entryRuleALSFunctionDefinition"
2100
2101
2102 // $ANTLR start "ruleALSFunctionDefinition"
2103 // InternalAlloyLanguage.g:768:1: ruleALSFunctionDefinition returns [EObject current=null] : (otherlv_0= 'fun' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= ':' ( (lv_type_8_0= ruleALSTerm ) ) otherlv_9= '{' ( (lv_value_10_0= ruleALSTerm ) ) otherlv_11= '}' ) ;
2104 public final EObject ruleALSFunctionDefinition() throws RecognitionException {
2105 EObject current = null;
2106
2107 Token otherlv_0=null;
2108 Token otherlv_2=null;
2109 Token otherlv_4=null;
2110 Token otherlv_6=null;
2111 Token otherlv_7=null;
2112 Token otherlv_9=null;
2113 Token otherlv_11=null;
2114 AntlrDatatypeRuleToken lv_name_1_0 = null;
2115
2116 EObject lv_variables_3_0 = null;
2117
2118 EObject lv_variables_5_0 = null;
2119
2120 EObject lv_type_8_0 = null;
2121
2122 EObject lv_value_10_0 = null;
2123
2124
2125 enterRule();
2126
2127 try {
2128 // InternalAlloyLanguage.g:771:28: ( (otherlv_0= 'fun' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= ':' ( (lv_type_8_0= ruleALSTerm ) ) otherlv_9= '{' ( (lv_value_10_0= ruleALSTerm ) ) otherlv_11= '}' ) )
2129 // InternalAlloyLanguage.g:772:1: (otherlv_0= 'fun' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= ':' ( (lv_type_8_0= ruleALSTerm ) ) otherlv_9= '{' ( (lv_value_10_0= ruleALSTerm ) ) otherlv_11= '}' )
2130 {
2131 // InternalAlloyLanguage.g:772:1: (otherlv_0= 'fun' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= ':' ( (lv_type_8_0= ruleALSTerm ) ) otherlv_9= '{' ( (lv_value_10_0= ruleALSTerm ) ) otherlv_11= '}' )
2132 // InternalAlloyLanguage.g:772:3: otherlv_0= 'fun' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= ':' ( (lv_type_8_0= ruleALSTerm ) ) otherlv_9= '{' ( (lv_value_10_0= ruleALSTerm ) ) otherlv_11= '}'
2133 {
2134 otherlv_0=(Token)match(input,21,FOLLOW_4); if (state.failed) return current;
2135 if ( state.backtracking==0 ) {
2136
2137 newLeafNode(otherlv_0, grammarAccess.getALSFunctionDefinitionAccess().getFunKeyword_0());
2138
2139 }
2140 // InternalAlloyLanguage.g:776:1: ( (lv_name_1_0= ruleALSID ) )
2141 // InternalAlloyLanguage.g:777:1: (lv_name_1_0= ruleALSID )
2142 {
2143 // InternalAlloyLanguage.g:777:1: (lv_name_1_0= ruleALSID )
2144 // InternalAlloyLanguage.g:778:3: lv_name_1_0= ruleALSID
2145 {
2146 if ( state.backtracking==0 ) {
2147
2148 newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getNameALSIDParserRuleCall_1_0());
2149
2150 }
2151 pushFollow(FOLLOW_13);
2152 lv_name_1_0=ruleALSID();
2153
2154 state._fsp--;
2155 if (state.failed) return current;
2156 if ( state.backtracking==0 ) {
2157
2158 if (current==null) {
2159 current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule());
2160 }
2161 set(
2162 current,
2163 "name",
2164 lv_name_1_0,
2165 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID");
2166 afterParserOrEnumRuleCall();
2167
2168 }
2169
2170 }
2171
2172
2173 }
2174
2175 otherlv_2=(Token)match(input,22,FOLLOW_4); if (state.failed) return current;
2176 if ( state.backtracking==0 ) {
2177
2178 newLeafNode(otherlv_2, grammarAccess.getALSFunctionDefinitionAccess().getLeftSquareBracketKeyword_2());
2179
2180 }
2181 // InternalAlloyLanguage.g:798:1: ( (lv_variables_3_0= ruleALSVariableDeclaration ) )
2182 // InternalAlloyLanguage.g:799:1: (lv_variables_3_0= ruleALSVariableDeclaration )
2183 {
2184 // InternalAlloyLanguage.g:799:1: (lv_variables_3_0= ruleALSVariableDeclaration )
2185 // InternalAlloyLanguage.g:800:3: lv_variables_3_0= ruleALSVariableDeclaration
2186 {
2187 if ( state.backtracking==0 ) {
2188
2189 newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getVariablesALSVariableDeclarationParserRuleCall_3_0());
2190
2191 }
2192 pushFollow(FOLLOW_14);
2193 lv_variables_3_0=ruleALSVariableDeclaration();
2194
2195 state._fsp--;
2196 if (state.failed) return current;
2197 if ( state.backtracking==0 ) {
2198
2199 if (current==null) {
2200 current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule());
2201 }
2202 add(
2203 current,
2204 "variables",
2205 lv_variables_3_0,
2206 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration");
2207 afterParserOrEnumRuleCall();
2208
2209 }
2210
2211 }
2212
2213
2214 }
2215
2216 // InternalAlloyLanguage.g:816:2: (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )*
2217 loop11:
2218 do {
2219 int alt11=2;
2220 int LA11_0 = input.LA(1);
2221
2222 if ( (LA11_0==13) ) {
2223 alt11=1;
2224 }
2225
2226
2227 switch (alt11) {
2228 case 1 :
2229 // InternalAlloyLanguage.g:816:4: otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) )
2230 {
2231 otherlv_4=(Token)match(input,13,FOLLOW_4); if (state.failed) return current;
2232 if ( state.backtracking==0 ) {
2233
2234 newLeafNode(otherlv_4, grammarAccess.getALSFunctionDefinitionAccess().getCommaKeyword_4_0());
2235
2236 }
2237 // InternalAlloyLanguage.g:820:1: ( (lv_variables_5_0= ruleALSVariableDeclaration ) )
2238 // InternalAlloyLanguage.g:821:1: (lv_variables_5_0= ruleALSVariableDeclaration )
2239 {
2240 // InternalAlloyLanguage.g:821:1: (lv_variables_5_0= ruleALSVariableDeclaration )
2241 // InternalAlloyLanguage.g:822:3: lv_variables_5_0= ruleALSVariableDeclaration
2242 {
2243 if ( state.backtracking==0 ) {
2244
2245 newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getVariablesALSVariableDeclarationParserRuleCall_4_1_0());
2246
2247 }
2248 pushFollow(FOLLOW_14);
2249 lv_variables_5_0=ruleALSVariableDeclaration();
2250
2251 state._fsp--;
2252 if (state.failed) return current;
2253 if ( state.backtracking==0 ) {
2254
2255 if (current==null) {
2256 current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule());
2257 }
2258 add(
2259 current,
2260 "variables",
2261 lv_variables_5_0,
2262 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration");
2263 afterParserOrEnumRuleCall();
2264
2265 }
2266
2267 }
2268
2269
2270 }
2271
2272
2273 }
2274 break;
2275
2276 default :
2277 break loop11;
2278 }
2279 } while (true);
2280
2281 otherlv_6=(Token)match(input,23,FOLLOW_11); if (state.failed) return current;
2282 if ( state.backtracking==0 ) {
2283
2284 newLeafNode(otherlv_6, grammarAccess.getALSFunctionDefinitionAccess().getRightSquareBracketKeyword_5());
2285
2286 }
2287 otherlv_7=(Token)match(input,20,FOLLOW_12); if (state.failed) return current;
2288 if ( state.backtracking==0 ) {
2289
2290 newLeafNode(otherlv_7, grammarAccess.getALSFunctionDefinitionAccess().getColonKeyword_6());
2291
2292 }
2293 // InternalAlloyLanguage.g:846:1: ( (lv_type_8_0= ruleALSTerm ) )
2294 // InternalAlloyLanguage.g:847:1: (lv_type_8_0= ruleALSTerm )
2295 {
2296 // InternalAlloyLanguage.g:847:1: (lv_type_8_0= ruleALSTerm )
2297 // InternalAlloyLanguage.g:848:3: lv_type_8_0= ruleALSTerm
2298 {
2299 if ( state.backtracking==0 ) {
2300
2301 newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getTypeALSTermParserRuleCall_7_0());
2302
2303 }
2304 pushFollow(FOLLOW_5);
2305 lv_type_8_0=ruleALSTerm();
2306
2307 state._fsp--;
2308 if (state.failed) return current;
2309 if ( state.backtracking==0 ) {
2310
2311 if (current==null) {
2312 current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule());
2313 }
2314 set(
2315 current,
2316 "type",
2317 lv_type_8_0,
2318 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
2319 afterParserOrEnumRuleCall();
2320
2321 }
2322
2323 }
2324
2325
2326 }
2327
2328 otherlv_9=(Token)match(input,12,FOLLOW_12); if (state.failed) return current;
2329 if ( state.backtracking==0 ) {
2330
2331 newLeafNode(otherlv_9, grammarAccess.getALSFunctionDefinitionAccess().getLeftCurlyBracketKeyword_8());
2332
2333 }
2334 // InternalAlloyLanguage.g:868:1: ( (lv_value_10_0= ruleALSTerm ) )
2335 // InternalAlloyLanguage.g:869:1: (lv_value_10_0= ruleALSTerm )
2336 {
2337 // InternalAlloyLanguage.g:869:1: (lv_value_10_0= ruleALSTerm )
2338 // InternalAlloyLanguage.g:870:3: lv_value_10_0= ruleALSTerm
2339 {
2340 if ( state.backtracking==0 ) {
2341
2342 newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getValueALSTermParserRuleCall_9_0());
2343
2344 }
2345 pushFollow(FOLLOW_15);
2346 lv_value_10_0=ruleALSTerm();
2347
2348 state._fsp--;
2349 if (state.failed) return current;
2350 if ( state.backtracking==0 ) {
2351
2352 if (current==null) {
2353 current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule());
2354 }
2355 set(
2356 current,
2357 "value",
2358 lv_value_10_0,
2359 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
2360 afterParserOrEnumRuleCall();
2361
2362 }
2363
2364 }
2365
2366
2367 }
2368
2369 otherlv_11=(Token)match(input,14,FOLLOW_2); if (state.failed) return current;
2370 if ( state.backtracking==0 ) {
2371
2372 newLeafNode(otherlv_11, grammarAccess.getALSFunctionDefinitionAccess().getRightCurlyBracketKeyword_10());
2373
2374 }
2375
2376 }
2377
2378
2379 }
2380
2381 if ( state.backtracking==0 ) {
2382 leaveRule();
2383 }
2384 }
2385
2386 catch (RecognitionException re) {
2387 recover(input,re);
2388 appendSkippedTokens();
2389 }
2390 finally {
2391 }
2392 return current;
2393 }
2394 // $ANTLR end "ruleALSFunctionDefinition"
2395
2396
2397 // $ANTLR start "entryRuleALSRelationDefinition"
2398 // InternalAlloyLanguage.g:898:1: entryRuleALSRelationDefinition returns [EObject current=null] : iv_ruleALSRelationDefinition= ruleALSRelationDefinition EOF ;
2399 public final EObject entryRuleALSRelationDefinition() throws RecognitionException {
2400 EObject current = null;
2401
2402 EObject iv_ruleALSRelationDefinition = null;
2403
2404
2405 try {
2406 // InternalAlloyLanguage.g:899:2: (iv_ruleALSRelationDefinition= ruleALSRelationDefinition EOF )
2407 // InternalAlloyLanguage.g:900:2: iv_ruleALSRelationDefinition= ruleALSRelationDefinition EOF
2408 {
2409 if ( state.backtracking==0 ) {
2410 newCompositeNode(grammarAccess.getALSRelationDefinitionRule());
2411 }
2412 pushFollow(FOLLOW_1);
2413 iv_ruleALSRelationDefinition=ruleALSRelationDefinition();
2414
2415 state._fsp--;
2416 if (state.failed) return current;
2417 if ( state.backtracking==0 ) {
2418 current =iv_ruleALSRelationDefinition;
2419 }
2420 match(input,EOF,FOLLOW_2); if (state.failed) return current;
2421
2422 }
2423
2424 }
2425
2426 catch (RecognitionException re) {
2427 recover(input,re);
2428 appendSkippedTokens();
2429 }
2430 finally {
2431 }
2432 return current;
2433 }
2434 // $ANTLR end "entryRuleALSRelationDefinition"
2435
2436
2437 // $ANTLR start "ruleALSRelationDefinition"
2438 // InternalAlloyLanguage.g:907:1: ruleALSRelationDefinition returns [EObject current=null] : (otherlv_0= 'pred' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= '{' ( (lv_value_8_0= ruleALSTerm ) ) otherlv_9= '}' ) ;
2439 public final EObject ruleALSRelationDefinition() throws RecognitionException {
2440 EObject current = null;
2441
2442 Token otherlv_0=null;
2443 Token otherlv_2=null;
2444 Token otherlv_4=null;
2445 Token otherlv_6=null;
2446 Token otherlv_7=null;
2447 Token otherlv_9=null;
2448 AntlrDatatypeRuleToken lv_name_1_0 = null;
2449
2450 EObject lv_variables_3_0 = null;
2451
2452 EObject lv_variables_5_0 = null;
2453
2454 EObject lv_value_8_0 = null;
2455
2456
2457 enterRule();
2458
2459 try {
2460 // InternalAlloyLanguage.g:910:28: ( (otherlv_0= 'pred' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= '{' ( (lv_value_8_0= ruleALSTerm ) ) otherlv_9= '}' ) )
2461 // InternalAlloyLanguage.g:911:1: (otherlv_0= 'pred' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= '{' ( (lv_value_8_0= ruleALSTerm ) ) otherlv_9= '}' )
2462 {
2463 // InternalAlloyLanguage.g:911:1: (otherlv_0= 'pred' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= '{' ( (lv_value_8_0= ruleALSTerm ) ) otherlv_9= '}' )
2464 // InternalAlloyLanguage.g:911:3: otherlv_0= 'pred' ( (lv_name_1_0= ruleALSID ) ) otherlv_2= '[' ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= ']' otherlv_7= '{' ( (lv_value_8_0= ruleALSTerm ) ) otherlv_9= '}'
2465 {
2466 otherlv_0=(Token)match(input,24,FOLLOW_4); if (state.failed) return current;
2467 if ( state.backtracking==0 ) {
2468
2469 newLeafNode(otherlv_0, grammarAccess.getALSRelationDefinitionAccess().getPredKeyword_0());
2470
2471 }
2472 // InternalAlloyLanguage.g:915:1: ( (lv_name_1_0= ruleALSID ) )
2473 // InternalAlloyLanguage.g:916:1: (lv_name_1_0= ruleALSID )
2474 {
2475 // InternalAlloyLanguage.g:916:1: (lv_name_1_0= ruleALSID )
2476 // InternalAlloyLanguage.g:917:3: lv_name_1_0= ruleALSID
2477 {
2478 if ( state.backtracking==0 ) {
2479
2480 newCompositeNode(grammarAccess.getALSRelationDefinitionAccess().getNameALSIDParserRuleCall_1_0());
2481
2482 }
2483 pushFollow(FOLLOW_13);
2484 lv_name_1_0=ruleALSID();
2485
2486 state._fsp--;
2487 if (state.failed) return current;
2488 if ( state.backtracking==0 ) {
2489
2490 if (current==null) {
2491 current = createModelElementForParent(grammarAccess.getALSRelationDefinitionRule());
2492 }
2493 set(
2494 current,
2495 "name",
2496 lv_name_1_0,
2497 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID");
2498 afterParserOrEnumRuleCall();
2499
2500 }
2501
2502 }
2503
2504
2505 }
2506
2507 otherlv_2=(Token)match(input,22,FOLLOW_4); if (state.failed) return current;
2508 if ( state.backtracking==0 ) {
2509
2510 newLeafNode(otherlv_2, grammarAccess.getALSRelationDefinitionAccess().getLeftSquareBracketKeyword_2());
2511
2512 }
2513 // InternalAlloyLanguage.g:937:1: ( (lv_variables_3_0= ruleALSVariableDeclaration ) )
2514 // InternalAlloyLanguage.g:938:1: (lv_variables_3_0= ruleALSVariableDeclaration )
2515 {
2516 // InternalAlloyLanguage.g:938:1: (lv_variables_3_0= ruleALSVariableDeclaration )
2517 // InternalAlloyLanguage.g:939:3: lv_variables_3_0= ruleALSVariableDeclaration
2518 {
2519 if ( state.backtracking==0 ) {
2520
2521 newCompositeNode(grammarAccess.getALSRelationDefinitionAccess().getVariablesALSVariableDeclarationParserRuleCall_3_0());
2522
2523 }
2524 pushFollow(FOLLOW_14);
2525 lv_variables_3_0=ruleALSVariableDeclaration();
2526
2527 state._fsp--;
2528 if (state.failed) return current;
2529 if ( state.backtracking==0 ) {
2530
2531 if (current==null) {
2532 current = createModelElementForParent(grammarAccess.getALSRelationDefinitionRule());
2533 }
2534 add(
2535 current,
2536 "variables",
2537 lv_variables_3_0,
2538 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration");
2539 afterParserOrEnumRuleCall();
2540
2541 }
2542
2543 }
2544
2545
2546 }
2547
2548 // InternalAlloyLanguage.g:955:2: (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )*
2549 loop12:
2550 do {
2551 int alt12=2;
2552 int LA12_0 = input.LA(1);
2553
2554 if ( (LA12_0==13) ) {
2555 alt12=1;
2556 }
2557
2558
2559 switch (alt12) {
2560 case 1 :
2561 // InternalAlloyLanguage.g:955:4: otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) )
2562 {
2563 otherlv_4=(Token)match(input,13,FOLLOW_4); if (state.failed) return current;
2564 if ( state.backtracking==0 ) {
2565
2566 newLeafNode(otherlv_4, grammarAccess.getALSRelationDefinitionAccess().getCommaKeyword_4_0());
2567
2568 }
2569 // InternalAlloyLanguage.g:959:1: ( (lv_variables_5_0= ruleALSVariableDeclaration ) )
2570 // InternalAlloyLanguage.g:960:1: (lv_variables_5_0= ruleALSVariableDeclaration )
2571 {
2572 // InternalAlloyLanguage.g:960:1: (lv_variables_5_0= ruleALSVariableDeclaration )
2573 // InternalAlloyLanguage.g:961:3: lv_variables_5_0= ruleALSVariableDeclaration
2574 {
2575 if ( state.backtracking==0 ) {
2576
2577 newCompositeNode(grammarAccess.getALSRelationDefinitionAccess().getVariablesALSVariableDeclarationParserRuleCall_4_1_0());
2578
2579 }
2580 pushFollow(FOLLOW_14);
2581 lv_variables_5_0=ruleALSVariableDeclaration();
2582
2583 state._fsp--;
2584 if (state.failed) return current;
2585 if ( state.backtracking==0 ) {
2586
2587 if (current==null) {
2588 current = createModelElementForParent(grammarAccess.getALSRelationDefinitionRule());
2589 }
2590 add(
2591 current,
2592 "variables",
2593 lv_variables_5_0,
2594 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration");
2595 afterParserOrEnumRuleCall();
2596
2597 }
2598
2599 }
2600
2601
2602 }
2603
2604
2605 }
2606 break;
2607
2608 default :
2609 break loop12;
2610 }
2611 } while (true);
2612
2613 otherlv_6=(Token)match(input,23,FOLLOW_5); if (state.failed) return current;
2614 if ( state.backtracking==0 ) {
2615
2616 newLeafNode(otherlv_6, grammarAccess.getALSRelationDefinitionAccess().getRightSquareBracketKeyword_5());
2617
2618 }
2619 otherlv_7=(Token)match(input,12,FOLLOW_12); if (state.failed) return current;
2620 if ( state.backtracking==0 ) {
2621
2622 newLeafNode(otherlv_7, grammarAccess.getALSRelationDefinitionAccess().getLeftCurlyBracketKeyword_6());
2623
2624 }
2625 // InternalAlloyLanguage.g:985:1: ( (lv_value_8_0= ruleALSTerm ) )
2626 // InternalAlloyLanguage.g:986:1: (lv_value_8_0= ruleALSTerm )
2627 {
2628 // InternalAlloyLanguage.g:986:1: (lv_value_8_0= ruleALSTerm )
2629 // InternalAlloyLanguage.g:987:3: lv_value_8_0= ruleALSTerm
2630 {
2631 if ( state.backtracking==0 ) {
2632
2633 newCompositeNode(grammarAccess.getALSRelationDefinitionAccess().getValueALSTermParserRuleCall_7_0());
2634
2635 }
2636 pushFollow(FOLLOW_15);
2637 lv_value_8_0=ruleALSTerm();
2638
2639 state._fsp--;
2640 if (state.failed) return current;
2641 if ( state.backtracking==0 ) {
2642
2643 if (current==null) {
2644 current = createModelElementForParent(grammarAccess.getALSRelationDefinitionRule());
2645 }
2646 set(
2647 current,
2648 "value",
2649 lv_value_8_0,
2650 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
2651 afterParserOrEnumRuleCall();
2652
2653 }
2654
2655 }
2656
2657
2658 }
2659
2660 otherlv_9=(Token)match(input,14,FOLLOW_2); if (state.failed) return current;
2661 if ( state.backtracking==0 ) {
2662
2663 newLeafNode(otherlv_9, grammarAccess.getALSRelationDefinitionAccess().getRightCurlyBracketKeyword_8());
2664
2665 }
2666
2667 }
2668
2669
2670 }
2671
2672 if ( state.backtracking==0 ) {
2673 leaveRule();
2674 }
2675 }
2676
2677 catch (RecognitionException re) {
2678 recover(input,re);
2679 appendSkippedTokens();
2680 }
2681 finally {
2682 }
2683 return current;
2684 }
2685 // $ANTLR end "ruleALSRelationDefinition"
2686
2687
2688 // $ANTLR start "entryRuleALSFactDeclaration"
2689 // InternalAlloyLanguage.g:1015:1: entryRuleALSFactDeclaration returns [EObject current=null] : iv_ruleALSFactDeclaration= ruleALSFactDeclaration EOF ;
2690 public final EObject entryRuleALSFactDeclaration() throws RecognitionException {
2691 EObject current = null;
2692
2693 EObject iv_ruleALSFactDeclaration = null;
2694
2695
2696 try {
2697 // InternalAlloyLanguage.g:1016:2: (iv_ruleALSFactDeclaration= ruleALSFactDeclaration EOF )
2698 // InternalAlloyLanguage.g:1017:2: iv_ruleALSFactDeclaration= ruleALSFactDeclaration EOF
2699 {
2700 if ( state.backtracking==0 ) {
2701 newCompositeNode(grammarAccess.getALSFactDeclarationRule());
2702 }
2703 pushFollow(FOLLOW_1);
2704 iv_ruleALSFactDeclaration=ruleALSFactDeclaration();
2705
2706 state._fsp--;
2707 if (state.failed) return current;
2708 if ( state.backtracking==0 ) {
2709 current =iv_ruleALSFactDeclaration;
2710 }
2711 match(input,EOF,FOLLOW_2); if (state.failed) return current;
2712
2713 }
2714
2715 }
2716
2717 catch (RecognitionException re) {
2718 recover(input,re);
2719 appendSkippedTokens();
2720 }
2721 finally {
2722 }
2723 return current;
2724 }
2725 // $ANTLR end "entryRuleALSFactDeclaration"
2726
2727
2728 // $ANTLR start "ruleALSFactDeclaration"
2729 // InternalAlloyLanguage.g:1024:1: ruleALSFactDeclaration returns [EObject current=null] : ( () otherlv_1= 'fact' ( (lv_name_2_0= ruleALSID ) )? otherlv_3= '{' ( (lv_term_4_0= ruleALSTerm ) ) otherlv_5= '}' ) ;
2730 public final EObject ruleALSFactDeclaration() throws RecognitionException {
2731 EObject current = null;
2732
2733 Token otherlv_1=null;
2734 Token otherlv_3=null;
2735 Token otherlv_5=null;
2736 AntlrDatatypeRuleToken lv_name_2_0 = null;
2737
2738 EObject lv_term_4_0 = null;
2739
2740
2741 enterRule();
2742
2743 try {
2744 // InternalAlloyLanguage.g:1027:28: ( ( () otherlv_1= 'fact' ( (lv_name_2_0= ruleALSID ) )? otherlv_3= '{' ( (lv_term_4_0= ruleALSTerm ) ) otherlv_5= '}' ) )
2745 // InternalAlloyLanguage.g:1028:1: ( () otherlv_1= 'fact' ( (lv_name_2_0= ruleALSID ) )? otherlv_3= '{' ( (lv_term_4_0= ruleALSTerm ) ) otherlv_5= '}' )
2746 {
2747 // InternalAlloyLanguage.g:1028:1: ( () otherlv_1= 'fact' ( (lv_name_2_0= ruleALSID ) )? otherlv_3= '{' ( (lv_term_4_0= ruleALSTerm ) ) otherlv_5= '}' )
2748 // InternalAlloyLanguage.g:1028:2: () otherlv_1= 'fact' ( (lv_name_2_0= ruleALSID ) )? otherlv_3= '{' ( (lv_term_4_0= ruleALSTerm ) ) otherlv_5= '}'
2749 {
2750 // InternalAlloyLanguage.g:1028:2: ()
2751 // InternalAlloyLanguage.g:1029:5:
2752 {
2753 if ( state.backtracking==0 ) {
2754
2755 current = forceCreateModelElement(
2756 grammarAccess.getALSFactDeclarationAccess().getALSFactDeclarationAction_0(),
2757 current);
2758
2759 }
2760
2761 }
2762
2763 otherlv_1=(Token)match(input,25,FOLLOW_16); if (state.failed) return current;
2764 if ( state.backtracking==0 ) {
2765
2766 newLeafNode(otherlv_1, grammarAccess.getALSFactDeclarationAccess().getFactKeyword_1());
2767
2768 }
2769 // InternalAlloyLanguage.g:1038:1: ( (lv_name_2_0= ruleALSID ) )?
2770 int alt13=2;
2771 int LA13_0 = input.LA(1);
2772
2773 if ( (LA13_0==RULE_ID) ) {
2774 alt13=1;
2775 }
2776 switch (alt13) {
2777 case 1 :
2778 // InternalAlloyLanguage.g:1039:1: (lv_name_2_0= ruleALSID )
2779 {
2780 // InternalAlloyLanguage.g:1039:1: (lv_name_2_0= ruleALSID )
2781 // InternalAlloyLanguage.g:1040:3: lv_name_2_0= ruleALSID
2782 {
2783 if ( state.backtracking==0 ) {
2784
2785 newCompositeNode(grammarAccess.getALSFactDeclarationAccess().getNameALSIDParserRuleCall_2_0());
2786
2787 }
2788 pushFollow(FOLLOW_5);
2789 lv_name_2_0=ruleALSID();
2790
2791 state._fsp--;
2792 if (state.failed) return current;
2793 if ( state.backtracking==0 ) {
2794
2795 if (current==null) {
2796 current = createModelElementForParent(grammarAccess.getALSFactDeclarationRule());
2797 }
2798 set(
2799 current,
2800 "name",
2801 lv_name_2_0,
2802 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID");
2803 afterParserOrEnumRuleCall();
2804
2805 }
2806
2807 }
2808
2809
2810 }
2811 break;
2812
2813 }
2814
2815 otherlv_3=(Token)match(input,12,FOLLOW_12); if (state.failed) return current;
2816 if ( state.backtracking==0 ) {
2817
2818 newLeafNode(otherlv_3, grammarAccess.getALSFactDeclarationAccess().getLeftCurlyBracketKeyword_3());
2819
2820 }
2821 // InternalAlloyLanguage.g:1060:1: ( (lv_term_4_0= ruleALSTerm ) )
2822 // InternalAlloyLanguage.g:1061:1: (lv_term_4_0= ruleALSTerm )
2823 {
2824 // InternalAlloyLanguage.g:1061:1: (lv_term_4_0= ruleALSTerm )
2825 // InternalAlloyLanguage.g:1062:3: lv_term_4_0= ruleALSTerm
2826 {
2827 if ( state.backtracking==0 ) {
2828
2829 newCompositeNode(grammarAccess.getALSFactDeclarationAccess().getTermALSTermParserRuleCall_4_0());
2830
2831 }
2832 pushFollow(FOLLOW_15);
2833 lv_term_4_0=ruleALSTerm();
2834
2835 state._fsp--;
2836 if (state.failed) return current;
2837 if ( state.backtracking==0 ) {
2838
2839 if (current==null) {
2840 current = createModelElementForParent(grammarAccess.getALSFactDeclarationRule());
2841 }
2842 set(
2843 current,
2844 "term",
2845 lv_term_4_0,
2846 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
2847 afterParserOrEnumRuleCall();
2848
2849 }
2850
2851 }
2852
2853
2854 }
2855
2856 otherlv_5=(Token)match(input,14,FOLLOW_2); if (state.failed) return current;
2857 if ( state.backtracking==0 ) {
2858
2859 newLeafNode(otherlv_5, grammarAccess.getALSFactDeclarationAccess().getRightCurlyBracketKeyword_5());
2860
2861 }
2862
2863 }
2864
2865
2866 }
2867
2868 if ( state.backtracking==0 ) {
2869 leaveRule();
2870 }
2871 }
2872
2873 catch (RecognitionException re) {
2874 recover(input,re);
2875 appendSkippedTokens();
2876 }
2877 finally {
2878 }
2879 return current;
2880 }
2881 // $ANTLR end "ruleALSFactDeclaration"
2882
2883
2884 // $ANTLR start "entryRuleALSTerm"
2885 // InternalAlloyLanguage.g:1090:1: entryRuleALSTerm returns [EObject current=null] : iv_ruleALSTerm= ruleALSTerm EOF ;
2886 public final EObject entryRuleALSTerm() throws RecognitionException {
2887 EObject current = null;
2888
2889 EObject iv_ruleALSTerm = null;
2890
2891
2892 try {
2893 // InternalAlloyLanguage.g:1091:2: (iv_ruleALSTerm= ruleALSTerm EOF )
2894 // InternalAlloyLanguage.g:1092:2: iv_ruleALSTerm= ruleALSTerm EOF
2895 {
2896 if ( state.backtracking==0 ) {
2897 newCompositeNode(grammarAccess.getALSTermRule());
2898 }
2899 pushFollow(FOLLOW_1);
2900 iv_ruleALSTerm=ruleALSTerm();
2901
2902 state._fsp--;
2903 if (state.failed) return current;
2904 if ( state.backtracking==0 ) {
2905 current =iv_ruleALSTerm;
2906 }
2907 match(input,EOF,FOLLOW_2); if (state.failed) return current;
2908
2909 }
2910
2911 }
2912
2913 catch (RecognitionException re) {
2914 recover(input,re);
2915 appendSkippedTokens();
2916 }
2917 finally {
2918 }
2919 return current;
2920 }
2921 // $ANTLR end "entryRuleALSTerm"
2922
2923
2924 // $ANTLR start "ruleALSTerm"
2925 // InternalAlloyLanguage.g:1099:1: ruleALSTerm returns [EObject current=null] : this_ALSQuantified_0= ruleALSQuantified ;
2926 public final EObject ruleALSTerm() throws RecognitionException {
2927 EObject current = null;
2928
2929 EObject this_ALSQuantified_0 = null;
2930
2931
2932 enterRule();
2933
2934 try {
2935 // InternalAlloyLanguage.g:1102:28: (this_ALSQuantified_0= ruleALSQuantified )
2936 // InternalAlloyLanguage.g:1104:5: this_ALSQuantified_0= ruleALSQuantified
2937 {
2938 if ( state.backtracking==0 ) {
2939
2940 newCompositeNode(grammarAccess.getALSTermAccess().getALSQuantifiedParserRuleCall());
2941
2942 }
2943 pushFollow(FOLLOW_2);
2944 this_ALSQuantified_0=ruleALSQuantified();
2945
2946 state._fsp--;
2947 if (state.failed) return current;
2948 if ( state.backtracking==0 ) {
2949
2950 current = this_ALSQuantified_0;
2951 afterParserOrEnumRuleCall();
2952
2953 }
2954
2955 }
2956
2957 if ( state.backtracking==0 ) {
2958 leaveRule();
2959 }
2960 }
2961
2962 catch (RecognitionException re) {
2963 recover(input,re);
2964 appendSkippedTokens();
2965 }
2966 finally {
2967 }
2968 return current;
2969 }
2970 // $ANTLR end "ruleALSTerm"
2971
2972
2973 // $ANTLR start "entryRuleALSQuantified"
2974 // InternalAlloyLanguage.g:1120:1: entryRuleALSQuantified returns [EObject current=null] : iv_ruleALSQuantified= ruleALSQuantified EOF ;
2975 public final EObject entryRuleALSQuantified() throws RecognitionException {
2976 EObject current = null;
2977
2978 EObject iv_ruleALSQuantified = null;
2979
2980
2981 try {
2982 // InternalAlloyLanguage.g:1121:2: (iv_ruleALSQuantified= ruleALSQuantified EOF )
2983 // InternalAlloyLanguage.g:1122:2: iv_ruleALSQuantified= ruleALSQuantified EOF
2984 {
2985 if ( state.backtracking==0 ) {
2986 newCompositeNode(grammarAccess.getALSQuantifiedRule());
2987 }
2988 pushFollow(FOLLOW_1);
2989 iv_ruleALSQuantified=ruleALSQuantified();
2990
2991 state._fsp--;
2992 if (state.failed) return current;
2993 if ( state.backtracking==0 ) {
2994 current =iv_ruleALSQuantified;
2995 }
2996 match(input,EOF,FOLLOW_2); if (state.failed) return current;
2997
2998 }
2999
3000 }
3001
3002 catch (RecognitionException re) {
3003 recover(input,re);
3004 appendSkippedTokens();
3005 }
3006 finally {
3007 }
3008 return current;
3009 }
3010 // $ANTLR end "entryRuleALSQuantified"
3011
3012
3013 // $ANTLR start "ruleALSQuantified"
3014 // InternalAlloyLanguage.g:1129:1: ruleALSQuantified returns [EObject current=null] : ( ( () ( (lv_type_1_0= ruleALSMultiplicity ) ) ( (lv_disj_2_0= 'disj' ) )? ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= '{' ( (lv_expression_7_0= ruleALSTerm ) ) otherlv_8= '}' ) | this_ALSOr_9= ruleALSOr ) ;
3015 public final EObject ruleALSQuantified() throws RecognitionException {
3016 EObject current = null;
3017
3018 Token lv_disj_2_0=null;
3019 Token otherlv_4=null;
3020 Token otherlv_6=null;
3021 Token otherlv_8=null;
3022 Enumerator lv_type_1_0 = null;
3023
3024 EObject lv_variables_3_0 = null;
3025
3026 EObject lv_variables_5_0 = null;
3027
3028 EObject lv_expression_7_0 = null;
3029
3030 EObject this_ALSOr_9 = null;
3031
3032
3033 enterRule();
3034
3035 try {
3036 // InternalAlloyLanguage.g:1132:28: ( ( ( () ( (lv_type_1_0= ruleALSMultiplicity ) ) ( (lv_disj_2_0= 'disj' ) )? ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= '{' ( (lv_expression_7_0= ruleALSTerm ) ) otherlv_8= '}' ) | this_ALSOr_9= ruleALSOr ) )
3037 // InternalAlloyLanguage.g:1133:1: ( ( () ( (lv_type_1_0= ruleALSMultiplicity ) ) ( (lv_disj_2_0= 'disj' ) )? ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= '{' ( (lv_expression_7_0= ruleALSTerm ) ) otherlv_8= '}' ) | this_ALSOr_9= ruleALSOr )
3038 {
3039 // InternalAlloyLanguage.g:1133:1: ( ( () ( (lv_type_1_0= ruleALSMultiplicity ) ) ( (lv_disj_2_0= 'disj' ) )? ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= '{' ( (lv_expression_7_0= ruleALSTerm ) ) otherlv_8= '}' ) | this_ALSOr_9= ruleALSOr )
3040 int alt16=2;
3041 int LA16_0 = input.LA(1);
3042
3043 if ( ((LA16_0>=65 && LA16_0<=70)) ) {
3044 alt16=1;
3045 }
3046 else if ( ((LA16_0>=RULE_ID && LA16_0<=RULE_INT)||LA16_0==46||(LA16_0>=49 && LA16_0<=60)||(LA16_0>=71 && LA16_0<=75)) ) {
3047 alt16=2;
3048 }
3049 else {
3050 if (state.backtracking>0) {state.failed=true; return current;}
3051 NoViableAltException nvae =
3052 new NoViableAltException("", 16, 0, input);
3053
3054 throw nvae;
3055 }
3056 switch (alt16) {
3057 case 1 :
3058 // InternalAlloyLanguage.g:1133:2: ( () ( (lv_type_1_0= ruleALSMultiplicity ) ) ( (lv_disj_2_0= 'disj' ) )? ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= '{' ( (lv_expression_7_0= ruleALSTerm ) ) otherlv_8= '}' )
3059 {
3060 // InternalAlloyLanguage.g:1133:2: ( () ( (lv_type_1_0= ruleALSMultiplicity ) ) ( (lv_disj_2_0= 'disj' ) )? ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= '{' ( (lv_expression_7_0= ruleALSTerm ) ) otherlv_8= '}' )
3061 // InternalAlloyLanguage.g:1133:3: () ( (lv_type_1_0= ruleALSMultiplicity ) ) ( (lv_disj_2_0= 'disj' ) )? ( (lv_variables_3_0= ruleALSVariableDeclaration ) ) (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )* otherlv_6= '{' ( (lv_expression_7_0= ruleALSTerm ) ) otherlv_8= '}'
3062 {
3063 // InternalAlloyLanguage.g:1133:3: ()
3064 // InternalAlloyLanguage.g:1134:5:
3065 {
3066 if ( state.backtracking==0 ) {
3067
3068 current = forceCreateModelElement(
3069 grammarAccess.getALSQuantifiedAccess().getALSQuantifiedExAction_0_0(),
3070 current);
3071
3072 }
3073
3074 }
3075
3076 // InternalAlloyLanguage.g:1139:2: ( (lv_type_1_0= ruleALSMultiplicity ) )
3077 // InternalAlloyLanguage.g:1140:1: (lv_type_1_0= ruleALSMultiplicity )
3078 {
3079 // InternalAlloyLanguage.g:1140:1: (lv_type_1_0= ruleALSMultiplicity )
3080 // InternalAlloyLanguage.g:1141:3: lv_type_1_0= ruleALSMultiplicity
3081 {
3082 if ( state.backtracking==0 ) {
3083
3084 newCompositeNode(grammarAccess.getALSQuantifiedAccess().getTypeALSMultiplicityEnumRuleCall_0_1_0());
3085
3086 }
3087 pushFollow(FOLLOW_17);
3088 lv_type_1_0=ruleALSMultiplicity();
3089
3090 state._fsp--;
3091 if (state.failed) return current;
3092 if ( state.backtracking==0 ) {
3093
3094 if (current==null) {
3095 current = createModelElementForParent(grammarAccess.getALSQuantifiedRule());
3096 }
3097 set(
3098 current,
3099 "type",
3100 lv_type_1_0,
3101 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity");
3102 afterParserOrEnumRuleCall();
3103
3104 }
3105
3106 }
3107
3108
3109 }
3110
3111 // InternalAlloyLanguage.g:1157:2: ( (lv_disj_2_0= 'disj' ) )?
3112 int alt14=2;
3113 int LA14_0 = input.LA(1);
3114
3115 if ( (LA14_0==26) ) {
3116 alt14=1;
3117 }
3118 switch (alt14) {
3119 case 1 :
3120 // InternalAlloyLanguage.g:1158:1: (lv_disj_2_0= 'disj' )
3121 {
3122 // InternalAlloyLanguage.g:1158:1: (lv_disj_2_0= 'disj' )
3123 // InternalAlloyLanguage.g:1159:3: lv_disj_2_0= 'disj'
3124 {
3125 lv_disj_2_0=(Token)match(input,26,FOLLOW_4); if (state.failed) return current;
3126 if ( state.backtracking==0 ) {
3127
3128 newLeafNode(lv_disj_2_0, grammarAccess.getALSQuantifiedAccess().getDisjDisjKeyword_0_2_0());
3129
3130 }
3131 if ( state.backtracking==0 ) {
3132
3133 if (current==null) {
3134 current = createModelElement(grammarAccess.getALSQuantifiedRule());
3135 }
3136 setWithLastConsumed(current, "disj", true, "disj");
3137
3138 }
3139
3140 }
3141
3142
3143 }
3144 break;
3145
3146 }
3147
3148 // InternalAlloyLanguage.g:1172:3: ( (lv_variables_3_0= ruleALSVariableDeclaration ) )
3149 // InternalAlloyLanguage.g:1173:1: (lv_variables_3_0= ruleALSVariableDeclaration )
3150 {
3151 // InternalAlloyLanguage.g:1173:1: (lv_variables_3_0= ruleALSVariableDeclaration )
3152 // InternalAlloyLanguage.g:1174:3: lv_variables_3_0= ruleALSVariableDeclaration
3153 {
3154 if ( state.backtracking==0 ) {
3155
3156 newCompositeNode(grammarAccess.getALSQuantifiedAccess().getVariablesALSVariableDeclarationParserRuleCall_0_3_0());
3157
3158 }
3159 pushFollow(FOLLOW_18);
3160 lv_variables_3_0=ruleALSVariableDeclaration();
3161
3162 state._fsp--;
3163 if (state.failed) return current;
3164 if ( state.backtracking==0 ) {
3165
3166 if (current==null) {
3167 current = createModelElementForParent(grammarAccess.getALSQuantifiedRule());
3168 }
3169 add(
3170 current,
3171 "variables",
3172 lv_variables_3_0,
3173 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration");
3174 afterParserOrEnumRuleCall();
3175
3176 }
3177
3178 }
3179
3180
3181 }
3182
3183 // InternalAlloyLanguage.g:1190:2: (otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) ) )*
3184 loop15:
3185 do {
3186 int alt15=2;
3187 int LA15_0 = input.LA(1);
3188
3189 if ( (LA15_0==13) ) {
3190 alt15=1;
3191 }
3192
3193
3194 switch (alt15) {
3195 case 1 :
3196 // InternalAlloyLanguage.g:1190:4: otherlv_4= ',' ( (lv_variables_5_0= ruleALSVariableDeclaration ) )
3197 {
3198 otherlv_4=(Token)match(input,13,FOLLOW_4); if (state.failed) return current;
3199 if ( state.backtracking==0 ) {
3200
3201 newLeafNode(otherlv_4, grammarAccess.getALSQuantifiedAccess().getCommaKeyword_0_4_0());
3202
3203 }
3204 // InternalAlloyLanguage.g:1194:1: ( (lv_variables_5_0= ruleALSVariableDeclaration ) )
3205 // InternalAlloyLanguage.g:1195:1: (lv_variables_5_0= ruleALSVariableDeclaration )
3206 {
3207 // InternalAlloyLanguage.g:1195:1: (lv_variables_5_0= ruleALSVariableDeclaration )
3208 // InternalAlloyLanguage.g:1196:3: lv_variables_5_0= ruleALSVariableDeclaration
3209 {
3210 if ( state.backtracking==0 ) {
3211
3212 newCompositeNode(grammarAccess.getALSQuantifiedAccess().getVariablesALSVariableDeclarationParserRuleCall_0_4_1_0());
3213
3214 }
3215 pushFollow(FOLLOW_18);
3216 lv_variables_5_0=ruleALSVariableDeclaration();
3217
3218 state._fsp--;
3219 if (state.failed) return current;
3220 if ( state.backtracking==0 ) {
3221
3222 if (current==null) {
3223 current = createModelElementForParent(grammarAccess.getALSQuantifiedRule());
3224 }
3225 add(
3226 current,
3227 "variables",
3228 lv_variables_5_0,
3229 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration");
3230 afterParserOrEnumRuleCall();
3231
3232 }
3233
3234 }
3235
3236
3237 }
3238
3239
3240 }
3241 break;
3242
3243 default :
3244 break loop15;
3245 }
3246 } while (true);
3247
3248 otherlv_6=(Token)match(input,12,FOLLOW_12); if (state.failed) return current;
3249 if ( state.backtracking==0 ) {
3250
3251 newLeafNode(otherlv_6, grammarAccess.getALSQuantifiedAccess().getLeftCurlyBracketKeyword_0_5());
3252
3253 }
3254 // InternalAlloyLanguage.g:1216:1: ( (lv_expression_7_0= ruleALSTerm ) )
3255 // InternalAlloyLanguage.g:1217:1: (lv_expression_7_0= ruleALSTerm )
3256 {
3257 // InternalAlloyLanguage.g:1217:1: (lv_expression_7_0= ruleALSTerm )
3258 // InternalAlloyLanguage.g:1218:3: lv_expression_7_0= ruleALSTerm
3259 {
3260 if ( state.backtracking==0 ) {
3261
3262 newCompositeNode(grammarAccess.getALSQuantifiedAccess().getExpressionALSTermParserRuleCall_0_6_0());
3263
3264 }
3265 pushFollow(FOLLOW_15);
3266 lv_expression_7_0=ruleALSTerm();
3267
3268 state._fsp--;
3269 if (state.failed) return current;
3270 if ( state.backtracking==0 ) {
3271
3272 if (current==null) {
3273 current = createModelElementForParent(grammarAccess.getALSQuantifiedRule());
3274 }
3275 set(
3276 current,
3277 "expression",
3278 lv_expression_7_0,
3279 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
3280 afterParserOrEnumRuleCall();
3281
3282 }
3283
3284 }
3285
3286
3287 }
3288
3289 otherlv_8=(Token)match(input,14,FOLLOW_2); if (state.failed) return current;
3290 if ( state.backtracking==0 ) {
3291
3292 newLeafNode(otherlv_8, grammarAccess.getALSQuantifiedAccess().getRightCurlyBracketKeyword_0_7());
3293
3294 }
3295
3296 }
3297
3298
3299 }
3300 break;
3301 case 2 :
3302 // InternalAlloyLanguage.g:1240:5: this_ALSOr_9= ruleALSOr
3303 {
3304 if ( state.backtracking==0 ) {
3305
3306 newCompositeNode(grammarAccess.getALSQuantifiedAccess().getALSOrParserRuleCall_1());
3307
3308 }
3309 pushFollow(FOLLOW_2);
3310 this_ALSOr_9=ruleALSOr();
3311
3312 state._fsp--;
3313 if (state.failed) return current;
3314 if ( state.backtracking==0 ) {
3315
3316 current = this_ALSOr_9;
3317 afterParserOrEnumRuleCall();
3318
3319 }
3320
3321 }
3322 break;
3323
3324 }
3325
3326
3327 }
3328
3329 if ( state.backtracking==0 ) {
3330 leaveRule();
3331 }
3332 }
3333
3334 catch (RecognitionException re) {
3335 recover(input,re);
3336 appendSkippedTokens();
3337 }
3338 finally {
3339 }
3340 return current;
3341 }
3342 // $ANTLR end "ruleALSQuantified"
3343
3344
3345 // $ANTLR start "entryRuleALSOr"
3346 // InternalAlloyLanguage.g:1256:1: entryRuleALSOr returns [EObject current=null] : iv_ruleALSOr= ruleALSOr EOF ;
3347 public final EObject entryRuleALSOr() throws RecognitionException {
3348 EObject current = null;
3349
3350 EObject iv_ruleALSOr = null;
3351
3352
3353 try {
3354 // InternalAlloyLanguage.g:1257:2: (iv_ruleALSOr= ruleALSOr EOF )
3355 // InternalAlloyLanguage.g:1258:2: iv_ruleALSOr= ruleALSOr EOF
3356 {
3357 if ( state.backtracking==0 ) {
3358 newCompositeNode(grammarAccess.getALSOrRule());
3359 }
3360 pushFollow(FOLLOW_1);
3361 iv_ruleALSOr=ruleALSOr();
3362
3363 state._fsp--;
3364 if (state.failed) return current;
3365 if ( state.backtracking==0 ) {
3366 current =iv_ruleALSOr;
3367 }
3368 match(input,EOF,FOLLOW_2); if (state.failed) return current;
3369
3370 }
3371
3372 }
3373
3374 catch (RecognitionException re) {
3375 recover(input,re);
3376 appendSkippedTokens();
3377 }
3378 finally {
3379 }
3380 return current;
3381 }
3382 // $ANTLR end "entryRuleALSOr"
3383
3384
3385 // $ANTLR start "ruleALSOr"
3386 // InternalAlloyLanguage.g:1265:1: ruleALSOr returns [EObject current=null] : (this_ALSIff_0= ruleALSIff ( () (otherlv_2= '||' | otherlv_3= 'or' ) ( (lv_rightOperand_4_0= ruleALSIff ) ) )? ) ;
3387 public final EObject ruleALSOr() throws RecognitionException {
3388 EObject current = null;
3389
3390 Token otherlv_2=null;
3391 Token otherlv_3=null;
3392 EObject this_ALSIff_0 = null;
3393
3394 EObject lv_rightOperand_4_0 = null;
3395
3396
3397 enterRule();
3398
3399 try {
3400 // InternalAlloyLanguage.g:1268:28: ( (this_ALSIff_0= ruleALSIff ( () (otherlv_2= '||' | otherlv_3= 'or' ) ( (lv_rightOperand_4_0= ruleALSIff ) ) )? ) )
3401 // InternalAlloyLanguage.g:1269:1: (this_ALSIff_0= ruleALSIff ( () (otherlv_2= '||' | otherlv_3= 'or' ) ( (lv_rightOperand_4_0= ruleALSIff ) ) )? )
3402 {
3403 // InternalAlloyLanguage.g:1269:1: (this_ALSIff_0= ruleALSIff ( () (otherlv_2= '||' | otherlv_3= 'or' ) ( (lv_rightOperand_4_0= ruleALSIff ) ) )? )
3404 // InternalAlloyLanguage.g:1270:5: this_ALSIff_0= ruleALSIff ( () (otherlv_2= '||' | otherlv_3= 'or' ) ( (lv_rightOperand_4_0= ruleALSIff ) ) )?
3405 {
3406 if ( state.backtracking==0 ) {
3407
3408 newCompositeNode(grammarAccess.getALSOrAccess().getALSIffParserRuleCall_0());
3409
3410 }
3411 pushFollow(FOLLOW_19);
3412 this_ALSIff_0=ruleALSIff();
3413
3414 state._fsp--;
3415 if (state.failed) return current;
3416 if ( state.backtracking==0 ) {
3417
3418 current = this_ALSIff_0;
3419 afterParserOrEnumRuleCall();
3420
3421 }
3422 // InternalAlloyLanguage.g:1278:1: ( () (otherlv_2= '||' | otherlv_3= 'or' ) ( (lv_rightOperand_4_0= ruleALSIff ) ) )?
3423 int alt18=2;
3424 int LA18_0 = input.LA(1);
3425
3426 if ( ((LA18_0>=27 && LA18_0<=28)) ) {
3427 alt18=1;
3428 }
3429 switch (alt18) {
3430 case 1 :
3431 // InternalAlloyLanguage.g:1278:2: () (otherlv_2= '||' | otherlv_3= 'or' ) ( (lv_rightOperand_4_0= ruleALSIff ) )
3432 {
3433 // InternalAlloyLanguage.g:1278:2: ()
3434 // InternalAlloyLanguage.g:1279:5:
3435 {
3436 if ( state.backtracking==0 ) {
3437
3438 current = forceCreateModelElementAndSet(
3439 grammarAccess.getALSOrAccess().getALSOrLeftOperandAction_1_0(),
3440 current);
3441
3442 }
3443
3444 }
3445
3446 // InternalAlloyLanguage.g:1284:2: (otherlv_2= '||' | otherlv_3= 'or' )
3447 int alt17=2;
3448 int LA17_0 = input.LA(1);
3449
3450 if ( (LA17_0==27) ) {
3451 alt17=1;
3452 }
3453 else if ( (LA17_0==28) ) {
3454 alt17=2;
3455 }
3456 else {
3457 if (state.backtracking>0) {state.failed=true; return current;}
3458 NoViableAltException nvae =
3459 new NoViableAltException("", 17, 0, input);
3460
3461 throw nvae;
3462 }
3463 switch (alt17) {
3464 case 1 :
3465 // InternalAlloyLanguage.g:1284:4: otherlv_2= '||'
3466 {
3467 otherlv_2=(Token)match(input,27,FOLLOW_12); if (state.failed) return current;
3468 if ( state.backtracking==0 ) {
3469
3470 newLeafNode(otherlv_2, grammarAccess.getALSOrAccess().getVerticalLineVerticalLineKeyword_1_1_0());
3471
3472 }
3473
3474 }
3475 break;
3476 case 2 :
3477 // InternalAlloyLanguage.g:1289:7: otherlv_3= 'or'
3478 {
3479 otherlv_3=(Token)match(input,28,FOLLOW_12); if (state.failed) return current;
3480 if ( state.backtracking==0 ) {
3481
3482 newLeafNode(otherlv_3, grammarAccess.getALSOrAccess().getOrKeyword_1_1_1());
3483
3484 }
3485
3486 }
3487 break;
3488
3489 }
3490
3491 // InternalAlloyLanguage.g:1293:2: ( (lv_rightOperand_4_0= ruleALSIff ) )
3492 // InternalAlloyLanguage.g:1294:1: (lv_rightOperand_4_0= ruleALSIff )
3493 {
3494 // InternalAlloyLanguage.g:1294:1: (lv_rightOperand_4_0= ruleALSIff )
3495 // InternalAlloyLanguage.g:1295:3: lv_rightOperand_4_0= ruleALSIff
3496 {
3497 if ( state.backtracking==0 ) {
3498
3499 newCompositeNode(grammarAccess.getALSOrAccess().getRightOperandALSIffParserRuleCall_1_2_0());
3500
3501 }
3502 pushFollow(FOLLOW_2);
3503 lv_rightOperand_4_0=ruleALSIff();
3504
3505 state._fsp--;
3506 if (state.failed) return current;
3507 if ( state.backtracking==0 ) {
3508
3509 if (current==null) {
3510 current = createModelElementForParent(grammarAccess.getALSOrRule());
3511 }
3512 set(
3513 current,
3514 "rightOperand",
3515 lv_rightOperand_4_0,
3516 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSIff");
3517 afterParserOrEnumRuleCall();
3518
3519 }
3520
3521 }
3522
3523
3524 }
3525
3526
3527 }
3528 break;
3529
3530 }
3531
3532
3533 }
3534
3535
3536 }
3537
3538 if ( state.backtracking==0 ) {
3539 leaveRule();
3540 }
3541 }
3542
3543 catch (RecognitionException re) {
3544 recover(input,re);
3545 appendSkippedTokens();
3546 }
3547 finally {
3548 }
3549 return current;
3550 }
3551 // $ANTLR end "ruleALSOr"
3552
3553
3554 // $ANTLR start "entryRuleALSIff"
3555 // InternalAlloyLanguage.g:1319:1: entryRuleALSIff returns [EObject current=null] : iv_ruleALSIff= ruleALSIff EOF ;
3556 public final EObject entryRuleALSIff() throws RecognitionException {
3557 EObject current = null;
3558
3559 EObject iv_ruleALSIff = null;
3560
3561
3562 try {
3563 // InternalAlloyLanguage.g:1320:2: (iv_ruleALSIff= ruleALSIff EOF )
3564 // InternalAlloyLanguage.g:1321:2: iv_ruleALSIff= ruleALSIff EOF
3565 {
3566 if ( state.backtracking==0 ) {
3567 newCompositeNode(grammarAccess.getALSIffRule());
3568 }
3569 pushFollow(FOLLOW_1);
3570 iv_ruleALSIff=ruleALSIff();
3571
3572 state._fsp--;
3573 if (state.failed) return current;
3574 if ( state.backtracking==0 ) {
3575 current =iv_ruleALSIff;
3576 }
3577 match(input,EOF,FOLLOW_2); if (state.failed) return current;
3578
3579 }
3580
3581 }
3582
3583 catch (RecognitionException re) {
3584 recover(input,re);
3585 appendSkippedTokens();
3586 }
3587 finally {
3588 }
3589 return current;
3590 }
3591 // $ANTLR end "entryRuleALSIff"
3592
3593
3594 // $ANTLR start "ruleALSIff"
3595 // InternalAlloyLanguage.g:1328:1: ruleALSIff returns [EObject current=null] : (this_ALSImpl_0= ruleALSImpl ( () (otherlv_2= '<=>' | otherlv_3= 'iff' ) ( (lv_rightOperand_4_0= ruleALSImpl ) ) )? ) ;
3596 public final EObject ruleALSIff() throws RecognitionException {
3597 EObject current = null;
3598
3599 Token otherlv_2=null;
3600 Token otherlv_3=null;
3601 EObject this_ALSImpl_0 = null;
3602
3603 EObject lv_rightOperand_4_0 = null;
3604
3605
3606 enterRule();
3607
3608 try {
3609 // InternalAlloyLanguage.g:1331:28: ( (this_ALSImpl_0= ruleALSImpl ( () (otherlv_2= '<=>' | otherlv_3= 'iff' ) ( (lv_rightOperand_4_0= ruleALSImpl ) ) )? ) )
3610 // InternalAlloyLanguage.g:1332:1: (this_ALSImpl_0= ruleALSImpl ( () (otherlv_2= '<=>' | otherlv_3= 'iff' ) ( (lv_rightOperand_4_0= ruleALSImpl ) ) )? )
3611 {
3612 // InternalAlloyLanguage.g:1332:1: (this_ALSImpl_0= ruleALSImpl ( () (otherlv_2= '<=>' | otherlv_3= 'iff' ) ( (lv_rightOperand_4_0= ruleALSImpl ) ) )? )
3613 // InternalAlloyLanguage.g:1333:5: this_ALSImpl_0= ruleALSImpl ( () (otherlv_2= '<=>' | otherlv_3= 'iff' ) ( (lv_rightOperand_4_0= ruleALSImpl ) ) )?
3614 {
3615 if ( state.backtracking==0 ) {
3616
3617 newCompositeNode(grammarAccess.getALSIffAccess().getALSImplParserRuleCall_0());
3618
3619 }
3620 pushFollow(FOLLOW_20);
3621 this_ALSImpl_0=ruleALSImpl();
3622
3623 state._fsp--;
3624 if (state.failed) return current;
3625 if ( state.backtracking==0 ) {
3626
3627 current = this_ALSImpl_0;
3628 afterParserOrEnumRuleCall();
3629
3630 }
3631 // InternalAlloyLanguage.g:1341:1: ( () (otherlv_2= '<=>' | otherlv_3= 'iff' ) ( (lv_rightOperand_4_0= ruleALSImpl ) ) )?
3632 int alt20=2;
3633 int LA20_0 = input.LA(1);
3634
3635 if ( ((LA20_0>=29 && LA20_0<=30)) ) {
3636 alt20=1;
3637 }
3638 switch (alt20) {
3639 case 1 :
3640 // InternalAlloyLanguage.g:1341:2: () (otherlv_2= '<=>' | otherlv_3= 'iff' ) ( (lv_rightOperand_4_0= ruleALSImpl ) )
3641 {
3642 // InternalAlloyLanguage.g:1341:2: ()
3643 // InternalAlloyLanguage.g:1342:5:
3644 {
3645 if ( state.backtracking==0 ) {
3646
3647 current = forceCreateModelElementAndSet(
3648 grammarAccess.getALSIffAccess().getALSIffLeftOperandAction_1_0(),
3649 current);
3650
3651 }
3652
3653 }
3654
3655 // InternalAlloyLanguage.g:1347:2: (otherlv_2= '<=>' | otherlv_3= 'iff' )
3656 int alt19=2;
3657 int LA19_0 = input.LA(1);
3658
3659 if ( (LA19_0==29) ) {
3660 alt19=1;
3661 }
3662 else if ( (LA19_0==30) ) {
3663 alt19=2;
3664 }
3665 else {
3666 if (state.backtracking>0) {state.failed=true; return current;}
3667 NoViableAltException nvae =
3668 new NoViableAltException("", 19, 0, input);
3669
3670 throw nvae;
3671 }
3672 switch (alt19) {
3673 case 1 :
3674 // InternalAlloyLanguage.g:1347:4: otherlv_2= '<=>'
3675 {
3676 otherlv_2=(Token)match(input,29,FOLLOW_12); if (state.failed) return current;
3677 if ( state.backtracking==0 ) {
3678
3679 newLeafNode(otherlv_2, grammarAccess.getALSIffAccess().getLessThanSignEqualsSignGreaterThanSignKeyword_1_1_0());
3680
3681 }
3682
3683 }
3684 break;
3685 case 2 :
3686 // InternalAlloyLanguage.g:1352:7: otherlv_3= 'iff'
3687 {
3688 otherlv_3=(Token)match(input,30,FOLLOW_12); if (state.failed) return current;
3689 if ( state.backtracking==0 ) {
3690
3691 newLeafNode(otherlv_3, grammarAccess.getALSIffAccess().getIffKeyword_1_1_1());
3692
3693 }
3694
3695 }
3696 break;
3697
3698 }
3699
3700 // InternalAlloyLanguage.g:1356:2: ( (lv_rightOperand_4_0= ruleALSImpl ) )
3701 // InternalAlloyLanguage.g:1357:1: (lv_rightOperand_4_0= ruleALSImpl )
3702 {
3703 // InternalAlloyLanguage.g:1357:1: (lv_rightOperand_4_0= ruleALSImpl )
3704 // InternalAlloyLanguage.g:1358:3: lv_rightOperand_4_0= ruleALSImpl
3705 {
3706 if ( state.backtracking==0 ) {
3707
3708 newCompositeNode(grammarAccess.getALSIffAccess().getRightOperandALSImplParserRuleCall_1_2_0());
3709
3710 }
3711 pushFollow(FOLLOW_2);
3712 lv_rightOperand_4_0=ruleALSImpl();
3713
3714 state._fsp--;
3715 if (state.failed) return current;
3716 if ( state.backtracking==0 ) {
3717
3718 if (current==null) {
3719 current = createModelElementForParent(grammarAccess.getALSIffRule());
3720 }
3721 set(
3722 current,
3723 "rightOperand",
3724 lv_rightOperand_4_0,
3725 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSImpl");
3726 afterParserOrEnumRuleCall();
3727
3728 }
3729
3730 }
3731
3732
3733 }
3734
3735
3736 }
3737 break;
3738
3739 }
3740
3741
3742 }
3743
3744
3745 }
3746
3747 if ( state.backtracking==0 ) {
3748 leaveRule();
3749 }
3750 }
3751
3752 catch (RecognitionException re) {
3753 recover(input,re);
3754 appendSkippedTokens();
3755 }
3756 finally {
3757 }
3758 return current;
3759 }
3760 // $ANTLR end "ruleALSIff"
3761
3762
3763 // $ANTLR start "entryRuleALSImpl"
3764 // InternalAlloyLanguage.g:1382:1: entryRuleALSImpl returns [EObject current=null] : iv_ruleALSImpl= ruleALSImpl EOF ;
3765 public final EObject entryRuleALSImpl() throws RecognitionException {
3766 EObject current = null;
3767
3768 EObject iv_ruleALSImpl = null;
3769
3770
3771 try {
3772 // InternalAlloyLanguage.g:1383:2: (iv_ruleALSImpl= ruleALSImpl EOF )
3773 // InternalAlloyLanguage.g:1384:2: iv_ruleALSImpl= ruleALSImpl EOF
3774 {
3775 if ( state.backtracking==0 ) {
3776 newCompositeNode(grammarAccess.getALSImplRule());
3777 }
3778 pushFollow(FOLLOW_1);
3779 iv_ruleALSImpl=ruleALSImpl();
3780
3781 state._fsp--;
3782 if (state.failed) return current;
3783 if ( state.backtracking==0 ) {
3784 current =iv_ruleALSImpl;
3785 }
3786 match(input,EOF,FOLLOW_2); if (state.failed) return current;
3787
3788 }
3789
3790 }
3791
3792 catch (RecognitionException re) {
3793 recover(input,re);
3794 appendSkippedTokens();
3795 }
3796 finally {
3797 }
3798 return current;
3799 }
3800 // $ANTLR end "entryRuleALSImpl"
3801
3802
3803 // $ANTLR start "ruleALSImpl"
3804 // InternalAlloyLanguage.g:1391:1: ruleALSImpl returns [EObject current=null] : (this_ALSAnd_0= ruleALSAnd ( () (otherlv_2= '=>' | otherlv_3= 'implies' ) ( (lv_rightOperand_4_0= ruleALSAnd ) ) (otherlv_5= 'else' ( (lv_elseOperand_6_0= ruleALSAnd ) ) )? )? ) ;
3805 public final EObject ruleALSImpl() throws RecognitionException {
3806 EObject current = null;
3807
3808 Token otherlv_2=null;
3809 Token otherlv_3=null;
3810 Token otherlv_5=null;
3811 EObject this_ALSAnd_0 = null;
3812
3813 EObject lv_rightOperand_4_0 = null;
3814
3815 EObject lv_elseOperand_6_0 = null;
3816
3817
3818 enterRule();
3819
3820 try {
3821 // InternalAlloyLanguage.g:1394:28: ( (this_ALSAnd_0= ruleALSAnd ( () (otherlv_2= '=>' | otherlv_3= 'implies' ) ( (lv_rightOperand_4_0= ruleALSAnd ) ) (otherlv_5= 'else' ( (lv_elseOperand_6_0= ruleALSAnd ) ) )? )? ) )
3822 // InternalAlloyLanguage.g:1395:1: (this_ALSAnd_0= ruleALSAnd ( () (otherlv_2= '=>' | otherlv_3= 'implies' ) ( (lv_rightOperand_4_0= ruleALSAnd ) ) (otherlv_5= 'else' ( (lv_elseOperand_6_0= ruleALSAnd ) ) )? )? )
3823 {
3824 // InternalAlloyLanguage.g:1395:1: (this_ALSAnd_0= ruleALSAnd ( () (otherlv_2= '=>' | otherlv_3= 'implies' ) ( (lv_rightOperand_4_0= ruleALSAnd ) ) (otherlv_5= 'else' ( (lv_elseOperand_6_0= ruleALSAnd ) ) )? )? )
3825 // InternalAlloyLanguage.g:1396:5: this_ALSAnd_0= ruleALSAnd ( () (otherlv_2= '=>' | otherlv_3= 'implies' ) ( (lv_rightOperand_4_0= ruleALSAnd ) ) (otherlv_5= 'else' ( (lv_elseOperand_6_0= ruleALSAnd ) ) )? )?
3826 {
3827 if ( state.backtracking==0 ) {
3828
3829 newCompositeNode(grammarAccess.getALSImplAccess().getALSAndParserRuleCall_0());
3830
3831 }
3832 pushFollow(FOLLOW_21);
3833 this_ALSAnd_0=ruleALSAnd();
3834
3835 state._fsp--;
3836 if (state.failed) return current;
3837 if ( state.backtracking==0 ) {
3838
3839 current = this_ALSAnd_0;
3840 afterParserOrEnumRuleCall();
3841
3842 }
3843 // InternalAlloyLanguage.g:1404:1: ( () (otherlv_2= '=>' | otherlv_3= 'implies' ) ( (lv_rightOperand_4_0= ruleALSAnd ) ) (otherlv_5= 'else' ( (lv_elseOperand_6_0= ruleALSAnd ) ) )? )?
3844 int alt23=2;
3845 int LA23_0 = input.LA(1);
3846
3847 if ( ((LA23_0>=31 && LA23_0<=32)) ) {
3848 alt23=1;
3849 }
3850 switch (alt23) {
3851 case 1 :
3852 // InternalAlloyLanguage.g:1404:2: () (otherlv_2= '=>' | otherlv_3= 'implies' ) ( (lv_rightOperand_4_0= ruleALSAnd ) ) (otherlv_5= 'else' ( (lv_elseOperand_6_0= ruleALSAnd ) ) )?
3853 {
3854 // InternalAlloyLanguage.g:1404:2: ()
3855 // InternalAlloyLanguage.g:1405:5:
3856 {
3857 if ( state.backtracking==0 ) {
3858
3859 current = forceCreateModelElementAndSet(
3860 grammarAccess.getALSImplAccess().getALSImplLeftOperandAction_1_0(),
3861 current);
3862
3863 }
3864
3865 }
3866
3867 // InternalAlloyLanguage.g:1410:2: (otherlv_2= '=>' | otherlv_3= 'implies' )
3868 int alt21=2;
3869 int LA21_0 = input.LA(1);
3870
3871 if ( (LA21_0==31) ) {
3872 alt21=1;
3873 }
3874 else if ( (LA21_0==32) ) {
3875 alt21=2;
3876 }
3877 else {
3878 if (state.backtracking>0) {state.failed=true; return current;}
3879 NoViableAltException nvae =
3880 new NoViableAltException("", 21, 0, input);
3881
3882 throw nvae;
3883 }
3884 switch (alt21) {
3885 case 1 :
3886 // InternalAlloyLanguage.g:1410:4: otherlv_2= '=>'
3887 {
3888 otherlv_2=(Token)match(input,31,FOLLOW_12); if (state.failed) return current;
3889 if ( state.backtracking==0 ) {
3890
3891 newLeafNode(otherlv_2, grammarAccess.getALSImplAccess().getEqualsSignGreaterThanSignKeyword_1_1_0());
3892
3893 }
3894
3895 }
3896 break;
3897 case 2 :
3898 // InternalAlloyLanguage.g:1415:7: otherlv_3= 'implies'
3899 {
3900 otherlv_3=(Token)match(input,32,FOLLOW_12); if (state.failed) return current;
3901 if ( state.backtracking==0 ) {
3902
3903 newLeafNode(otherlv_3, grammarAccess.getALSImplAccess().getImpliesKeyword_1_1_1());
3904
3905 }
3906
3907 }
3908 break;
3909
3910 }
3911
3912 // InternalAlloyLanguage.g:1419:2: ( (lv_rightOperand_4_0= ruleALSAnd ) )
3913 // InternalAlloyLanguage.g:1420:1: (lv_rightOperand_4_0= ruleALSAnd )
3914 {
3915 // InternalAlloyLanguage.g:1420:1: (lv_rightOperand_4_0= ruleALSAnd )
3916 // InternalAlloyLanguage.g:1421:3: lv_rightOperand_4_0= ruleALSAnd
3917 {
3918 if ( state.backtracking==0 ) {
3919
3920 newCompositeNode(grammarAccess.getALSImplAccess().getRightOperandALSAndParserRuleCall_1_2_0());
3921
3922 }
3923 pushFollow(FOLLOW_22);
3924 lv_rightOperand_4_0=ruleALSAnd();
3925
3926 state._fsp--;
3927 if (state.failed) return current;
3928 if ( state.backtracking==0 ) {
3929
3930 if (current==null) {
3931 current = createModelElementForParent(grammarAccess.getALSImplRule());
3932 }
3933 set(
3934 current,
3935 "rightOperand",
3936 lv_rightOperand_4_0,
3937 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSAnd");
3938 afterParserOrEnumRuleCall();
3939
3940 }
3941
3942 }
3943
3944
3945 }
3946
3947 // InternalAlloyLanguage.g:1437:2: (otherlv_5= 'else' ( (lv_elseOperand_6_0= ruleALSAnd ) ) )?
3948 int alt22=2;
3949 int LA22_0 = input.LA(1);
3950
3951 if ( (LA22_0==33) ) {
3952 alt22=1;
3953 }
3954 switch (alt22) {
3955 case 1 :
3956 // InternalAlloyLanguage.g:1437:4: otherlv_5= 'else' ( (lv_elseOperand_6_0= ruleALSAnd ) )
3957 {
3958 otherlv_5=(Token)match(input,33,FOLLOW_12); if (state.failed) return current;
3959 if ( state.backtracking==0 ) {
3960
3961 newLeafNode(otherlv_5, grammarAccess.getALSImplAccess().getElseKeyword_1_3_0());
3962
3963 }
3964 // InternalAlloyLanguage.g:1441:1: ( (lv_elseOperand_6_0= ruleALSAnd ) )
3965 // InternalAlloyLanguage.g:1442:1: (lv_elseOperand_6_0= ruleALSAnd )
3966 {
3967 // InternalAlloyLanguage.g:1442:1: (lv_elseOperand_6_0= ruleALSAnd )
3968 // InternalAlloyLanguage.g:1443:3: lv_elseOperand_6_0= ruleALSAnd
3969 {
3970 if ( state.backtracking==0 ) {
3971
3972 newCompositeNode(grammarAccess.getALSImplAccess().getElseOperandALSAndParserRuleCall_1_3_1_0());
3973
3974 }
3975 pushFollow(FOLLOW_2);
3976 lv_elseOperand_6_0=ruleALSAnd();
3977
3978 state._fsp--;
3979 if (state.failed) return current;
3980 if ( state.backtracking==0 ) {
3981
3982 if (current==null) {
3983 current = createModelElementForParent(grammarAccess.getALSImplRule());
3984 }
3985 set(
3986 current,
3987 "elseOperand",
3988 lv_elseOperand_6_0,
3989 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSAnd");
3990 afterParserOrEnumRuleCall();
3991
3992 }
3993
3994 }
3995
3996
3997 }
3998
3999
4000 }
4001 break;
4002
4003 }
4004
4005
4006 }
4007 break;
4008
4009 }
4010
4011
4012 }
4013
4014
4015 }
4016
4017 if ( state.backtracking==0 ) {
4018 leaveRule();
4019 }
4020 }
4021
4022 catch (RecognitionException re) {
4023 recover(input,re);
4024 appendSkippedTokens();
4025 }
4026 finally {
4027 }
4028 return current;
4029 }
4030 // $ANTLR end "ruleALSImpl"
4031
4032
4033 // $ANTLR start "entryRuleALSAnd"
4034 // InternalAlloyLanguage.g:1467:1: entryRuleALSAnd returns [EObject current=null] : iv_ruleALSAnd= ruleALSAnd EOF ;
4035 public final EObject entryRuleALSAnd() throws RecognitionException {
4036 EObject current = null;
4037
4038 EObject iv_ruleALSAnd = null;
4039
4040
4041 try {
4042 // InternalAlloyLanguage.g:1468:2: (iv_ruleALSAnd= ruleALSAnd EOF )
4043 // InternalAlloyLanguage.g:1469:2: iv_ruleALSAnd= ruleALSAnd EOF
4044 {
4045 if ( state.backtracking==0 ) {
4046 newCompositeNode(grammarAccess.getALSAndRule());
4047 }
4048 pushFollow(FOLLOW_1);
4049 iv_ruleALSAnd=ruleALSAnd();
4050
4051 state._fsp--;
4052 if (state.failed) return current;
4053 if ( state.backtracking==0 ) {
4054 current =iv_ruleALSAnd;
4055 }
4056 match(input,EOF,FOLLOW_2); if (state.failed) return current;
4057
4058 }
4059
4060 }
4061
4062 catch (RecognitionException re) {
4063 recover(input,re);
4064 appendSkippedTokens();
4065 }
4066 finally {
4067 }
4068 return current;
4069 }
4070 // $ANTLR end "entryRuleALSAnd"
4071
4072
4073 // $ANTLR start "ruleALSAnd"
4074 // InternalAlloyLanguage.g:1476:1: ruleALSAnd returns [EObject current=null] : (this_ALSComparison_0= ruleALSComparison ( () (otherlv_2= '&&' | otherlv_3= 'and' ) ( (lv_rightOperand_4_0= ruleALSComparison ) ) )? ) ;
4075 public final EObject ruleALSAnd() throws RecognitionException {
4076 EObject current = null;
4077
4078 Token otherlv_2=null;
4079 Token otherlv_3=null;
4080 EObject this_ALSComparison_0 = null;
4081
4082 EObject lv_rightOperand_4_0 = null;
4083
4084
4085 enterRule();
4086
4087 try {
4088 // InternalAlloyLanguage.g:1479:28: ( (this_ALSComparison_0= ruleALSComparison ( () (otherlv_2= '&&' | otherlv_3= 'and' ) ( (lv_rightOperand_4_0= ruleALSComparison ) ) )? ) )
4089 // InternalAlloyLanguage.g:1480:1: (this_ALSComparison_0= ruleALSComparison ( () (otherlv_2= '&&' | otherlv_3= 'and' ) ( (lv_rightOperand_4_0= ruleALSComparison ) ) )? )
4090 {
4091 // InternalAlloyLanguage.g:1480:1: (this_ALSComparison_0= ruleALSComparison ( () (otherlv_2= '&&' | otherlv_3= 'and' ) ( (lv_rightOperand_4_0= ruleALSComparison ) ) )? )
4092 // InternalAlloyLanguage.g:1481:5: this_ALSComparison_0= ruleALSComparison ( () (otherlv_2= '&&' | otherlv_3= 'and' ) ( (lv_rightOperand_4_0= ruleALSComparison ) ) )?
4093 {
4094 if ( state.backtracking==0 ) {
4095
4096 newCompositeNode(grammarAccess.getALSAndAccess().getALSComparisonParserRuleCall_0());
4097
4098 }
4099 pushFollow(FOLLOW_23);
4100 this_ALSComparison_0=ruleALSComparison();
4101
4102 state._fsp--;
4103 if (state.failed) return current;
4104 if ( state.backtracking==0 ) {
4105
4106 current = this_ALSComparison_0;
4107 afterParserOrEnumRuleCall();
4108
4109 }
4110 // InternalAlloyLanguage.g:1489:1: ( () (otherlv_2= '&&' | otherlv_3= 'and' ) ( (lv_rightOperand_4_0= ruleALSComparison ) ) )?
4111 int alt25=2;
4112 int LA25_0 = input.LA(1);
4113
4114 if ( ((LA25_0>=34 && LA25_0<=35)) ) {
4115 alt25=1;
4116 }
4117 switch (alt25) {
4118 case 1 :
4119 // InternalAlloyLanguage.g:1489:2: () (otherlv_2= '&&' | otherlv_3= 'and' ) ( (lv_rightOperand_4_0= ruleALSComparison ) )
4120 {
4121 // InternalAlloyLanguage.g:1489:2: ()
4122 // InternalAlloyLanguage.g:1490:5:
4123 {
4124 if ( state.backtracking==0 ) {
4125
4126 current = forceCreateModelElementAndSet(
4127 grammarAccess.getALSAndAccess().getALSAndLeftOperandAction_1_0(),
4128 current);
4129
4130 }
4131
4132 }
4133
4134 // InternalAlloyLanguage.g:1495:2: (otherlv_2= '&&' | otherlv_3= 'and' )
4135 int alt24=2;
4136 int LA24_0 = input.LA(1);
4137
4138 if ( (LA24_0==34) ) {
4139 alt24=1;
4140 }
4141 else if ( (LA24_0==35) ) {
4142 alt24=2;
4143 }
4144 else {
4145 if (state.backtracking>0) {state.failed=true; return current;}
4146 NoViableAltException nvae =
4147 new NoViableAltException("", 24, 0, input);
4148
4149 throw nvae;
4150 }
4151 switch (alt24) {
4152 case 1 :
4153 // InternalAlloyLanguage.g:1495:4: otherlv_2= '&&'
4154 {
4155 otherlv_2=(Token)match(input,34,FOLLOW_12); if (state.failed) return current;
4156 if ( state.backtracking==0 ) {
4157
4158 newLeafNode(otherlv_2, grammarAccess.getALSAndAccess().getAmpersandAmpersandKeyword_1_1_0());
4159
4160 }
4161
4162 }
4163 break;
4164 case 2 :
4165 // InternalAlloyLanguage.g:1500:7: otherlv_3= 'and'
4166 {
4167 otherlv_3=(Token)match(input,35,FOLLOW_12); if (state.failed) return current;
4168 if ( state.backtracking==0 ) {
4169
4170 newLeafNode(otherlv_3, grammarAccess.getALSAndAccess().getAndKeyword_1_1_1());
4171
4172 }
4173
4174 }
4175 break;
4176
4177 }
4178
4179 // InternalAlloyLanguage.g:1504:2: ( (lv_rightOperand_4_0= ruleALSComparison ) )
4180 // InternalAlloyLanguage.g:1505:1: (lv_rightOperand_4_0= ruleALSComparison )
4181 {
4182 // InternalAlloyLanguage.g:1505:1: (lv_rightOperand_4_0= ruleALSComparison )
4183 // InternalAlloyLanguage.g:1506:3: lv_rightOperand_4_0= ruleALSComparison
4184 {
4185 if ( state.backtracking==0 ) {
4186
4187 newCompositeNode(grammarAccess.getALSAndAccess().getRightOperandALSComparisonParserRuleCall_1_2_0());
4188
4189 }
4190 pushFollow(FOLLOW_2);
4191 lv_rightOperand_4_0=ruleALSComparison();
4192
4193 state._fsp--;
4194 if (state.failed) return current;
4195 if ( state.backtracking==0 ) {
4196
4197 if (current==null) {
4198 current = createModelElementForParent(grammarAccess.getALSAndRule());
4199 }
4200 set(
4201 current,
4202 "rightOperand",
4203 lv_rightOperand_4_0,
4204 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSComparison");
4205 afterParserOrEnumRuleCall();
4206
4207 }
4208
4209 }
4210
4211
4212 }
4213
4214
4215 }
4216 break;
4217
4218 }
4219
4220
4221 }
4222
4223
4224 }
4225
4226 if ( state.backtracking==0 ) {
4227 leaveRule();
4228 }
4229 }
4230
4231 catch (RecognitionException re) {
4232 recover(input,re);
4233 appendSkippedTokens();
4234 }
4235 finally {
4236 }
4237 return current;
4238 }
4239 // $ANTLR end "ruleALSAnd"
4240
4241
4242 // $ANTLR start "entryRuleALSComparison"
4243 // InternalAlloyLanguage.g:1530:1: entryRuleALSComparison returns [EObject current=null] : iv_ruleALSComparison= ruleALSComparison EOF ;
4244 public final EObject entryRuleALSComparison() throws RecognitionException {
4245 EObject current = null;
4246
4247 EObject iv_ruleALSComparison = null;
4248
4249
4250 try {
4251 // InternalAlloyLanguage.g:1531:2: (iv_ruleALSComparison= ruleALSComparison EOF )
4252 // InternalAlloyLanguage.g:1532:2: iv_ruleALSComparison= ruleALSComparison EOF
4253 {
4254 if ( state.backtracking==0 ) {
4255 newCompositeNode(grammarAccess.getALSComparisonRule());
4256 }
4257 pushFollow(FOLLOW_1);
4258 iv_ruleALSComparison=ruleALSComparison();
4259
4260 state._fsp--;
4261 if (state.failed) return current;
4262 if ( state.backtracking==0 ) {
4263 current =iv_ruleALSComparison;
4264 }
4265 match(input,EOF,FOLLOW_2); if (state.failed) return current;
4266
4267 }
4268
4269 }
4270
4271 catch (RecognitionException re) {
4272 recover(input,re);
4273 appendSkippedTokens();
4274 }
4275 finally {
4276 }
4277 return current;
4278 }
4279 // $ANTLR end "entryRuleALSComparison"
4280
4281
4282 // $ANTLR start "ruleALSComparison"
4283 // InternalAlloyLanguage.g:1539:1: ruleALSComparison returns [EObject current=null] : (this_ALSOverride_0= ruleALSOverride ( ( ( () otherlv_2= '=' ) | ( () otherlv_4= '!=' ) | ( () otherlv_6= 'in' ) | ( () otherlv_8= '>' ) | ( () otherlv_10= '>=' ) | ( () otherlv_12= '<' ) | ( () otherlv_14= '<=' ) ) ( (lv_rightOperand_15_0= ruleALSOverride ) ) )? ) ;
4284 public final EObject ruleALSComparison() throws RecognitionException {
4285 EObject current = null;
4286
4287 Token otherlv_2=null;
4288 Token otherlv_4=null;
4289 Token otherlv_6=null;
4290 Token otherlv_8=null;
4291 Token otherlv_10=null;
4292 Token otherlv_12=null;
4293 Token otherlv_14=null;
4294 EObject this_ALSOverride_0 = null;
4295
4296 EObject lv_rightOperand_15_0 = null;
4297
4298
4299 enterRule();
4300
4301 try {
4302 // InternalAlloyLanguage.g:1542:28: ( (this_ALSOverride_0= ruleALSOverride ( ( ( () otherlv_2= '=' ) | ( () otherlv_4= '!=' ) | ( () otherlv_6= 'in' ) | ( () otherlv_8= '>' ) | ( () otherlv_10= '>=' ) | ( () otherlv_12= '<' ) | ( () otherlv_14= '<=' ) ) ( (lv_rightOperand_15_0= ruleALSOverride ) ) )? ) )
4303 // InternalAlloyLanguage.g:1543:1: (this_ALSOverride_0= ruleALSOverride ( ( ( () otherlv_2= '=' ) | ( () otherlv_4= '!=' ) | ( () otherlv_6= 'in' ) | ( () otherlv_8= '>' ) | ( () otherlv_10= '>=' ) | ( () otherlv_12= '<' ) | ( () otherlv_14= '<=' ) ) ( (lv_rightOperand_15_0= ruleALSOverride ) ) )? )
4304 {
4305 // InternalAlloyLanguage.g:1543:1: (this_ALSOverride_0= ruleALSOverride ( ( ( () otherlv_2= '=' ) | ( () otherlv_4= '!=' ) | ( () otherlv_6= 'in' ) | ( () otherlv_8= '>' ) | ( () otherlv_10= '>=' ) | ( () otherlv_12= '<' ) | ( () otherlv_14= '<=' ) ) ( (lv_rightOperand_15_0= ruleALSOverride ) ) )? )
4306 // InternalAlloyLanguage.g:1544:5: this_ALSOverride_0= ruleALSOverride ( ( ( () otherlv_2= '=' ) | ( () otherlv_4= '!=' ) | ( () otherlv_6= 'in' ) | ( () otherlv_8= '>' ) | ( () otherlv_10= '>=' ) | ( () otherlv_12= '<' ) | ( () otherlv_14= '<=' ) ) ( (lv_rightOperand_15_0= ruleALSOverride ) ) )?
4307 {
4308 if ( state.backtracking==0 ) {
4309
4310 newCompositeNode(grammarAccess.getALSComparisonAccess().getALSOverrideParserRuleCall_0());
4311
4312 }
4313 pushFollow(FOLLOW_24);
4314 this_ALSOverride_0=ruleALSOverride();
4315
4316 state._fsp--;
4317 if (state.failed) return current;
4318 if ( state.backtracking==0 ) {
4319
4320 current = this_ALSOverride_0;
4321 afterParserOrEnumRuleCall();
4322
4323 }
4324 // InternalAlloyLanguage.g:1552:1: ( ( ( () otherlv_2= '=' ) | ( () otherlv_4= '!=' ) | ( () otherlv_6= 'in' ) | ( () otherlv_8= '>' ) | ( () otherlv_10= '>=' ) | ( () otherlv_12= '<' ) | ( () otherlv_14= '<=' ) ) ( (lv_rightOperand_15_0= ruleALSOverride ) ) )?
4325 int alt27=2;
4326 int LA27_0 = input.LA(1);
4327
4328 if ( (LA27_0==18||(LA27_0>=36 && LA27_0<=41)) ) {
4329 alt27=1;
4330 }
4331 switch (alt27) {
4332 case 1 :
4333 // InternalAlloyLanguage.g:1552:2: ( ( () otherlv_2= '=' ) | ( () otherlv_4= '!=' ) | ( () otherlv_6= 'in' ) | ( () otherlv_8= '>' ) | ( () otherlv_10= '>=' ) | ( () otherlv_12= '<' ) | ( () otherlv_14= '<=' ) ) ( (lv_rightOperand_15_0= ruleALSOverride ) )
4334 {
4335 // InternalAlloyLanguage.g:1552:2: ( ( () otherlv_2= '=' ) | ( () otherlv_4= '!=' ) | ( () otherlv_6= 'in' ) | ( () otherlv_8= '>' ) | ( () otherlv_10= '>=' ) | ( () otherlv_12= '<' ) | ( () otherlv_14= '<=' ) )
4336 int alt26=7;
4337 switch ( input.LA(1) ) {
4338 case 36:
4339 {
4340 alt26=1;
4341 }
4342 break;
4343 case 37:
4344 {
4345 alt26=2;
4346 }
4347 break;
4348 case 18:
4349 {
4350 alt26=3;
4351 }
4352 break;
4353 case 38:
4354 {
4355 alt26=4;
4356 }
4357 break;
4358 case 39:
4359 {
4360 alt26=5;
4361 }
4362 break;
4363 case 40:
4364 {
4365 alt26=6;
4366 }
4367 break;
4368 case 41:
4369 {
4370 alt26=7;
4371 }
4372 break;
4373 default:
4374 if (state.backtracking>0) {state.failed=true; return current;}
4375 NoViableAltException nvae =
4376 new NoViableAltException("", 26, 0, input);
4377
4378 throw nvae;
4379 }
4380
4381 switch (alt26) {
4382 case 1 :
4383 // InternalAlloyLanguage.g:1552:3: ( () otherlv_2= '=' )
4384 {
4385 // InternalAlloyLanguage.g:1552:3: ( () otherlv_2= '=' )
4386 // InternalAlloyLanguage.g:1552:4: () otherlv_2= '='
4387 {
4388 // InternalAlloyLanguage.g:1552:4: ()
4389 // InternalAlloyLanguage.g:1553:5:
4390 {
4391 if ( state.backtracking==0 ) {
4392
4393 current = forceCreateModelElementAndSet(
4394 grammarAccess.getALSComparisonAccess().getALSEqualsLeftOperandAction_1_0_0_0(),
4395 current);
4396
4397 }
4398
4399 }
4400
4401 otherlv_2=(Token)match(input,36,FOLLOW_12); if (state.failed) return current;
4402 if ( state.backtracking==0 ) {
4403
4404 newLeafNode(otherlv_2, grammarAccess.getALSComparisonAccess().getEqualsSignKeyword_1_0_0_1());
4405
4406 }
4407
4408 }
4409
4410
4411 }
4412 break;
4413 case 2 :
4414 // InternalAlloyLanguage.g:1563:6: ( () otherlv_4= '!=' )
4415 {
4416 // InternalAlloyLanguage.g:1563:6: ( () otherlv_4= '!=' )
4417 // InternalAlloyLanguage.g:1563:7: () otherlv_4= '!='
4418 {
4419 // InternalAlloyLanguage.g:1563:7: ()
4420 // InternalAlloyLanguage.g:1564:5:
4421 {
4422 if ( state.backtracking==0 ) {
4423
4424 current = forceCreateModelElementAndSet(
4425 grammarAccess.getALSComparisonAccess().getALSNotEqualsLeftOperandAction_1_0_1_0(),
4426 current);
4427
4428 }
4429
4430 }
4431
4432 otherlv_4=(Token)match(input,37,FOLLOW_12); if (state.failed) return current;
4433 if ( state.backtracking==0 ) {
4434
4435 newLeafNode(otherlv_4, grammarAccess.getALSComparisonAccess().getExclamationMarkEqualsSignKeyword_1_0_1_1());
4436
4437 }
4438
4439 }
4440
4441
4442 }
4443 break;
4444 case 3 :
4445 // InternalAlloyLanguage.g:1574:6: ( () otherlv_6= 'in' )
4446 {
4447 // InternalAlloyLanguage.g:1574:6: ( () otherlv_6= 'in' )
4448 // InternalAlloyLanguage.g:1574:7: () otherlv_6= 'in'
4449 {
4450 // InternalAlloyLanguage.g:1574:7: ()
4451 // InternalAlloyLanguage.g:1575:5:
4452 {
4453 if ( state.backtracking==0 ) {
4454
4455 current = forceCreateModelElementAndSet(
4456 grammarAccess.getALSComparisonAccess().getALSSubsetLeftOperandAction_1_0_2_0(),
4457 current);
4458
4459 }
4460
4461 }
4462
4463 otherlv_6=(Token)match(input,18,FOLLOW_12); if (state.failed) return current;
4464 if ( state.backtracking==0 ) {
4465
4466 newLeafNode(otherlv_6, grammarAccess.getALSComparisonAccess().getInKeyword_1_0_2_1());
4467
4468 }
4469
4470 }
4471
4472
4473 }
4474 break;
4475 case 4 :
4476 // InternalAlloyLanguage.g:1585:6: ( () otherlv_8= '>' )
4477 {
4478 // InternalAlloyLanguage.g:1585:6: ( () otherlv_8= '>' )
4479 // InternalAlloyLanguage.g:1585:7: () otherlv_8= '>'
4480 {
4481 // InternalAlloyLanguage.g:1585:7: ()
4482 // InternalAlloyLanguage.g:1586:5:
4483 {
4484 if ( state.backtracking==0 ) {
4485
4486 current = forceCreateModelElementAndSet(
4487 grammarAccess.getALSComparisonAccess().getALSLessLeftOperandAction_1_0_3_0(),
4488 current);
4489
4490 }
4491
4492 }
4493
4494 otherlv_8=(Token)match(input,38,FOLLOW_12); if (state.failed) return current;
4495 if ( state.backtracking==0 ) {
4496
4497 newLeafNode(otherlv_8, grammarAccess.getALSComparisonAccess().getGreaterThanSignKeyword_1_0_3_1());
4498
4499 }
4500
4501 }
4502
4503
4504 }
4505 break;
4506 case 5 :
4507 // InternalAlloyLanguage.g:1596:6: ( () otherlv_10= '>=' )
4508 {
4509 // InternalAlloyLanguage.g:1596:6: ( () otherlv_10= '>=' )
4510 // InternalAlloyLanguage.g:1596:7: () otherlv_10= '>='
4511 {
4512 // InternalAlloyLanguage.g:1596:7: ()
4513 // InternalAlloyLanguage.g:1597:5:
4514 {
4515 if ( state.backtracking==0 ) {
4516
4517 current = forceCreateModelElementAndSet(
4518 grammarAccess.getALSComparisonAccess().getALSLeqLeftOperandAction_1_0_4_0(),
4519 current);
4520
4521 }
4522
4523 }
4524
4525 otherlv_10=(Token)match(input,39,FOLLOW_12); if (state.failed) return current;
4526 if ( state.backtracking==0 ) {
4527
4528 newLeafNode(otherlv_10, grammarAccess.getALSComparisonAccess().getGreaterThanSignEqualsSignKeyword_1_0_4_1());
4529
4530 }
4531
4532 }
4533
4534
4535 }
4536 break;
4537 case 6 :
4538 // InternalAlloyLanguage.g:1607:6: ( () otherlv_12= '<' )
4539 {
4540 // InternalAlloyLanguage.g:1607:6: ( () otherlv_12= '<' )
4541 // InternalAlloyLanguage.g:1607:7: () otherlv_12= '<'
4542 {
4543 // InternalAlloyLanguage.g:1607:7: ()
4544 // InternalAlloyLanguage.g:1608:5:
4545 {
4546 if ( state.backtracking==0 ) {
4547
4548 current = forceCreateModelElementAndSet(
4549 grammarAccess.getALSComparisonAccess().getALSMoreLeftOperandAction_1_0_5_0(),
4550 current);
4551
4552 }
4553
4554 }
4555
4556 otherlv_12=(Token)match(input,40,FOLLOW_12); if (state.failed) return current;
4557 if ( state.backtracking==0 ) {
4558
4559 newLeafNode(otherlv_12, grammarAccess.getALSComparisonAccess().getLessThanSignKeyword_1_0_5_1());
4560
4561 }
4562
4563 }
4564
4565
4566 }
4567 break;
4568 case 7 :
4569 // InternalAlloyLanguage.g:1618:6: ( () otherlv_14= '<=' )
4570 {
4571 // InternalAlloyLanguage.g:1618:6: ( () otherlv_14= '<=' )
4572 // InternalAlloyLanguage.g:1618:7: () otherlv_14= '<='
4573 {
4574 // InternalAlloyLanguage.g:1618:7: ()
4575 // InternalAlloyLanguage.g:1619:5:
4576 {
4577 if ( state.backtracking==0 ) {
4578
4579 current = forceCreateModelElementAndSet(
4580 grammarAccess.getALSComparisonAccess().getALSMeqLeftOperandAction_1_0_6_0(),
4581 current);
4582
4583 }
4584
4585 }
4586
4587 otherlv_14=(Token)match(input,41,FOLLOW_12); if (state.failed) return current;
4588 if ( state.backtracking==0 ) {
4589
4590 newLeafNode(otherlv_14, grammarAccess.getALSComparisonAccess().getLessThanSignEqualsSignKeyword_1_0_6_1());
4591
4592 }
4593
4594 }
4595
4596
4597 }
4598 break;
4599
4600 }
4601
4602 // InternalAlloyLanguage.g:1628:3: ( (lv_rightOperand_15_0= ruleALSOverride ) )
4603 // InternalAlloyLanguage.g:1629:1: (lv_rightOperand_15_0= ruleALSOverride )
4604 {
4605 // InternalAlloyLanguage.g:1629:1: (lv_rightOperand_15_0= ruleALSOverride )
4606 // InternalAlloyLanguage.g:1630:3: lv_rightOperand_15_0= ruleALSOverride
4607 {
4608 if ( state.backtracking==0 ) {
4609
4610 newCompositeNode(grammarAccess.getALSComparisonAccess().getRightOperandALSOverrideParserRuleCall_1_1_0());
4611
4612 }
4613 pushFollow(FOLLOW_2);
4614 lv_rightOperand_15_0=ruleALSOverride();
4615
4616 state._fsp--;
4617 if (state.failed) return current;
4618 if ( state.backtracking==0 ) {
4619
4620 if (current==null) {
4621 current = createModelElementForParent(grammarAccess.getALSComparisonRule());
4622 }
4623 set(
4624 current,
4625 "rightOperand",
4626 lv_rightOperand_15_0,
4627 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSOverride");
4628 afterParserOrEnumRuleCall();
4629
4630 }
4631
4632 }
4633
4634
4635 }
4636
4637
4638 }
4639 break;
4640
4641 }
4642
4643
4644 }
4645
4646
4647 }
4648
4649 if ( state.backtracking==0 ) {
4650 leaveRule();
4651 }
4652 }
4653
4654 catch (RecognitionException re) {
4655 recover(input,re);
4656 appendSkippedTokens();
4657 }
4658 finally {
4659 }
4660 return current;
4661 }
4662 // $ANTLR end "ruleALSComparison"
4663
4664
4665 // $ANTLR start "entryRuleALSOverride"
4666 // InternalAlloyLanguage.g:1654:1: entryRuleALSOverride returns [EObject current=null] : iv_ruleALSOverride= ruleALSOverride EOF ;
4667 public final EObject entryRuleALSOverride() throws RecognitionException {
4668 EObject current = null;
4669
4670 EObject iv_ruleALSOverride = null;
4671
4672
4673 try {
4674 // InternalAlloyLanguage.g:1655:2: (iv_ruleALSOverride= ruleALSOverride EOF )
4675 // InternalAlloyLanguage.g:1656:2: iv_ruleALSOverride= ruleALSOverride EOF
4676 {
4677 if ( state.backtracking==0 ) {
4678 newCompositeNode(grammarAccess.getALSOverrideRule());
4679 }
4680 pushFollow(FOLLOW_1);
4681 iv_ruleALSOverride=ruleALSOverride();
4682
4683 state._fsp--;
4684 if (state.failed) return current;
4685 if ( state.backtracking==0 ) {
4686 current =iv_ruleALSOverride;
4687 }
4688 match(input,EOF,FOLLOW_2); if (state.failed) return current;
4689
4690 }
4691
4692 }
4693
4694 catch (RecognitionException re) {
4695 recover(input,re);
4696 appendSkippedTokens();
4697 }
4698 finally {
4699 }
4700 return current;
4701 }
4702 // $ANTLR end "entryRuleALSOverride"
4703
4704
4705 // $ANTLR start "ruleALSOverride"
4706 // InternalAlloyLanguage.g:1663:1: ruleALSOverride returns [EObject current=null] : (this_ALSRangeRestrictionRight_0= ruleALSRangeRestrictionRight ( () otherlv_2= '++' ( (lv_rightOperand_3_0= ruleALSRangeRestrictionRight ) ) )? ) ;
4707 public final EObject ruleALSOverride() throws RecognitionException {
4708 EObject current = null;
4709
4710 Token otherlv_2=null;
4711 EObject this_ALSRangeRestrictionRight_0 = null;
4712
4713 EObject lv_rightOperand_3_0 = null;
4714
4715
4716 enterRule();
4717
4718 try {
4719 // InternalAlloyLanguage.g:1666:28: ( (this_ALSRangeRestrictionRight_0= ruleALSRangeRestrictionRight ( () otherlv_2= '++' ( (lv_rightOperand_3_0= ruleALSRangeRestrictionRight ) ) )? ) )
4720 // InternalAlloyLanguage.g:1667:1: (this_ALSRangeRestrictionRight_0= ruleALSRangeRestrictionRight ( () otherlv_2= '++' ( (lv_rightOperand_3_0= ruleALSRangeRestrictionRight ) ) )? )
4721 {
4722 // InternalAlloyLanguage.g:1667:1: (this_ALSRangeRestrictionRight_0= ruleALSRangeRestrictionRight ( () otherlv_2= '++' ( (lv_rightOperand_3_0= ruleALSRangeRestrictionRight ) ) )? )
4723 // InternalAlloyLanguage.g:1668:5: this_ALSRangeRestrictionRight_0= ruleALSRangeRestrictionRight ( () otherlv_2= '++' ( (lv_rightOperand_3_0= ruleALSRangeRestrictionRight ) ) )?
4724 {
4725 if ( state.backtracking==0 ) {
4726
4727 newCompositeNode(grammarAccess.getALSOverrideAccess().getALSRangeRestrictionRightParserRuleCall_0());
4728
4729 }
4730 pushFollow(FOLLOW_25);
4731 this_ALSRangeRestrictionRight_0=ruleALSRangeRestrictionRight();
4732
4733 state._fsp--;
4734 if (state.failed) return current;
4735 if ( state.backtracking==0 ) {
4736
4737 current = this_ALSRangeRestrictionRight_0;
4738 afterParserOrEnumRuleCall();
4739
4740 }
4741 // InternalAlloyLanguage.g:1676:1: ( () otherlv_2= '++' ( (lv_rightOperand_3_0= ruleALSRangeRestrictionRight ) ) )?
4742 int alt28=2;
4743 int LA28_0 = input.LA(1);
4744
4745 if ( (LA28_0==42) ) {
4746 alt28=1;
4747 }
4748 switch (alt28) {
4749 case 1 :
4750 // InternalAlloyLanguage.g:1676:2: () otherlv_2= '++' ( (lv_rightOperand_3_0= ruleALSRangeRestrictionRight ) )
4751 {
4752 // InternalAlloyLanguage.g:1676:2: ()
4753 // InternalAlloyLanguage.g:1677:5:
4754 {
4755 if ( state.backtracking==0 ) {
4756
4757 current = forceCreateModelElementAndSet(
4758 grammarAccess.getALSOverrideAccess().getALSOverrideLeftOperandAction_1_0(),
4759 current);
4760
4761 }
4762
4763 }
4764
4765 otherlv_2=(Token)match(input,42,FOLLOW_12); if (state.failed) return current;
4766 if ( state.backtracking==0 ) {
4767
4768 newLeafNode(otherlv_2, grammarAccess.getALSOverrideAccess().getPlusSignPlusSignKeyword_1_1());
4769
4770 }
4771 // InternalAlloyLanguage.g:1686:1: ( (lv_rightOperand_3_0= ruleALSRangeRestrictionRight ) )
4772 // InternalAlloyLanguage.g:1687:1: (lv_rightOperand_3_0= ruleALSRangeRestrictionRight )
4773 {
4774 // InternalAlloyLanguage.g:1687:1: (lv_rightOperand_3_0= ruleALSRangeRestrictionRight )
4775 // InternalAlloyLanguage.g:1688:3: lv_rightOperand_3_0= ruleALSRangeRestrictionRight
4776 {
4777 if ( state.backtracking==0 ) {
4778
4779 newCompositeNode(grammarAccess.getALSOverrideAccess().getRightOperandALSRangeRestrictionRightParserRuleCall_1_2_0());
4780
4781 }
4782 pushFollow(FOLLOW_2);
4783 lv_rightOperand_3_0=ruleALSRangeRestrictionRight();
4784
4785 state._fsp--;
4786 if (state.failed) return current;
4787 if ( state.backtracking==0 ) {
4788
4789 if (current==null) {
4790 current = createModelElementForParent(grammarAccess.getALSOverrideRule());
4791 }
4792 set(
4793 current,
4794 "rightOperand",
4795 lv_rightOperand_3_0,
4796 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSRangeRestrictionRight");
4797 afterParserOrEnumRuleCall();
4798
4799 }
4800
4801 }
4802
4803
4804 }
4805
4806
4807 }
4808 break;
4809
4810 }
4811
4812
4813 }
4814
4815
4816 }
4817
4818 if ( state.backtracking==0 ) {
4819 leaveRule();
4820 }
4821 }
4822
4823 catch (RecognitionException re) {
4824 recover(input,re);
4825 appendSkippedTokens();
4826 }
4827 finally {
4828 }
4829 return current;
4830 }
4831 // $ANTLR end "ruleALSOverride"
4832
4833
4834 // $ANTLR start "entryRuleALSRangeRestrictionRight"
4835 // InternalAlloyLanguage.g:1712:1: entryRuleALSRangeRestrictionRight returns [EObject current=null] : iv_ruleALSRangeRestrictionRight= ruleALSRangeRestrictionRight EOF ;
4836 public final EObject entryRuleALSRangeRestrictionRight() throws RecognitionException {
4837 EObject current = null;
4838
4839 EObject iv_ruleALSRangeRestrictionRight = null;
4840
4841
4842 try {
4843 // InternalAlloyLanguage.g:1713:2: (iv_ruleALSRangeRestrictionRight= ruleALSRangeRestrictionRight EOF )
4844 // InternalAlloyLanguage.g:1714:2: iv_ruleALSRangeRestrictionRight= ruleALSRangeRestrictionRight EOF
4845 {
4846 if ( state.backtracking==0 ) {
4847 newCompositeNode(grammarAccess.getALSRangeRestrictionRightRule());
4848 }
4849 pushFollow(FOLLOW_1);
4850 iv_ruleALSRangeRestrictionRight=ruleALSRangeRestrictionRight();
4851
4852 state._fsp--;
4853 if (state.failed) return current;
4854 if ( state.backtracking==0 ) {
4855 current =iv_ruleALSRangeRestrictionRight;
4856 }
4857 match(input,EOF,FOLLOW_2); if (state.failed) return current;
4858
4859 }
4860
4861 }
4862
4863 catch (RecognitionException re) {
4864 recover(input,re);
4865 appendSkippedTokens();
4866 }
4867 finally {
4868 }
4869 return current;
4870 }
4871 // $ANTLR end "entryRuleALSRangeRestrictionRight"
4872
4873
4874 // $ANTLR start "ruleALSRangeRestrictionRight"
4875 // InternalAlloyLanguage.g:1721:1: ruleALSRangeRestrictionRight returns [EObject current=null] : (this_ALSRangeRestrictionLeft_0= ruleALSRangeRestrictionLeft ( () otherlv_2= ':>' ( (lv_filter_3_0= ruleALSRangeRestrictionLeft ) ) )? ) ;
4876 public final EObject ruleALSRangeRestrictionRight() throws RecognitionException {
4877 EObject current = null;
4878
4879 Token otherlv_2=null;
4880 EObject this_ALSRangeRestrictionLeft_0 = null;
4881
4882 EObject lv_filter_3_0 = null;
4883
4884
4885 enterRule();
4886
4887 try {
4888 // InternalAlloyLanguage.g:1724:28: ( (this_ALSRangeRestrictionLeft_0= ruleALSRangeRestrictionLeft ( () otherlv_2= ':>' ( (lv_filter_3_0= ruleALSRangeRestrictionLeft ) ) )? ) )
4889 // InternalAlloyLanguage.g:1725:1: (this_ALSRangeRestrictionLeft_0= ruleALSRangeRestrictionLeft ( () otherlv_2= ':>' ( (lv_filter_3_0= ruleALSRangeRestrictionLeft ) ) )? )
4890 {
4891 // InternalAlloyLanguage.g:1725:1: (this_ALSRangeRestrictionLeft_0= ruleALSRangeRestrictionLeft ( () otherlv_2= ':>' ( (lv_filter_3_0= ruleALSRangeRestrictionLeft ) ) )? )
4892 // InternalAlloyLanguage.g:1726:5: this_ALSRangeRestrictionLeft_0= ruleALSRangeRestrictionLeft ( () otherlv_2= ':>' ( (lv_filter_3_0= ruleALSRangeRestrictionLeft ) ) )?
4893 {
4894 if ( state.backtracking==0 ) {
4895
4896 newCompositeNode(grammarAccess.getALSRangeRestrictionRightAccess().getALSRangeRestrictionLeftParserRuleCall_0());
4897
4898 }
4899 pushFollow(FOLLOW_26);
4900 this_ALSRangeRestrictionLeft_0=ruleALSRangeRestrictionLeft();
4901
4902 state._fsp--;
4903 if (state.failed) return current;
4904 if ( state.backtracking==0 ) {
4905
4906 current = this_ALSRangeRestrictionLeft_0;
4907 afterParserOrEnumRuleCall();
4908
4909 }
4910 // InternalAlloyLanguage.g:1734:1: ( () otherlv_2= ':>' ( (lv_filter_3_0= ruleALSRangeRestrictionLeft ) ) )?
4911 int alt29=2;
4912 int LA29_0 = input.LA(1);
4913
4914 if ( (LA29_0==43) ) {
4915 alt29=1;
4916 }
4917 switch (alt29) {
4918 case 1 :
4919 // InternalAlloyLanguage.g:1734:2: () otherlv_2= ':>' ( (lv_filter_3_0= ruleALSRangeRestrictionLeft ) )
4920 {
4921 // InternalAlloyLanguage.g:1734:2: ()
4922 // InternalAlloyLanguage.g:1735:5:
4923 {
4924 if ( state.backtracking==0 ) {
4925
4926 current = forceCreateModelElementAndSet(
4927 grammarAccess.getALSRangeRestrictionRightAccess().getALSRangeRestrictionRightRelationAction_1_0(),
4928 current);
4929
4930 }
4931
4932 }
4933
4934 otherlv_2=(Token)match(input,43,FOLLOW_12); if (state.failed) return current;
4935 if ( state.backtracking==0 ) {
4936
4937 newLeafNode(otherlv_2, grammarAccess.getALSRangeRestrictionRightAccess().getColonGreaterThanSignKeyword_1_1());
4938
4939 }
4940 // InternalAlloyLanguage.g:1744:1: ( (lv_filter_3_0= ruleALSRangeRestrictionLeft ) )
4941 // InternalAlloyLanguage.g:1745:1: (lv_filter_3_0= ruleALSRangeRestrictionLeft )
4942 {
4943 // InternalAlloyLanguage.g:1745:1: (lv_filter_3_0= ruleALSRangeRestrictionLeft )
4944 // InternalAlloyLanguage.g:1746:3: lv_filter_3_0= ruleALSRangeRestrictionLeft
4945 {
4946 if ( state.backtracking==0 ) {
4947
4948 newCompositeNode(grammarAccess.getALSRangeRestrictionRightAccess().getFilterALSRangeRestrictionLeftParserRuleCall_1_2_0());
4949
4950 }
4951 pushFollow(FOLLOW_2);
4952 lv_filter_3_0=ruleALSRangeRestrictionLeft();
4953
4954 state._fsp--;
4955 if (state.failed) return current;
4956 if ( state.backtracking==0 ) {
4957
4958 if (current==null) {
4959 current = createModelElementForParent(grammarAccess.getALSRangeRestrictionRightRule());
4960 }
4961 set(
4962 current,
4963 "filter",
4964 lv_filter_3_0,
4965 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSRangeRestrictionLeft");
4966 afterParserOrEnumRuleCall();
4967
4968 }
4969
4970 }
4971
4972
4973 }
4974
4975
4976 }
4977 break;
4978
4979 }
4980
4981
4982 }
4983
4984
4985 }
4986
4987 if ( state.backtracking==0 ) {
4988 leaveRule();
4989 }
4990 }
4991
4992 catch (RecognitionException re) {
4993 recover(input,re);
4994 appendSkippedTokens();
4995 }
4996 finally {
4997 }
4998 return current;
4999 }
5000 // $ANTLR end "ruleALSRangeRestrictionRight"
5001
5002
5003 // $ANTLR start "entryRuleALSRangeRestrictionLeft"
5004 // InternalAlloyLanguage.g:1770:1: entryRuleALSRangeRestrictionLeft returns [EObject current=null] : iv_ruleALSRangeRestrictionLeft= ruleALSRangeRestrictionLeft EOF ;
5005 public final EObject entryRuleALSRangeRestrictionLeft() throws RecognitionException {
5006 EObject current = null;
5007
5008 EObject iv_ruleALSRangeRestrictionLeft = null;
5009
5010
5011 try {
5012 // InternalAlloyLanguage.g:1771:2: (iv_ruleALSRangeRestrictionLeft= ruleALSRangeRestrictionLeft EOF )
5013 // InternalAlloyLanguage.g:1772:2: iv_ruleALSRangeRestrictionLeft= ruleALSRangeRestrictionLeft EOF
5014 {
5015 if ( state.backtracking==0 ) {
5016 newCompositeNode(grammarAccess.getALSRangeRestrictionLeftRule());
5017 }
5018 pushFollow(FOLLOW_1);
5019 iv_ruleALSRangeRestrictionLeft=ruleALSRangeRestrictionLeft();
5020
5021 state._fsp--;
5022 if (state.failed) return current;
5023 if ( state.backtracking==0 ) {
5024 current =iv_ruleALSRangeRestrictionLeft;
5025 }
5026 match(input,EOF,FOLLOW_2); if (state.failed) return current;
5027
5028 }
5029
5030 }
5031
5032 catch (RecognitionException re) {
5033 recover(input,re);
5034 appendSkippedTokens();
5035 }
5036 finally {
5037 }
5038 return current;
5039 }
5040 // $ANTLR end "entryRuleALSRangeRestrictionLeft"
5041
5042
5043 // $ANTLR start "ruleALSRangeRestrictionLeft"
5044 // InternalAlloyLanguage.g:1779:1: ruleALSRangeRestrictionLeft returns [EObject current=null] : (this_ALSJoin_0= ruleALSJoin ( () otherlv_2= '<:' ( (lv_relation_3_0= ruleALSJoin ) ) )? ) ;
5045 public final EObject ruleALSRangeRestrictionLeft() throws RecognitionException {
5046 EObject current = null;
5047
5048 Token otherlv_2=null;
5049 EObject this_ALSJoin_0 = null;
5050
5051 EObject lv_relation_3_0 = null;
5052
5053
5054 enterRule();
5055
5056 try {
5057 // InternalAlloyLanguage.g:1782:28: ( (this_ALSJoin_0= ruleALSJoin ( () otherlv_2= '<:' ( (lv_relation_3_0= ruleALSJoin ) ) )? ) )
5058 // InternalAlloyLanguage.g:1783:1: (this_ALSJoin_0= ruleALSJoin ( () otherlv_2= '<:' ( (lv_relation_3_0= ruleALSJoin ) ) )? )
5059 {
5060 // InternalAlloyLanguage.g:1783:1: (this_ALSJoin_0= ruleALSJoin ( () otherlv_2= '<:' ( (lv_relation_3_0= ruleALSJoin ) ) )? )
5061 // InternalAlloyLanguage.g:1784:5: this_ALSJoin_0= ruleALSJoin ( () otherlv_2= '<:' ( (lv_relation_3_0= ruleALSJoin ) ) )?
5062 {
5063 if ( state.backtracking==0 ) {
5064
5065 newCompositeNode(grammarAccess.getALSRangeRestrictionLeftAccess().getALSJoinParserRuleCall_0());
5066
5067 }
5068 pushFollow(FOLLOW_27);
5069 this_ALSJoin_0=ruleALSJoin();
5070
5071 state._fsp--;
5072 if (state.failed) return current;
5073 if ( state.backtracking==0 ) {
5074
5075 current = this_ALSJoin_0;
5076 afterParserOrEnumRuleCall();
5077
5078 }
5079 // InternalAlloyLanguage.g:1792:1: ( () otherlv_2= '<:' ( (lv_relation_3_0= ruleALSJoin ) ) )?
5080 int alt30=2;
5081 int LA30_0 = input.LA(1);
5082
5083 if ( (LA30_0==44) ) {
5084 alt30=1;
5085 }
5086 switch (alt30) {
5087 case 1 :
5088 // InternalAlloyLanguage.g:1792:2: () otherlv_2= '<:' ( (lv_relation_3_0= ruleALSJoin ) )
5089 {
5090 // InternalAlloyLanguage.g:1792:2: ()
5091 // InternalAlloyLanguage.g:1793:5:
5092 {
5093 if ( state.backtracking==0 ) {
5094
5095 current = forceCreateModelElementAndSet(
5096 grammarAccess.getALSRangeRestrictionLeftAccess().getALSRangeRestrictionLeftFilterAction_1_0(),
5097 current);
5098
5099 }
5100
5101 }
5102
5103 otherlv_2=(Token)match(input,44,FOLLOW_12); if (state.failed) return current;
5104 if ( state.backtracking==0 ) {
5105
5106 newLeafNode(otherlv_2, grammarAccess.getALSRangeRestrictionLeftAccess().getLessThanSignColonKeyword_1_1());
5107
5108 }
5109 // InternalAlloyLanguage.g:1802:1: ( (lv_relation_3_0= ruleALSJoin ) )
5110 // InternalAlloyLanguage.g:1803:1: (lv_relation_3_0= ruleALSJoin )
5111 {
5112 // InternalAlloyLanguage.g:1803:1: (lv_relation_3_0= ruleALSJoin )
5113 // InternalAlloyLanguage.g:1804:3: lv_relation_3_0= ruleALSJoin
5114 {
5115 if ( state.backtracking==0 ) {
5116
5117 newCompositeNode(grammarAccess.getALSRangeRestrictionLeftAccess().getRelationALSJoinParserRuleCall_1_2_0());
5118
5119 }
5120 pushFollow(FOLLOW_2);
5121 lv_relation_3_0=ruleALSJoin();
5122
5123 state._fsp--;
5124 if (state.failed) return current;
5125 if ( state.backtracking==0 ) {
5126
5127 if (current==null) {
5128 current = createModelElementForParent(grammarAccess.getALSRangeRestrictionLeftRule());
5129 }
5130 set(
5131 current,
5132 "relation",
5133 lv_relation_3_0,
5134 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSJoin");
5135 afterParserOrEnumRuleCall();
5136
5137 }
5138
5139 }
5140
5141
5142 }
5143
5144
5145 }
5146 break;
5147
5148 }
5149
5150
5151 }
5152
5153
5154 }
5155
5156 if ( state.backtracking==0 ) {
5157 leaveRule();
5158 }
5159 }
5160
5161 catch (RecognitionException re) {
5162 recover(input,re);
5163 appendSkippedTokens();
5164 }
5165 finally {
5166 }
5167 return current;
5168 }
5169 // $ANTLR end "ruleALSRangeRestrictionLeft"
5170
5171
5172 // $ANTLR start "entryRuleALSJoin"
5173 // InternalAlloyLanguage.g:1828:1: entryRuleALSJoin returns [EObject current=null] : iv_ruleALSJoin= ruleALSJoin EOF ;
5174 public final EObject entryRuleALSJoin() throws RecognitionException {
5175 EObject current = null;
5176
5177 EObject iv_ruleALSJoin = null;
5178
5179
5180 try {
5181 // InternalAlloyLanguage.g:1829:2: (iv_ruleALSJoin= ruleALSJoin EOF )
5182 // InternalAlloyLanguage.g:1830:2: iv_ruleALSJoin= ruleALSJoin EOF
5183 {
5184 if ( state.backtracking==0 ) {
5185 newCompositeNode(grammarAccess.getALSJoinRule());
5186 }
5187 pushFollow(FOLLOW_1);
5188 iv_ruleALSJoin=ruleALSJoin();
5189
5190 state._fsp--;
5191 if (state.failed) return current;
5192 if ( state.backtracking==0 ) {
5193 current =iv_ruleALSJoin;
5194 }
5195 match(input,EOF,FOLLOW_2); if (state.failed) return current;
5196
5197 }
5198
5199 }
5200
5201 catch (RecognitionException re) {
5202 recover(input,re);
5203 appendSkippedTokens();
5204 }
5205 finally {
5206 }
5207 return current;
5208 }
5209 // $ANTLR end "entryRuleALSJoin"
5210
5211
5212 // $ANTLR start "ruleALSJoin"
5213 // InternalAlloyLanguage.g:1837:1: ruleALSJoin returns [EObject current=null] : (this_ALSMinus_0= ruleALSMinus ( () otherlv_2= '.' ( (lv_rightOperand_3_0= ruleALSMinus ) ) )* ) ;
5214 public final EObject ruleALSJoin() throws RecognitionException {
5215 EObject current = null;
5216
5217 Token otherlv_2=null;
5218 EObject this_ALSMinus_0 = null;
5219
5220 EObject lv_rightOperand_3_0 = null;
5221
5222
5223 enterRule();
5224
5225 try {
5226 // InternalAlloyLanguage.g:1840:28: ( (this_ALSMinus_0= ruleALSMinus ( () otherlv_2= '.' ( (lv_rightOperand_3_0= ruleALSMinus ) ) )* ) )
5227 // InternalAlloyLanguage.g:1841:1: (this_ALSMinus_0= ruleALSMinus ( () otherlv_2= '.' ( (lv_rightOperand_3_0= ruleALSMinus ) ) )* )
5228 {
5229 // InternalAlloyLanguage.g:1841:1: (this_ALSMinus_0= ruleALSMinus ( () otherlv_2= '.' ( (lv_rightOperand_3_0= ruleALSMinus ) ) )* )
5230 // InternalAlloyLanguage.g:1842:5: this_ALSMinus_0= ruleALSMinus ( () otherlv_2= '.' ( (lv_rightOperand_3_0= ruleALSMinus ) ) )*
5231 {
5232 if ( state.backtracking==0 ) {
5233
5234 newCompositeNode(grammarAccess.getALSJoinAccess().getALSMinusParserRuleCall_0());
5235
5236 }
5237 pushFollow(FOLLOW_28);
5238 this_ALSMinus_0=ruleALSMinus();
5239
5240 state._fsp--;
5241 if (state.failed) return current;
5242 if ( state.backtracking==0 ) {
5243
5244 current = this_ALSMinus_0;
5245 afterParserOrEnumRuleCall();
5246
5247 }
5248 // InternalAlloyLanguage.g:1850:1: ( () otherlv_2= '.' ( (lv_rightOperand_3_0= ruleALSMinus ) ) )*
5249 loop31:
5250 do {
5251 int alt31=2;
5252 int LA31_0 = input.LA(1);
5253
5254 if ( (LA31_0==45) ) {
5255 alt31=1;
5256 }
5257
5258
5259 switch (alt31) {
5260 case 1 :
5261 // InternalAlloyLanguage.g:1850:2: () otherlv_2= '.' ( (lv_rightOperand_3_0= ruleALSMinus ) )
5262 {
5263 // InternalAlloyLanguage.g:1850:2: ()
5264 // InternalAlloyLanguage.g:1851:5:
5265 {
5266 if ( state.backtracking==0 ) {
5267
5268 current = forceCreateModelElementAndSet(
5269 grammarAccess.getALSJoinAccess().getALSJoinLeftOperandAction_1_0(),
5270 current);
5271
5272 }
5273
5274 }
5275
5276 otherlv_2=(Token)match(input,45,FOLLOW_12); if (state.failed) return current;
5277 if ( state.backtracking==0 ) {
5278
5279 newLeafNode(otherlv_2, grammarAccess.getALSJoinAccess().getFullStopKeyword_1_1());
5280
5281 }
5282 // InternalAlloyLanguage.g:1860:1: ( (lv_rightOperand_3_0= ruleALSMinus ) )
5283 // InternalAlloyLanguage.g:1861:1: (lv_rightOperand_3_0= ruleALSMinus )
5284 {
5285 // InternalAlloyLanguage.g:1861:1: (lv_rightOperand_3_0= ruleALSMinus )
5286 // InternalAlloyLanguage.g:1862:3: lv_rightOperand_3_0= ruleALSMinus
5287 {
5288 if ( state.backtracking==0 ) {
5289
5290 newCompositeNode(grammarAccess.getALSJoinAccess().getRightOperandALSMinusParserRuleCall_1_2_0());
5291
5292 }
5293 pushFollow(FOLLOW_28);
5294 lv_rightOperand_3_0=ruleALSMinus();
5295
5296 state._fsp--;
5297 if (state.failed) return current;
5298 if ( state.backtracking==0 ) {
5299
5300 if (current==null) {
5301 current = createModelElementForParent(grammarAccess.getALSJoinRule());
5302 }
5303 set(
5304 current,
5305 "rightOperand",
5306 lv_rightOperand_3_0,
5307 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMinus");
5308 afterParserOrEnumRuleCall();
5309
5310 }
5311
5312 }
5313
5314
5315 }
5316
5317
5318 }
5319 break;
5320
5321 default :
5322 break loop31;
5323 }
5324 } while (true);
5325
5326
5327 }
5328
5329
5330 }
5331
5332 if ( state.backtracking==0 ) {
5333 leaveRule();
5334 }
5335 }
5336
5337 catch (RecognitionException re) {
5338 recover(input,re);
5339 appendSkippedTokens();
5340 }
5341 finally {
5342 }
5343 return current;
5344 }
5345 // $ANTLR end "ruleALSJoin"
5346
5347
5348 // $ANTLR start "entryRuleALSMinus"
5349 // InternalAlloyLanguage.g:1886:1: entryRuleALSMinus returns [EObject current=null] : iv_ruleALSMinus= ruleALSMinus EOF ;
5350 public final EObject entryRuleALSMinus() throws RecognitionException {
5351 EObject current = null;
5352
5353 EObject iv_ruleALSMinus = null;
5354
5355
5356 try {
5357 // InternalAlloyLanguage.g:1887:2: (iv_ruleALSMinus= ruleALSMinus EOF )
5358 // InternalAlloyLanguage.g:1888:2: iv_ruleALSMinus= ruleALSMinus EOF
5359 {
5360 if ( state.backtracking==0 ) {
5361 newCompositeNode(grammarAccess.getALSMinusRule());
5362 }
5363 pushFollow(FOLLOW_1);
5364 iv_ruleALSMinus=ruleALSMinus();
5365
5366 state._fsp--;
5367 if (state.failed) return current;
5368 if ( state.backtracking==0 ) {
5369 current =iv_ruleALSMinus;
5370 }
5371 match(input,EOF,FOLLOW_2); if (state.failed) return current;
5372
5373 }
5374
5375 }
5376
5377 catch (RecognitionException re) {
5378 recover(input,re);
5379 appendSkippedTokens();
5380 }
5381 finally {
5382 }
5383 return current;
5384 }
5385 // $ANTLR end "entryRuleALSMinus"
5386
5387
5388 // $ANTLR start "ruleALSMinus"
5389 // InternalAlloyLanguage.g:1895:1: ruleALSMinus returns [EObject current=null] : (this_ALSPlus_0= ruleALSPlus ( () otherlv_2= '-' ( (lv_rightOperand_3_0= ruleALSPlus ) ) )* ) ;
5390 public final EObject ruleALSMinus() throws RecognitionException {
5391 EObject current = null;
5392
5393 Token otherlv_2=null;
5394 EObject this_ALSPlus_0 = null;
5395
5396 EObject lv_rightOperand_3_0 = null;
5397
5398
5399 enterRule();
5400
5401 try {
5402 // InternalAlloyLanguage.g:1898:28: ( (this_ALSPlus_0= ruleALSPlus ( () otherlv_2= '-' ( (lv_rightOperand_3_0= ruleALSPlus ) ) )* ) )
5403 // InternalAlloyLanguage.g:1899:1: (this_ALSPlus_0= ruleALSPlus ( () otherlv_2= '-' ( (lv_rightOperand_3_0= ruleALSPlus ) ) )* )
5404 {
5405 // InternalAlloyLanguage.g:1899:1: (this_ALSPlus_0= ruleALSPlus ( () otherlv_2= '-' ( (lv_rightOperand_3_0= ruleALSPlus ) ) )* )
5406 // InternalAlloyLanguage.g:1900:5: this_ALSPlus_0= ruleALSPlus ( () otherlv_2= '-' ( (lv_rightOperand_3_0= ruleALSPlus ) ) )*
5407 {
5408 if ( state.backtracking==0 ) {
5409
5410 newCompositeNode(grammarAccess.getALSMinusAccess().getALSPlusParserRuleCall_0());
5411
5412 }
5413 pushFollow(FOLLOW_29);
5414 this_ALSPlus_0=ruleALSPlus();
5415
5416 state._fsp--;
5417 if (state.failed) return current;
5418 if ( state.backtracking==0 ) {
5419
5420 current = this_ALSPlus_0;
5421 afterParserOrEnumRuleCall();
5422
5423 }
5424 // InternalAlloyLanguage.g:1908:1: ( () otherlv_2= '-' ( (lv_rightOperand_3_0= ruleALSPlus ) ) )*
5425 loop32:
5426 do {
5427 int alt32=2;
5428 int LA32_0 = input.LA(1);
5429
5430 if ( (LA32_0==46) ) {
5431 alt32=1;
5432 }
5433
5434
5435 switch (alt32) {
5436 case 1 :
5437 // InternalAlloyLanguage.g:1908:2: () otherlv_2= '-' ( (lv_rightOperand_3_0= ruleALSPlus ) )
5438 {
5439 // InternalAlloyLanguage.g:1908:2: ()
5440 // InternalAlloyLanguage.g:1909:5:
5441 {
5442 if ( state.backtracking==0 ) {
5443
5444 current = forceCreateModelElementAndSet(
5445 grammarAccess.getALSMinusAccess().getALSMinusLeftOperandAction_1_0(),
5446 current);
5447
5448 }
5449
5450 }
5451
5452 otherlv_2=(Token)match(input,46,FOLLOW_12); if (state.failed) return current;
5453 if ( state.backtracking==0 ) {
5454
5455 newLeafNode(otherlv_2, grammarAccess.getALSMinusAccess().getHyphenMinusKeyword_1_1());
5456
5457 }
5458 // InternalAlloyLanguage.g:1918:1: ( (lv_rightOperand_3_0= ruleALSPlus ) )
5459 // InternalAlloyLanguage.g:1919:1: (lv_rightOperand_3_0= ruleALSPlus )
5460 {
5461 // InternalAlloyLanguage.g:1919:1: (lv_rightOperand_3_0= ruleALSPlus )
5462 // InternalAlloyLanguage.g:1920:3: lv_rightOperand_3_0= ruleALSPlus
5463 {
5464 if ( state.backtracking==0 ) {
5465
5466 newCompositeNode(grammarAccess.getALSMinusAccess().getRightOperandALSPlusParserRuleCall_1_2_0());
5467
5468 }
5469 pushFollow(FOLLOW_29);
5470 lv_rightOperand_3_0=ruleALSPlus();
5471
5472 state._fsp--;
5473 if (state.failed) return current;
5474 if ( state.backtracking==0 ) {
5475
5476 if (current==null) {
5477 current = createModelElementForParent(grammarAccess.getALSMinusRule());
5478 }
5479 set(
5480 current,
5481 "rightOperand",
5482 lv_rightOperand_3_0,
5483 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSPlus");
5484 afterParserOrEnumRuleCall();
5485
5486 }
5487
5488 }
5489
5490
5491 }
5492
5493
5494 }
5495 break;
5496
5497 default :
5498 break loop32;
5499 }
5500 } while (true);
5501
5502
5503 }
5504
5505
5506 }
5507
5508 if ( state.backtracking==0 ) {
5509 leaveRule();
5510 }
5511 }
5512
5513 catch (RecognitionException re) {
5514 recover(input,re);
5515 appendSkippedTokens();
5516 }
5517 finally {
5518 }
5519 return current;
5520 }
5521 // $ANTLR end "ruleALSMinus"
5522
5523
5524 // $ANTLR start "entryRuleALSPlus"
5525 // InternalAlloyLanguage.g:1944:1: entryRuleALSPlus returns [EObject current=null] : iv_ruleALSPlus= ruleALSPlus EOF ;
5526 public final EObject entryRuleALSPlus() throws RecognitionException {
5527 EObject current = null;
5528
5529 EObject iv_ruleALSPlus = null;
5530
5531
5532 try {
5533 // InternalAlloyLanguage.g:1945:2: (iv_ruleALSPlus= ruleALSPlus EOF )
5534 // InternalAlloyLanguage.g:1946:2: iv_ruleALSPlus= ruleALSPlus EOF
5535 {
5536 if ( state.backtracking==0 ) {
5537 newCompositeNode(grammarAccess.getALSPlusRule());
5538 }
5539 pushFollow(FOLLOW_1);
5540 iv_ruleALSPlus=ruleALSPlus();
5541
5542 state._fsp--;
5543 if (state.failed) return current;
5544 if ( state.backtracking==0 ) {
5545 current =iv_ruleALSPlus;
5546 }
5547 match(input,EOF,FOLLOW_2); if (state.failed) return current;
5548
5549 }
5550
5551 }
5552
5553 catch (RecognitionException re) {
5554 recover(input,re);
5555 appendSkippedTokens();
5556 }
5557 finally {
5558 }
5559 return current;
5560 }
5561 // $ANTLR end "entryRuleALSPlus"
5562
5563
5564 // $ANTLR start "ruleALSPlus"
5565 // InternalAlloyLanguage.g:1953:1: ruleALSPlus returns [EObject current=null] : (this_ALSIntersection_0= ruleALSIntersection ( () otherlv_2= '+' ( (lv_rightOperand_3_0= ruleALSIntersection ) ) )* ) ;
5566 public final EObject ruleALSPlus() throws RecognitionException {
5567 EObject current = null;
5568
5569 Token otherlv_2=null;
5570 EObject this_ALSIntersection_0 = null;
5571
5572 EObject lv_rightOperand_3_0 = null;
5573
5574
5575 enterRule();
5576
5577 try {
5578 // InternalAlloyLanguage.g:1956:28: ( (this_ALSIntersection_0= ruleALSIntersection ( () otherlv_2= '+' ( (lv_rightOperand_3_0= ruleALSIntersection ) ) )* ) )
5579 // InternalAlloyLanguage.g:1957:1: (this_ALSIntersection_0= ruleALSIntersection ( () otherlv_2= '+' ( (lv_rightOperand_3_0= ruleALSIntersection ) ) )* )
5580 {
5581 // InternalAlloyLanguage.g:1957:1: (this_ALSIntersection_0= ruleALSIntersection ( () otherlv_2= '+' ( (lv_rightOperand_3_0= ruleALSIntersection ) ) )* )
5582 // InternalAlloyLanguage.g:1958:5: this_ALSIntersection_0= ruleALSIntersection ( () otherlv_2= '+' ( (lv_rightOperand_3_0= ruleALSIntersection ) ) )*
5583 {
5584 if ( state.backtracking==0 ) {
5585
5586 newCompositeNode(grammarAccess.getALSPlusAccess().getALSIntersectionParserRuleCall_0());
5587
5588 }
5589 pushFollow(FOLLOW_30);
5590 this_ALSIntersection_0=ruleALSIntersection();
5591
5592 state._fsp--;
5593 if (state.failed) return current;
5594 if ( state.backtracking==0 ) {
5595
5596 current = this_ALSIntersection_0;
5597 afterParserOrEnumRuleCall();
5598
5599 }
5600 // InternalAlloyLanguage.g:1966:1: ( () otherlv_2= '+' ( (lv_rightOperand_3_0= ruleALSIntersection ) ) )*
5601 loop33:
5602 do {
5603 int alt33=2;
5604 int LA33_0 = input.LA(1);
5605
5606 if ( (LA33_0==19) ) {
5607 alt33=1;
5608 }
5609
5610
5611 switch (alt33) {
5612 case 1 :
5613 // InternalAlloyLanguage.g:1966:2: () otherlv_2= '+' ( (lv_rightOperand_3_0= ruleALSIntersection ) )
5614 {
5615 // InternalAlloyLanguage.g:1966:2: ()
5616 // InternalAlloyLanguage.g:1967:5:
5617 {
5618 if ( state.backtracking==0 ) {
5619
5620 current = forceCreateModelElementAndSet(
5621 grammarAccess.getALSPlusAccess().getALSPlusLeftOperandAction_1_0(),
5622 current);
5623
5624 }
5625
5626 }
5627
5628 otherlv_2=(Token)match(input,19,FOLLOW_12); if (state.failed) return current;
5629 if ( state.backtracking==0 ) {
5630
5631 newLeafNode(otherlv_2, grammarAccess.getALSPlusAccess().getPlusSignKeyword_1_1());
5632
5633 }
5634 // InternalAlloyLanguage.g:1976:1: ( (lv_rightOperand_3_0= ruleALSIntersection ) )
5635 // InternalAlloyLanguage.g:1977:1: (lv_rightOperand_3_0= ruleALSIntersection )
5636 {
5637 // InternalAlloyLanguage.g:1977:1: (lv_rightOperand_3_0= ruleALSIntersection )
5638 // InternalAlloyLanguage.g:1978:3: lv_rightOperand_3_0= ruleALSIntersection
5639 {
5640 if ( state.backtracking==0 ) {
5641
5642 newCompositeNode(grammarAccess.getALSPlusAccess().getRightOperandALSIntersectionParserRuleCall_1_2_0());
5643
5644 }
5645 pushFollow(FOLLOW_30);
5646 lv_rightOperand_3_0=ruleALSIntersection();
5647
5648 state._fsp--;
5649 if (state.failed) return current;
5650 if ( state.backtracking==0 ) {
5651
5652 if (current==null) {
5653 current = createModelElementForParent(grammarAccess.getALSPlusRule());
5654 }
5655 set(
5656 current,
5657 "rightOperand",
5658 lv_rightOperand_3_0,
5659 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSIntersection");
5660 afterParserOrEnumRuleCall();
5661
5662 }
5663
5664 }
5665
5666
5667 }
5668
5669
5670 }
5671 break;
5672
5673 default :
5674 break loop33;
5675 }
5676 } while (true);
5677
5678
5679 }
5680
5681
5682 }
5683
5684 if ( state.backtracking==0 ) {
5685 leaveRule();
5686 }
5687 }
5688
5689 catch (RecognitionException re) {
5690 recover(input,re);
5691 appendSkippedTokens();
5692 }
5693 finally {
5694 }
5695 return current;
5696 }
5697 // $ANTLR end "ruleALSPlus"
5698
5699
5700 // $ANTLR start "entryRuleALSIntersection"
5701 // InternalAlloyLanguage.g:2002:1: entryRuleALSIntersection returns [EObject current=null] : iv_ruleALSIntersection= ruleALSIntersection EOF ;
5702 public final EObject entryRuleALSIntersection() throws RecognitionException {
5703 EObject current = null;
5704
5705 EObject iv_ruleALSIntersection = null;
5706
5707
5708 try {
5709 // InternalAlloyLanguage.g:2003:2: (iv_ruleALSIntersection= ruleALSIntersection EOF )
5710 // InternalAlloyLanguage.g:2004:2: iv_ruleALSIntersection= ruleALSIntersection EOF
5711 {
5712 if ( state.backtracking==0 ) {
5713 newCompositeNode(grammarAccess.getALSIntersectionRule());
5714 }
5715 pushFollow(FOLLOW_1);
5716 iv_ruleALSIntersection=ruleALSIntersection();
5717
5718 state._fsp--;
5719 if (state.failed) return current;
5720 if ( state.backtracking==0 ) {
5721 current =iv_ruleALSIntersection;
5722 }
5723 match(input,EOF,FOLLOW_2); if (state.failed) return current;
5724
5725 }
5726
5727 }
5728
5729 catch (RecognitionException re) {
5730 recover(input,re);
5731 appendSkippedTokens();
5732 }
5733 finally {
5734 }
5735 return current;
5736 }
5737 // $ANTLR end "entryRuleALSIntersection"
5738
5739
5740 // $ANTLR start "ruleALSIntersection"
5741 // InternalAlloyLanguage.g:2011:1: ruleALSIntersection returns [EObject current=null] : (this_ALSDirectProduct_0= ruleALSDirectProduct ( () otherlv_2= '&' ( (lv_rightOperand_3_0= ruleALSDirectProduct ) ) )* ) ;
5742 public final EObject ruleALSIntersection() throws RecognitionException {
5743 EObject current = null;
5744
5745 Token otherlv_2=null;
5746 EObject this_ALSDirectProduct_0 = null;
5747
5748 EObject lv_rightOperand_3_0 = null;
5749
5750
5751 enterRule();
5752
5753 try {
5754 // InternalAlloyLanguage.g:2014:28: ( (this_ALSDirectProduct_0= ruleALSDirectProduct ( () otherlv_2= '&' ( (lv_rightOperand_3_0= ruleALSDirectProduct ) ) )* ) )
5755 // InternalAlloyLanguage.g:2015:1: (this_ALSDirectProduct_0= ruleALSDirectProduct ( () otherlv_2= '&' ( (lv_rightOperand_3_0= ruleALSDirectProduct ) ) )* )
5756 {
5757 // InternalAlloyLanguage.g:2015:1: (this_ALSDirectProduct_0= ruleALSDirectProduct ( () otherlv_2= '&' ( (lv_rightOperand_3_0= ruleALSDirectProduct ) ) )* )
5758 // InternalAlloyLanguage.g:2016:5: this_ALSDirectProduct_0= ruleALSDirectProduct ( () otherlv_2= '&' ( (lv_rightOperand_3_0= ruleALSDirectProduct ) ) )*
5759 {
5760 if ( state.backtracking==0 ) {
5761
5762 newCompositeNode(grammarAccess.getALSIntersectionAccess().getALSDirectProductParserRuleCall_0());
5763
5764 }
5765 pushFollow(FOLLOW_31);
5766 this_ALSDirectProduct_0=ruleALSDirectProduct();
5767
5768 state._fsp--;
5769 if (state.failed) return current;
5770 if ( state.backtracking==0 ) {
5771
5772 current = this_ALSDirectProduct_0;
5773 afterParserOrEnumRuleCall();
5774
5775 }
5776 // InternalAlloyLanguage.g:2024:1: ( () otherlv_2= '&' ( (lv_rightOperand_3_0= ruleALSDirectProduct ) ) )*
5777 loop34:
5778 do {
5779 int alt34=2;
5780 int LA34_0 = input.LA(1);
5781
5782 if ( (LA34_0==47) ) {
5783 alt34=1;
5784 }
5785
5786
5787 switch (alt34) {
5788 case 1 :
5789 // InternalAlloyLanguage.g:2024:2: () otherlv_2= '&' ( (lv_rightOperand_3_0= ruleALSDirectProduct ) )
5790 {
5791 // InternalAlloyLanguage.g:2024:2: ()
5792 // InternalAlloyLanguage.g:2025:5:
5793 {
5794 if ( state.backtracking==0 ) {
5795
5796 current = forceCreateModelElementAndSet(
5797 grammarAccess.getALSIntersectionAccess().getALSIntersectionLeftOperandAction_1_0(),
5798 current);
5799
5800 }
5801
5802 }
5803
5804 otherlv_2=(Token)match(input,47,FOLLOW_12); if (state.failed) return current;
5805 if ( state.backtracking==0 ) {
5806
5807 newLeafNode(otherlv_2, grammarAccess.getALSIntersectionAccess().getAmpersandKeyword_1_1());
5808
5809 }
5810 // InternalAlloyLanguage.g:2034:1: ( (lv_rightOperand_3_0= ruleALSDirectProduct ) )
5811 // InternalAlloyLanguage.g:2035:1: (lv_rightOperand_3_0= ruleALSDirectProduct )
5812 {
5813 // InternalAlloyLanguage.g:2035:1: (lv_rightOperand_3_0= ruleALSDirectProduct )
5814 // InternalAlloyLanguage.g:2036:3: lv_rightOperand_3_0= ruleALSDirectProduct
5815 {
5816 if ( state.backtracking==0 ) {
5817
5818 newCompositeNode(grammarAccess.getALSIntersectionAccess().getRightOperandALSDirectProductParserRuleCall_1_2_0());
5819
5820 }
5821 pushFollow(FOLLOW_31);
5822 lv_rightOperand_3_0=ruleALSDirectProduct();
5823
5824 state._fsp--;
5825 if (state.failed) return current;
5826 if ( state.backtracking==0 ) {
5827
5828 if (current==null) {
5829 current = createModelElementForParent(grammarAccess.getALSIntersectionRule());
5830 }
5831 set(
5832 current,
5833 "rightOperand",
5834 lv_rightOperand_3_0,
5835 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSDirectProduct");
5836 afterParserOrEnumRuleCall();
5837
5838 }
5839
5840 }
5841
5842
5843 }
5844
5845
5846 }
5847 break;
5848
5849 default :
5850 break loop34;
5851 }
5852 } while (true);
5853
5854
5855 }
5856
5857
5858 }
5859
5860 if ( state.backtracking==0 ) {
5861 leaveRule();
5862 }
5863 }
5864
5865 catch (RecognitionException re) {
5866 recover(input,re);
5867 appendSkippedTokens();
5868 }
5869 finally {
5870 }
5871 return current;
5872 }
5873 // $ANTLR end "ruleALSIntersection"
5874
5875
5876 // $ANTLR start "entryRuleALSDirectProduct"
5877 // InternalAlloyLanguage.g:2060:1: entryRuleALSDirectProduct returns [EObject current=null] : iv_ruleALSDirectProduct= ruleALSDirectProduct EOF ;
5878 public final EObject entryRuleALSDirectProduct() throws RecognitionException {
5879 EObject current = null;
5880
5881 EObject iv_ruleALSDirectProduct = null;
5882
5883
5884 try {
5885 // InternalAlloyLanguage.g:2061:2: (iv_ruleALSDirectProduct= ruleALSDirectProduct EOF )
5886 // InternalAlloyLanguage.g:2062:2: iv_ruleALSDirectProduct= ruleALSDirectProduct EOF
5887 {
5888 if ( state.backtracking==0 ) {
5889 newCompositeNode(grammarAccess.getALSDirectProductRule());
5890 }
5891 pushFollow(FOLLOW_1);
5892 iv_ruleALSDirectProduct=ruleALSDirectProduct();
5893
5894 state._fsp--;
5895 if (state.failed) return current;
5896 if ( state.backtracking==0 ) {
5897 current =iv_ruleALSDirectProduct;
5898 }
5899 match(input,EOF,FOLLOW_2); if (state.failed) return current;
5900
5901 }
5902
5903 }
5904
5905 catch (RecognitionException re) {
5906 recover(input,re);
5907 appendSkippedTokens();
5908 }
5909 finally {
5910 }
5911 return current;
5912 }
5913 // $ANTLR end "entryRuleALSDirectProduct"
5914
5915
5916 // $ANTLR start "ruleALSDirectProduct"
5917 // InternalAlloyLanguage.g:2069:1: ruleALSDirectProduct returns [EObject current=null] : (this_ALSPreficed_0= ruleALSPreficed ( () ( (lv_leftMultiplicit_2_0= ruleALSMultiplicity ) )? otherlv_3= '->' ( (lv_rightMultiplicit_4_0= ruleALSMultiplicity ) )? ( (lv_rightOperand_5_0= ruleALSPreficed ) ) )? ) ;
5918 public final EObject ruleALSDirectProduct() throws RecognitionException {
5919 EObject current = null;
5920
5921 Token otherlv_3=null;
5922 EObject this_ALSPreficed_0 = null;
5923
5924 Enumerator lv_leftMultiplicit_2_0 = null;
5925
5926 Enumerator lv_rightMultiplicit_4_0 = null;
5927
5928 EObject lv_rightOperand_5_0 = null;
5929
5930
5931 enterRule();
5932
5933 try {
5934 // InternalAlloyLanguage.g:2072:28: ( (this_ALSPreficed_0= ruleALSPreficed ( () ( (lv_leftMultiplicit_2_0= ruleALSMultiplicity ) )? otherlv_3= '->' ( (lv_rightMultiplicit_4_0= ruleALSMultiplicity ) )? ( (lv_rightOperand_5_0= ruleALSPreficed ) ) )? ) )
5935 // InternalAlloyLanguage.g:2073:1: (this_ALSPreficed_0= ruleALSPreficed ( () ( (lv_leftMultiplicit_2_0= ruleALSMultiplicity ) )? otherlv_3= '->' ( (lv_rightMultiplicit_4_0= ruleALSMultiplicity ) )? ( (lv_rightOperand_5_0= ruleALSPreficed ) ) )? )
5936 {
5937 // InternalAlloyLanguage.g:2073:1: (this_ALSPreficed_0= ruleALSPreficed ( () ( (lv_leftMultiplicit_2_0= ruleALSMultiplicity ) )? otherlv_3= '->' ( (lv_rightMultiplicit_4_0= ruleALSMultiplicity ) )? ( (lv_rightOperand_5_0= ruleALSPreficed ) ) )? )
5938 // InternalAlloyLanguage.g:2074:5: this_ALSPreficed_0= ruleALSPreficed ( () ( (lv_leftMultiplicit_2_0= ruleALSMultiplicity ) )? otherlv_3= '->' ( (lv_rightMultiplicit_4_0= ruleALSMultiplicity ) )? ( (lv_rightOperand_5_0= ruleALSPreficed ) ) )?
5939 {
5940 if ( state.backtracking==0 ) {
5941
5942 newCompositeNode(grammarAccess.getALSDirectProductAccess().getALSPreficedParserRuleCall_0());
5943
5944 }
5945 pushFollow(FOLLOW_32);
5946 this_ALSPreficed_0=ruleALSPreficed();
5947
5948 state._fsp--;
5949 if (state.failed) return current;
5950 if ( state.backtracking==0 ) {
5951
5952 current = this_ALSPreficed_0;
5953 afterParserOrEnumRuleCall();
5954
5955 }
5956 // InternalAlloyLanguage.g:2082:1: ( () ( (lv_leftMultiplicit_2_0= ruleALSMultiplicity ) )? otherlv_3= '->' ( (lv_rightMultiplicit_4_0= ruleALSMultiplicity ) )? ( (lv_rightOperand_5_0= ruleALSPreficed ) ) )?
5957 int alt37=2;
5958 int LA37_0 = input.LA(1);
5959
5960 if ( (LA37_0==48||(LA37_0>=65 && LA37_0<=70)) ) {
5961 alt37=1;
5962 }
5963 switch (alt37) {
5964 case 1 :
5965 // InternalAlloyLanguage.g:2082:2: () ( (lv_leftMultiplicit_2_0= ruleALSMultiplicity ) )? otherlv_3= '->' ( (lv_rightMultiplicit_4_0= ruleALSMultiplicity ) )? ( (lv_rightOperand_5_0= ruleALSPreficed ) )
5966 {
5967 // InternalAlloyLanguage.g:2082:2: ()
5968 // InternalAlloyLanguage.g:2083:5:
5969 {
5970 if ( state.backtracking==0 ) {
5971
5972 current = forceCreateModelElementAndSet(
5973 grammarAccess.getALSDirectProductAccess().getALSDirectProductLeftOperandAction_1_0(),
5974 current);
5975
5976 }
5977
5978 }
5979
5980 // InternalAlloyLanguage.g:2088:2: ( (lv_leftMultiplicit_2_0= ruleALSMultiplicity ) )?
5981 int alt35=2;
5982 int LA35_0 = input.LA(1);
5983
5984 if ( ((LA35_0>=65 && LA35_0<=70)) ) {
5985 alt35=1;
5986 }
5987 switch (alt35) {
5988 case 1 :
5989 // InternalAlloyLanguage.g:2089:1: (lv_leftMultiplicit_2_0= ruleALSMultiplicity )
5990 {
5991 // InternalAlloyLanguage.g:2089:1: (lv_leftMultiplicit_2_0= ruleALSMultiplicity )
5992 // InternalAlloyLanguage.g:2090:3: lv_leftMultiplicit_2_0= ruleALSMultiplicity
5993 {
5994 if ( state.backtracking==0 ) {
5995
5996 newCompositeNode(grammarAccess.getALSDirectProductAccess().getLeftMultiplicitALSMultiplicityEnumRuleCall_1_1_0());
5997
5998 }
5999 pushFollow(FOLLOW_33);
6000 lv_leftMultiplicit_2_0=ruleALSMultiplicity();
6001
6002 state._fsp--;
6003 if (state.failed) return current;
6004 if ( state.backtracking==0 ) {
6005
6006 if (current==null) {
6007 current = createModelElementForParent(grammarAccess.getALSDirectProductRule());
6008 }
6009 set(
6010 current,
6011 "leftMultiplicit",
6012 lv_leftMultiplicit_2_0,
6013 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity");
6014 afterParserOrEnumRuleCall();
6015
6016 }
6017
6018 }
6019
6020
6021 }
6022 break;
6023
6024 }
6025
6026 otherlv_3=(Token)match(input,48,FOLLOW_12); if (state.failed) return current;
6027 if ( state.backtracking==0 ) {
6028
6029 newLeafNode(otherlv_3, grammarAccess.getALSDirectProductAccess().getHyphenMinusGreaterThanSignKeyword_1_2());
6030
6031 }
6032 // InternalAlloyLanguage.g:2110:1: ( (lv_rightMultiplicit_4_0= ruleALSMultiplicity ) )?
6033 int alt36=2;
6034 int LA36_0 = input.LA(1);
6035
6036 if ( ((LA36_0>=65 && LA36_0<=70)) ) {
6037 alt36=1;
6038 }
6039 switch (alt36) {
6040 case 1 :
6041 // InternalAlloyLanguage.g:2111:1: (lv_rightMultiplicit_4_0= ruleALSMultiplicity )
6042 {
6043 // InternalAlloyLanguage.g:2111:1: (lv_rightMultiplicit_4_0= ruleALSMultiplicity )
6044 // InternalAlloyLanguage.g:2112:3: lv_rightMultiplicit_4_0= ruleALSMultiplicity
6045 {
6046 if ( state.backtracking==0 ) {
6047
6048 newCompositeNode(grammarAccess.getALSDirectProductAccess().getRightMultiplicitALSMultiplicityEnumRuleCall_1_3_0());
6049
6050 }
6051 pushFollow(FOLLOW_12);
6052 lv_rightMultiplicit_4_0=ruleALSMultiplicity();
6053
6054 state._fsp--;
6055 if (state.failed) return current;
6056 if ( state.backtracking==0 ) {
6057
6058 if (current==null) {
6059 current = createModelElementForParent(grammarAccess.getALSDirectProductRule());
6060 }
6061 set(
6062 current,
6063 "rightMultiplicit",
6064 lv_rightMultiplicit_4_0,
6065 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity");
6066 afterParserOrEnumRuleCall();
6067
6068 }
6069
6070 }
6071
6072
6073 }
6074 break;
6075
6076 }
6077
6078 // InternalAlloyLanguage.g:2128:3: ( (lv_rightOperand_5_0= ruleALSPreficed ) )
6079 // InternalAlloyLanguage.g:2129:1: (lv_rightOperand_5_0= ruleALSPreficed )
6080 {
6081 // InternalAlloyLanguage.g:2129:1: (lv_rightOperand_5_0= ruleALSPreficed )
6082 // InternalAlloyLanguage.g:2130:3: lv_rightOperand_5_0= ruleALSPreficed
6083 {
6084 if ( state.backtracking==0 ) {
6085
6086 newCompositeNode(grammarAccess.getALSDirectProductAccess().getRightOperandALSPreficedParserRuleCall_1_4_0());
6087
6088 }
6089 pushFollow(FOLLOW_2);
6090 lv_rightOperand_5_0=ruleALSPreficed();
6091
6092 state._fsp--;
6093 if (state.failed) return current;
6094 if ( state.backtracking==0 ) {
6095
6096 if (current==null) {
6097 current = createModelElementForParent(grammarAccess.getALSDirectProductRule());
6098 }
6099 set(
6100 current,
6101 "rightOperand",
6102 lv_rightOperand_5_0,
6103 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSPreficed");
6104 afterParserOrEnumRuleCall();
6105
6106 }
6107
6108 }
6109
6110
6111 }
6112
6113
6114 }
6115 break;
6116
6117 }
6118
6119
6120 }
6121
6122
6123 }
6124
6125 if ( state.backtracking==0 ) {
6126 leaveRule();
6127 }
6128 }
6129
6130 catch (RecognitionException re) {
6131 recover(input,re);
6132 appendSkippedTokens();
6133 }
6134 finally {
6135 }
6136 return current;
6137 }
6138 // $ANTLR end "ruleALSDirectProduct"
6139
6140
6141 // $ANTLR start "entryRuleALSPreficed"
6142 // InternalAlloyLanguage.g:2154:1: entryRuleALSPreficed returns [EObject current=null] : iv_ruleALSPreficed= ruleALSPreficed EOF ;
6143 public final EObject entryRuleALSPreficed() throws RecognitionException {
6144 EObject current = null;
6145
6146 EObject iv_ruleALSPreficed = null;
6147
6148
6149 try {
6150 // InternalAlloyLanguage.g:2155:2: (iv_ruleALSPreficed= ruleALSPreficed EOF )
6151 // InternalAlloyLanguage.g:2156:2: iv_ruleALSPreficed= ruleALSPreficed EOF
6152 {
6153 if ( state.backtracking==0 ) {
6154 newCompositeNode(grammarAccess.getALSPreficedRule());
6155 }
6156 pushFollow(FOLLOW_1);
6157 iv_ruleALSPreficed=ruleALSPreficed();
6158
6159 state._fsp--;
6160 if (state.failed) return current;
6161 if ( state.backtracking==0 ) {
6162 current =iv_ruleALSPreficed;
6163 }
6164 match(input,EOF,FOLLOW_2); if (state.failed) return current;
6165
6166 }
6167
6168 }
6169
6170 catch (RecognitionException re) {
6171 recover(input,re);
6172 appendSkippedTokens();
6173 }
6174 finally {
6175 }
6176 return current;
6177 }
6178 // $ANTLR end "entryRuleALSPreficed"
6179
6180
6181 // $ANTLR start "ruleALSPreficed"
6182 // InternalAlloyLanguage.g:2163:1: ruleALSPreficed returns [EObject current=null] : ( ( () ( ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' ) ) ( (lv_operand_3_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '~' )=>otherlv_5= '~' ) ( (lv_operand_6_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_8= '^' ( (lv_operand_9_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_11= '*' ( (lv_operand_12_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_14= '#' ( (lv_operand_15_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '-' )=>otherlv_17= '-' ) ( (lv_operand_18_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_20= 'sum' ( (lv_variables_21_0= ruleALSVariableDeclaration ) ) (otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) ) )* otherlv_24= '{' ( (lv_expression_25_0= ruleALSTerm ) ) otherlv_26= '}' ) | ( () ( ( (otherlv_28= RULE_ID ) ) | ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) ) ) otherlv_30= '[' ( (lv_params_31_0= ruleALSTerm ) ) (otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) ) )* otherlv_34= ']' ) | this_ALSBasicRelationTerm_35= ruleALSBasicRelationTerm ) ;
6183 public final EObject ruleALSPreficed() throws RecognitionException {
6184 EObject current = null;
6185
6186 Token otherlv_1=null;
6187 Token otherlv_2=null;
6188 Token otherlv_5=null;
6189 Token otherlv_8=null;
6190 Token otherlv_11=null;
6191 Token otherlv_14=null;
6192 Token otherlv_17=null;
6193 Token otherlv_20=null;
6194 Token otherlv_22=null;
6195 Token otherlv_24=null;
6196 Token otherlv_26=null;
6197 Token otherlv_28=null;
6198 Token otherlv_30=null;
6199 Token otherlv_32=null;
6200 Token otherlv_34=null;
6201 EObject lv_operand_3_0 = null;
6202
6203 EObject lv_operand_6_0 = null;
6204
6205 EObject lv_operand_9_0 = null;
6206
6207 EObject lv_operand_12_0 = null;
6208
6209 EObject lv_operand_15_0 = null;
6210
6211 EObject lv_operand_18_0 = null;
6212
6213 EObject lv_variables_21_0 = null;
6214
6215 EObject lv_variables_23_0 = null;
6216
6217 EObject lv_expression_25_0 = null;
6218
6219 Enumerator lv_referredNumericOperator_29_0 = null;
6220
6221 EObject lv_params_31_0 = null;
6222
6223 EObject lv_params_33_0 = null;
6224
6225 EObject this_ALSBasicRelationTerm_35 = null;
6226
6227
6228 enterRule();
6229
6230 try {
6231 // InternalAlloyLanguage.g:2166:28: ( ( ( () ( ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' ) ) ( (lv_operand_3_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '~' )=>otherlv_5= '~' ) ( (lv_operand_6_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_8= '^' ( (lv_operand_9_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_11= '*' ( (lv_operand_12_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_14= '#' ( (lv_operand_15_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '-' )=>otherlv_17= '-' ) ( (lv_operand_18_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_20= 'sum' ( (lv_variables_21_0= ruleALSVariableDeclaration ) ) (otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) ) )* otherlv_24= '{' ( (lv_expression_25_0= ruleALSTerm ) ) otherlv_26= '}' ) | ( () ( ( (otherlv_28= RULE_ID ) ) | ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) ) ) otherlv_30= '[' ( (lv_params_31_0= ruleALSTerm ) ) (otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) ) )* otherlv_34= ']' ) | this_ALSBasicRelationTerm_35= ruleALSBasicRelationTerm ) )
6232 // InternalAlloyLanguage.g:2167:1: ( ( () ( ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' ) ) ( (lv_operand_3_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '~' )=>otherlv_5= '~' ) ( (lv_operand_6_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_8= '^' ( (lv_operand_9_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_11= '*' ( (lv_operand_12_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_14= '#' ( (lv_operand_15_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '-' )=>otherlv_17= '-' ) ( (lv_operand_18_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_20= 'sum' ( (lv_variables_21_0= ruleALSVariableDeclaration ) ) (otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) ) )* otherlv_24= '{' ( (lv_expression_25_0= ruleALSTerm ) ) otherlv_26= '}' ) | ( () ( ( (otherlv_28= RULE_ID ) ) | ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) ) ) otherlv_30= '[' ( (lv_params_31_0= ruleALSTerm ) ) (otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) ) )* otherlv_34= ']' ) | this_ALSBasicRelationTerm_35= ruleALSBasicRelationTerm )
6233 {
6234 // InternalAlloyLanguage.g:2167:1: ( ( () ( ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' ) ) ( (lv_operand_3_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '~' )=>otherlv_5= '~' ) ( (lv_operand_6_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_8= '^' ( (lv_operand_9_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_11= '*' ( (lv_operand_12_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_14= '#' ( (lv_operand_15_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '-' )=>otherlv_17= '-' ) ( (lv_operand_18_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_20= 'sum' ( (lv_variables_21_0= ruleALSVariableDeclaration ) ) (otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) ) )* otherlv_24= '{' ( (lv_expression_25_0= ruleALSTerm ) ) otherlv_26= '}' ) | ( () ( ( (otherlv_28= RULE_ID ) ) | ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) ) ) otherlv_30= '[' ( (lv_params_31_0= ruleALSTerm ) ) (otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) ) )* otherlv_34= ']' ) | this_ALSBasicRelationTerm_35= ruleALSBasicRelationTerm )
6235 int alt42=9;
6236 alt42 = dfa42.predict(input);
6237 switch (alt42) {
6238 case 1 :
6239 // InternalAlloyLanguage.g:2167:2: ( () ( ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' ) ) ( (lv_operand_3_0= ruleALSBasicRelationTerm ) ) )
6240 {
6241 // InternalAlloyLanguage.g:2167:2: ( () ( ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' ) ) ( (lv_operand_3_0= ruleALSBasicRelationTerm ) ) )
6242 // InternalAlloyLanguage.g:2167:3: () ( ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' ) ) ( (lv_operand_3_0= ruleALSBasicRelationTerm ) )
6243 {
6244 // InternalAlloyLanguage.g:2167:3: ()
6245 // InternalAlloyLanguage.g:2168:5:
6246 {
6247 if ( state.backtracking==0 ) {
6248
6249 current = forceCreateModelElement(
6250 grammarAccess.getALSPreficedAccess().getALSNotAction_0_0(),
6251 current);
6252
6253 }
6254
6255 }
6256
6257 // InternalAlloyLanguage.g:2173:2: ( ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' ) )
6258 // InternalAlloyLanguage.g:2173:3: ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' )
6259 {
6260 // InternalAlloyLanguage.g:2176:5: (otherlv_1= '!' | otherlv_2= 'not' )
6261 int alt38=2;
6262 int LA38_0 = input.LA(1);
6263
6264 if ( (LA38_0==49) ) {
6265 alt38=1;
6266 }
6267 else if ( (LA38_0==50) ) {
6268 alt38=2;
6269 }
6270 else {
6271 if (state.backtracking>0) {state.failed=true; return current;}
6272 NoViableAltException nvae =
6273 new NoViableAltException("", 38, 0, input);
6274
6275 throw nvae;
6276 }
6277 switch (alt38) {
6278 case 1 :
6279 // InternalAlloyLanguage.g:2176:7: otherlv_1= '!'
6280 {
6281 otherlv_1=(Token)match(input,49,FOLLOW_12); if (state.failed) return current;
6282 if ( state.backtracking==0 ) {
6283
6284 newLeafNode(otherlv_1, grammarAccess.getALSPreficedAccess().getExclamationMarkKeyword_0_1_0_0());
6285
6286 }
6287
6288 }
6289 break;
6290 case 2 :
6291 // InternalAlloyLanguage.g:2181:7: otherlv_2= 'not'
6292 {
6293 otherlv_2=(Token)match(input,50,FOLLOW_12); if (state.failed) return current;
6294 if ( state.backtracking==0 ) {
6295
6296 newLeafNode(otherlv_2, grammarAccess.getALSPreficedAccess().getNotKeyword_0_1_0_1());
6297
6298 }
6299
6300 }
6301 break;
6302
6303 }
6304
6305
6306 }
6307
6308 // InternalAlloyLanguage.g:2185:3: ( (lv_operand_3_0= ruleALSBasicRelationTerm ) )
6309 // InternalAlloyLanguage.g:2186:1: (lv_operand_3_0= ruleALSBasicRelationTerm )
6310 {
6311 // InternalAlloyLanguage.g:2186:1: (lv_operand_3_0= ruleALSBasicRelationTerm )
6312 // InternalAlloyLanguage.g:2187:3: lv_operand_3_0= ruleALSBasicRelationTerm
6313 {
6314 if ( state.backtracking==0 ) {
6315
6316 newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_0_2_0());
6317
6318 }
6319 pushFollow(FOLLOW_2);
6320 lv_operand_3_0=ruleALSBasicRelationTerm();
6321
6322 state._fsp--;
6323 if (state.failed) return current;
6324 if ( state.backtracking==0 ) {
6325
6326 if (current==null) {
6327 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6328 }
6329 set(
6330 current,
6331 "operand",
6332 lv_operand_3_0,
6333 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm");
6334 afterParserOrEnumRuleCall();
6335
6336 }
6337
6338 }
6339
6340
6341 }
6342
6343
6344 }
6345
6346
6347 }
6348 break;
6349 case 2 :
6350 // InternalAlloyLanguage.g:2204:6: ( () ( ( '~' )=>otherlv_5= '~' ) ( (lv_operand_6_0= ruleALSBasicRelationTerm ) ) )
6351 {
6352 // InternalAlloyLanguage.g:2204:6: ( () ( ( '~' )=>otherlv_5= '~' ) ( (lv_operand_6_0= ruleALSBasicRelationTerm ) ) )
6353 // InternalAlloyLanguage.g:2204:7: () ( ( '~' )=>otherlv_5= '~' ) ( (lv_operand_6_0= ruleALSBasicRelationTerm ) )
6354 {
6355 // InternalAlloyLanguage.g:2204:7: ()
6356 // InternalAlloyLanguage.g:2205:5:
6357 {
6358 if ( state.backtracking==0 ) {
6359
6360 current = forceCreateModelElement(
6361 grammarAccess.getALSPreficedAccess().getALSInverseRelationAction_1_0(),
6362 current);
6363
6364 }
6365
6366 }
6367
6368 // InternalAlloyLanguage.g:2210:2: ( ( '~' )=>otherlv_5= '~' )
6369 // InternalAlloyLanguage.g:2210:3: ( '~' )=>otherlv_5= '~'
6370 {
6371 otherlv_5=(Token)match(input,51,FOLLOW_12); if (state.failed) return current;
6372 if ( state.backtracking==0 ) {
6373
6374 newLeafNode(otherlv_5, grammarAccess.getALSPreficedAccess().getTildeKeyword_1_1());
6375
6376 }
6377
6378 }
6379
6380 // InternalAlloyLanguage.g:2215:2: ( (lv_operand_6_0= ruleALSBasicRelationTerm ) )
6381 // InternalAlloyLanguage.g:2216:1: (lv_operand_6_0= ruleALSBasicRelationTerm )
6382 {
6383 // InternalAlloyLanguage.g:2216:1: (lv_operand_6_0= ruleALSBasicRelationTerm )
6384 // InternalAlloyLanguage.g:2217:3: lv_operand_6_0= ruleALSBasicRelationTerm
6385 {
6386 if ( state.backtracking==0 ) {
6387
6388 newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_1_2_0());
6389
6390 }
6391 pushFollow(FOLLOW_2);
6392 lv_operand_6_0=ruleALSBasicRelationTerm();
6393
6394 state._fsp--;
6395 if (state.failed) return current;
6396 if ( state.backtracking==0 ) {
6397
6398 if (current==null) {
6399 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6400 }
6401 set(
6402 current,
6403 "operand",
6404 lv_operand_6_0,
6405 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm");
6406 afterParserOrEnumRuleCall();
6407
6408 }
6409
6410 }
6411
6412
6413 }
6414
6415
6416 }
6417
6418
6419 }
6420 break;
6421 case 3 :
6422 // InternalAlloyLanguage.g:2234:6: ( () otherlv_8= '^' ( (lv_operand_9_0= ruleALSBasicRelationTerm ) ) )
6423 {
6424 // InternalAlloyLanguage.g:2234:6: ( () otherlv_8= '^' ( (lv_operand_9_0= ruleALSBasicRelationTerm ) ) )
6425 // InternalAlloyLanguage.g:2234:7: () otherlv_8= '^' ( (lv_operand_9_0= ruleALSBasicRelationTerm ) )
6426 {
6427 // InternalAlloyLanguage.g:2234:7: ()
6428 // InternalAlloyLanguage.g:2235:5:
6429 {
6430 if ( state.backtracking==0 ) {
6431
6432 current = forceCreateModelElement(
6433 grammarAccess.getALSPreficedAccess().getAlSTransitiveClosureAction_2_0(),
6434 current);
6435
6436 }
6437
6438 }
6439
6440 otherlv_8=(Token)match(input,52,FOLLOW_12); if (state.failed) return current;
6441 if ( state.backtracking==0 ) {
6442
6443 newLeafNode(otherlv_8, grammarAccess.getALSPreficedAccess().getCircumflexAccentKeyword_2_1());
6444
6445 }
6446 // InternalAlloyLanguage.g:2244:1: ( (lv_operand_9_0= ruleALSBasicRelationTerm ) )
6447 // InternalAlloyLanguage.g:2245:1: (lv_operand_9_0= ruleALSBasicRelationTerm )
6448 {
6449 // InternalAlloyLanguage.g:2245:1: (lv_operand_9_0= ruleALSBasicRelationTerm )
6450 // InternalAlloyLanguage.g:2246:3: lv_operand_9_0= ruleALSBasicRelationTerm
6451 {
6452 if ( state.backtracking==0 ) {
6453
6454 newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_2_2_0());
6455
6456 }
6457 pushFollow(FOLLOW_2);
6458 lv_operand_9_0=ruleALSBasicRelationTerm();
6459
6460 state._fsp--;
6461 if (state.failed) return current;
6462 if ( state.backtracking==0 ) {
6463
6464 if (current==null) {
6465 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6466 }
6467 set(
6468 current,
6469 "operand",
6470 lv_operand_9_0,
6471 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm");
6472 afterParserOrEnumRuleCall();
6473
6474 }
6475
6476 }
6477
6478
6479 }
6480
6481
6482 }
6483
6484
6485 }
6486 break;
6487 case 4 :
6488 // InternalAlloyLanguage.g:2263:6: ( () otherlv_11= '*' ( (lv_operand_12_0= ruleALSBasicRelationTerm ) ) )
6489 {
6490 // InternalAlloyLanguage.g:2263:6: ( () otherlv_11= '*' ( (lv_operand_12_0= ruleALSBasicRelationTerm ) ) )
6491 // InternalAlloyLanguage.g:2263:7: () otherlv_11= '*' ( (lv_operand_12_0= ruleALSBasicRelationTerm ) )
6492 {
6493 // InternalAlloyLanguage.g:2263:7: ()
6494 // InternalAlloyLanguage.g:2264:5:
6495 {
6496 if ( state.backtracking==0 ) {
6497
6498 current = forceCreateModelElement(
6499 grammarAccess.getALSPreficedAccess().getALSReflectiveTransitiveClosureAction_3_0(),
6500 current);
6501
6502 }
6503
6504 }
6505
6506 otherlv_11=(Token)match(input,53,FOLLOW_12); if (state.failed) return current;
6507 if ( state.backtracking==0 ) {
6508
6509 newLeafNode(otherlv_11, grammarAccess.getALSPreficedAccess().getAsteriskKeyword_3_1());
6510
6511 }
6512 // InternalAlloyLanguage.g:2273:1: ( (lv_operand_12_0= ruleALSBasicRelationTerm ) )
6513 // InternalAlloyLanguage.g:2274:1: (lv_operand_12_0= ruleALSBasicRelationTerm )
6514 {
6515 // InternalAlloyLanguage.g:2274:1: (lv_operand_12_0= ruleALSBasicRelationTerm )
6516 // InternalAlloyLanguage.g:2275:3: lv_operand_12_0= ruleALSBasicRelationTerm
6517 {
6518 if ( state.backtracking==0 ) {
6519
6520 newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_3_2_0());
6521
6522 }
6523 pushFollow(FOLLOW_2);
6524 lv_operand_12_0=ruleALSBasicRelationTerm();
6525
6526 state._fsp--;
6527 if (state.failed) return current;
6528 if ( state.backtracking==0 ) {
6529
6530 if (current==null) {
6531 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6532 }
6533 set(
6534 current,
6535 "operand",
6536 lv_operand_12_0,
6537 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm");
6538 afterParserOrEnumRuleCall();
6539
6540 }
6541
6542 }
6543
6544
6545 }
6546
6547
6548 }
6549
6550
6551 }
6552 break;
6553 case 5 :
6554 // InternalAlloyLanguage.g:2292:6: ( () otherlv_14= '#' ( (lv_operand_15_0= ruleALSBasicRelationTerm ) ) )
6555 {
6556 // InternalAlloyLanguage.g:2292:6: ( () otherlv_14= '#' ( (lv_operand_15_0= ruleALSBasicRelationTerm ) ) )
6557 // InternalAlloyLanguage.g:2292:7: () otherlv_14= '#' ( (lv_operand_15_0= ruleALSBasicRelationTerm ) )
6558 {
6559 // InternalAlloyLanguage.g:2292:7: ()
6560 // InternalAlloyLanguage.g:2293:5:
6561 {
6562 if ( state.backtracking==0 ) {
6563
6564 current = forceCreateModelElement(
6565 grammarAccess.getALSPreficedAccess().getALSCardinalityAction_4_0(),
6566 current);
6567
6568 }
6569
6570 }
6571
6572 otherlv_14=(Token)match(input,54,FOLLOW_12); if (state.failed) return current;
6573 if ( state.backtracking==0 ) {
6574
6575 newLeafNode(otherlv_14, grammarAccess.getALSPreficedAccess().getNumberSignKeyword_4_1());
6576
6577 }
6578 // InternalAlloyLanguage.g:2302:1: ( (lv_operand_15_0= ruleALSBasicRelationTerm ) )
6579 // InternalAlloyLanguage.g:2303:1: (lv_operand_15_0= ruleALSBasicRelationTerm )
6580 {
6581 // InternalAlloyLanguage.g:2303:1: (lv_operand_15_0= ruleALSBasicRelationTerm )
6582 // InternalAlloyLanguage.g:2304:3: lv_operand_15_0= ruleALSBasicRelationTerm
6583 {
6584 if ( state.backtracking==0 ) {
6585
6586 newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_4_2_0());
6587
6588 }
6589 pushFollow(FOLLOW_2);
6590 lv_operand_15_0=ruleALSBasicRelationTerm();
6591
6592 state._fsp--;
6593 if (state.failed) return current;
6594 if ( state.backtracking==0 ) {
6595
6596 if (current==null) {
6597 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6598 }
6599 set(
6600 current,
6601 "operand",
6602 lv_operand_15_0,
6603 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm");
6604 afterParserOrEnumRuleCall();
6605
6606 }
6607
6608 }
6609
6610
6611 }
6612
6613
6614 }
6615
6616
6617 }
6618 break;
6619 case 6 :
6620 // InternalAlloyLanguage.g:2321:6: ( () ( ( '-' )=>otherlv_17= '-' ) ( (lv_operand_18_0= ruleALSBasicRelationTerm ) ) )
6621 {
6622 // InternalAlloyLanguage.g:2321:6: ( () ( ( '-' )=>otherlv_17= '-' ) ( (lv_operand_18_0= ruleALSBasicRelationTerm ) ) )
6623 // InternalAlloyLanguage.g:2321:7: () ( ( '-' )=>otherlv_17= '-' ) ( (lv_operand_18_0= ruleALSBasicRelationTerm ) )
6624 {
6625 // InternalAlloyLanguage.g:2321:7: ()
6626 // InternalAlloyLanguage.g:2322:5:
6627 {
6628 if ( state.backtracking==0 ) {
6629
6630 current = forceCreateModelElement(
6631 grammarAccess.getALSPreficedAccess().getALSUnaryMinusAction_5_0(),
6632 current);
6633
6634 }
6635
6636 }
6637
6638 // InternalAlloyLanguage.g:2327:2: ( ( '-' )=>otherlv_17= '-' )
6639 // InternalAlloyLanguage.g:2327:3: ( '-' )=>otherlv_17= '-'
6640 {
6641 otherlv_17=(Token)match(input,46,FOLLOW_12); if (state.failed) return current;
6642 if ( state.backtracking==0 ) {
6643
6644 newLeafNode(otherlv_17, grammarAccess.getALSPreficedAccess().getHyphenMinusKeyword_5_1());
6645
6646 }
6647
6648 }
6649
6650 // InternalAlloyLanguage.g:2332:2: ( (lv_operand_18_0= ruleALSBasicRelationTerm ) )
6651 // InternalAlloyLanguage.g:2333:1: (lv_operand_18_0= ruleALSBasicRelationTerm )
6652 {
6653 // InternalAlloyLanguage.g:2333:1: (lv_operand_18_0= ruleALSBasicRelationTerm )
6654 // InternalAlloyLanguage.g:2334:3: lv_operand_18_0= ruleALSBasicRelationTerm
6655 {
6656 if ( state.backtracking==0 ) {
6657
6658 newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_5_2_0());
6659
6660 }
6661 pushFollow(FOLLOW_2);
6662 lv_operand_18_0=ruleALSBasicRelationTerm();
6663
6664 state._fsp--;
6665 if (state.failed) return current;
6666 if ( state.backtracking==0 ) {
6667
6668 if (current==null) {
6669 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6670 }
6671 set(
6672 current,
6673 "operand",
6674 lv_operand_18_0,
6675 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm");
6676 afterParserOrEnumRuleCall();
6677
6678 }
6679
6680 }
6681
6682
6683 }
6684
6685
6686 }
6687
6688
6689 }
6690 break;
6691 case 7 :
6692 // InternalAlloyLanguage.g:2351:6: ( () otherlv_20= 'sum' ( (lv_variables_21_0= ruleALSVariableDeclaration ) ) (otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) ) )* otherlv_24= '{' ( (lv_expression_25_0= ruleALSTerm ) ) otherlv_26= '}' )
6693 {
6694 // InternalAlloyLanguage.g:2351:6: ( () otherlv_20= 'sum' ( (lv_variables_21_0= ruleALSVariableDeclaration ) ) (otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) ) )* otherlv_24= '{' ( (lv_expression_25_0= ruleALSTerm ) ) otherlv_26= '}' )
6695 // InternalAlloyLanguage.g:2351:7: () otherlv_20= 'sum' ( (lv_variables_21_0= ruleALSVariableDeclaration ) ) (otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) ) )* otherlv_24= '{' ( (lv_expression_25_0= ruleALSTerm ) ) otherlv_26= '}'
6696 {
6697 // InternalAlloyLanguage.g:2351:7: ()
6698 // InternalAlloyLanguage.g:2352:5:
6699 {
6700 if ( state.backtracking==0 ) {
6701
6702 current = forceCreateModelElement(
6703 grammarAccess.getALSPreficedAccess().getALSSumAction_6_0(),
6704 current);
6705
6706 }
6707
6708 }
6709
6710 otherlv_20=(Token)match(input,55,FOLLOW_4); if (state.failed) return current;
6711 if ( state.backtracking==0 ) {
6712
6713 newLeafNode(otherlv_20, grammarAccess.getALSPreficedAccess().getSumKeyword_6_1());
6714
6715 }
6716 // InternalAlloyLanguage.g:2361:1: ( (lv_variables_21_0= ruleALSVariableDeclaration ) )
6717 // InternalAlloyLanguage.g:2362:1: (lv_variables_21_0= ruleALSVariableDeclaration )
6718 {
6719 // InternalAlloyLanguage.g:2362:1: (lv_variables_21_0= ruleALSVariableDeclaration )
6720 // InternalAlloyLanguage.g:2363:3: lv_variables_21_0= ruleALSVariableDeclaration
6721 {
6722 if ( state.backtracking==0 ) {
6723
6724 newCompositeNode(grammarAccess.getALSPreficedAccess().getVariablesALSVariableDeclarationParserRuleCall_6_2_0());
6725
6726 }
6727 pushFollow(FOLLOW_18);
6728 lv_variables_21_0=ruleALSVariableDeclaration();
6729
6730 state._fsp--;
6731 if (state.failed) return current;
6732 if ( state.backtracking==0 ) {
6733
6734 if (current==null) {
6735 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6736 }
6737 add(
6738 current,
6739 "variables",
6740 lv_variables_21_0,
6741 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration");
6742 afterParserOrEnumRuleCall();
6743
6744 }
6745
6746 }
6747
6748
6749 }
6750
6751 // InternalAlloyLanguage.g:2379:2: (otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) ) )*
6752 loop39:
6753 do {
6754 int alt39=2;
6755 int LA39_0 = input.LA(1);
6756
6757 if ( (LA39_0==13) ) {
6758 alt39=1;
6759 }
6760
6761
6762 switch (alt39) {
6763 case 1 :
6764 // InternalAlloyLanguage.g:2379:4: otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) )
6765 {
6766 otherlv_22=(Token)match(input,13,FOLLOW_4); if (state.failed) return current;
6767 if ( state.backtracking==0 ) {
6768
6769 newLeafNode(otherlv_22, grammarAccess.getALSPreficedAccess().getCommaKeyword_6_3_0());
6770
6771 }
6772 // InternalAlloyLanguage.g:2383:1: ( (lv_variables_23_0= ruleALSVariableDeclaration ) )
6773 // InternalAlloyLanguage.g:2384:1: (lv_variables_23_0= ruleALSVariableDeclaration )
6774 {
6775 // InternalAlloyLanguage.g:2384:1: (lv_variables_23_0= ruleALSVariableDeclaration )
6776 // InternalAlloyLanguage.g:2385:3: lv_variables_23_0= ruleALSVariableDeclaration
6777 {
6778 if ( state.backtracking==0 ) {
6779
6780 newCompositeNode(grammarAccess.getALSPreficedAccess().getVariablesALSVariableDeclarationParserRuleCall_6_3_1_0());
6781
6782 }
6783 pushFollow(FOLLOW_18);
6784 lv_variables_23_0=ruleALSVariableDeclaration();
6785
6786 state._fsp--;
6787 if (state.failed) return current;
6788 if ( state.backtracking==0 ) {
6789
6790 if (current==null) {
6791 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6792 }
6793 add(
6794 current,
6795 "variables",
6796 lv_variables_23_0,
6797 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration");
6798 afterParserOrEnumRuleCall();
6799
6800 }
6801
6802 }
6803
6804
6805 }
6806
6807
6808 }
6809 break;
6810
6811 default :
6812 break loop39;
6813 }
6814 } while (true);
6815
6816 otherlv_24=(Token)match(input,12,FOLLOW_12); if (state.failed) return current;
6817 if ( state.backtracking==0 ) {
6818
6819 newLeafNode(otherlv_24, grammarAccess.getALSPreficedAccess().getLeftCurlyBracketKeyword_6_4());
6820
6821 }
6822 // InternalAlloyLanguage.g:2405:1: ( (lv_expression_25_0= ruleALSTerm ) )
6823 // InternalAlloyLanguage.g:2406:1: (lv_expression_25_0= ruleALSTerm )
6824 {
6825 // InternalAlloyLanguage.g:2406:1: (lv_expression_25_0= ruleALSTerm )
6826 // InternalAlloyLanguage.g:2407:3: lv_expression_25_0= ruleALSTerm
6827 {
6828 if ( state.backtracking==0 ) {
6829
6830 newCompositeNode(grammarAccess.getALSPreficedAccess().getExpressionALSTermParserRuleCall_6_5_0());
6831
6832 }
6833 pushFollow(FOLLOW_15);
6834 lv_expression_25_0=ruleALSTerm();
6835
6836 state._fsp--;
6837 if (state.failed) return current;
6838 if ( state.backtracking==0 ) {
6839
6840 if (current==null) {
6841 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6842 }
6843 set(
6844 current,
6845 "expression",
6846 lv_expression_25_0,
6847 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
6848 afterParserOrEnumRuleCall();
6849
6850 }
6851
6852 }
6853
6854
6855 }
6856
6857 otherlv_26=(Token)match(input,14,FOLLOW_2); if (state.failed) return current;
6858 if ( state.backtracking==0 ) {
6859
6860 newLeafNode(otherlv_26, grammarAccess.getALSPreficedAccess().getRightCurlyBracketKeyword_6_6());
6861
6862 }
6863
6864 }
6865
6866
6867 }
6868 break;
6869 case 8 :
6870 // InternalAlloyLanguage.g:2428:6: ( () ( ( (otherlv_28= RULE_ID ) ) | ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) ) ) otherlv_30= '[' ( (lv_params_31_0= ruleALSTerm ) ) (otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) ) )* otherlv_34= ']' )
6871 {
6872 // InternalAlloyLanguage.g:2428:6: ( () ( ( (otherlv_28= RULE_ID ) ) | ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) ) ) otherlv_30= '[' ( (lv_params_31_0= ruleALSTerm ) ) (otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) ) )* otherlv_34= ']' )
6873 // InternalAlloyLanguage.g:2428:7: () ( ( (otherlv_28= RULE_ID ) ) | ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) ) ) otherlv_30= '[' ( (lv_params_31_0= ruleALSTerm ) ) (otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) ) )* otherlv_34= ']'
6874 {
6875 // InternalAlloyLanguage.g:2428:7: ()
6876 // InternalAlloyLanguage.g:2429:5:
6877 {
6878 if ( state.backtracking==0 ) {
6879
6880 current = forceCreateModelElement(
6881 grammarAccess.getALSPreficedAccess().getALSFunctionCallAction_7_0(),
6882 current);
6883
6884 }
6885
6886 }
6887
6888 // InternalAlloyLanguage.g:2434:2: ( ( (otherlv_28= RULE_ID ) ) | ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) ) )
6889 int alt40=2;
6890 int LA40_0 = input.LA(1);
6891
6892 if ( (LA40_0==RULE_ID) ) {
6893 alt40=1;
6894 }
6895 else if ( ((LA40_0>=71 && LA40_0<=75)) ) {
6896 alt40=2;
6897 }
6898 else {
6899 if (state.backtracking>0) {state.failed=true; return current;}
6900 NoViableAltException nvae =
6901 new NoViableAltException("", 40, 0, input);
6902
6903 throw nvae;
6904 }
6905 switch (alt40) {
6906 case 1 :
6907 // InternalAlloyLanguage.g:2434:3: ( (otherlv_28= RULE_ID ) )
6908 {
6909 // InternalAlloyLanguage.g:2434:3: ( (otherlv_28= RULE_ID ) )
6910 // InternalAlloyLanguage.g:2435:1: (otherlv_28= RULE_ID )
6911 {
6912 // InternalAlloyLanguage.g:2435:1: (otherlv_28= RULE_ID )
6913 // InternalAlloyLanguage.g:2436:3: otherlv_28= RULE_ID
6914 {
6915 if ( state.backtracking==0 ) {
6916
6917 if (current==null) {
6918 current = createModelElement(grammarAccess.getALSPreficedRule());
6919 }
6920
6921 }
6922 otherlv_28=(Token)match(input,RULE_ID,FOLLOW_13); if (state.failed) return current;
6923 if ( state.backtracking==0 ) {
6924
6925 newLeafNode(otherlv_28, grammarAccess.getALSPreficedAccess().getReferredDefinitionALSDefinitionCrossReference_7_1_0_0());
6926
6927 }
6928
6929 }
6930
6931
6932 }
6933
6934
6935 }
6936 break;
6937 case 2 :
6938 // InternalAlloyLanguage.g:2448:6: ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) )
6939 {
6940 // InternalAlloyLanguage.g:2448:6: ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) )
6941 // InternalAlloyLanguage.g:2449:1: (lv_referredNumericOperator_29_0= ruleALSNumericOperator )
6942 {
6943 // InternalAlloyLanguage.g:2449:1: (lv_referredNumericOperator_29_0= ruleALSNumericOperator )
6944 // InternalAlloyLanguage.g:2450:3: lv_referredNumericOperator_29_0= ruleALSNumericOperator
6945 {
6946 if ( state.backtracking==0 ) {
6947
6948 newCompositeNode(grammarAccess.getALSPreficedAccess().getReferredNumericOperatorALSNumericOperatorEnumRuleCall_7_1_1_0());
6949
6950 }
6951 pushFollow(FOLLOW_13);
6952 lv_referredNumericOperator_29_0=ruleALSNumericOperator();
6953
6954 state._fsp--;
6955 if (state.failed) return current;
6956 if ( state.backtracking==0 ) {
6957
6958 if (current==null) {
6959 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
6960 }
6961 set(
6962 current,
6963 "referredNumericOperator",
6964 lv_referredNumericOperator_29_0,
6965 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSNumericOperator");
6966 afterParserOrEnumRuleCall();
6967
6968 }
6969
6970 }
6971
6972
6973 }
6974
6975
6976 }
6977 break;
6978
6979 }
6980
6981 otherlv_30=(Token)match(input,22,FOLLOW_12); if (state.failed) return current;
6982 if ( state.backtracking==0 ) {
6983
6984 newLeafNode(otherlv_30, grammarAccess.getALSPreficedAccess().getLeftSquareBracketKeyword_7_2());
6985
6986 }
6987 // InternalAlloyLanguage.g:2470:1: ( (lv_params_31_0= ruleALSTerm ) )
6988 // InternalAlloyLanguage.g:2471:1: (lv_params_31_0= ruleALSTerm )
6989 {
6990 // InternalAlloyLanguage.g:2471:1: (lv_params_31_0= ruleALSTerm )
6991 // InternalAlloyLanguage.g:2472:3: lv_params_31_0= ruleALSTerm
6992 {
6993 if ( state.backtracking==0 ) {
6994
6995 newCompositeNode(grammarAccess.getALSPreficedAccess().getParamsALSTermParserRuleCall_7_3_0());
6996
6997 }
6998 pushFollow(FOLLOW_14);
6999 lv_params_31_0=ruleALSTerm();
7000
7001 state._fsp--;
7002 if (state.failed) return current;
7003 if ( state.backtracking==0 ) {
7004
7005 if (current==null) {
7006 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
7007 }
7008 add(
7009 current,
7010 "params",
7011 lv_params_31_0,
7012 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
7013 afterParserOrEnumRuleCall();
7014
7015 }
7016
7017 }
7018
7019
7020 }
7021
7022 // InternalAlloyLanguage.g:2488:2: (otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) ) )*
7023 loop41:
7024 do {
7025 int alt41=2;
7026 int LA41_0 = input.LA(1);
7027
7028 if ( (LA41_0==13) ) {
7029 alt41=1;
7030 }
7031
7032
7033 switch (alt41) {
7034 case 1 :
7035 // InternalAlloyLanguage.g:2488:4: otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) )
7036 {
7037 otherlv_32=(Token)match(input,13,FOLLOW_12); if (state.failed) return current;
7038 if ( state.backtracking==0 ) {
7039
7040 newLeafNode(otherlv_32, grammarAccess.getALSPreficedAccess().getCommaKeyword_7_4_0());
7041
7042 }
7043 // InternalAlloyLanguage.g:2492:1: ( (lv_params_33_0= ruleALSTerm ) )
7044 // InternalAlloyLanguage.g:2493:1: (lv_params_33_0= ruleALSTerm )
7045 {
7046 // InternalAlloyLanguage.g:2493:1: (lv_params_33_0= ruleALSTerm )
7047 // InternalAlloyLanguage.g:2494:3: lv_params_33_0= ruleALSTerm
7048 {
7049 if ( state.backtracking==0 ) {
7050
7051 newCompositeNode(grammarAccess.getALSPreficedAccess().getParamsALSTermParserRuleCall_7_4_1_0());
7052
7053 }
7054 pushFollow(FOLLOW_14);
7055 lv_params_33_0=ruleALSTerm();
7056
7057 state._fsp--;
7058 if (state.failed) return current;
7059 if ( state.backtracking==0 ) {
7060
7061 if (current==null) {
7062 current = createModelElementForParent(grammarAccess.getALSPreficedRule());
7063 }
7064 add(
7065 current,
7066 "params",
7067 lv_params_33_0,
7068 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
7069 afterParserOrEnumRuleCall();
7070
7071 }
7072
7073 }
7074
7075
7076 }
7077
7078
7079 }
7080 break;
7081
7082 default :
7083 break loop41;
7084 }
7085 } while (true);
7086
7087 otherlv_34=(Token)match(input,23,FOLLOW_2); if (state.failed) return current;
7088 if ( state.backtracking==0 ) {
7089
7090 newLeafNode(otherlv_34, grammarAccess.getALSPreficedAccess().getRightSquareBracketKeyword_7_5());
7091
7092 }
7093
7094 }
7095
7096
7097 }
7098 break;
7099 case 9 :
7100 // InternalAlloyLanguage.g:2516:5: this_ALSBasicRelationTerm_35= ruleALSBasicRelationTerm
7101 {
7102 if ( state.backtracking==0 ) {
7103
7104 newCompositeNode(grammarAccess.getALSPreficedAccess().getALSBasicRelationTermParserRuleCall_8());
7105
7106 }
7107 pushFollow(FOLLOW_2);
7108 this_ALSBasicRelationTerm_35=ruleALSBasicRelationTerm();
7109
7110 state._fsp--;
7111 if (state.failed) return current;
7112 if ( state.backtracking==0 ) {
7113
7114 current = this_ALSBasicRelationTerm_35;
7115 afterParserOrEnumRuleCall();
7116
7117 }
7118
7119 }
7120 break;
7121
7122 }
7123
7124
7125 }
7126
7127 if ( state.backtracking==0 ) {
7128 leaveRule();
7129 }
7130 }
7131
7132 catch (RecognitionException re) {
7133 recover(input,re);
7134 appendSkippedTokens();
7135 }
7136 finally {
7137 }
7138 return current;
7139 }
7140 // $ANTLR end "ruleALSPreficed"
7141
7142
7143 // $ANTLR start "entryRuleALSVariableDeclaration"
7144 // InternalAlloyLanguage.g:2532:1: entryRuleALSVariableDeclaration returns [EObject current=null] : iv_ruleALSVariableDeclaration= ruleALSVariableDeclaration EOF ;
7145 public final EObject entryRuleALSVariableDeclaration() throws RecognitionException {
7146 EObject current = null;
7147
7148 EObject iv_ruleALSVariableDeclaration = null;
7149
7150
7151 try {
7152 // InternalAlloyLanguage.g:2533:2: (iv_ruleALSVariableDeclaration= ruleALSVariableDeclaration EOF )
7153 // InternalAlloyLanguage.g:2534:2: iv_ruleALSVariableDeclaration= ruleALSVariableDeclaration EOF
7154 {
7155 if ( state.backtracking==0 ) {
7156 newCompositeNode(grammarAccess.getALSVariableDeclarationRule());
7157 }
7158 pushFollow(FOLLOW_1);
7159 iv_ruleALSVariableDeclaration=ruleALSVariableDeclaration();
7160
7161 state._fsp--;
7162 if (state.failed) return current;
7163 if ( state.backtracking==0 ) {
7164 current =iv_ruleALSVariableDeclaration;
7165 }
7166 match(input,EOF,FOLLOW_2); if (state.failed) return current;
7167
7168 }
7169
7170 }
7171
7172 catch (RecognitionException re) {
7173 recover(input,re);
7174 appendSkippedTokens();
7175 }
7176 finally {
7177 }
7178 return current;
7179 }
7180 // $ANTLR end "entryRuleALSVariableDeclaration"
7181
7182
7183 // $ANTLR start "ruleALSVariableDeclaration"
7184 // InternalAlloyLanguage.g:2541:1: ruleALSVariableDeclaration returns [EObject current=null] : ( ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_range_2_0= ruleALSTerm ) ) ) ;
7185 public final EObject ruleALSVariableDeclaration() throws RecognitionException {
7186 EObject current = null;
7187
7188 Token otherlv_1=null;
7189 AntlrDatatypeRuleToken lv_name_0_0 = null;
7190
7191 EObject lv_range_2_0 = null;
7192
7193
7194 enterRule();
7195
7196 try {
7197 // InternalAlloyLanguage.g:2544:28: ( ( ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_range_2_0= ruleALSTerm ) ) ) )
7198 // InternalAlloyLanguage.g:2545:1: ( ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_range_2_0= ruleALSTerm ) ) )
7199 {
7200 // InternalAlloyLanguage.g:2545:1: ( ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_range_2_0= ruleALSTerm ) ) )
7201 // InternalAlloyLanguage.g:2545:2: ( (lv_name_0_0= ruleALSID ) ) otherlv_1= ':' ( (lv_range_2_0= ruleALSTerm ) )
7202 {
7203 // InternalAlloyLanguage.g:2545:2: ( (lv_name_0_0= ruleALSID ) )
7204 // InternalAlloyLanguage.g:2546:1: (lv_name_0_0= ruleALSID )
7205 {
7206 // InternalAlloyLanguage.g:2546:1: (lv_name_0_0= ruleALSID )
7207 // InternalAlloyLanguage.g:2547:3: lv_name_0_0= ruleALSID
7208 {
7209 if ( state.backtracking==0 ) {
7210
7211 newCompositeNode(grammarAccess.getALSVariableDeclarationAccess().getNameALSIDParserRuleCall_0_0());
7212
7213 }
7214 pushFollow(FOLLOW_11);
7215 lv_name_0_0=ruleALSID();
7216
7217 state._fsp--;
7218 if (state.failed) return current;
7219 if ( state.backtracking==0 ) {
7220
7221 if (current==null) {
7222 current = createModelElementForParent(grammarAccess.getALSVariableDeclarationRule());
7223 }
7224 set(
7225 current,
7226 "name",
7227 lv_name_0_0,
7228 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID");
7229 afterParserOrEnumRuleCall();
7230
7231 }
7232
7233 }
7234
7235
7236 }
7237
7238 otherlv_1=(Token)match(input,20,FOLLOW_12); if (state.failed) return current;
7239 if ( state.backtracking==0 ) {
7240
7241 newLeafNode(otherlv_1, grammarAccess.getALSVariableDeclarationAccess().getColonKeyword_1());
7242
7243 }
7244 // InternalAlloyLanguage.g:2567:1: ( (lv_range_2_0= ruleALSTerm ) )
7245 // InternalAlloyLanguage.g:2568:1: (lv_range_2_0= ruleALSTerm )
7246 {
7247 // InternalAlloyLanguage.g:2568:1: (lv_range_2_0= ruleALSTerm )
7248 // InternalAlloyLanguage.g:2569:3: lv_range_2_0= ruleALSTerm
7249 {
7250 if ( state.backtracking==0 ) {
7251
7252 newCompositeNode(grammarAccess.getALSVariableDeclarationAccess().getRangeALSTermParserRuleCall_2_0());
7253
7254 }
7255 pushFollow(FOLLOW_2);
7256 lv_range_2_0=ruleALSTerm();
7257
7258 state._fsp--;
7259 if (state.failed) return current;
7260 if ( state.backtracking==0 ) {
7261
7262 if (current==null) {
7263 current = createModelElementForParent(grammarAccess.getALSVariableDeclarationRule());
7264 }
7265 set(
7266 current,
7267 "range",
7268 lv_range_2_0,
7269 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm");
7270 afterParserOrEnumRuleCall();
7271
7272 }
7273
7274 }
7275
7276
7277 }
7278
7279
7280 }
7281
7282
7283 }
7284
7285 if ( state.backtracking==0 ) {
7286 leaveRule();
7287 }
7288 }
7289
7290 catch (RecognitionException re) {
7291 recover(input,re);
7292 appendSkippedTokens();
7293 }
7294 finally {
7295 }
7296 return current;
7297 }
7298 // $ANTLR end "ruleALSVariableDeclaration"
7299
7300
7301 // $ANTLR start "entryRuleALSBasicRelationTerm"
7302 // InternalAlloyLanguage.g:2593:1: entryRuleALSBasicRelationTerm returns [EObject current=null] : iv_ruleALSBasicRelationTerm= ruleALSBasicRelationTerm EOF ;
7303 public final EObject entryRuleALSBasicRelationTerm() throws RecognitionException {
7304 EObject current = null;
7305
7306 EObject iv_ruleALSBasicRelationTerm = null;
7307
7308
7309 try {
7310 // InternalAlloyLanguage.g:2594:2: (iv_ruleALSBasicRelationTerm= ruleALSBasicRelationTerm EOF )
7311 // InternalAlloyLanguage.g:2595:2: iv_ruleALSBasicRelationTerm= ruleALSBasicRelationTerm EOF
7312 {
7313 if ( state.backtracking==0 ) {
7314 newCompositeNode(grammarAccess.getALSBasicRelationTermRule());
7315 }
7316 pushFollow(FOLLOW_1);
7317 iv_ruleALSBasicRelationTerm=ruleALSBasicRelationTerm();
7318
7319 state._fsp--;
7320 if (state.failed) return current;
7321 if ( state.backtracking==0 ) {
7322 current =iv_ruleALSBasicRelationTerm;
7323 }
7324 match(input,EOF,FOLLOW_2); if (state.failed) return current;
7325
7326 }
7327
7328 }
7329
7330 catch (RecognitionException re) {
7331 recover(input,re);
7332 appendSkippedTokens();
7333 }
7334 finally {
7335 }
7336 return current;
7337 }
7338 // $ANTLR end "entryRuleALSBasicRelationTerm"
7339
7340
7341 // $ANTLR start "ruleALSBasicRelationTerm"
7342 // InternalAlloyLanguage.g:2602:1: ruleALSBasicRelationTerm returns [EObject current=null] : ( ( () otherlv_1= 'none' ) | ( () otherlv_3= 'iden' ) | ( () otherlv_5= 'univ' ) | ( () otherlv_7= 'Int' ) | ( () ( (otherlv_9= RULE_ID ) ) ) | ( () ( (lv_value_11_0= RULE_INT ) ) ) | (otherlv_12= '(' this_ALSTerm_13= ruleALSTerm otherlv_14= ')' ) ) ;
7343 public final EObject ruleALSBasicRelationTerm() throws RecognitionException {
7344 EObject current = null;
7345
7346 Token otherlv_1=null;
7347 Token otherlv_3=null;
7348 Token otherlv_5=null;
7349 Token otherlv_7=null;
7350 Token otherlv_9=null;
7351 Token lv_value_11_0=null;
7352 Token otherlv_12=null;
7353 Token otherlv_14=null;
7354 EObject this_ALSTerm_13 = null;
7355
7356
7357 enterRule();
7358
7359 try {
7360 // InternalAlloyLanguage.g:2605:28: ( ( ( () otherlv_1= 'none' ) | ( () otherlv_3= 'iden' ) | ( () otherlv_5= 'univ' ) | ( () otherlv_7= 'Int' ) | ( () ( (otherlv_9= RULE_ID ) ) ) | ( () ( (lv_value_11_0= RULE_INT ) ) ) | (otherlv_12= '(' this_ALSTerm_13= ruleALSTerm otherlv_14= ')' ) ) )
7361 // InternalAlloyLanguage.g:2606:1: ( ( () otherlv_1= 'none' ) | ( () otherlv_3= 'iden' ) | ( () otherlv_5= 'univ' ) | ( () otherlv_7= 'Int' ) | ( () ( (otherlv_9= RULE_ID ) ) ) | ( () ( (lv_value_11_0= RULE_INT ) ) ) | (otherlv_12= '(' this_ALSTerm_13= ruleALSTerm otherlv_14= ')' ) )
7362 {
7363 // InternalAlloyLanguage.g:2606:1: ( ( () otherlv_1= 'none' ) | ( () otherlv_3= 'iden' ) | ( () otherlv_5= 'univ' ) | ( () otherlv_7= 'Int' ) | ( () ( (otherlv_9= RULE_ID ) ) ) | ( () ( (lv_value_11_0= RULE_INT ) ) ) | (otherlv_12= '(' this_ALSTerm_13= ruleALSTerm otherlv_14= ')' ) )
7364 int alt43=7;
7365 switch ( input.LA(1) ) {
7366 case 56:
7367 {
7368 alt43=1;
7369 }
7370 break;
7371 case 57:
7372 {
7373 alt43=2;
7374 }
7375 break;
7376 case 58:
7377 {
7378 alt43=3;
7379 }
7380 break;
7381 case 59:
7382 {
7383 alt43=4;
7384 }
7385 break;
7386 case RULE_ID:
7387 {
7388 alt43=5;
7389 }
7390 break;
7391 case RULE_INT:
7392 {
7393 alt43=6;
7394 }
7395 break;
7396 case 60:
7397 {
7398 alt43=7;
7399 }
7400 break;
7401 default:
7402 if (state.backtracking>0) {state.failed=true; return current;}
7403 NoViableAltException nvae =
7404 new NoViableAltException("", 43, 0, input);
7405
7406 throw nvae;
7407 }
7408
7409 switch (alt43) {
7410 case 1 :
7411 // InternalAlloyLanguage.g:2606:2: ( () otherlv_1= 'none' )
7412 {
7413 // InternalAlloyLanguage.g:2606:2: ( () otherlv_1= 'none' )
7414 // InternalAlloyLanguage.g:2606:3: () otherlv_1= 'none'
7415 {
7416 // InternalAlloyLanguage.g:2606:3: ()
7417 // InternalAlloyLanguage.g:2607:5:
7418 {
7419 if ( state.backtracking==0 ) {
7420
7421 current = forceCreateModelElement(
7422 grammarAccess.getALSBasicRelationTermAccess().getALSNoneAction_0_0(),
7423 current);
7424
7425 }
7426
7427 }
7428
7429 otherlv_1=(Token)match(input,56,FOLLOW_2); if (state.failed) return current;
7430 if ( state.backtracking==0 ) {
7431
7432 newLeafNode(otherlv_1, grammarAccess.getALSBasicRelationTermAccess().getNoneKeyword_0_1());
7433
7434 }
7435
7436 }
7437
7438
7439 }
7440 break;
7441 case 2 :
7442 // InternalAlloyLanguage.g:2617:6: ( () otherlv_3= 'iden' )
7443 {
7444 // InternalAlloyLanguage.g:2617:6: ( () otherlv_3= 'iden' )
7445 // InternalAlloyLanguage.g:2617:7: () otherlv_3= 'iden'
7446 {
7447 // InternalAlloyLanguage.g:2617:7: ()
7448 // InternalAlloyLanguage.g:2618:5:
7449 {
7450 if ( state.backtracking==0 ) {
7451
7452 current = forceCreateModelElement(
7453 grammarAccess.getALSBasicRelationTermAccess().getALSIdenAction_1_0(),
7454 current);
7455
7456 }
7457
7458 }
7459
7460 otherlv_3=(Token)match(input,57,FOLLOW_2); if (state.failed) return current;
7461 if ( state.backtracking==0 ) {
7462
7463 newLeafNode(otherlv_3, grammarAccess.getALSBasicRelationTermAccess().getIdenKeyword_1_1());
7464
7465 }
7466
7467 }
7468
7469
7470 }
7471 break;
7472 case 3 :
7473 // InternalAlloyLanguage.g:2628:6: ( () otherlv_5= 'univ' )
7474 {
7475 // InternalAlloyLanguage.g:2628:6: ( () otherlv_5= 'univ' )
7476 // InternalAlloyLanguage.g:2628:7: () otherlv_5= 'univ'
7477 {
7478 // InternalAlloyLanguage.g:2628:7: ()
7479 // InternalAlloyLanguage.g:2629:5:
7480 {
7481 if ( state.backtracking==0 ) {
7482
7483 current = forceCreateModelElement(
7484 grammarAccess.getALSBasicRelationTermAccess().getALSUnivAction_2_0(),
7485 current);
7486
7487 }
7488
7489 }
7490
7491 otherlv_5=(Token)match(input,58,FOLLOW_2); if (state.failed) return current;
7492 if ( state.backtracking==0 ) {
7493
7494 newLeafNode(otherlv_5, grammarAccess.getALSBasicRelationTermAccess().getUnivKeyword_2_1());
7495
7496 }
7497
7498 }
7499
7500
7501 }
7502 break;
7503 case 4 :
7504 // InternalAlloyLanguage.g:2639:6: ( () otherlv_7= 'Int' )
7505 {
7506 // InternalAlloyLanguage.g:2639:6: ( () otherlv_7= 'Int' )
7507 // InternalAlloyLanguage.g:2639:7: () otherlv_7= 'Int'
7508 {
7509 // InternalAlloyLanguage.g:2639:7: ()
7510 // InternalAlloyLanguage.g:2640:5:
7511 {
7512 if ( state.backtracking==0 ) {
7513
7514 current = forceCreateModelElement(
7515 grammarAccess.getALSBasicRelationTermAccess().getALSIntAction_3_0(),
7516 current);
7517
7518 }
7519
7520 }
7521
7522 otherlv_7=(Token)match(input,59,FOLLOW_2); if (state.failed) return current;
7523 if ( state.backtracking==0 ) {
7524
7525 newLeafNode(otherlv_7, grammarAccess.getALSBasicRelationTermAccess().getIntKeyword_3_1());
7526
7527 }
7528
7529 }
7530
7531
7532 }
7533 break;
7534 case 5 :
7535 // InternalAlloyLanguage.g:2650:6: ( () ( (otherlv_9= RULE_ID ) ) )
7536 {
7537 // InternalAlloyLanguage.g:2650:6: ( () ( (otherlv_9= RULE_ID ) ) )
7538 // InternalAlloyLanguage.g:2650:7: () ( (otherlv_9= RULE_ID ) )
7539 {
7540 // InternalAlloyLanguage.g:2650:7: ()
7541 // InternalAlloyLanguage.g:2651:5:
7542 {
7543 if ( state.backtracking==0 ) {
7544
7545 current = forceCreateModelElement(
7546 grammarAccess.getALSBasicRelationTermAccess().getALSReferenceAction_4_0(),
7547 current);
7548
7549 }
7550
7551 }
7552
7553 // InternalAlloyLanguage.g:2656:2: ( (otherlv_9= RULE_ID ) )
7554 // InternalAlloyLanguage.g:2657:1: (otherlv_9= RULE_ID )
7555 {
7556 // InternalAlloyLanguage.g:2657:1: (otherlv_9= RULE_ID )
7557 // InternalAlloyLanguage.g:2658:3: otherlv_9= RULE_ID
7558 {
7559 if ( state.backtracking==0 ) {
7560
7561 if (current==null) {
7562 current = createModelElement(grammarAccess.getALSBasicRelationTermRule());
7563 }
7564
7565 }
7566 otherlv_9=(Token)match(input,RULE_ID,FOLLOW_2); if (state.failed) return current;
7567 if ( state.backtracking==0 ) {
7568
7569 newLeafNode(otherlv_9, grammarAccess.getALSBasicRelationTermAccess().getReferredALSRelationDeclarationCrossReference_4_1_0());
7570
7571 }
7572
7573 }
7574
7575
7576 }
7577
7578
7579 }
7580
7581
7582 }
7583 break;
7584 case 6 :
7585 // InternalAlloyLanguage.g:2670:6: ( () ( (lv_value_11_0= RULE_INT ) ) )
7586 {
7587 // InternalAlloyLanguage.g:2670:6: ( () ( (lv_value_11_0= RULE_INT ) ) )
7588 // InternalAlloyLanguage.g:2670:7: () ( (lv_value_11_0= RULE_INT ) )
7589 {
7590 // InternalAlloyLanguage.g:2670:7: ()
7591 // InternalAlloyLanguage.g:2671:5:
7592 {
7593 if ( state.backtracking==0 ) {
7594
7595 current = forceCreateModelElement(
7596 grammarAccess.getALSBasicRelationTermAccess().getALSNumberLiteralAction_5_0(),
7597 current);
7598
7599 }
7600
7601 }
7602
7603 // InternalAlloyLanguage.g:2676:2: ( (lv_value_11_0= RULE_INT ) )
7604 // InternalAlloyLanguage.g:2677:1: (lv_value_11_0= RULE_INT )
7605 {
7606 // InternalAlloyLanguage.g:2677:1: (lv_value_11_0= RULE_INT )
7607 // InternalAlloyLanguage.g:2678:3: lv_value_11_0= RULE_INT
7608 {
7609 lv_value_11_0=(Token)match(input,RULE_INT,FOLLOW_2); if (state.failed) return current;
7610 if ( state.backtracking==0 ) {
7611
7612 newLeafNode(lv_value_11_0, grammarAccess.getALSBasicRelationTermAccess().getValueINTTerminalRuleCall_5_1_0());
7613
7614 }
7615 if ( state.backtracking==0 ) {
7616
7617 if (current==null) {
7618 current = createModelElement(grammarAccess.getALSBasicRelationTermRule());
7619 }
7620 setWithLastConsumed(
7621 current,
7622 "value",
7623 lv_value_11_0,
7624 "org.eclipse.xtext.common.Terminals.INT");
7625
7626 }
7627
7628 }
7629
7630
7631 }
7632
7633
7634 }
7635
7636
7637 }
7638 break;
7639 case 7 :
7640 // InternalAlloyLanguage.g:2695:6: (otherlv_12= '(' this_ALSTerm_13= ruleALSTerm otherlv_14= ')' )
7641 {
7642 // InternalAlloyLanguage.g:2695:6: (otherlv_12= '(' this_ALSTerm_13= ruleALSTerm otherlv_14= ')' )
7643 // InternalAlloyLanguage.g:2695:8: otherlv_12= '(' this_ALSTerm_13= ruleALSTerm otherlv_14= ')'
7644 {
7645 otherlv_12=(Token)match(input,60,FOLLOW_12); if (state.failed) return current;
7646 if ( state.backtracking==0 ) {
7647
7648 newLeafNode(otherlv_12, grammarAccess.getALSBasicRelationTermAccess().getLeftParenthesisKeyword_6_0());
7649
7650 }
7651 if ( state.backtracking==0 ) {
7652
7653 newCompositeNode(grammarAccess.getALSBasicRelationTermAccess().getALSTermParserRuleCall_6_1());
7654
7655 }
7656 pushFollow(FOLLOW_34);
7657 this_ALSTerm_13=ruleALSTerm();
7658
7659 state._fsp--;
7660 if (state.failed) return current;
7661 if ( state.backtracking==0 ) {
7662
7663 current = this_ALSTerm_13;
7664 afterParserOrEnumRuleCall();
7665
7666 }
7667 otherlv_14=(Token)match(input,61,FOLLOW_2); if (state.failed) return current;
7668 if ( state.backtracking==0 ) {
7669
7670 newLeafNode(otherlv_14, grammarAccess.getALSBasicRelationTermAccess().getRightParenthesisKeyword_6_2());
7671
7672 }
7673
7674 }
7675
7676
7677 }
7678 break;
7679
7680 }
7681
7682
7683 }
7684
7685 if ( state.backtracking==0 ) {
7686 leaveRule();
7687 }
7688 }
7689
7690 catch (RecognitionException re) {
7691 recover(input,re);
7692 appendSkippedTokens();
7693 }
7694 finally {
7695 }
7696 return current;
7697 }
7698 // $ANTLR end "ruleALSBasicRelationTerm"
7699
7700
7701 // $ANTLR start "entryRuleALSRunCommand"
7702 // InternalAlloyLanguage.g:2720:1: entryRuleALSRunCommand returns [EObject current=null] : iv_ruleALSRunCommand= ruleALSRunCommand EOF ;
7703 public final EObject entryRuleALSRunCommand() throws RecognitionException {
7704 EObject current = null;
7705
7706 EObject iv_ruleALSRunCommand = null;
7707
7708
7709 try {
7710 // InternalAlloyLanguage.g:2721:2: (iv_ruleALSRunCommand= ruleALSRunCommand EOF )
7711 // InternalAlloyLanguage.g:2722:2: iv_ruleALSRunCommand= ruleALSRunCommand EOF
7712 {
7713 if ( state.backtracking==0 ) {
7714 newCompositeNode(grammarAccess.getALSRunCommandRule());
7715 }
7716 pushFollow(FOLLOW_1);
7717 iv_ruleALSRunCommand=ruleALSRunCommand();
7718
7719 state._fsp--;
7720 if (state.failed) return current;
7721 if ( state.backtracking==0 ) {
7722 current =iv_ruleALSRunCommand;
7723 }
7724 match(input,EOF,FOLLOW_2); if (state.failed) return current;
7725
7726 }
7727
7728 }
7729
7730 catch (RecognitionException re) {
7731 recover(input,re);
7732 appendSkippedTokens();
7733 }
7734 finally {
7735 }
7736 return current;
7737 }
7738 // $ANTLR end "entryRuleALSRunCommand"
7739
7740
7741 // $ANTLR start "ruleALSRunCommand"
7742 // InternalAlloyLanguage.g:2729:1: ruleALSRunCommand returns [EObject current=null] : ( () otherlv_1= 'run' otherlv_2= '{' otherlv_3= '}' (otherlv_4= 'for' ( (lv_typeScopes_5_0= ruleALSTypeScope ) ) (otherlv_6= ',' ( (lv_typeScopes_7_0= ruleALSTypeScope ) ) )* )? ) ;
7743 public final EObject ruleALSRunCommand() throws RecognitionException {
7744 EObject current = null;
7745
7746 Token otherlv_1=null;
7747 Token otherlv_2=null;
7748 Token otherlv_3=null;
7749 Token otherlv_4=null;
7750 Token otherlv_6=null;
7751 EObject lv_typeScopes_5_0 = null;
7752
7753 EObject lv_typeScopes_7_0 = null;
7754
7755
7756 enterRule();
7757
7758 try {
7759 // InternalAlloyLanguage.g:2732:28: ( ( () otherlv_1= 'run' otherlv_2= '{' otherlv_3= '}' (otherlv_4= 'for' ( (lv_typeScopes_5_0= ruleALSTypeScope ) ) (otherlv_6= ',' ( (lv_typeScopes_7_0= ruleALSTypeScope ) ) )* )? ) )
7760 // InternalAlloyLanguage.g:2733:1: ( () otherlv_1= 'run' otherlv_2= '{' otherlv_3= '}' (otherlv_4= 'for' ( (lv_typeScopes_5_0= ruleALSTypeScope ) ) (otherlv_6= ',' ( (lv_typeScopes_7_0= ruleALSTypeScope ) ) )* )? )
7761 {
7762 // InternalAlloyLanguage.g:2733:1: ( () otherlv_1= 'run' otherlv_2= '{' otherlv_3= '}' (otherlv_4= 'for' ( (lv_typeScopes_5_0= ruleALSTypeScope ) ) (otherlv_6= ',' ( (lv_typeScopes_7_0= ruleALSTypeScope ) ) )* )? )
7763 // InternalAlloyLanguage.g:2733:2: () otherlv_1= 'run' otherlv_2= '{' otherlv_3= '}' (otherlv_4= 'for' ( (lv_typeScopes_5_0= ruleALSTypeScope ) ) (otherlv_6= ',' ( (lv_typeScopes_7_0= ruleALSTypeScope ) ) )* )?
7764 {
7765 // InternalAlloyLanguage.g:2733:2: ()
7766 // InternalAlloyLanguage.g:2734:5:
7767 {
7768 if ( state.backtracking==0 ) {
7769
7770 current = forceCreateModelElement(
7771 grammarAccess.getALSRunCommandAccess().getALSRunCommandAction_0(),
7772 current);
7773
7774 }
7775
7776 }
7777
7778 otherlv_1=(Token)match(input,62,FOLLOW_5); if (state.failed) return current;
7779 if ( state.backtracking==0 ) {
7780
7781 newLeafNode(otherlv_1, grammarAccess.getALSRunCommandAccess().getRunKeyword_1());
7782
7783 }
7784 otherlv_2=(Token)match(input,12,FOLLOW_15); if (state.failed) return current;
7785 if ( state.backtracking==0 ) {
7786
7787 newLeafNode(otherlv_2, grammarAccess.getALSRunCommandAccess().getLeftCurlyBracketKeyword_2());
7788
7789 }
7790 otherlv_3=(Token)match(input,14,FOLLOW_35); if (state.failed) return current;
7791 if ( state.backtracking==0 ) {
7792
7793 newLeafNode(otherlv_3, grammarAccess.getALSRunCommandAccess().getRightCurlyBracketKeyword_3());
7794
7795 }
7796 // InternalAlloyLanguage.g:2751:1: (otherlv_4= 'for' ( (lv_typeScopes_5_0= ruleALSTypeScope ) ) (otherlv_6= ',' ( (lv_typeScopes_7_0= ruleALSTypeScope ) ) )* )?
7797 int alt45=2;
7798 int LA45_0 = input.LA(1);
7799
7800 if ( (LA45_0==63) ) {
7801 alt45=1;
7802 }
7803 switch (alt45) {
7804 case 1 :
7805 // InternalAlloyLanguage.g:2751:3: otherlv_4= 'for' ( (lv_typeScopes_5_0= ruleALSTypeScope ) ) (otherlv_6= ',' ( (lv_typeScopes_7_0= ruleALSTypeScope ) ) )*
7806 {
7807 otherlv_4=(Token)match(input,63,FOLLOW_36); if (state.failed) return current;
7808 if ( state.backtracking==0 ) {
7809
7810 newLeafNode(otherlv_4, grammarAccess.getALSRunCommandAccess().getForKeyword_4_0());
7811
7812 }
7813 // InternalAlloyLanguage.g:2755:1: ( (lv_typeScopes_5_0= ruleALSTypeScope ) )
7814 // InternalAlloyLanguage.g:2756:1: (lv_typeScopes_5_0= ruleALSTypeScope )
7815 {
7816 // InternalAlloyLanguage.g:2756:1: (lv_typeScopes_5_0= ruleALSTypeScope )
7817 // InternalAlloyLanguage.g:2757:3: lv_typeScopes_5_0= ruleALSTypeScope
7818 {
7819 if ( state.backtracking==0 ) {
7820
7821 newCompositeNode(grammarAccess.getALSRunCommandAccess().getTypeScopesALSTypeScopeParserRuleCall_4_1_0());
7822
7823 }
7824 pushFollow(FOLLOW_37);
7825 lv_typeScopes_5_0=ruleALSTypeScope();
7826
7827 state._fsp--;
7828 if (state.failed) return current;
7829 if ( state.backtracking==0 ) {
7830
7831 if (current==null) {
7832 current = createModelElementForParent(grammarAccess.getALSRunCommandRule());
7833 }
7834 add(
7835 current,
7836 "typeScopes",
7837 lv_typeScopes_5_0,
7838 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTypeScope");
7839 afterParserOrEnumRuleCall();
7840
7841 }
7842
7843 }
7844
7845
7846 }
7847
7848 // InternalAlloyLanguage.g:2773:2: (otherlv_6= ',' ( (lv_typeScopes_7_0= ruleALSTypeScope ) ) )*
7849 loop44:
7850 do {
7851 int alt44=2;
7852 int LA44_0 = input.LA(1);
7853
7854 if ( (LA44_0==13) ) {
7855 alt44=1;
7856 }
7857
7858
7859 switch (alt44) {
7860 case 1 :
7861 // InternalAlloyLanguage.g:2773:4: otherlv_6= ',' ( (lv_typeScopes_7_0= ruleALSTypeScope ) )
7862 {
7863 otherlv_6=(Token)match(input,13,FOLLOW_36); if (state.failed) return current;
7864 if ( state.backtracking==0 ) {
7865
7866 newLeafNode(otherlv_6, grammarAccess.getALSRunCommandAccess().getCommaKeyword_4_2_0());
7867
7868 }
7869 // InternalAlloyLanguage.g:2777:1: ( (lv_typeScopes_7_0= ruleALSTypeScope ) )
7870 // InternalAlloyLanguage.g:2778:1: (lv_typeScopes_7_0= ruleALSTypeScope )
7871 {
7872 // InternalAlloyLanguage.g:2778:1: (lv_typeScopes_7_0= ruleALSTypeScope )
7873 // InternalAlloyLanguage.g:2779:3: lv_typeScopes_7_0= ruleALSTypeScope
7874 {
7875 if ( state.backtracking==0 ) {
7876
7877 newCompositeNode(grammarAccess.getALSRunCommandAccess().getTypeScopesALSTypeScopeParserRuleCall_4_2_1_0());
7878
7879 }
7880 pushFollow(FOLLOW_37);
7881 lv_typeScopes_7_0=ruleALSTypeScope();
7882
7883 state._fsp--;
7884 if (state.failed) return current;
7885 if ( state.backtracking==0 ) {
7886
7887 if (current==null) {
7888 current = createModelElementForParent(grammarAccess.getALSRunCommandRule());
7889 }
7890 add(
7891 current,
7892 "typeScopes",
7893 lv_typeScopes_7_0,
7894 "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTypeScope");
7895 afterParserOrEnumRuleCall();
7896
7897 }
7898
7899 }
7900
7901
7902 }
7903
7904
7905 }
7906 break;
7907
7908 default :
7909 break loop44;
7910 }
7911 } while (true);
7912
7913
7914 }
7915 break;
7916
7917 }
7918
7919
7920 }
7921
7922
7923 }
7924
7925 if ( state.backtracking==0 ) {
7926 leaveRule();
7927 }
7928 }
7929
7930 catch (RecognitionException re) {
7931 recover(input,re);
7932 appendSkippedTokens();
7933 }
7934 finally {
7935 }
7936 return current;
7937 }
7938 // $ANTLR end "ruleALSRunCommand"
7939
7940
7941 // $ANTLR start "entryRuleALSTypeScope"
7942 // InternalAlloyLanguage.g:2803:1: entryRuleALSTypeScope returns [EObject current=null] : iv_ruleALSTypeScope= ruleALSTypeScope EOF ;
7943 public final EObject entryRuleALSTypeScope() throws RecognitionException {
7944 EObject current = null;
7945
7946 EObject iv_ruleALSTypeScope = null;
7947
7948
7949 try {
7950 // InternalAlloyLanguage.g:2804:2: (iv_ruleALSTypeScope= ruleALSTypeScope EOF )
7951 // InternalAlloyLanguage.g:2805:2: iv_ruleALSTypeScope= ruleALSTypeScope EOF
7952 {
7953 if ( state.backtracking==0 ) {
7954 newCompositeNode(grammarAccess.getALSTypeScopeRule());
7955 }
7956 pushFollow(FOLLOW_1);
7957 iv_ruleALSTypeScope=ruleALSTypeScope();
7958
7959 state._fsp--;
7960 if (state.failed) return current;
7961 if ( state.backtracking==0 ) {
7962 current =iv_ruleALSTypeScope;
7963 }
7964 match(input,EOF,FOLLOW_2); if (state.failed) return current;
7965
7966 }
7967
7968 }
7969
7970 catch (RecognitionException re) {
7971 recover(input,re);
7972 appendSkippedTokens();
7973 }
7974 finally {
7975 }
7976 return current;
7977 }
7978 // $ANTLR end "entryRuleALSTypeScope"
7979
7980
7981 // $ANTLR start "ruleALSTypeScope"
7982 // InternalAlloyLanguage.g:2812:1: ruleALSTypeScope returns [EObject current=null] : (this_ALSSigScope_0= ruleALSSigScope | this_ALSIntScope_1= ruleALSIntScope ) ;
7983 public final EObject ruleALSTypeScope() throws RecognitionException {
7984 EObject current = null;
7985
7986 EObject this_ALSSigScope_0 = null;
7987
7988 EObject this_ALSIntScope_1 = null;
7989
7990
7991 enterRule();
7992
7993 try {
7994 // InternalAlloyLanguage.g:2815:28: ( (this_ALSSigScope_0= ruleALSSigScope | this_ALSIntScope_1= ruleALSIntScope ) )
7995 // InternalAlloyLanguage.g:2816:1: (this_ALSSigScope_0= ruleALSSigScope | this_ALSIntScope_1= ruleALSIntScope )
7996 {
7997 // InternalAlloyLanguage.g:2816:1: (this_ALSSigScope_0= ruleALSSigScope | this_ALSIntScope_1= ruleALSIntScope )
7998 int alt46=2;
7999 int LA46_0 = input.LA(1);
8000
8001 if ( (LA46_0==64) ) {
8002 alt46=1;
8003 }
8004 else if ( (LA46_0==RULE_INT) ) {
8005 int LA46_2 = input.LA(2);
8006
8007 if ( (LA46_2==RULE_ID) ) {
8008 alt46=1;
8009 }
8010 else if ( (LA46_2==59) ) {
8011 alt46=2;
8012 }
8013 else {
8014 if (state.backtracking>0) {state.failed=true; return current;}
8015 NoViableAltException nvae =
8016 new NoViableAltException("", 46, 2, input);
8017
8018 throw nvae;
8019 }
8020 }
8021 else {
8022 if (state.backtracking>0) {state.failed=true; return current;}
8023 NoViableAltException nvae =
8024 new NoViableAltException("", 46, 0, input);
8025
8026 throw nvae;
8027 }
8028 switch (alt46) {
8029 case 1 :
8030 // InternalAlloyLanguage.g:2817:5: this_ALSSigScope_0= ruleALSSigScope
8031 {
8032 if ( state.backtracking==0 ) {
8033
8034 newCompositeNode(grammarAccess.getALSTypeScopeAccess().getALSSigScopeParserRuleCall_0());
8035
8036 }
8037 pushFollow(FOLLOW_2);
8038 this_ALSSigScope_0=ruleALSSigScope();
8039
8040 state._fsp--;
8041 if (state.failed) return current;
8042 if ( state.backtracking==0 ) {
8043
8044 current = this_ALSSigScope_0;
8045 afterParserOrEnumRuleCall();
8046
8047 }
8048
8049 }
8050 break;
8051 case 2 :
8052 // InternalAlloyLanguage.g:2827:5: this_ALSIntScope_1= ruleALSIntScope
8053 {
8054 if ( state.backtracking==0 ) {
8055
8056 newCompositeNode(grammarAccess.getALSTypeScopeAccess().getALSIntScopeParserRuleCall_1());
8057
8058 }
8059 pushFollow(FOLLOW_2);
8060 this_ALSIntScope_1=ruleALSIntScope();
8061
8062 state._fsp--;
8063 if (state.failed) return current;
8064 if ( state.backtracking==0 ) {
8065
8066 current = this_ALSIntScope_1;
8067 afterParserOrEnumRuleCall();
8068
8069 }
8070
8071 }
8072 break;
8073
8074 }
8075
8076
8077 }
8078
8079 if ( state.backtracking==0 ) {
8080 leaveRule();
8081 }
8082 }
8083
8084 catch (RecognitionException re) {
8085 recover(input,re);
8086 appendSkippedTokens();
8087 }
8088 finally {
8089 }
8090 return current;
8091 }
8092 // $ANTLR end "ruleALSTypeScope"
8093
8094
8095 // $ANTLR start "entryRuleALSSigScope"
8096 // InternalAlloyLanguage.g:2843:1: entryRuleALSSigScope returns [EObject current=null] : iv_ruleALSSigScope= ruleALSSigScope EOF ;
8097 public final EObject entryRuleALSSigScope() throws RecognitionException {
8098 EObject current = null;
8099
8100 EObject iv_ruleALSSigScope = null;
8101
8102
8103 try {
8104 // InternalAlloyLanguage.g:2844:2: (iv_ruleALSSigScope= ruleALSSigScope EOF )
8105 // InternalAlloyLanguage.g:2845:2: iv_ruleALSSigScope= ruleALSSigScope EOF
8106 {
8107 if ( state.backtracking==0 ) {
8108 newCompositeNode(grammarAccess.getALSSigScopeRule());
8109 }
8110 pushFollow(FOLLOW_1);
8111 iv_ruleALSSigScope=ruleALSSigScope();
8112
8113 state._fsp--;
8114 if (state.failed) return current;
8115 if ( state.backtracking==0 ) {
8116 current =iv_ruleALSSigScope;
8117 }
8118 match(input,EOF,FOLLOW_2); if (state.failed) return current;
8119
8120 }
8121
8122 }
8123
8124 catch (RecognitionException re) {
8125 recover(input,re);
8126 appendSkippedTokens();
8127 }
8128 finally {
8129 }
8130 return current;
8131 }
8132 // $ANTLR end "entryRuleALSSigScope"
8133
8134
8135 // $ANTLR start "ruleALSSigScope"
8136 // InternalAlloyLanguage.g:2852:1: ruleALSSigScope returns [EObject current=null] : ( ( (lv_exactly_0_0= 'exactly' ) )? ( (lv_number_1_0= RULE_INT ) ) ( (otherlv_2= RULE_ID ) ) ) ;
8137 public final EObject ruleALSSigScope() throws RecognitionException {
8138 EObject current = null;
8139
8140 Token lv_exactly_0_0=null;
8141 Token lv_number_1_0=null;
8142 Token otherlv_2=null;
8143
8144 enterRule();
8145
8146 try {
8147 // InternalAlloyLanguage.g:2855:28: ( ( ( (lv_exactly_0_0= 'exactly' ) )? ( (lv_number_1_0= RULE_INT ) ) ( (otherlv_2= RULE_ID ) ) ) )
8148 // InternalAlloyLanguage.g:2856:1: ( ( (lv_exactly_0_0= 'exactly' ) )? ( (lv_number_1_0= RULE_INT ) ) ( (otherlv_2= RULE_ID ) ) )
8149 {
8150 // InternalAlloyLanguage.g:2856:1: ( ( (lv_exactly_0_0= 'exactly' ) )? ( (lv_number_1_0= RULE_INT ) ) ( (otherlv_2= RULE_ID ) ) )
8151 // InternalAlloyLanguage.g:2856:2: ( (lv_exactly_0_0= 'exactly' ) )? ( (lv_number_1_0= RULE_INT ) ) ( (otherlv_2= RULE_ID ) )
8152 {
8153 // InternalAlloyLanguage.g:2856:2: ( (lv_exactly_0_0= 'exactly' ) )?
8154 int alt47=2;
8155 int LA47_0 = input.LA(1);
8156
8157 if ( (LA47_0==64) ) {
8158 alt47=1;
8159 }
8160 switch (alt47) {
8161 case 1 :
8162 // InternalAlloyLanguage.g:2857:1: (lv_exactly_0_0= 'exactly' )
8163 {
8164 // InternalAlloyLanguage.g:2857:1: (lv_exactly_0_0= 'exactly' )
8165 // InternalAlloyLanguage.g:2858:3: lv_exactly_0_0= 'exactly'
8166 {
8167 lv_exactly_0_0=(Token)match(input,64,FOLLOW_38); if (state.failed) return current;
8168 if ( state.backtracking==0 ) {
8169
8170 newLeafNode(lv_exactly_0_0, grammarAccess.getALSSigScopeAccess().getExactlyExactlyKeyword_0_0());
8171
8172 }
8173 if ( state.backtracking==0 ) {
8174
8175 if (current==null) {
8176 current = createModelElement(grammarAccess.getALSSigScopeRule());
8177 }
8178 setWithLastConsumed(current, "exactly", true, "exactly");
8179
8180 }
8181
8182 }
8183
8184
8185 }
8186 break;
8187
8188 }
8189
8190 // InternalAlloyLanguage.g:2871:3: ( (lv_number_1_0= RULE_INT ) )
8191 // InternalAlloyLanguage.g:2872:1: (lv_number_1_0= RULE_INT )
8192 {
8193 // InternalAlloyLanguage.g:2872:1: (lv_number_1_0= RULE_INT )
8194 // InternalAlloyLanguage.g:2873:3: lv_number_1_0= RULE_INT
8195 {
8196 lv_number_1_0=(Token)match(input,RULE_INT,FOLLOW_4); if (state.failed) return current;
8197 if ( state.backtracking==0 ) {
8198
8199 newLeafNode(lv_number_1_0, grammarAccess.getALSSigScopeAccess().getNumberINTTerminalRuleCall_1_0());
8200
8201 }
8202 if ( state.backtracking==0 ) {
8203
8204 if (current==null) {
8205 current = createModelElement(grammarAccess.getALSSigScopeRule());
8206 }
8207 setWithLastConsumed(
8208 current,
8209 "number",
8210 lv_number_1_0,
8211 "org.eclipse.xtext.common.Terminals.INT");
8212
8213 }
8214
8215 }
8216
8217
8218 }
8219
8220 // InternalAlloyLanguage.g:2889:2: ( (otherlv_2= RULE_ID ) )
8221 // InternalAlloyLanguage.g:2890:1: (otherlv_2= RULE_ID )
8222 {
8223 // InternalAlloyLanguage.g:2890:1: (otherlv_2= RULE_ID )
8224 // InternalAlloyLanguage.g:2891:3: otherlv_2= RULE_ID
8225 {
8226 if ( state.backtracking==0 ) {
8227
8228 if (current==null) {
8229 current = createModelElement(grammarAccess.getALSSigScopeRule());
8230 }
8231
8232 }
8233 otherlv_2=(Token)match(input,RULE_ID,FOLLOW_2); if (state.failed) return current;
8234 if ( state.backtracking==0 ) {
8235
8236 newLeafNode(otherlv_2, grammarAccess.getALSSigScopeAccess().getTypeALSSignatureDeclarationCrossReference_2_0());
8237
8238 }
8239
8240 }
8241
8242
8243 }
8244
8245
8246 }
8247
8248
8249 }
8250
8251 if ( state.backtracking==0 ) {
8252 leaveRule();
8253 }
8254 }
8255
8256 catch (RecognitionException re) {
8257 recover(input,re);
8258 appendSkippedTokens();
8259 }
8260 finally {
8261 }
8262 return current;
8263 }
8264 // $ANTLR end "ruleALSSigScope"
8265
8266
8267 // $ANTLR start "entryRuleALSIntScope"
8268 // InternalAlloyLanguage.g:2910:1: entryRuleALSIntScope returns [EObject current=null] : iv_ruleALSIntScope= ruleALSIntScope EOF ;
8269 public final EObject entryRuleALSIntScope() throws RecognitionException {
8270 EObject current = null;
8271
8272 EObject iv_ruleALSIntScope = null;
8273
8274
8275 try {
8276 // InternalAlloyLanguage.g:2911:2: (iv_ruleALSIntScope= ruleALSIntScope EOF )
8277 // InternalAlloyLanguage.g:2912:2: iv_ruleALSIntScope= ruleALSIntScope EOF
8278 {
8279 if ( state.backtracking==0 ) {
8280 newCompositeNode(grammarAccess.getALSIntScopeRule());
8281 }
8282 pushFollow(FOLLOW_1);
8283 iv_ruleALSIntScope=ruleALSIntScope();
8284
8285 state._fsp--;
8286 if (state.failed) return current;
8287 if ( state.backtracking==0 ) {
8288 current =iv_ruleALSIntScope;
8289 }
8290 match(input,EOF,FOLLOW_2); if (state.failed) return current;
8291
8292 }
8293
8294 }
8295
8296 catch (RecognitionException re) {
8297 recover(input,re);
8298 appendSkippedTokens();
8299 }
8300 finally {
8301 }
8302 return current;
8303 }
8304 // $ANTLR end "entryRuleALSIntScope"
8305
8306
8307 // $ANTLR start "ruleALSIntScope"
8308 // InternalAlloyLanguage.g:2919:1: ruleALSIntScope returns [EObject current=null] : ( ( (lv_number_0_0= RULE_INT ) ) otherlv_1= 'Int' ) ;
8309 public final EObject ruleALSIntScope() throws RecognitionException {
8310 EObject current = null;
8311
8312 Token lv_number_0_0=null;
8313 Token otherlv_1=null;
8314
8315 enterRule();
8316
8317 try {
8318 // InternalAlloyLanguage.g:2922:28: ( ( ( (lv_number_0_0= RULE_INT ) ) otherlv_1= 'Int' ) )
8319 // InternalAlloyLanguage.g:2923:1: ( ( (lv_number_0_0= RULE_INT ) ) otherlv_1= 'Int' )
8320 {
8321 // InternalAlloyLanguage.g:2923:1: ( ( (lv_number_0_0= RULE_INT ) ) otherlv_1= 'Int' )
8322 // InternalAlloyLanguage.g:2923:2: ( (lv_number_0_0= RULE_INT ) ) otherlv_1= 'Int'
8323 {
8324 // InternalAlloyLanguage.g:2923:2: ( (lv_number_0_0= RULE_INT ) )
8325 // InternalAlloyLanguage.g:2924:1: (lv_number_0_0= RULE_INT )
8326 {
8327 // InternalAlloyLanguage.g:2924:1: (lv_number_0_0= RULE_INT )
8328 // InternalAlloyLanguage.g:2925:3: lv_number_0_0= RULE_INT
8329 {
8330 lv_number_0_0=(Token)match(input,RULE_INT,FOLLOW_39); if (state.failed) return current;
8331 if ( state.backtracking==0 ) {
8332
8333 newLeafNode(lv_number_0_0, grammarAccess.getALSIntScopeAccess().getNumberINTTerminalRuleCall_0_0());
8334
8335 }
8336 if ( state.backtracking==0 ) {
8337
8338 if (current==null) {
8339 current = createModelElement(grammarAccess.getALSIntScopeRule());
8340 }
8341 setWithLastConsumed(
8342 current,
8343 "number",
8344 lv_number_0_0,
8345 "org.eclipse.xtext.common.Terminals.INT");
8346
8347 }
8348
8349 }
8350
8351
8352 }
8353
8354 otherlv_1=(Token)match(input,59,FOLLOW_2); if (state.failed) return current;
8355 if ( state.backtracking==0 ) {
8356
8357 newLeafNode(otherlv_1, grammarAccess.getALSIntScopeAccess().getIntKeyword_1());
8358
8359 }
8360
8361 }
8362
8363
8364 }
8365
8366 if ( state.backtracking==0 ) {
8367 leaveRule();
8368 }
8369 }
8370
8371 catch (RecognitionException re) {
8372 recover(input,re);
8373 appendSkippedTokens();
8374 }
8375 finally {
8376 }
8377 return current;
8378 }
8379 // $ANTLR end "ruleALSIntScope"
8380
8381
8382 // $ANTLR start "ruleALSMultiplicity"
8383 // InternalAlloyLanguage.g:2953:1: ruleALSMultiplicity returns [Enumerator current=null] : ( (enumLiteral_0= 'all' ) | (enumLiteral_1= 'no' ) | (enumLiteral_2= 'some' ) | (enumLiteral_3= 'lone' ) | (enumLiteral_4= 'one' ) | (enumLiteral_5= 'set' ) ) ;
8384 public final Enumerator ruleALSMultiplicity() throws RecognitionException {
8385 Enumerator current = null;
8386
8387 Token enumLiteral_0=null;
8388 Token enumLiteral_1=null;
8389 Token enumLiteral_2=null;
8390 Token enumLiteral_3=null;
8391 Token enumLiteral_4=null;
8392 Token enumLiteral_5=null;
8393
8394 enterRule();
8395 try {
8396 // InternalAlloyLanguage.g:2955:28: ( ( (enumLiteral_0= 'all' ) | (enumLiteral_1= 'no' ) | (enumLiteral_2= 'some' ) | (enumLiteral_3= 'lone' ) | (enumLiteral_4= 'one' ) | (enumLiteral_5= 'set' ) ) )
8397 // InternalAlloyLanguage.g:2956:1: ( (enumLiteral_0= 'all' ) | (enumLiteral_1= 'no' ) | (enumLiteral_2= 'some' ) | (enumLiteral_3= 'lone' ) | (enumLiteral_4= 'one' ) | (enumLiteral_5= 'set' ) )
8398 {
8399 // InternalAlloyLanguage.g:2956:1: ( (enumLiteral_0= 'all' ) | (enumLiteral_1= 'no' ) | (enumLiteral_2= 'some' ) | (enumLiteral_3= 'lone' ) | (enumLiteral_4= 'one' ) | (enumLiteral_5= 'set' ) )
8400 int alt48=6;
8401 switch ( input.LA(1) ) {
8402 case 65:
8403 {
8404 alt48=1;
8405 }
8406 break;
8407 case 66:
8408 {
8409 alt48=2;
8410 }
8411 break;
8412 case 67:
8413 {
8414 alt48=3;
8415 }
8416 break;
8417 case 68:
8418 {
8419 alt48=4;
8420 }
8421 break;
8422 case 69:
8423 {
8424 alt48=5;
8425 }
8426 break;
8427 case 70:
8428 {
8429 alt48=6;
8430 }
8431 break;
8432 default:
8433 if (state.backtracking>0) {state.failed=true; return current;}
8434 NoViableAltException nvae =
8435 new NoViableAltException("", 48, 0, input);
8436
8437 throw nvae;
8438 }
8439
8440 switch (alt48) {
8441 case 1 :
8442 // InternalAlloyLanguage.g:2956:2: (enumLiteral_0= 'all' )
8443 {
8444 // InternalAlloyLanguage.g:2956:2: (enumLiteral_0= 'all' )
8445 // InternalAlloyLanguage.g:2956:4: enumLiteral_0= 'all'
8446 {
8447 enumLiteral_0=(Token)match(input,65,FOLLOW_2); if (state.failed) return current;
8448 if ( state.backtracking==0 ) {
8449
8450 current = grammarAccess.getALSMultiplicityAccess().getAllEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
8451 newLeafNode(enumLiteral_0, grammarAccess.getALSMultiplicityAccess().getAllEnumLiteralDeclaration_0());
8452
8453 }
8454
8455 }
8456
8457
8458 }
8459 break;
8460 case 2 :
8461 // InternalAlloyLanguage.g:2962:6: (enumLiteral_1= 'no' )
8462 {
8463 // InternalAlloyLanguage.g:2962:6: (enumLiteral_1= 'no' )
8464 // InternalAlloyLanguage.g:2962:8: enumLiteral_1= 'no'
8465 {
8466 enumLiteral_1=(Token)match(input,66,FOLLOW_2); if (state.failed) return current;
8467 if ( state.backtracking==0 ) {
8468
8469 current = grammarAccess.getALSMultiplicityAccess().getNoEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
8470 newLeafNode(enumLiteral_1, grammarAccess.getALSMultiplicityAccess().getNoEnumLiteralDeclaration_1());
8471
8472 }
8473
8474 }
8475
8476
8477 }
8478 break;
8479 case 3 :
8480 // InternalAlloyLanguage.g:2968:6: (enumLiteral_2= 'some' )
8481 {
8482 // InternalAlloyLanguage.g:2968:6: (enumLiteral_2= 'some' )
8483 // InternalAlloyLanguage.g:2968:8: enumLiteral_2= 'some'
8484 {
8485 enumLiteral_2=(Token)match(input,67,FOLLOW_2); if (state.failed) return current;
8486 if ( state.backtracking==0 ) {
8487
8488 current = grammarAccess.getALSMultiplicityAccess().getSomeEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
8489 newLeafNode(enumLiteral_2, grammarAccess.getALSMultiplicityAccess().getSomeEnumLiteralDeclaration_2());
8490
8491 }
8492
8493 }
8494
8495
8496 }
8497 break;
8498 case 4 :
8499 // InternalAlloyLanguage.g:2974:6: (enumLiteral_3= 'lone' )
8500 {
8501 // InternalAlloyLanguage.g:2974:6: (enumLiteral_3= 'lone' )
8502 // InternalAlloyLanguage.g:2974:8: enumLiteral_3= 'lone'
8503 {
8504 enumLiteral_3=(Token)match(input,68,FOLLOW_2); if (state.failed) return current;
8505 if ( state.backtracking==0 ) {
8506
8507 current = grammarAccess.getALSMultiplicityAccess().getLoneEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
8508 newLeafNode(enumLiteral_3, grammarAccess.getALSMultiplicityAccess().getLoneEnumLiteralDeclaration_3());
8509
8510 }
8511
8512 }
8513
8514
8515 }
8516 break;
8517 case 5 :
8518 // InternalAlloyLanguage.g:2980:6: (enumLiteral_4= 'one' )
8519 {
8520 // InternalAlloyLanguage.g:2980:6: (enumLiteral_4= 'one' )
8521 // InternalAlloyLanguage.g:2980:8: enumLiteral_4= 'one'
8522 {
8523 enumLiteral_4=(Token)match(input,69,FOLLOW_2); if (state.failed) return current;
8524 if ( state.backtracking==0 ) {
8525
8526 current = grammarAccess.getALSMultiplicityAccess().getOneEnumLiteralDeclaration_4().getEnumLiteral().getInstance();
8527 newLeafNode(enumLiteral_4, grammarAccess.getALSMultiplicityAccess().getOneEnumLiteralDeclaration_4());
8528
8529 }
8530
8531 }
8532
8533
8534 }
8535 break;
8536 case 6 :
8537 // InternalAlloyLanguage.g:2986:6: (enumLiteral_5= 'set' )
8538 {
8539 // InternalAlloyLanguage.g:2986:6: (enumLiteral_5= 'set' )
8540 // InternalAlloyLanguage.g:2986:8: enumLiteral_5= 'set'
8541 {
8542 enumLiteral_5=(Token)match(input,70,FOLLOW_2); if (state.failed) return current;
8543 if ( state.backtracking==0 ) {
8544
8545 current = grammarAccess.getALSMultiplicityAccess().getSetEnumLiteralDeclaration_5().getEnumLiteral().getInstance();
8546 newLeafNode(enumLiteral_5, grammarAccess.getALSMultiplicityAccess().getSetEnumLiteralDeclaration_5());
8547
8548 }
8549
8550 }
8551
8552
8553 }
8554 break;
8555
8556 }
8557
8558
8559 }
8560
8561 if ( state.backtracking==0 ) {
8562 leaveRule();
8563 }
8564 }
8565
8566 catch (RecognitionException re) {
8567 recover(input,re);
8568 appendSkippedTokens();
8569 }
8570 finally {
8571 }
8572 return current;
8573 }
8574 // $ANTLR end "ruleALSMultiplicity"
8575
8576
8577 // $ANTLR start "ruleALSNumericOperator"
8578 // InternalAlloyLanguage.g:2996:1: ruleALSNumericOperator returns [Enumerator current=null] : ( (enumLiteral_0= 'plus' ) | (enumLiteral_1= 'sub' ) | (enumLiteral_2= 'mul' ) | (enumLiteral_3= 'rem' ) | (enumLiteral_4= 'div' ) ) ;
8579 public final Enumerator ruleALSNumericOperator() throws RecognitionException {
8580 Enumerator current = null;
8581
8582 Token enumLiteral_0=null;
8583 Token enumLiteral_1=null;
8584 Token enumLiteral_2=null;
8585 Token enumLiteral_3=null;
8586 Token enumLiteral_4=null;
8587
8588 enterRule();
8589 try {
8590 // InternalAlloyLanguage.g:2998:28: ( ( (enumLiteral_0= 'plus' ) | (enumLiteral_1= 'sub' ) | (enumLiteral_2= 'mul' ) | (enumLiteral_3= 'rem' ) | (enumLiteral_4= 'div' ) ) )
8591 // InternalAlloyLanguage.g:2999:1: ( (enumLiteral_0= 'plus' ) | (enumLiteral_1= 'sub' ) | (enumLiteral_2= 'mul' ) | (enumLiteral_3= 'rem' ) | (enumLiteral_4= 'div' ) )
8592 {
8593 // InternalAlloyLanguage.g:2999:1: ( (enumLiteral_0= 'plus' ) | (enumLiteral_1= 'sub' ) | (enumLiteral_2= 'mul' ) | (enumLiteral_3= 'rem' ) | (enumLiteral_4= 'div' ) )
8594 int alt49=5;
8595 switch ( input.LA(1) ) {
8596 case 71:
8597 {
8598 alt49=1;
8599 }
8600 break;
8601 case 72:
8602 {
8603 alt49=2;
8604 }
8605 break;
8606 case 73:
8607 {
8608 alt49=3;
8609 }
8610 break;
8611 case 74:
8612 {
8613 alt49=4;
8614 }
8615 break;
8616 case 75:
8617 {
8618 alt49=5;
8619 }
8620 break;
8621 default:
8622 if (state.backtracking>0) {state.failed=true; return current;}
8623 NoViableAltException nvae =
8624 new NoViableAltException("", 49, 0, input);
8625
8626 throw nvae;
8627 }
8628
8629 switch (alt49) {
8630 case 1 :
8631 // InternalAlloyLanguage.g:2999:2: (enumLiteral_0= 'plus' )
8632 {
8633 // InternalAlloyLanguage.g:2999:2: (enumLiteral_0= 'plus' )
8634 // InternalAlloyLanguage.g:2999:4: enumLiteral_0= 'plus'
8635 {
8636 enumLiteral_0=(Token)match(input,71,FOLLOW_2); if (state.failed) return current;
8637 if ( state.backtracking==0 ) {
8638
8639 current = grammarAccess.getALSNumericOperatorAccess().getPlusEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
8640 newLeafNode(enumLiteral_0, grammarAccess.getALSNumericOperatorAccess().getPlusEnumLiteralDeclaration_0());
8641
8642 }
8643
8644 }
8645
8646
8647 }
8648 break;
8649 case 2 :
8650 // InternalAlloyLanguage.g:3005:6: (enumLiteral_1= 'sub' )
8651 {
8652 // InternalAlloyLanguage.g:3005:6: (enumLiteral_1= 'sub' )
8653 // InternalAlloyLanguage.g:3005:8: enumLiteral_1= 'sub'
8654 {
8655 enumLiteral_1=(Token)match(input,72,FOLLOW_2); if (state.failed) return current;
8656 if ( state.backtracking==0 ) {
8657
8658 current = grammarAccess.getALSNumericOperatorAccess().getSubEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
8659 newLeafNode(enumLiteral_1, grammarAccess.getALSNumericOperatorAccess().getSubEnumLiteralDeclaration_1());
8660
8661 }
8662
8663 }
8664
8665
8666 }
8667 break;
8668 case 3 :
8669 // InternalAlloyLanguage.g:3011:6: (enumLiteral_2= 'mul' )
8670 {
8671 // InternalAlloyLanguage.g:3011:6: (enumLiteral_2= 'mul' )
8672 // InternalAlloyLanguage.g:3011:8: enumLiteral_2= 'mul'
8673 {
8674 enumLiteral_2=(Token)match(input,73,FOLLOW_2); if (state.failed) return current;
8675 if ( state.backtracking==0 ) {
8676
8677 current = grammarAccess.getALSNumericOperatorAccess().getMulEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
8678 newLeafNode(enumLiteral_2, grammarAccess.getALSNumericOperatorAccess().getMulEnumLiteralDeclaration_2());
8679
8680 }
8681
8682 }
8683
8684
8685 }
8686 break;
8687 case 4 :
8688 // InternalAlloyLanguage.g:3017:6: (enumLiteral_3= 'rem' )
8689 {
8690 // InternalAlloyLanguage.g:3017:6: (enumLiteral_3= 'rem' )
8691 // InternalAlloyLanguage.g:3017:8: enumLiteral_3= 'rem'
8692 {
8693 enumLiteral_3=(Token)match(input,74,FOLLOW_2); if (state.failed) return current;
8694 if ( state.backtracking==0 ) {
8695
8696 current = grammarAccess.getALSNumericOperatorAccess().getRemEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
8697 newLeafNode(enumLiteral_3, grammarAccess.getALSNumericOperatorAccess().getRemEnumLiteralDeclaration_3());
8698
8699 }
8700
8701 }
8702
8703
8704 }
8705 break;
8706 case 5 :
8707 // InternalAlloyLanguage.g:3023:6: (enumLiteral_4= 'div' )
8708 {
8709 // InternalAlloyLanguage.g:3023:6: (enumLiteral_4= 'div' )
8710 // InternalAlloyLanguage.g:3023:8: enumLiteral_4= 'div'
8711 {
8712 enumLiteral_4=(Token)match(input,75,FOLLOW_2); if (state.failed) return current;
8713 if ( state.backtracking==0 ) {
8714
8715 current = grammarAccess.getALSNumericOperatorAccess().getDivEnumLiteralDeclaration_4().getEnumLiteral().getInstance();
8716 newLeafNode(enumLiteral_4, grammarAccess.getALSNumericOperatorAccess().getDivEnumLiteralDeclaration_4());
8717
8718 }
8719
8720 }
8721
8722
8723 }
8724 break;
8725
8726 }
8727
8728
8729 }
8730
8731 if ( state.backtracking==0 ) {
8732 leaveRule();
8733 }
8734 }
8735
8736 catch (RecognitionException re) {
8737 recover(input,re);
8738 appendSkippedTokens();
8739 }
8740 finally {
8741 }
8742 return current;
8743 }
8744 // $ANTLR end "ruleALSNumericOperator"
8745
8746 // Delegated rules
8747
8748
8749 protected DFA10 dfa10 = new DFA10(this);
8750 protected DFA42 dfa42 = new DFA42(this);
8751 static final String dfa_1s = "\12\uffff";
8752 static final String dfa_2s = "\10\uffff\1\11\1\uffff";
8753 static final String dfa_3s = "\7\4\1\uffff\1\15\1\uffff";
8754 static final String dfa_4s = "\7\113\1\uffff\1\106\1\uffff";
8755 static final String dfa_5s = "\7\uffff\1\2\1\uffff\1\1";
8756 static final String dfa_6s = "\12\uffff}>";
8757 static final String[] dfa_7s = {
8758 "\2\7\50\uffff\1\7\2\uffff\14\7\4\uffff\1\1\1\2\1\3\1\4\1\5\1\6\5\7",
8759 "\1\10\1\11\24\uffff\1\7\23\uffff\1\11\2\uffff\14\11\4\uffff\13\11",
8760 "\1\10\1\11\24\uffff\1\7\23\uffff\1\11\2\uffff\14\11\4\uffff\13\11",
8761 "\1\10\1\11\24\uffff\1\7\23\uffff\1\11\2\uffff\14\11\4\uffff\13\11",
8762 "\1\10\1\11\24\uffff\1\7\23\uffff\1\11\2\uffff\14\11\4\uffff\13\11",
8763 "\1\10\1\11\24\uffff\1\7\23\uffff\1\11\2\uffff\14\11\4\uffff\13\11",
8764 "\1\10\1\11\24\uffff\1\7\23\uffff\1\11\2\uffff\14\11\4\uffff\13\11",
8765 "",
8766 "\2\11\3\uffff\2\11\1\7\1\uffff\1\11\4\uffff\6\11\1\uffff\17\11\20\uffff\6\11",
8767 ""
8768 };
8769
8770 static final short[] dfa_1 = DFA.unpackEncodedString(dfa_1s);
8771 static final short[] dfa_2 = DFA.unpackEncodedString(dfa_2s);
8772 static final char[] dfa_3 = DFA.unpackEncodedStringToUnsignedChars(dfa_3s);
8773 static final char[] dfa_4 = DFA.unpackEncodedStringToUnsignedChars(dfa_4s);
8774 static final short[] dfa_5 = DFA.unpackEncodedString(dfa_5s);
8775 static final short[] dfa_6 = DFA.unpackEncodedString(dfa_6s);
8776 static final short[][] dfa_7 = unpackEncodedStringArray(dfa_7s);
8777
8778 class DFA10 extends DFA {
8779
8780 public DFA10(BaseRecognizer recognizer) {
8781 this.recognizer = recognizer;
8782 this.decisionNumber = 10;
8783 this.eot = dfa_1;
8784 this.eof = dfa_2;
8785 this.min = dfa_3;
8786 this.max = dfa_4;
8787 this.accept = dfa_5;
8788 this.special = dfa_6;
8789 this.transition = dfa_7;
8790 }
8791 public String getDescription() {
8792 return "713:1: ( (lv_multiplicity_2_0= ruleALSMultiplicity ) )?";
8793 }
8794 }
8795 static final String dfa_8s = "\13\uffff";
8796 static final String dfa_9s = "\10\uffff\1\12\2\uffff";
8797 static final String dfa_10s = "\1\4\7\uffff\1\14\2\uffff";
8798 static final String dfa_11s = "\1\113\7\uffff\1\106\2\uffff";
8799 static final String dfa_12s = "\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\uffff\1\10\1\11";
8800 static final String dfa_13s = "\13\uffff}>";
8801 static final String[] dfa_14s = {
8802 "\1\10\1\12\50\uffff\1\6\2\uffff\2\1\1\2\1\3\1\4\1\5\1\7\5\12\12\uffff\5\11",
8803 "",
8804 "",
8805 "",
8806 "",
8807 "",
8808 "",
8809 "",
8810 "\3\12\3\uffff\2\12\2\uffff\1\11\1\12\3\uffff\26\12\14\uffff\1\12\3\uffff\6\12",
8811 "",
8812 ""
8813 };
8814
8815 static final short[] dfa_8 = DFA.unpackEncodedString(dfa_8s);
8816 static final short[] dfa_9 = DFA.unpackEncodedString(dfa_9s);
8817 static final char[] dfa_10 = DFA.unpackEncodedStringToUnsignedChars(dfa_10s);
8818 static final char[] dfa_11 = DFA.unpackEncodedStringToUnsignedChars(dfa_11s);
8819 static final short[] dfa_12 = DFA.unpackEncodedString(dfa_12s);
8820 static final short[] dfa_13 = DFA.unpackEncodedString(dfa_13s);
8821 static final short[][] dfa_14 = unpackEncodedStringArray(dfa_14s);
8822
8823 class DFA42 extends DFA {
8824
8825 public DFA42(BaseRecognizer recognizer) {
8826 this.recognizer = recognizer;
8827 this.decisionNumber = 42;
8828 this.eot = dfa_8;
8829 this.eof = dfa_9;
8830 this.min = dfa_10;
8831 this.max = dfa_11;
8832 this.accept = dfa_12;
8833 this.special = dfa_13;
8834 this.transition = dfa_14;
8835 }
8836 public String getDescription() {
8837 return "2167:1: ( ( () ( ( ( '!' | 'not' ) )=> (otherlv_1= '!' | otherlv_2= 'not' ) ) ( (lv_operand_3_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '~' )=>otherlv_5= '~' ) ( (lv_operand_6_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_8= '^' ( (lv_operand_9_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_11= '*' ( (lv_operand_12_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_14= '#' ( (lv_operand_15_0= ruleALSBasicRelationTerm ) ) ) | ( () ( ( '-' )=>otherlv_17= '-' ) ( (lv_operand_18_0= ruleALSBasicRelationTerm ) ) ) | ( () otherlv_20= 'sum' ( (lv_variables_21_0= ruleALSVariableDeclaration ) ) (otherlv_22= ',' ( (lv_variables_23_0= ruleALSVariableDeclaration ) ) )* otherlv_24= '{' ( (lv_expression_25_0= ruleALSTerm ) ) otherlv_26= '}' ) | ( () ( ( (otherlv_28= RULE_ID ) ) | ( (lv_referredNumericOperator_29_0= ruleALSNumericOperator ) ) ) otherlv_30= '[' ( (lv_params_31_0= ruleALSTerm ) ) (otherlv_32= ',' ( (lv_params_33_0= ruleALSTerm ) ) )* otherlv_34= ']' ) | this_ALSBasicRelationTerm_35= ruleALSBasicRelationTerm )";
8838 }
8839 }
8840
8841
8842 public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L});
8843 public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L});
8844 public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x4000000003218800L,0x000000000000007EL});
8845 public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000000010L});
8846 public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000001000L});
8847 public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000006000L});
8848 public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000018000L,0x000000000000007EL});
8849 public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000063000L});
8850 public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000081000L});
8851 public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000004010L});
8852 public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000000000100000L});
8853 public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x1FFE400000000030L,0x0000000000000FFEL});
8854 public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000400000L});
8855 public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000802000L});
8856 public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000000004000L});
8857 public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000000001010L});
8858 public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000004000010L});
8859 public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000000003000L});
8860 public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000018000002L});
8861 public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000060000002L});
8862 public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000180000002L});
8863 public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x0000000200000002L});
8864 public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000000C00000002L});
8865 public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x000003F000040002L});
8866 public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x0000040000000002L});
8867 public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000080000000002L});
8868 public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x0000100000000002L});
8869 public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0000200000000002L});
8870 public static final BitSet FOLLOW_29 = new BitSet(new long[]{0x0000400000000002L});
8871 public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x0000000000080002L});
8872 public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000800000000002L});
8873 public static final BitSet FOLLOW_32 = new BitSet(new long[]{0x0001000000000002L,0x000000000000007EL});
8874 public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x0001000000000000L});
8875 public static final BitSet FOLLOW_34 = new BitSet(new long[]{0x2000000000000000L});
8876 public static final BitSet FOLLOW_35 = new BitSet(new long[]{0x8000000000000002L});
8877 public static final BitSet FOLLOW_36 = new BitSet(new long[]{0x0000000000000020L,0x0000000000000001L});
8878 public static final BitSet FOLLOW_37 = new BitSet(new long[]{0x0000000000002002L});
8879 public static final BitSet FOLLOW_38 = new BitSet(new long[]{0x0000000000000020L});
8880 public static final BitSet FOLLOW_39 = new BitSet(new long[]{0x0800000000000000L});
8881
8882}