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