diff options
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.java | 9766 |
1 files changed, 6470 insertions, 3296 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.java index 1d449e49..7dbfa002 100644 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.java +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.java | |||
@@ -5,6 +5,7 @@ import org.eclipse.xtext.parser.*; | |||
5 | import org.eclipse.xtext.parser.impl.*; | 5 | import org.eclipse.xtext.parser.impl.*; |
6 | import org.eclipse.emf.ecore.util.EcoreUtil; | 6 | import org.eclipse.emf.ecore.util.EcoreUtil; |
7 | import org.eclipse.emf.ecore.EObject; | 7 | import org.eclipse.emf.ecore.EObject; |
8 | import org.eclipse.emf.common.util.Enumerator; | ||
8 | import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; | 9 | import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; |
9 | import org.eclipse.xtext.parser.antlr.XtextTokenStream; | 10 | import org.eclipse.xtext.parser.antlr.XtextTokenStream; |
10 | import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; | 11 | import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; |
@@ -21,47 +22,92 @@ import java.util.ArrayList; | |||
21 | @SuppressWarnings("all") | 22 | @SuppressWarnings("all") |
22 | public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | 23 | public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { |
23 | public static final String[] tokenNames = new String[] { | 24 | public static final String[] tokenNames = new String[] { |
24 | "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_INT", "RULE_ID", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'-'", "'.'", "'true'", "'false'", "'unknown'", "'error'", "'('", "','", "')'", "':'", "'exists'", "'equals'", "'bool'", "'int'", "'real'", "'string'", "'\\''", "':-'", "'|'", "'+'", "'*'", "'default'", "'abstract'", "'class'", "'extends'", "'{'", "'}'", "'enum'", "'containment'", "'relation'", "'..'" | 25 | "<invalid>", "<EOR>", "<DOWN>", "<UP>", "GREATER_EQ", "Functional", "Abstract", "Contains", "Maximize", "Minimize", "Opposite", "GREATER", "LESS_EQ", "Current", "Default", "Extends", "Unknown", "NOT_EQ", "Extern", "Class", "Count", "Empty", "Error", "False", "Scope", "LESS", "Else", "Must", "Only", "Prod", "Real", "Then", "True", "ADD", "DIV", "MUL", "POW", "SUB", "Avg", "Inf", "Int", "Max", "May", "Min", "Sum", "ExclamationMarkEqualsSign", "HyphenMinusGreaterThanSign", "FullStopFullStop", "ColonHyphenMinus", "LessThanSignEqualsSign", "EqualsSignEqualsSign", "GreaterThanSignEqualsSign", "EQ", "IN", "If", "In", "ExclamationMark", "LeftParenthesis", "RightParenthesis", "Asterisk", "PlusSign", "Comma", "HyphenMinus", "FullStop", "Solidus", "Colon", "Semicolon", "LessThanSign", "EqualsSign", "GreaterThanSign", "LeftSquareBracket", "RightSquareBracket", "CircumflexAccent", "LeftCurlyBracket", "VerticalLine", "RightCurlyBracket", "RULE_STRING", "RULE_QUOTED_ID", "RULE_SL_COMMENT", "RULE_TRANSITIVE_CLOSURE", "RULE_REFLEXIVE_TRANSITIVE_CLOSURE", "RULE_FULL_STOP", "RULE_ID", "RULE_INT", "RULE_ML_COMMENT", "RULE_WS", "RULE_ANY_OTHER" |
25 | }; | 26 | }; |
26 | public static final int RULE_STRING=6; | 27 | public static final int ADD=33; |
27 | public static final int RULE_SL_COMMENT=8; | 28 | public static final int True=32; |
28 | public static final int T__19=19; | 29 | public static final int GREATER_EQ=4; |
29 | public static final int T__15=15; | 30 | public static final int Count=20; |
30 | public static final int T__37=37; | 31 | public static final int False=23; |
31 | public static final int T__16=16; | 32 | public static final int Must=27; |
32 | public static final int T__38=38; | 33 | public static final int LessThanSign=67; |
33 | public static final int T__17=17; | 34 | public static final int LeftParenthesis=57; |
34 | public static final int T__39=39; | 35 | public static final int Unknown=16; |
35 | public static final int T__18=18; | 36 | public static final int RULE_REFLEXIVE_TRANSITIVE_CLOSURE=80; |
36 | public static final int T__11=11; | 37 | public static final int FullStopFullStop=47; |
37 | public static final int T__33=33; | 38 | public static final int Real=30; |
38 | public static final int T__12=12; | 39 | public static final int Then=31; |
39 | public static final int T__34=34; | 40 | public static final int Extends=15; |
40 | public static final int T__13=13; | 41 | public static final int RightSquareBracket=71; |
41 | public static final int T__35=35; | 42 | public static final int ExclamationMark=56; |
42 | public static final int T__14=14; | 43 | public static final int Opposite=10; |
43 | public static final int T__36=36; | 44 | public static final int SUB=37; |
45 | public static final int GreaterThanSign=69; | ||
46 | public static final int NOT_EQ=17; | ||
47 | public static final int RULE_ID=82; | ||
48 | public static final int MUL=35; | ||
49 | public static final int IN=53; | ||
50 | public static final int RULE_QUOTED_ID=77; | ||
51 | public static final int RightParenthesis=58; | ||
52 | public static final int Sum=44; | ||
53 | public static final int EQ=52; | ||
54 | public static final int GreaterThanSignEqualsSign=51; | ||
55 | public static final int Functional=5; | ||
56 | public static final int EqualsSignEqualsSign=50; | ||
57 | public static final int Avg=38; | ||
58 | public static final int Min=43; | ||
59 | public static final int VerticalLine=74; | ||
60 | public static final int PlusSign=60; | ||
61 | public static final int RULE_INT=83; | ||
62 | public static final int Contains=7; | ||
63 | public static final int RULE_ML_COMMENT=84; | ||
64 | public static final int POW=36; | ||
65 | public static final int RULE_TRANSITIVE_CLOSURE=79; | ||
66 | public static final int Class=19; | ||
67 | public static final int LESS=25; | ||
68 | public static final int LeftSquareBracket=70; | ||
69 | public static final int RULE_FULL_STOP=81; | ||
70 | public static final int Current=13; | ||
71 | public static final int If=54; | ||
72 | public static final int Inf=39; | ||
73 | public static final int LESS_EQ=12; | ||
74 | public static final int May=42; | ||
75 | public static final int Max=41; | ||
76 | public static final int In=55; | ||
77 | public static final int RULE_STRING=76; | ||
78 | public static final int Int=40; | ||
79 | public static final int Extern=18; | ||
80 | public static final int RULE_SL_COMMENT=78; | ||
81 | public static final int Prod=29; | ||
82 | public static final int Comma=61; | ||
83 | public static final int EqualsSign=68; | ||
84 | public static final int Empty=21; | ||
85 | public static final int HyphenMinus=62; | ||
86 | public static final int Maximize=8; | ||
87 | public static final int LessThanSignEqualsSign=49; | ||
88 | public static final int Solidus=64; | ||
89 | public static final int Colon=65; | ||
90 | public static final int RightCurlyBracket=75; | ||
44 | public static final int EOF=-1; | 91 | public static final int EOF=-1; |
45 | public static final int T__30=30; | 92 | public static final int Asterisk=59; |
46 | public static final int T__31=31; | 93 | public static final int FullStop=63; |
47 | public static final int T__32=32; | 94 | public static final int RULE_WS=85; |
48 | public static final int RULE_ID=5; | 95 | public static final int Abstract=6; |
49 | public static final int RULE_WS=9; | 96 | public static final int Minimize=9; |
50 | public static final int RULE_ANY_OTHER=10; | 97 | public static final int GREATER=11; |
51 | public static final int T__26=26; | 98 | public static final int LeftCurlyBracket=73; |
52 | public static final int T__27=27; | 99 | public static final int Error=22; |
53 | public static final int T__28=28; | 100 | public static final int Only=28; |
54 | public static final int RULE_INT=4; | 101 | public static final int RULE_ANY_OTHER=86; |
55 | public static final int T__29=29; | 102 | public static final int Default=14; |
56 | public static final int T__22=22; | 103 | public static final int ColonHyphenMinus=48; |
57 | public static final int RULE_ML_COMMENT=7; | 104 | public static final int CircumflexAccent=72; |
58 | public static final int T__23=23; | 105 | public static final int DIV=34; |
59 | public static final int T__24=24; | 106 | public static final int Semicolon=66; |
60 | public static final int T__25=25; | 107 | public static final int Scope=24; |
61 | public static final int T__40=40; | 108 | public static final int Else=26; |
62 | public static final int T__41=41; | 109 | public static final int ExclamationMarkEqualsSign=45; |
63 | public static final int T__20=20; | 110 | public static final int HyphenMinusGreaterThanSign=46; |
64 | public static final int T__21=21; | ||
65 | 111 | ||
66 | // delegates | 112 | // delegates |
67 | // delegators | 113 | // delegators |
@@ -77,7 +123,7 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
77 | 123 | ||
78 | 124 | ||
79 | public String[] getTokenNames() { return InternalSolverLanguageParser.tokenNames; } | 125 | public String[] getTokenNames() { return InternalSolverLanguageParser.tokenNames; } |
80 | public String getGrammarFileName() { return "InternalSolverLanguage.g"; } | 126 | public String getGrammarFileName() { return "InternalSolverLanguageParser.g"; } |
81 | 127 | ||
82 | 128 | ||
83 | 129 | ||
@@ -103,7 +149,7 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
103 | 149 | ||
104 | 150 | ||
105 | // $ANTLR start "entryRuleProblem" | 151 | // $ANTLR start "entryRuleProblem" |
106 | // InternalSolverLanguage.g:64:1: entryRuleProblem returns [EObject current=null] : iv_ruleProblem= ruleProblem EOF ; | 152 | // InternalSolverLanguageParser.g:58:1: entryRuleProblem returns [EObject current=null] : iv_ruleProblem= ruleProblem EOF ; |
107 | public final EObject entryRuleProblem() throws RecognitionException { | 153 | public final EObject entryRuleProblem() throws RecognitionException { |
108 | EObject current = null; | 154 | EObject current = null; |
109 | 155 | ||
@@ -111,8 +157,8 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
111 | 157 | ||
112 | 158 | ||
113 | try { | 159 | try { |
114 | // InternalSolverLanguage.g:64:48: (iv_ruleProblem= ruleProblem EOF ) | 160 | // InternalSolverLanguageParser.g:58:48: (iv_ruleProblem= ruleProblem EOF ) |
115 | // InternalSolverLanguage.g:65:2: iv_ruleProblem= ruleProblem EOF | 161 | // InternalSolverLanguageParser.g:59:2: iv_ruleProblem= ruleProblem EOF |
116 | { | 162 | { |
117 | newCompositeNode(grammarAccess.getProblemRule()); | 163 | newCompositeNode(grammarAccess.getProblemRule()); |
118 | pushFollow(FOLLOW_1); | 164 | pushFollow(FOLLOW_1); |
@@ -139,7 +185,7 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
139 | 185 | ||
140 | 186 | ||
141 | // $ANTLR start "ruleProblem" | 187 | // $ANTLR start "ruleProblem" |
142 | // InternalSolverLanguage.g:71:1: ruleProblem returns [EObject current=null] : ( (lv_statements_0_0= ruleStatement ) )* ; | 188 | // InternalSolverLanguageParser.g:65:1: ruleProblem returns [EObject current=null] : ( (lv_statements_0_0= ruleStatement ) )* ; |
143 | public final EObject ruleProblem() throws RecognitionException { | 189 | public final EObject ruleProblem() throws RecognitionException { |
144 | EObject current = null; | 190 | EObject current = null; |
145 | 191 | ||
@@ -150,26 +196,26 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
150 | enterRule(); | 196 | enterRule(); |
151 | 197 | ||
152 | try { | 198 | try { |
153 | // InternalSolverLanguage.g:77:2: ( ( (lv_statements_0_0= ruleStatement ) )* ) | 199 | // InternalSolverLanguageParser.g:71:2: ( ( (lv_statements_0_0= ruleStatement ) )* ) |
154 | // InternalSolverLanguage.g:78:2: ( (lv_statements_0_0= ruleStatement ) )* | 200 | // InternalSolverLanguageParser.g:72:2: ( (lv_statements_0_0= ruleStatement ) )* |
155 | { | 201 | { |
156 | // InternalSolverLanguage.g:78:2: ( (lv_statements_0_0= ruleStatement ) )* | 202 | // InternalSolverLanguageParser.g:72:2: ( (lv_statements_0_0= ruleStatement ) )* |
157 | loop1: | 203 | loop1: |
158 | do { | 204 | do { |
159 | int alt1=2; | 205 | int alt1=2; |
160 | int LA1_0 = input.LA(1); | 206 | int LA1_0 = input.LA(1); |
161 | 207 | ||
162 | if ( (LA1_0==RULE_ID||LA1_0==16||(LA1_0>=21 && LA1_0<=26)||(LA1_0>=32 && LA1_0<=34)||(LA1_0>=38 && LA1_0<=40)) ) { | 208 | if ( ((LA1_0>=Functional && LA1_0<=Abstract)||(LA1_0>=Maximize && LA1_0<=Minimize)||(LA1_0>=Current && LA1_0<=Default)||LA1_0==Unknown||(LA1_0>=Extern && LA1_0<=False)||LA1_0==Scope||(LA1_0>=Must && LA1_0<=Real)||LA1_0==True||(LA1_0>=Avg && LA1_0<=Sum)||LA1_0==If||(LA1_0>=ExclamationMark && LA1_0<=LeftParenthesis)||LA1_0==PlusSign||LA1_0==HyphenMinus||LA1_0==LeftSquareBracket||(LA1_0>=RULE_STRING && LA1_0<=RULE_QUOTED_ID)||(LA1_0>=RULE_ID && LA1_0<=RULE_INT)) ) { |
163 | alt1=1; | 209 | alt1=1; |
164 | } | 210 | } |
165 | 211 | ||
166 | 212 | ||
167 | switch (alt1) { | 213 | switch (alt1) { |
168 | case 1 : | 214 | case 1 : |
169 | // InternalSolverLanguage.g:79:3: (lv_statements_0_0= ruleStatement ) | 215 | // InternalSolverLanguageParser.g:73:3: (lv_statements_0_0= ruleStatement ) |
170 | { | 216 | { |
171 | // InternalSolverLanguage.g:79:3: (lv_statements_0_0= ruleStatement ) | 217 | // InternalSolverLanguageParser.g:73:3: (lv_statements_0_0= ruleStatement ) |
172 | // InternalSolverLanguage.g:80:4: lv_statements_0_0= ruleStatement | 218 | // InternalSolverLanguageParser.g:74:4: lv_statements_0_0= ruleStatement |
173 | { | 219 | { |
174 | 220 | ||
175 | newCompositeNode(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); | 221 | newCompositeNode(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); |
@@ -222,7 +268,7 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
222 | 268 | ||
223 | 269 | ||
224 | // $ANTLR start "entryRuleStatement" | 270 | // $ANTLR start "entryRuleStatement" |
225 | // InternalSolverLanguage.g:100:1: entryRuleStatement returns [EObject current=null] : iv_ruleStatement= ruleStatement EOF ; | 271 | // InternalSolverLanguageParser.g:94:1: entryRuleStatement returns [EObject current=null] : iv_ruleStatement= ruleStatement EOF ; |
226 | public final EObject entryRuleStatement() throws RecognitionException { | 272 | public final EObject entryRuleStatement() throws RecognitionException { |
227 | EObject current = null; | 273 | EObject current = null; |
228 | 274 | ||
@@ -230,8 +276,8 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
230 | 276 | ||
231 | 277 | ||
232 | try { | 278 | try { |
233 | // InternalSolverLanguage.g:100:50: (iv_ruleStatement= ruleStatement EOF ) | 279 | // InternalSolverLanguageParser.g:94:50: (iv_ruleStatement= ruleStatement EOF ) |
234 | // InternalSolverLanguage.g:101:2: iv_ruleStatement= ruleStatement EOF | 280 | // InternalSolverLanguageParser.g:95:2: iv_ruleStatement= ruleStatement EOF |
235 | { | 281 | { |
236 | newCompositeNode(grammarAccess.getStatementRule()); | 282 | newCompositeNode(grammarAccess.getStatementRule()); |
237 | pushFollow(FOLLOW_1); | 283 | pushFollow(FOLLOW_1); |
@@ -258,179 +304,232 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
258 | 304 | ||
259 | 305 | ||
260 | // $ANTLR start "ruleStatement" | 306 | // $ANTLR start "ruleStatement" |
261 | // InternalSolverLanguage.g:107:1: ruleStatement returns [EObject current=null] : (this_Interpretation_0= ruleInterpretation | this_Predicate_1= rulePredicate ) ; | 307 | // InternalSolverLanguageParser.g:101:1: ruleStatement returns [EObject current=null] : ( (this_AssertionOrDefinition_0= ruleAssertionOrDefinition | this_PredicateDefinition_1= rulePredicateDefinition | this_UnnamedErrorPrediateDefinition_2= ruleUnnamedErrorPrediateDefinition | this_DefaultDefinition_3= ruleDefaultDefinition | this_ExternPredicateDefinition_4= ruleExternPredicateDefinition | this_MetricDefinition_5= ruleMetricDefinition | this_ExternMetricDefinition_6= ruleExternMetricDefinition | this_ClassDefinition_7= ruleClassDefinition | this_ScopeDefinition_8= ruleScopeDefinition | this_ObjectiveDefinition_9= ruleObjectiveDefinition ) this_FULL_STOP_10= RULE_FULL_STOP ) ; |
262 | public final EObject ruleStatement() throws RecognitionException { | 308 | public final EObject ruleStatement() throws RecognitionException { |
263 | EObject current = null; | 309 | EObject current = null; |
264 | 310 | ||
265 | EObject this_Interpretation_0 = null; | 311 | Token this_FULL_STOP_10=null; |
312 | EObject this_AssertionOrDefinition_0 = null; | ||
266 | 313 | ||
267 | EObject this_Predicate_1 = null; | 314 | EObject this_PredicateDefinition_1 = null; |
315 | |||
316 | EObject this_UnnamedErrorPrediateDefinition_2 = null; | ||
317 | |||
318 | EObject this_DefaultDefinition_3 = null; | ||
319 | |||
320 | EObject this_ExternPredicateDefinition_4 = null; | ||
321 | |||
322 | EObject this_MetricDefinition_5 = null; | ||
323 | |||
324 | EObject this_ExternMetricDefinition_6 = null; | ||
325 | |||
326 | EObject this_ClassDefinition_7 = null; | ||
327 | |||
328 | EObject this_ScopeDefinition_8 = null; | ||
329 | |||
330 | EObject this_ObjectiveDefinition_9 = null; | ||
268 | 331 | ||
269 | 332 | ||
270 | 333 | ||
271 | enterRule(); | 334 | enterRule(); |
272 | 335 | ||
273 | try { | 336 | try { |
274 | // InternalSolverLanguage.g:113:2: ( (this_Interpretation_0= ruleInterpretation | this_Predicate_1= rulePredicate ) ) | 337 | // InternalSolverLanguageParser.g:107:2: ( ( (this_AssertionOrDefinition_0= ruleAssertionOrDefinition | this_PredicateDefinition_1= rulePredicateDefinition | this_UnnamedErrorPrediateDefinition_2= ruleUnnamedErrorPrediateDefinition | this_DefaultDefinition_3= ruleDefaultDefinition | this_ExternPredicateDefinition_4= ruleExternPredicateDefinition | this_MetricDefinition_5= ruleMetricDefinition | this_ExternMetricDefinition_6= ruleExternMetricDefinition | this_ClassDefinition_7= ruleClassDefinition | this_ScopeDefinition_8= ruleScopeDefinition | this_ObjectiveDefinition_9= ruleObjectiveDefinition ) this_FULL_STOP_10= RULE_FULL_STOP ) ) |
275 | // InternalSolverLanguage.g:114:2: (this_Interpretation_0= ruleInterpretation | this_Predicate_1= rulePredicate ) | 338 | // InternalSolverLanguageParser.g:108:2: ( (this_AssertionOrDefinition_0= ruleAssertionOrDefinition | this_PredicateDefinition_1= rulePredicateDefinition | this_UnnamedErrorPrediateDefinition_2= ruleUnnamedErrorPrediateDefinition | this_DefaultDefinition_3= ruleDefaultDefinition | this_ExternPredicateDefinition_4= ruleExternPredicateDefinition | this_MetricDefinition_5= ruleMetricDefinition | this_ExternMetricDefinition_6= ruleExternMetricDefinition | this_ClassDefinition_7= ruleClassDefinition | this_ScopeDefinition_8= ruleScopeDefinition | this_ObjectiveDefinition_9= ruleObjectiveDefinition ) this_FULL_STOP_10= RULE_FULL_STOP ) |
339 | { | ||
340 | // InternalSolverLanguageParser.g:108:2: ( (this_AssertionOrDefinition_0= ruleAssertionOrDefinition | this_PredicateDefinition_1= rulePredicateDefinition | this_UnnamedErrorPrediateDefinition_2= ruleUnnamedErrorPrediateDefinition | this_DefaultDefinition_3= ruleDefaultDefinition | this_ExternPredicateDefinition_4= ruleExternPredicateDefinition | this_MetricDefinition_5= ruleMetricDefinition | this_ExternMetricDefinition_6= ruleExternMetricDefinition | this_ClassDefinition_7= ruleClassDefinition | this_ScopeDefinition_8= ruleScopeDefinition | this_ObjectiveDefinition_9= ruleObjectiveDefinition ) this_FULL_STOP_10= RULE_FULL_STOP ) | ||
341 | // InternalSolverLanguageParser.g:109:3: (this_AssertionOrDefinition_0= ruleAssertionOrDefinition | this_PredicateDefinition_1= rulePredicateDefinition | this_UnnamedErrorPrediateDefinition_2= ruleUnnamedErrorPrediateDefinition | this_DefaultDefinition_3= ruleDefaultDefinition | this_ExternPredicateDefinition_4= ruleExternPredicateDefinition | this_MetricDefinition_5= ruleMetricDefinition | this_ExternMetricDefinition_6= ruleExternMetricDefinition | this_ClassDefinition_7= ruleClassDefinition | this_ScopeDefinition_8= ruleScopeDefinition | this_ObjectiveDefinition_9= ruleObjectiveDefinition ) this_FULL_STOP_10= RULE_FULL_STOP | ||
276 | { | 342 | { |
277 | // InternalSolverLanguage.g:114:2: (this_Interpretation_0= ruleInterpretation | this_Predicate_1= rulePredicate ) | 343 | // InternalSolverLanguageParser.g:109:3: (this_AssertionOrDefinition_0= ruleAssertionOrDefinition | this_PredicateDefinition_1= rulePredicateDefinition | this_UnnamedErrorPrediateDefinition_2= ruleUnnamedErrorPrediateDefinition | this_DefaultDefinition_3= ruleDefaultDefinition | this_ExternPredicateDefinition_4= ruleExternPredicateDefinition | this_MetricDefinition_5= ruleMetricDefinition | this_ExternMetricDefinition_6= ruleExternMetricDefinition | this_ClassDefinition_7= ruleClassDefinition | this_ScopeDefinition_8= ruleScopeDefinition | this_ObjectiveDefinition_9= ruleObjectiveDefinition ) |
278 | int alt2=2; | 344 | int alt2=10; |
279 | alt2 = dfa2.predict(input); | 345 | alt2 = dfa2.predict(input); |
280 | switch (alt2) { | 346 | switch (alt2) { |
281 | case 1 : | 347 | case 1 : |
282 | // InternalSolverLanguage.g:115:3: this_Interpretation_0= ruleInterpretation | 348 | // InternalSolverLanguageParser.g:110:4: this_AssertionOrDefinition_0= ruleAssertionOrDefinition |
283 | { | 349 | { |
284 | 350 | ||
285 | newCompositeNode(grammarAccess.getStatementAccess().getInterpretationParserRuleCall_0()); | 351 | newCompositeNode(grammarAccess.getStatementAccess().getAssertionOrDefinitionParserRuleCall_0_0()); |
286 | 352 | ||
287 | pushFollow(FOLLOW_2); | 353 | pushFollow(FOLLOW_4); |
288 | this_Interpretation_0=ruleInterpretation(); | 354 | this_AssertionOrDefinition_0=ruleAssertionOrDefinition(); |
289 | 355 | ||
290 | state._fsp--; | 356 | state._fsp--; |
291 | 357 | ||
292 | 358 | ||
293 | current = this_Interpretation_0; | 359 | current = this_AssertionOrDefinition_0; |
294 | afterParserOrEnumRuleCall(); | 360 | afterParserOrEnumRuleCall(); |
295 | 361 | ||
296 | 362 | ||
297 | } | 363 | } |
298 | break; | 364 | break; |
299 | case 2 : | 365 | case 2 : |
300 | // InternalSolverLanguage.g:124:3: this_Predicate_1= rulePredicate | 366 | // InternalSolverLanguageParser.g:119:4: this_PredicateDefinition_1= rulePredicateDefinition |
301 | { | 367 | { |
302 | 368 | ||
303 | newCompositeNode(grammarAccess.getStatementAccess().getPredicateParserRuleCall_1()); | 369 | newCompositeNode(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_0_1()); |
304 | 370 | ||
305 | pushFollow(FOLLOW_2); | 371 | pushFollow(FOLLOW_4); |
306 | this_Predicate_1=rulePredicate(); | 372 | this_PredicateDefinition_1=rulePredicateDefinition(); |
307 | 373 | ||
308 | state._fsp--; | 374 | state._fsp--; |
309 | 375 | ||
310 | 376 | ||
311 | current = this_Predicate_1; | 377 | current = this_PredicateDefinition_1; |
312 | afterParserOrEnumRuleCall(); | 378 | afterParserOrEnumRuleCall(); |
313 | 379 | ||
314 | 380 | ||
315 | } | 381 | } |
316 | break; | 382 | break; |
383 | case 3 : | ||
384 | // InternalSolverLanguageParser.g:128:4: this_UnnamedErrorPrediateDefinition_2= ruleUnnamedErrorPrediateDefinition | ||
385 | { | ||
317 | 386 | ||
318 | } | 387 | newCompositeNode(grammarAccess.getStatementAccess().getUnnamedErrorPrediateDefinitionParserRuleCall_0_2()); |
388 | |||
389 | pushFollow(FOLLOW_4); | ||
390 | this_UnnamedErrorPrediateDefinition_2=ruleUnnamedErrorPrediateDefinition(); | ||
319 | 391 | ||
392 | state._fsp--; | ||
320 | 393 | ||
321 | } | ||
322 | 394 | ||
395 | current = this_UnnamedErrorPrediateDefinition_2; | ||
396 | afterParserOrEnumRuleCall(); | ||
397 | |||
323 | 398 | ||
324 | leaveRule(); | 399 | } |
400 | break; | ||
401 | case 4 : | ||
402 | // InternalSolverLanguageParser.g:137:4: this_DefaultDefinition_3= ruleDefaultDefinition | ||
403 | { | ||
325 | 404 | ||
326 | } | 405 | newCompositeNode(grammarAccess.getStatementAccess().getDefaultDefinitionParserRuleCall_0_3()); |
406 | |||
407 | pushFollow(FOLLOW_4); | ||
408 | this_DefaultDefinition_3=ruleDefaultDefinition(); | ||
327 | 409 | ||
328 | catch (RecognitionException re) { | 410 | state._fsp--; |
329 | recover(input,re); | ||
330 | appendSkippedTokens(); | ||
331 | } | ||
332 | finally { | ||
333 | } | ||
334 | return current; | ||
335 | } | ||
336 | // $ANTLR end "ruleStatement" | ||
337 | 411 | ||
338 | 412 | ||
339 | // $ANTLR start "entryRuleREALLiteral" | 413 | current = this_DefaultDefinition_3; |
340 | // InternalSolverLanguage.g:136:1: entryRuleREALLiteral returns [String current=null] : iv_ruleREALLiteral= ruleREALLiteral EOF ; | 414 | afterParserOrEnumRuleCall(); |
341 | public final String entryRuleREALLiteral() throws RecognitionException { | 415 | |
342 | String current = null; | ||
343 | 416 | ||
344 | AntlrDatatypeRuleToken iv_ruleREALLiteral = null; | 417 | } |
418 | break; | ||
419 | case 5 : | ||
420 | // InternalSolverLanguageParser.g:146:4: this_ExternPredicateDefinition_4= ruleExternPredicateDefinition | ||
421 | { | ||
345 | 422 | ||
423 | newCompositeNode(grammarAccess.getStatementAccess().getExternPredicateDefinitionParserRuleCall_0_4()); | ||
424 | |||
425 | pushFollow(FOLLOW_4); | ||
426 | this_ExternPredicateDefinition_4=ruleExternPredicateDefinition(); | ||
346 | 427 | ||
347 | try { | 428 | state._fsp--; |
348 | // InternalSolverLanguage.g:136:51: (iv_ruleREALLiteral= ruleREALLiteral EOF ) | ||
349 | // InternalSolverLanguage.g:137:2: iv_ruleREALLiteral= ruleREALLiteral EOF | ||
350 | { | ||
351 | newCompositeNode(grammarAccess.getREALLiteralRule()); | ||
352 | pushFollow(FOLLOW_1); | ||
353 | iv_ruleREALLiteral=ruleREALLiteral(); | ||
354 | 429 | ||
355 | state._fsp--; | ||
356 | 430 | ||
357 | current =iv_ruleREALLiteral.getText(); | 431 | current = this_ExternPredicateDefinition_4; |
358 | match(input,EOF,FOLLOW_2); | 432 | afterParserOrEnumRuleCall(); |
433 | |||
359 | 434 | ||
360 | } | 435 | } |
436 | break; | ||
437 | case 6 : | ||
438 | // InternalSolverLanguageParser.g:155:4: this_MetricDefinition_5= ruleMetricDefinition | ||
439 | { | ||
361 | 440 | ||
362 | } | 441 | newCompositeNode(grammarAccess.getStatementAccess().getMetricDefinitionParserRuleCall_0_5()); |
442 | |||
443 | pushFollow(FOLLOW_4); | ||
444 | this_MetricDefinition_5=ruleMetricDefinition(); | ||
363 | 445 | ||
364 | catch (RecognitionException re) { | 446 | state._fsp--; |
365 | recover(input,re); | ||
366 | appendSkippedTokens(); | ||
367 | } | ||
368 | finally { | ||
369 | } | ||
370 | return current; | ||
371 | } | ||
372 | // $ANTLR end "entryRuleREALLiteral" | ||
373 | 447 | ||
374 | 448 | ||
375 | // $ANTLR start "ruleREALLiteral" | 449 | current = this_MetricDefinition_5; |
376 | // InternalSolverLanguage.g:143:1: ruleREALLiteral returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (kw= '-' )? this_INT_1= RULE_INT kw= '.' this_INT_3= RULE_INT ) ; | 450 | afterParserOrEnumRuleCall(); |
377 | public final AntlrDatatypeRuleToken ruleREALLiteral() throws RecognitionException { | 451 | |
378 | AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); | ||
379 | 452 | ||
380 | Token kw=null; | 453 | } |
381 | Token this_INT_1=null; | 454 | break; |
382 | Token this_INT_3=null; | 455 | case 7 : |
456 | // InternalSolverLanguageParser.g:164:4: this_ExternMetricDefinition_6= ruleExternMetricDefinition | ||
457 | { | ||
383 | 458 | ||
459 | newCompositeNode(grammarAccess.getStatementAccess().getExternMetricDefinitionParserRuleCall_0_6()); | ||
460 | |||
461 | pushFollow(FOLLOW_4); | ||
462 | this_ExternMetricDefinition_6=ruleExternMetricDefinition(); | ||
384 | 463 | ||
385 | enterRule(); | 464 | state._fsp--; |
386 | 465 | ||
387 | try { | ||
388 | // InternalSolverLanguage.g:149:2: ( ( (kw= '-' )? this_INT_1= RULE_INT kw= '.' this_INT_3= RULE_INT ) ) | ||
389 | // InternalSolverLanguage.g:150:2: ( (kw= '-' )? this_INT_1= RULE_INT kw= '.' this_INT_3= RULE_INT ) | ||
390 | { | ||
391 | // InternalSolverLanguage.g:150:2: ( (kw= '-' )? this_INT_1= RULE_INT kw= '.' this_INT_3= RULE_INT ) | ||
392 | // InternalSolverLanguage.g:151:3: (kw= '-' )? this_INT_1= RULE_INT kw= '.' this_INT_3= RULE_INT | ||
393 | { | ||
394 | // InternalSolverLanguage.g:151:3: (kw= '-' )? | ||
395 | int alt3=2; | ||
396 | int LA3_0 = input.LA(1); | ||
397 | 466 | ||
398 | if ( (LA3_0==11) ) { | 467 | current = this_ExternMetricDefinition_6; |
399 | alt3=1; | 468 | afterParserOrEnumRuleCall(); |
400 | } | 469 | |
401 | switch (alt3) { | 470 | |
402 | case 1 : | 471 | } |
403 | // InternalSolverLanguage.g:152:4: kw= '-' | 472 | break; |
473 | case 8 : | ||
474 | // InternalSolverLanguageParser.g:173:4: this_ClassDefinition_7= ruleClassDefinition | ||
404 | { | 475 | { |
405 | kw=(Token)match(input,11,FOLLOW_4); | ||
406 | 476 | ||
407 | current.merge(kw); | 477 | newCompositeNode(grammarAccess.getStatementAccess().getClassDefinitionParserRuleCall_0_7()); |
408 | newLeafNode(kw, grammarAccess.getREALLiteralAccess().getHyphenMinusKeyword_0()); | 478 | |
479 | pushFollow(FOLLOW_4); | ||
480 | this_ClassDefinition_7=ruleClassDefinition(); | ||
481 | |||
482 | state._fsp--; | ||
483 | |||
484 | |||
485 | current = this_ClassDefinition_7; | ||
486 | afterParserOrEnumRuleCall(); | ||
409 | 487 | ||
410 | 488 | ||
411 | } | 489 | } |
412 | break; | 490 | break; |
491 | case 9 : | ||
492 | // InternalSolverLanguageParser.g:182:4: this_ScopeDefinition_8= ruleScopeDefinition | ||
493 | { | ||
413 | 494 | ||
414 | } | 495 | newCompositeNode(grammarAccess.getStatementAccess().getScopeDefinitionParserRuleCall_0_8()); |
496 | |||
497 | pushFollow(FOLLOW_4); | ||
498 | this_ScopeDefinition_8=ruleScopeDefinition(); | ||
415 | 499 | ||
416 | this_INT_1=(Token)match(input,RULE_INT,FOLLOW_5); | 500 | state._fsp--; |
417 | 501 | ||
418 | current.merge(this_INT_1); | ||
419 | |||
420 | 502 | ||
421 | newLeafNode(this_INT_1, grammarAccess.getREALLiteralAccess().getINTTerminalRuleCall_1()); | 503 | current = this_ScopeDefinition_8; |
422 | 504 | afterParserOrEnumRuleCall(); | |
423 | kw=(Token)match(input,12,FOLLOW_4); | 505 | |
424 | 506 | ||
425 | current.merge(kw); | 507 | } |
426 | newLeafNode(kw, grammarAccess.getREALLiteralAccess().getFullStopKeyword_2()); | 508 | break; |
427 | 509 | case 10 : | |
428 | this_INT_3=(Token)match(input,RULE_INT,FOLLOW_2); | 510 | // InternalSolverLanguageParser.g:191:4: this_ObjectiveDefinition_9= ruleObjectiveDefinition |
511 | { | ||
429 | 512 | ||
430 | current.merge(this_INT_3); | 513 | newCompositeNode(grammarAccess.getStatementAccess().getObjectiveDefinitionParserRuleCall_0_9()); |
431 | 514 | ||
515 | pushFollow(FOLLOW_4); | ||
516 | this_ObjectiveDefinition_9=ruleObjectiveDefinition(); | ||
517 | |||
518 | state._fsp--; | ||
519 | |||
520 | |||
521 | current = this_ObjectiveDefinition_9; | ||
522 | afterParserOrEnumRuleCall(); | ||
523 | |||
524 | |||
525 | } | ||
526 | break; | ||
527 | |||
528 | } | ||
529 | |||
530 | this_FULL_STOP_10=(Token)match(input,RULE_FULL_STOP,FOLLOW_2); | ||
432 | 531 | ||
433 | newLeafNode(this_INT_3, grammarAccess.getREALLiteralAccess().getINTTerminalRuleCall_3()); | 532 | newLeafNode(this_FULL_STOP_10, grammarAccess.getStatementAccess().getFULL_STOPTerminalRuleCall_1()); |
434 | 533 | ||
435 | 534 | ||
436 | } | 535 | } |
@@ -451,28 +550,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
451 | } | 550 | } |
452 | return current; | 551 | return current; |
453 | } | 552 | } |
454 | // $ANTLR end "ruleREALLiteral" | 553 | // $ANTLR end "ruleStatement" |
455 | 554 | ||
456 | 555 | ||
457 | // $ANTLR start "entryRuleINTLiteral" | 556 | // $ANTLR start "entryRuleAssertionOrDefinition" |
458 | // InternalSolverLanguage.g:181:1: entryRuleINTLiteral returns [String current=null] : iv_ruleINTLiteral= ruleINTLiteral EOF ; | 557 | // InternalSolverLanguageParser.g:208:1: entryRuleAssertionOrDefinition returns [EObject current=null] : iv_ruleAssertionOrDefinition= ruleAssertionOrDefinition EOF ; |
459 | public final String entryRuleINTLiteral() throws RecognitionException { | 558 | public final EObject entryRuleAssertionOrDefinition() throws RecognitionException { |
460 | String current = null; | 559 | EObject current = null; |
461 | 560 | ||
462 | AntlrDatatypeRuleToken iv_ruleINTLiteral = null; | 561 | EObject iv_ruleAssertionOrDefinition = null; |
463 | 562 | ||
464 | 563 | ||
465 | try { | 564 | try { |
466 | // InternalSolverLanguage.g:181:50: (iv_ruleINTLiteral= ruleINTLiteral EOF ) | 565 | // InternalSolverLanguageParser.g:208:62: (iv_ruleAssertionOrDefinition= ruleAssertionOrDefinition EOF ) |
467 | // InternalSolverLanguage.g:182:2: iv_ruleINTLiteral= ruleINTLiteral EOF | 566 | // InternalSolverLanguageParser.g:209:2: iv_ruleAssertionOrDefinition= ruleAssertionOrDefinition EOF |
468 | { | 567 | { |
469 | newCompositeNode(grammarAccess.getINTLiteralRule()); | 568 | newCompositeNode(grammarAccess.getAssertionOrDefinitionRule()); |
470 | pushFollow(FOLLOW_1); | 569 | pushFollow(FOLLOW_1); |
471 | iv_ruleINTLiteral=ruleINTLiteral(); | 570 | iv_ruleAssertionOrDefinition=ruleAssertionOrDefinition(); |
472 | 571 | ||
473 | state._fsp--; | 572 | state._fsp--; |
474 | 573 | ||
475 | current =iv_ruleINTLiteral.getText(); | 574 | current =iv_ruleAssertionOrDefinition; |
476 | match(input,EOF,FOLLOW_2); | 575 | match(input,EOF,FOLLOW_2); |
477 | 576 | ||
478 | } | 577 | } |
@@ -487,191 +586,258 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
487 | } | 586 | } |
488 | return current; | 587 | return current; |
489 | } | 588 | } |
490 | // $ANTLR end "entryRuleINTLiteral" | 589 | // $ANTLR end "entryRuleAssertionOrDefinition" |
491 | 590 | ||
492 | 591 | ||
493 | // $ANTLR start "ruleINTLiteral" | 592 | // $ANTLR start "ruleAssertionOrDefinition" |
494 | // InternalSolverLanguage.g:188:1: ruleINTLiteral returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (kw= '-' )? this_INT_1= RULE_INT ) ; | 593 | // InternalSolverLanguageParser.g:215:1: ruleAssertionOrDefinition returns [EObject current=null] : (this_Expression_0= ruleExpression ( ( () (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? ) | ( () otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) | ( () otherlv_8= EqualsSign ( (lv_body_9_0= ruleExpression ) ) ) ) ) ; |
495 | public final AntlrDatatypeRuleToken ruleINTLiteral() throws RecognitionException { | 594 | public final EObject ruleAssertionOrDefinition() throws RecognitionException { |
496 | AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); | 595 | EObject current = null; |
596 | |||
597 | Token otherlv_2=null; | ||
598 | Token otherlv_5=null; | ||
599 | Token otherlv_8=null; | ||
600 | EObject this_Expression_0 = null; | ||
601 | |||
602 | EObject lv_range_3_0 = null; | ||
603 | |||
604 | EObject lv_body_6_0 = null; | ||
605 | |||
606 | EObject lv_body_9_0 = null; | ||
497 | 607 | ||
498 | Token kw=null; | ||
499 | Token this_INT_1=null; | ||
500 | 608 | ||
501 | 609 | ||
502 | enterRule(); | 610 | enterRule(); |
503 | 611 | ||
504 | try { | 612 | try { |
505 | // InternalSolverLanguage.g:194:2: ( ( (kw= '-' )? this_INT_1= RULE_INT ) ) | 613 | // InternalSolverLanguageParser.g:221:2: ( (this_Expression_0= ruleExpression ( ( () (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? ) | ( () otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) | ( () otherlv_8= EqualsSign ( (lv_body_9_0= ruleExpression ) ) ) ) ) ) |
506 | // InternalSolverLanguage.g:195:2: ( (kw= '-' )? this_INT_1= RULE_INT ) | 614 | // InternalSolverLanguageParser.g:222:2: (this_Expression_0= ruleExpression ( ( () (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? ) | ( () otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) | ( () otherlv_8= EqualsSign ( (lv_body_9_0= ruleExpression ) ) ) ) ) |
507 | { | 615 | { |
508 | // InternalSolverLanguage.g:195:2: ( (kw= '-' )? this_INT_1= RULE_INT ) | 616 | // InternalSolverLanguageParser.g:222:2: (this_Expression_0= ruleExpression ( ( () (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? ) | ( () otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) | ( () otherlv_8= EqualsSign ( (lv_body_9_0= ruleExpression ) ) ) ) ) |
509 | // InternalSolverLanguage.g:196:3: (kw= '-' )? this_INT_1= RULE_INT | 617 | // InternalSolverLanguageParser.g:223:3: this_Expression_0= ruleExpression ( ( () (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? ) | ( () otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) | ( () otherlv_8= EqualsSign ( (lv_body_9_0= ruleExpression ) ) ) ) |
510 | { | 618 | { |
511 | // InternalSolverLanguage.g:196:3: (kw= '-' )? | ||
512 | int alt4=2; | ||
513 | int LA4_0 = input.LA(1); | ||
514 | 619 | ||
515 | if ( (LA4_0==11) ) { | 620 | newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getExpressionParserRuleCall_0()); |
621 | |||
622 | pushFollow(FOLLOW_5); | ||
623 | this_Expression_0=ruleExpression(); | ||
624 | |||
625 | state._fsp--; | ||
626 | |||
627 | |||
628 | current = this_Expression_0; | ||
629 | afterParserOrEnumRuleCall(); | ||
630 | |||
631 | // InternalSolverLanguageParser.g:231:3: ( ( () (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? ) | ( () otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) | ( () otherlv_8= EqualsSign ( (lv_body_9_0= ruleExpression ) ) ) ) | ||
632 | int alt4=3; | ||
633 | switch ( input.LA(1) ) { | ||
634 | case EOF: | ||
635 | case Colon: | ||
636 | case RULE_FULL_STOP: | ||
637 | { | ||
516 | alt4=1; | 638 | alt4=1; |
639 | } | ||
640 | break; | ||
641 | case ColonHyphenMinus: | ||
642 | { | ||
643 | alt4=2; | ||
644 | } | ||
645 | break; | ||
646 | case EqualsSign: | ||
647 | { | ||
648 | alt4=3; | ||
649 | } | ||
650 | break; | ||
651 | default: | ||
652 | NoViableAltException nvae = | ||
653 | new NoViableAltException("", 4, 0, input); | ||
654 | |||
655 | throw nvae; | ||
517 | } | 656 | } |
657 | |||
518 | switch (alt4) { | 658 | switch (alt4) { |
519 | case 1 : | 659 | case 1 : |
520 | // InternalSolverLanguage.g:197:4: kw= '-' | 660 | // InternalSolverLanguageParser.g:232:4: ( () (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? ) |
661 | { | ||
662 | // InternalSolverLanguageParser.g:232:4: ( () (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? ) | ||
663 | // InternalSolverLanguageParser.g:233:5: () (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? | ||
664 | { | ||
665 | // InternalSolverLanguageParser.g:233:5: () | ||
666 | // InternalSolverLanguageParser.g:234:6: | ||
521 | { | 667 | { |
522 | kw=(Token)match(input,11,FOLLOW_4); | ||
523 | 668 | ||
524 | current.merge(kw); | 669 | current = forceCreateModelElementAndSet( |
525 | newLeafNode(kw, grammarAccess.getINTLiteralAccess().getHyphenMinusKeyword_0()); | 670 | grammarAccess.getAssertionOrDefinitionAccess().getAssertionBodyAction_1_0_0(), |
526 | 671 | current); | |
672 | |||
527 | 673 | ||
528 | } | 674 | } |
529 | break; | ||
530 | 675 | ||
531 | } | 676 | // InternalSolverLanguageParser.g:240:5: (otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) )? |
677 | int alt3=2; | ||
678 | int LA3_0 = input.LA(1); | ||
532 | 679 | ||
533 | this_INT_1=(Token)match(input,RULE_INT,FOLLOW_2); | 680 | if ( (LA3_0==Colon) ) { |
681 | alt3=1; | ||
682 | } | ||
683 | switch (alt3) { | ||
684 | case 1 : | ||
685 | // InternalSolverLanguageParser.g:241:6: otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) | ||
686 | { | ||
687 | otherlv_2=(Token)match(input,Colon,FOLLOW_6); | ||
534 | 688 | ||
535 | current.merge(this_INT_1); | 689 | newLeafNode(otherlv_2, grammarAccess.getAssertionOrDefinitionAccess().getColonKeyword_1_0_1_0()); |
536 | 690 | ||
691 | // InternalSolverLanguageParser.g:245:6: ( (lv_range_3_0= ruleExpression ) ) | ||
692 | // InternalSolverLanguageParser.g:246:7: (lv_range_3_0= ruleExpression ) | ||
693 | { | ||
694 | // InternalSolverLanguageParser.g:246:7: (lv_range_3_0= ruleExpression ) | ||
695 | // InternalSolverLanguageParser.g:247:8: lv_range_3_0= ruleExpression | ||
696 | { | ||
537 | 697 | ||
538 | newLeafNode(this_INT_1, grammarAccess.getINTLiteralAccess().getINTTerminalRuleCall_1()); | 698 | newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getRangeExpressionParserRuleCall_1_0_1_1_0()); |
539 | 699 | ||
700 | pushFollow(FOLLOW_2); | ||
701 | lv_range_3_0=ruleExpression(); | ||
540 | 702 | ||
541 | } | 703 | state._fsp--; |
542 | 704 | ||
543 | 705 | ||
544 | } | 706 | if (current==null) { |
707 | current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule()); | ||
708 | } | ||
709 | set( | ||
710 | current, | ||
711 | "range", | ||
712 | lv_range_3_0, | ||
713 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
714 | afterParserOrEnumRuleCall(); | ||
715 | |||
545 | 716 | ||
717 | } | ||
546 | 718 | ||
547 | leaveRule(); | ||
548 | 719 | ||
549 | } | 720 | } |
550 | 721 | ||
551 | catch (RecognitionException re) { | ||
552 | recover(input,re); | ||
553 | appendSkippedTokens(); | ||
554 | } | ||
555 | finally { | ||
556 | } | ||
557 | return current; | ||
558 | } | ||
559 | // $ANTLR end "ruleINTLiteral" | ||
560 | 722 | ||
723 | } | ||
724 | break; | ||
561 | 725 | ||
562 | // $ANTLR start "entryRuleBooleanValue" | 726 | } |
563 | // InternalSolverLanguage.g:214:1: entryRuleBooleanValue returns [EObject current=null] : iv_ruleBooleanValue= ruleBooleanValue EOF ; | ||
564 | public final EObject entryRuleBooleanValue() throws RecognitionException { | ||
565 | EObject current = null; | ||
566 | 727 | ||
567 | EObject iv_ruleBooleanValue = null; | ||
568 | 728 | ||
729 | } | ||
569 | 730 | ||
570 | try { | ||
571 | // InternalSolverLanguage.g:214:53: (iv_ruleBooleanValue= ruleBooleanValue EOF ) | ||
572 | // InternalSolverLanguage.g:215:2: iv_ruleBooleanValue= ruleBooleanValue EOF | ||
573 | { | ||
574 | newCompositeNode(grammarAccess.getBooleanValueRule()); | ||
575 | pushFollow(FOLLOW_1); | ||
576 | iv_ruleBooleanValue=ruleBooleanValue(); | ||
577 | 731 | ||
578 | state._fsp--; | 732 | } |
733 | break; | ||
734 | case 2 : | ||
735 | // InternalSolverLanguageParser.g:267:4: ( () otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) | ||
736 | { | ||
737 | // InternalSolverLanguageParser.g:267:4: ( () otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) | ||
738 | // InternalSolverLanguageParser.g:268:5: () otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) | ||
739 | { | ||
740 | // InternalSolverLanguageParser.g:268:5: () | ||
741 | // InternalSolverLanguageParser.g:269:6: | ||
742 | { | ||
579 | 743 | ||
580 | current =iv_ruleBooleanValue; | 744 | current = forceCreateModelElementAndSet( |
581 | match(input,EOF,FOLLOW_2); | 745 | grammarAccess.getAssertionOrDefinitionAccess().getPredicateDefinitionHeadAction_1_1_0(), |
746 | current); | ||
747 | |||
582 | 748 | ||
583 | } | 749 | } |
584 | 750 | ||
585 | } | 751 | otherlv_5=(Token)match(input,ColonHyphenMinus,FOLLOW_6); |
586 | 752 | ||
587 | catch (RecognitionException re) { | 753 | newLeafNode(otherlv_5, grammarAccess.getAssertionOrDefinitionAccess().getColonHyphenMinusKeyword_1_1_1()); |
588 | recover(input,re); | 754 | |
589 | appendSkippedTokens(); | 755 | // InternalSolverLanguageParser.g:279:5: ( (lv_body_6_0= ruleExpression ) ) |
590 | } | 756 | // InternalSolverLanguageParser.g:280:6: (lv_body_6_0= ruleExpression ) |
591 | finally { | 757 | { |
592 | } | 758 | // InternalSolverLanguageParser.g:280:6: (lv_body_6_0= ruleExpression ) |
593 | return current; | 759 | // InternalSolverLanguageParser.g:281:7: lv_body_6_0= ruleExpression |
594 | } | 760 | { |
595 | // $ANTLR end "entryRuleBooleanValue" | ||
596 | 761 | ||
762 | newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getBodyExpressionParserRuleCall_1_1_2_0()); | ||
763 | |||
764 | pushFollow(FOLLOW_2); | ||
765 | lv_body_6_0=ruleExpression(); | ||
597 | 766 | ||
598 | // $ANTLR start "ruleBooleanValue" | 767 | state._fsp--; |
599 | // InternalSolverLanguage.g:221:1: ruleBooleanValue returns [EObject current=null] : ( ( () otherlv_1= 'true' ) | (otherlv_2= 'false' () ) ) ; | ||
600 | public final EObject ruleBooleanValue() throws RecognitionException { | ||
601 | EObject current = null; | ||
602 | 768 | ||
603 | Token otherlv_1=null; | ||
604 | Token otherlv_2=null; | ||
605 | 769 | ||
770 | if (current==null) { | ||
771 | current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule()); | ||
772 | } | ||
773 | set( | ||
774 | current, | ||
775 | "body", | ||
776 | lv_body_6_0, | ||
777 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
778 | afterParserOrEnumRuleCall(); | ||
779 | |||
606 | 780 | ||
607 | enterRule(); | 781 | } |
608 | 782 | ||
609 | try { | ||
610 | // InternalSolverLanguage.g:227:2: ( ( ( () otherlv_1= 'true' ) | (otherlv_2= 'false' () ) ) ) | ||
611 | // InternalSolverLanguage.g:228:2: ( ( () otherlv_1= 'true' ) | (otherlv_2= 'false' () ) ) | ||
612 | { | ||
613 | // InternalSolverLanguage.g:228:2: ( ( () otherlv_1= 'true' ) | (otherlv_2= 'false' () ) ) | ||
614 | int alt5=2; | ||
615 | int LA5_0 = input.LA(1); | ||
616 | 783 | ||
617 | if ( (LA5_0==13) ) { | 784 | } |
618 | alt5=1; | ||
619 | } | ||
620 | else if ( (LA5_0==14) ) { | ||
621 | alt5=2; | ||
622 | } | ||
623 | else { | ||
624 | NoViableAltException nvae = | ||
625 | new NoViableAltException("", 5, 0, input); | ||
626 | 785 | ||
627 | throw nvae; | 786 | |
628 | } | 787 | } |
629 | switch (alt5) { | 788 | |
630 | case 1 : | 789 | |
631 | // InternalSolverLanguage.g:229:3: ( () otherlv_1= 'true' ) | 790 | } |
791 | break; | ||
792 | case 3 : | ||
793 | // InternalSolverLanguageParser.g:300:4: ( () otherlv_8= EqualsSign ( (lv_body_9_0= ruleExpression ) ) ) | ||
632 | { | 794 | { |
633 | // InternalSolverLanguage.g:229:3: ( () otherlv_1= 'true' ) | 795 | // InternalSolverLanguageParser.g:300:4: ( () otherlv_8= EqualsSign ( (lv_body_9_0= ruleExpression ) ) ) |
634 | // InternalSolverLanguage.g:230:4: () otherlv_1= 'true' | 796 | // InternalSolverLanguageParser.g:301:5: () otherlv_8= EqualsSign ( (lv_body_9_0= ruleExpression ) ) |
635 | { | 797 | { |
636 | // InternalSolverLanguage.g:230:4: () | 798 | // InternalSolverLanguageParser.g:301:5: () |
637 | // InternalSolverLanguage.g:231:5: | 799 | // InternalSolverLanguageParser.g:302:6: |
638 | { | 800 | { |
639 | 801 | ||
640 | current = forceCreateModelElement( | 802 | current = forceCreateModelElementAndSet( |
641 | grammarAccess.getBooleanValueAccess().getBooleanTrueAction_0_0(), | 803 | grammarAccess.getAssertionOrDefinitionAccess().getMetricDefinitionHeadAction_1_2_0(), |
642 | current); | 804 | current); |
643 | 805 | ||
644 | 806 | ||
645 | } | 807 | } |
646 | 808 | ||
647 | otherlv_1=(Token)match(input,13,FOLLOW_2); | 809 | otherlv_8=(Token)match(input,EqualsSign,FOLLOW_6); |
648 | 810 | ||
649 | newLeafNode(otherlv_1, grammarAccess.getBooleanValueAccess().getTrueKeyword_0_1()); | 811 | newLeafNode(otherlv_8, grammarAccess.getAssertionOrDefinitionAccess().getEqualsSignKeyword_1_2_1()); |
650 | 812 | ||
813 | // InternalSolverLanguageParser.g:312:5: ( (lv_body_9_0= ruleExpression ) ) | ||
814 | // InternalSolverLanguageParser.g:313:6: (lv_body_9_0= ruleExpression ) | ||
815 | { | ||
816 | // InternalSolverLanguageParser.g:313:6: (lv_body_9_0= ruleExpression ) | ||
817 | // InternalSolverLanguageParser.g:314:7: lv_body_9_0= ruleExpression | ||
818 | { | ||
651 | 819 | ||
652 | } | 820 | newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getBodyExpressionParserRuleCall_1_2_2_0()); |
821 | |||
822 | pushFollow(FOLLOW_2); | ||
823 | lv_body_9_0=ruleExpression(); | ||
653 | 824 | ||
825 | state._fsp--; | ||
654 | 826 | ||
655 | } | ||
656 | break; | ||
657 | case 2 : | ||
658 | // InternalSolverLanguage.g:243:3: (otherlv_2= 'false' () ) | ||
659 | { | ||
660 | // InternalSolverLanguage.g:243:3: (otherlv_2= 'false' () ) | ||
661 | // InternalSolverLanguage.g:244:4: otherlv_2= 'false' () | ||
662 | { | ||
663 | otherlv_2=(Token)match(input,14,FOLLOW_2); | ||
664 | 827 | ||
665 | newLeafNode(otherlv_2, grammarAccess.getBooleanValueAccess().getFalseKeyword_1_0()); | 828 | if (current==null) { |
666 | 829 | current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule()); | |
667 | // InternalSolverLanguage.g:248:4: () | 830 | } |
668 | // InternalSolverLanguage.g:249:5: | 831 | set( |
669 | { | 832 | current, |
833 | "body", | ||
834 | lv_body_9_0, | ||
835 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
836 | afterParserOrEnumRuleCall(); | ||
837 | |||
838 | |||
839 | } | ||
670 | 840 | ||
671 | current = forceCreateModelElement( | ||
672 | grammarAccess.getBooleanValueAccess().getBooleanFalseAction_1_1(), | ||
673 | current); | ||
674 | |||
675 | 841 | ||
676 | } | 842 | } |
677 | 843 | ||
@@ -688,6 +854,9 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
688 | } | 854 | } |
689 | 855 | ||
690 | 856 | ||
857 | } | ||
858 | |||
859 | |||
691 | leaveRule(); | 860 | leaveRule(); |
692 | 861 | ||
693 | } | 862 | } |
@@ -700,28 +869,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
700 | } | 869 | } |
701 | return current; | 870 | return current; |
702 | } | 871 | } |
703 | // $ANTLR end "ruleBooleanValue" | 872 | // $ANTLR end "ruleAssertionOrDefinition" |
704 | 873 | ||
705 | 874 | ||
706 | // $ANTLR start "entryRuleTruthValue" | 875 | // $ANTLR start "entryRulePredicateDefinition" |
707 | // InternalSolverLanguage.g:260:1: entryRuleTruthValue returns [EObject current=null] : iv_ruleTruthValue= ruleTruthValue EOF ; | 876 | // InternalSolverLanguageParser.g:337:1: entryRulePredicateDefinition returns [EObject current=null] : iv_rulePredicateDefinition= rulePredicateDefinition EOF ; |
708 | public final EObject entryRuleTruthValue() throws RecognitionException { | 877 | public final EObject entryRulePredicateDefinition() throws RecognitionException { |
709 | EObject current = null; | 878 | EObject current = null; |
710 | 879 | ||
711 | EObject iv_ruleTruthValue = null; | 880 | EObject iv_rulePredicateDefinition = null; |
712 | 881 | ||
713 | 882 | ||
714 | try { | 883 | try { |
715 | // InternalSolverLanguage.g:260:51: (iv_ruleTruthValue= ruleTruthValue EOF ) | 884 | // InternalSolverLanguageParser.g:337:60: (iv_rulePredicateDefinition= rulePredicateDefinition EOF ) |
716 | // InternalSolverLanguage.g:261:2: iv_ruleTruthValue= ruleTruthValue EOF | 885 | // InternalSolverLanguageParser.g:338:2: iv_rulePredicateDefinition= rulePredicateDefinition EOF |
717 | { | 886 | { |
718 | newCompositeNode(grammarAccess.getTruthValueRule()); | 887 | newCompositeNode(grammarAccess.getPredicateDefinitionRule()); |
719 | pushFollow(FOLLOW_1); | 888 | pushFollow(FOLLOW_1); |
720 | iv_ruleTruthValue=ruleTruthValue(); | 889 | iv_rulePredicateDefinition=rulePredicateDefinition(); |
721 | 890 | ||
722 | state._fsp--; | 891 | state._fsp--; |
723 | 892 | ||
724 | current =iv_ruleTruthValue; | 893 | current =iv_rulePredicateDefinition; |
725 | match(input,EOF,FOLLOW_2); | 894 | match(input,EOF,FOLLOW_2); |
726 | 895 | ||
727 | } | 896 | } |
@@ -736,159 +905,179 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
736 | } | 905 | } |
737 | return current; | 906 | return current; |
738 | } | 907 | } |
739 | // $ANTLR end "entryRuleTruthValue" | 908 | // $ANTLR end "entryRulePredicateDefinition" |
740 | 909 | ||
741 | 910 | ||
742 | // $ANTLR start "ruleTruthValue" | 911 | // $ANTLR start "rulePredicateDefinition" |
743 | // InternalSolverLanguage.g:267:1: ruleTruthValue returns [EObject current=null] : ( ( () otherlv_1= 'true' ) | ( () otherlv_3= 'false' ) | ( () otherlv_5= 'unknown' ) | ( () otherlv_7= 'error' ) ) ; | 912 | // InternalSolverLanguageParser.g:344:1: rulePredicateDefinition returns [EObject current=null] : ( ( ( ( (lv_functional_0_0= Functional ) ) ( (lv_error_1_0= Error ) )? ) | ( ( (lv_error_2_0= Error ) ) ( (lv_functional_3_0= Functional ) )? ) ) ( (lv_head_4_0= ruleCall ) ) otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) ; |
744 | public final EObject ruleTruthValue() throws RecognitionException { | 913 | public final EObject rulePredicateDefinition() throws RecognitionException { |
745 | EObject current = null; | 914 | EObject current = null; |
746 | 915 | ||
747 | Token otherlv_1=null; | 916 | Token lv_functional_0_0=null; |
748 | Token otherlv_3=null; | 917 | Token lv_error_1_0=null; |
918 | Token lv_error_2_0=null; | ||
919 | Token lv_functional_3_0=null; | ||
749 | Token otherlv_5=null; | 920 | Token otherlv_5=null; |
750 | Token otherlv_7=null; | 921 | EObject lv_head_4_0 = null; |
922 | |||
923 | EObject lv_body_6_0 = null; | ||
924 | |||
751 | 925 | ||
752 | 926 | ||
753 | enterRule(); | 927 | enterRule(); |
754 | 928 | ||
755 | try { | 929 | try { |
756 | // InternalSolverLanguage.g:273:2: ( ( ( () otherlv_1= 'true' ) | ( () otherlv_3= 'false' ) | ( () otherlv_5= 'unknown' ) | ( () otherlv_7= 'error' ) ) ) | 930 | // InternalSolverLanguageParser.g:350:2: ( ( ( ( ( (lv_functional_0_0= Functional ) ) ( (lv_error_1_0= Error ) )? ) | ( ( (lv_error_2_0= Error ) ) ( (lv_functional_3_0= Functional ) )? ) ) ( (lv_head_4_0= ruleCall ) ) otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) ) |
757 | // InternalSolverLanguage.g:274:2: ( ( () otherlv_1= 'true' ) | ( () otherlv_3= 'false' ) | ( () otherlv_5= 'unknown' ) | ( () otherlv_7= 'error' ) ) | 931 | // InternalSolverLanguageParser.g:351:2: ( ( ( ( (lv_functional_0_0= Functional ) ) ( (lv_error_1_0= Error ) )? ) | ( ( (lv_error_2_0= Error ) ) ( (lv_functional_3_0= Functional ) )? ) ) ( (lv_head_4_0= ruleCall ) ) otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) |
758 | { | 932 | { |
759 | // InternalSolverLanguage.g:274:2: ( ( () otherlv_1= 'true' ) | ( () otherlv_3= 'false' ) | ( () otherlv_5= 'unknown' ) | ( () otherlv_7= 'error' ) ) | 933 | // InternalSolverLanguageParser.g:351:2: ( ( ( ( (lv_functional_0_0= Functional ) ) ( (lv_error_1_0= Error ) )? ) | ( ( (lv_error_2_0= Error ) ) ( (lv_functional_3_0= Functional ) )? ) ) ( (lv_head_4_0= ruleCall ) ) otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) ) |
760 | int alt6=4; | 934 | // InternalSolverLanguageParser.g:352:3: ( ( ( (lv_functional_0_0= Functional ) ) ( (lv_error_1_0= Error ) )? ) | ( ( (lv_error_2_0= Error ) ) ( (lv_functional_3_0= Functional ) )? ) ) ( (lv_head_4_0= ruleCall ) ) otherlv_5= ColonHyphenMinus ( (lv_body_6_0= ruleExpression ) ) |
761 | switch ( input.LA(1) ) { | 935 | { |
762 | case 13: | 936 | // InternalSolverLanguageParser.g:352:3: ( ( ( (lv_functional_0_0= Functional ) ) ( (lv_error_1_0= Error ) )? ) | ( ( (lv_error_2_0= Error ) ) ( (lv_functional_3_0= Functional ) )? ) ) |
763 | { | 937 | int alt7=2; |
764 | alt6=1; | 938 | int LA7_0 = input.LA(1); |
765 | } | 939 | |
766 | break; | 940 | if ( (LA7_0==Functional) ) { |
767 | case 14: | 941 | alt7=1; |
768 | { | 942 | } |
769 | alt6=2; | 943 | else if ( (LA7_0==Error) ) { |
770 | } | 944 | alt7=2; |
771 | break; | 945 | } |
772 | case 15: | 946 | else { |
773 | { | ||
774 | alt6=3; | ||
775 | } | ||
776 | break; | ||
777 | case 16: | ||
778 | { | ||
779 | alt6=4; | ||
780 | } | ||
781 | break; | ||
782 | default: | ||
783 | NoViableAltException nvae = | 947 | NoViableAltException nvae = |
784 | new NoViableAltException("", 6, 0, input); | 948 | new NoViableAltException("", 7, 0, input); |
785 | 949 | ||
786 | throw nvae; | 950 | throw nvae; |
787 | } | 951 | } |
788 | 952 | switch (alt7) { | |
789 | switch (alt6) { | ||
790 | case 1 : | 953 | case 1 : |
791 | // InternalSolverLanguage.g:275:3: ( () otherlv_1= 'true' ) | 954 | // InternalSolverLanguageParser.g:353:4: ( ( (lv_functional_0_0= Functional ) ) ( (lv_error_1_0= Error ) )? ) |
955 | { | ||
956 | // InternalSolverLanguageParser.g:353:4: ( ( (lv_functional_0_0= Functional ) ) ( (lv_error_1_0= Error ) )? ) | ||
957 | // InternalSolverLanguageParser.g:354:5: ( (lv_functional_0_0= Functional ) ) ( (lv_error_1_0= Error ) )? | ||
792 | { | 958 | { |
793 | // InternalSolverLanguage.g:275:3: ( () otherlv_1= 'true' ) | 959 | // InternalSolverLanguageParser.g:354:5: ( (lv_functional_0_0= Functional ) ) |
794 | // InternalSolverLanguage.g:276:4: () otherlv_1= 'true' | 960 | // InternalSolverLanguageParser.g:355:6: (lv_functional_0_0= Functional ) |
795 | { | 961 | { |
796 | // InternalSolverLanguage.g:276:4: () | 962 | // InternalSolverLanguageParser.g:355:6: (lv_functional_0_0= Functional ) |
797 | // InternalSolverLanguage.g:277:5: | 963 | // InternalSolverLanguageParser.g:356:7: lv_functional_0_0= Functional |
798 | { | 964 | { |
965 | lv_functional_0_0=(Token)match(input,Functional,FOLLOW_7); | ||
799 | 966 | ||
800 | current = forceCreateModelElement( | 967 | newLeafNode(lv_functional_0_0, grammarAccess.getPredicateDefinitionAccess().getFunctionalFunctionalKeyword_0_0_0_0()); |
801 | grammarAccess.getTruthValueAccess().getTrueAction_0_0(), | 968 | |
802 | current); | ||
803 | |||
804 | 969 | ||
805 | } | 970 | if (current==null) { |
971 | current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
972 | } | ||
973 | setWithLastConsumed(current, "functional", true, "functional"); | ||
974 | |||
806 | 975 | ||
807 | otherlv_1=(Token)match(input,13,FOLLOW_2); | 976 | } |
808 | 977 | ||
809 | newLeafNode(otherlv_1, grammarAccess.getTruthValueAccess().getTrueKeyword_0_1()); | ||
810 | |||
811 | 978 | ||
812 | } | 979 | } |
813 | 980 | ||
981 | // InternalSolverLanguageParser.g:368:5: ( (lv_error_1_0= Error ) )? | ||
982 | int alt5=2; | ||
983 | int LA5_0 = input.LA(1); | ||
814 | 984 | ||
985 | if ( (LA5_0==Error) ) { | ||
986 | alt5=1; | ||
815 | } | 987 | } |
816 | break; | 988 | switch (alt5) { |
817 | case 2 : | 989 | case 1 : |
818 | // InternalSolverLanguage.g:289:3: ( () otherlv_3= 'false' ) | 990 | // InternalSolverLanguageParser.g:369:6: (lv_error_1_0= Error ) |
819 | { | 991 | { |
820 | // InternalSolverLanguage.g:289:3: ( () otherlv_3= 'false' ) | 992 | // InternalSolverLanguageParser.g:369:6: (lv_error_1_0= Error ) |
821 | // InternalSolverLanguage.g:290:4: () otherlv_3= 'false' | 993 | // InternalSolverLanguageParser.g:370:7: lv_error_1_0= Error |
822 | { | 994 | { |
823 | // InternalSolverLanguage.g:290:4: () | 995 | lv_error_1_0=(Token)match(input,Error,FOLLOW_8); |
824 | // InternalSolverLanguage.g:291:5: | ||
825 | { | ||
826 | 996 | ||
827 | current = forceCreateModelElement( | 997 | newLeafNode(lv_error_1_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_1_0()); |
828 | grammarAccess.getTruthValueAccess().getFalseAction_1_0(), | 998 | |
829 | current); | ||
830 | |||
831 | 999 | ||
832 | } | 1000 | if (current==null) { |
1001 | current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
1002 | } | ||
1003 | setWithLastConsumed(current, "error", true, "error"); | ||
1004 | |||
1005 | |||
1006 | } | ||
833 | 1007 | ||
834 | otherlv_3=(Token)match(input,14,FOLLOW_2); | ||
835 | 1008 | ||
836 | newLeafNode(otherlv_3, grammarAccess.getTruthValueAccess().getFalseKeyword_1_1()); | 1009 | } |
837 | 1010 | break; | |
1011 | |||
1012 | } | ||
1013 | |||
838 | 1014 | ||
839 | } | 1015 | } |
840 | 1016 | ||
841 | 1017 | ||
842 | } | 1018 | } |
843 | break; | 1019 | break; |
844 | case 3 : | 1020 | case 2 : |
845 | // InternalSolverLanguage.g:303:3: ( () otherlv_5= 'unknown' ) | 1021 | // InternalSolverLanguageParser.g:384:4: ( ( (lv_error_2_0= Error ) ) ( (lv_functional_3_0= Functional ) )? ) |
846 | { | 1022 | { |
847 | // InternalSolverLanguage.g:303:3: ( () otherlv_5= 'unknown' ) | 1023 | // InternalSolverLanguageParser.g:384:4: ( ( (lv_error_2_0= Error ) ) ( (lv_functional_3_0= Functional ) )? ) |
848 | // InternalSolverLanguage.g:304:4: () otherlv_5= 'unknown' | 1024 | // InternalSolverLanguageParser.g:385:5: ( (lv_error_2_0= Error ) ) ( (lv_functional_3_0= Functional ) )? |
849 | { | 1025 | { |
850 | // InternalSolverLanguage.g:304:4: () | 1026 | // InternalSolverLanguageParser.g:385:5: ( (lv_error_2_0= Error ) ) |
851 | // InternalSolverLanguage.g:305:5: | 1027 | // InternalSolverLanguageParser.g:386:6: (lv_error_2_0= Error ) |
852 | { | 1028 | { |
1029 | // InternalSolverLanguageParser.g:386:6: (lv_error_2_0= Error ) | ||
1030 | // InternalSolverLanguageParser.g:387:7: lv_error_2_0= Error | ||
1031 | { | ||
1032 | lv_error_2_0=(Token)match(input,Error,FOLLOW_9); | ||
853 | 1033 | ||
854 | current = forceCreateModelElement( | 1034 | newLeafNode(lv_error_2_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_1_0_0()); |
855 | grammarAccess.getTruthValueAccess().getUnknownAction_2_0(), | 1035 | |
856 | current); | ||
857 | |||
858 | 1036 | ||
859 | } | 1037 | if (current==null) { |
1038 | current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
1039 | } | ||
1040 | setWithLastConsumed(current, "error", true, "error"); | ||
1041 | |||
860 | 1042 | ||
861 | otherlv_5=(Token)match(input,15,FOLLOW_2); | 1043 | } |
862 | 1044 | ||
863 | newLeafNode(otherlv_5, grammarAccess.getTruthValueAccess().getUnknownKeyword_2_1()); | ||
864 | |||
865 | 1045 | ||
866 | } | 1046 | } |
867 | 1047 | ||
1048 | // InternalSolverLanguageParser.g:399:5: ( (lv_functional_3_0= Functional ) )? | ||
1049 | int alt6=2; | ||
1050 | int LA6_0 = input.LA(1); | ||
868 | 1051 | ||
1052 | if ( (LA6_0==Functional) ) { | ||
1053 | alt6=1; | ||
869 | } | 1054 | } |
870 | break; | 1055 | switch (alt6) { |
871 | case 4 : | 1056 | case 1 : |
872 | // InternalSolverLanguage.g:317:3: ( () otherlv_7= 'error' ) | 1057 | // InternalSolverLanguageParser.g:400:6: (lv_functional_3_0= Functional ) |
873 | { | 1058 | { |
874 | // InternalSolverLanguage.g:317:3: ( () otherlv_7= 'error' ) | 1059 | // InternalSolverLanguageParser.g:400:6: (lv_functional_3_0= Functional ) |
875 | // InternalSolverLanguage.g:318:4: () otherlv_7= 'error' | 1060 | // InternalSolverLanguageParser.g:401:7: lv_functional_3_0= Functional |
876 | { | 1061 | { |
877 | // InternalSolverLanguage.g:318:4: () | 1062 | lv_functional_3_0=(Token)match(input,Functional,FOLLOW_8); |
878 | // InternalSolverLanguage.g:319:5: | ||
879 | { | ||
880 | 1063 | ||
881 | current = forceCreateModelElement( | 1064 | newLeafNode(lv_functional_3_0, grammarAccess.getPredicateDefinitionAccess().getFunctionalFunctionalKeyword_0_1_1_0()); |
882 | grammarAccess.getTruthValueAccess().getErrorAction_3_0(), | 1065 | |
883 | current); | ||
884 | |||
885 | 1066 | ||
886 | } | 1067 | if (current==null) { |
1068 | current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
1069 | } | ||
1070 | setWithLastConsumed(current, "functional", true, "functional"); | ||
1071 | |||
887 | 1072 | ||
888 | otherlv_7=(Token)match(input,16,FOLLOW_2); | 1073 | } |
1074 | |||
1075 | |||
1076 | } | ||
1077 | break; | ||
1078 | |||
1079 | } | ||
889 | 1080 | ||
890 | newLeafNode(otherlv_7, grammarAccess.getTruthValueAccess().getErrorKeyword_3_1()); | ||
891 | |||
892 | 1081 | ||
893 | } | 1082 | } |
894 | 1083 | ||
@@ -898,6 +1087,75 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
898 | 1087 | ||
899 | } | 1088 | } |
900 | 1089 | ||
1090 | // InternalSolverLanguageParser.g:415:3: ( (lv_head_4_0= ruleCall ) ) | ||
1091 | // InternalSolverLanguageParser.g:416:4: (lv_head_4_0= ruleCall ) | ||
1092 | { | ||
1093 | // InternalSolverLanguageParser.g:416:4: (lv_head_4_0= ruleCall ) | ||
1094 | // InternalSolverLanguageParser.g:417:5: lv_head_4_0= ruleCall | ||
1095 | { | ||
1096 | |||
1097 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getHeadCallParserRuleCall_1_0()); | ||
1098 | |||
1099 | pushFollow(FOLLOW_10); | ||
1100 | lv_head_4_0=ruleCall(); | ||
1101 | |||
1102 | state._fsp--; | ||
1103 | |||
1104 | |||
1105 | if (current==null) { | ||
1106 | current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
1107 | } | ||
1108 | set( | ||
1109 | current, | ||
1110 | "head", | ||
1111 | lv_head_4_0, | ||
1112 | "org.eclipse.viatra.solver.language.SolverLanguage.Call"); | ||
1113 | afterParserOrEnumRuleCall(); | ||
1114 | |||
1115 | |||
1116 | } | ||
1117 | |||
1118 | |||
1119 | } | ||
1120 | |||
1121 | otherlv_5=(Token)match(input,ColonHyphenMinus,FOLLOW_6); | ||
1122 | |||
1123 | newLeafNode(otherlv_5, grammarAccess.getPredicateDefinitionAccess().getColonHyphenMinusKeyword_2()); | ||
1124 | |||
1125 | // InternalSolverLanguageParser.g:438:3: ( (lv_body_6_0= ruleExpression ) ) | ||
1126 | // InternalSolverLanguageParser.g:439:4: (lv_body_6_0= ruleExpression ) | ||
1127 | { | ||
1128 | // InternalSolverLanguageParser.g:439:4: (lv_body_6_0= ruleExpression ) | ||
1129 | // InternalSolverLanguageParser.g:440:5: lv_body_6_0= ruleExpression | ||
1130 | { | ||
1131 | |||
1132 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodyExpressionParserRuleCall_3_0()); | ||
1133 | |||
1134 | pushFollow(FOLLOW_2); | ||
1135 | lv_body_6_0=ruleExpression(); | ||
1136 | |||
1137 | state._fsp--; | ||
1138 | |||
1139 | |||
1140 | if (current==null) { | ||
1141 | current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
1142 | } | ||
1143 | set( | ||
1144 | current, | ||
1145 | "body", | ||
1146 | lv_body_6_0, | ||
1147 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
1148 | afterParserOrEnumRuleCall(); | ||
1149 | |||
1150 | |||
1151 | } | ||
1152 | |||
1153 | |||
1154 | } | ||
1155 | |||
1156 | |||
1157 | } | ||
1158 | |||
901 | 1159 | ||
902 | } | 1160 | } |
903 | 1161 | ||
@@ -914,28 +1172,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
914 | } | 1172 | } |
915 | return current; | 1173 | return current; |
916 | } | 1174 | } |
917 | // $ANTLR end "ruleTruthValue" | 1175 | // $ANTLR end "rulePredicateDefinition" |
918 | 1176 | ||
919 | 1177 | ||
920 | // $ANTLR start "entryRuleInterpretation" | 1178 | // $ANTLR start "entryRuleUnnamedErrorPrediateDefinition" |
921 | // InternalSolverLanguage.g:334:1: entryRuleInterpretation returns [EObject current=null] : iv_ruleInterpretation= ruleInterpretation EOF ; | 1179 | // InternalSolverLanguageParser.g:461:1: entryRuleUnnamedErrorPrediateDefinition returns [EObject current=null] : iv_ruleUnnamedErrorPrediateDefinition= ruleUnnamedErrorPrediateDefinition EOF ; |
922 | public final EObject entryRuleInterpretation() throws RecognitionException { | 1180 | public final EObject entryRuleUnnamedErrorPrediateDefinition() throws RecognitionException { |
923 | EObject current = null; | 1181 | EObject current = null; |
924 | 1182 | ||
925 | EObject iv_ruleInterpretation = null; | 1183 | EObject iv_ruleUnnamedErrorPrediateDefinition = null; |
926 | 1184 | ||
927 | 1185 | ||
928 | try { | 1186 | try { |
929 | // InternalSolverLanguage.g:334:55: (iv_ruleInterpretation= ruleInterpretation EOF ) | 1187 | // InternalSolverLanguageParser.g:461:71: (iv_ruleUnnamedErrorPrediateDefinition= ruleUnnamedErrorPrediateDefinition EOF ) |
930 | // InternalSolverLanguage.g:335:2: iv_ruleInterpretation= ruleInterpretation EOF | 1188 | // InternalSolverLanguageParser.g:462:2: iv_ruleUnnamedErrorPrediateDefinition= ruleUnnamedErrorPrediateDefinition EOF |
931 | { | 1189 | { |
932 | newCompositeNode(grammarAccess.getInterpretationRule()); | 1190 | newCompositeNode(grammarAccess.getUnnamedErrorPrediateDefinitionRule()); |
933 | pushFollow(FOLLOW_1); | 1191 | pushFollow(FOLLOW_1); |
934 | iv_ruleInterpretation=ruleInterpretation(); | 1192 | iv_ruleUnnamedErrorPrediateDefinition=ruleUnnamedErrorPrediateDefinition(); |
935 | 1193 | ||
936 | state._fsp--; | 1194 | state._fsp--; |
937 | 1195 | ||
938 | current =iv_ruleInterpretation; | 1196 | current =iv_ruleUnnamedErrorPrediateDefinition; |
939 | match(input,EOF,FOLLOW_2); | 1197 | match(input,EOF,FOLLOW_2); |
940 | 1198 | ||
941 | } | 1199 | } |
@@ -950,118 +1208,101 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
950 | } | 1208 | } |
951 | return current; | 1209 | return current; |
952 | } | 1210 | } |
953 | // $ANTLR end "entryRuleInterpretation" | 1211 | // $ANTLR end "entryRuleUnnamedErrorPrediateDefinition" |
954 | 1212 | ||
955 | 1213 | ||
956 | // $ANTLR start "ruleInterpretation" | 1214 | // $ANTLR start "ruleUnnamedErrorPrediateDefinition" |
957 | // InternalSolverLanguage.g:341:1: ruleInterpretation returns [EObject current=null] : (this_BasicInterpretation_0= ruleBasicInterpretation | this_DefaultInterpretation_1= ruleDefaultInterpretation | this_CDInterpretation_2= ruleCDInterpretation ) ; | 1215 | // InternalSolverLanguageParser.g:468:1: ruleUnnamedErrorPrediateDefinition returns [EObject current=null] : (otherlv_0= Error ( (lv_argumentList_1_0= ruleArgumentList ) ) otherlv_2= ColonHyphenMinus ( (lv_body_3_0= ruleExpression ) ) ) ; |
958 | public final EObject ruleInterpretation() throws RecognitionException { | 1216 | public final EObject ruleUnnamedErrorPrediateDefinition() throws RecognitionException { |
959 | EObject current = null; | 1217 | EObject current = null; |
960 | 1218 | ||
961 | EObject this_BasicInterpretation_0 = null; | 1219 | Token otherlv_0=null; |
962 | 1220 | Token otherlv_2=null; | |
963 | EObject this_DefaultInterpretation_1 = null; | 1221 | EObject lv_argumentList_1_0 = null; |
964 | 1222 | ||
965 | EObject this_CDInterpretation_2 = null; | 1223 | EObject lv_body_3_0 = null; |
966 | 1224 | ||
967 | 1225 | ||
968 | 1226 | ||
969 | enterRule(); | 1227 | enterRule(); |
970 | 1228 | ||
971 | try { | 1229 | try { |
972 | // InternalSolverLanguage.g:347:2: ( (this_BasicInterpretation_0= ruleBasicInterpretation | this_DefaultInterpretation_1= ruleDefaultInterpretation | this_CDInterpretation_2= ruleCDInterpretation ) ) | 1230 | // InternalSolverLanguageParser.g:474:2: ( (otherlv_0= Error ( (lv_argumentList_1_0= ruleArgumentList ) ) otherlv_2= ColonHyphenMinus ( (lv_body_3_0= ruleExpression ) ) ) ) |
973 | // InternalSolverLanguage.g:348:2: (this_BasicInterpretation_0= ruleBasicInterpretation | this_DefaultInterpretation_1= ruleDefaultInterpretation | this_CDInterpretation_2= ruleCDInterpretation ) | 1231 | // InternalSolverLanguageParser.g:475:2: (otherlv_0= Error ( (lv_argumentList_1_0= ruleArgumentList ) ) otherlv_2= ColonHyphenMinus ( (lv_body_3_0= ruleExpression ) ) ) |
974 | { | 1232 | { |
975 | // InternalSolverLanguage.g:348:2: (this_BasicInterpretation_0= ruleBasicInterpretation | this_DefaultInterpretation_1= ruleDefaultInterpretation | this_CDInterpretation_2= ruleCDInterpretation ) | 1233 | // InternalSolverLanguageParser.g:475:2: (otherlv_0= Error ( (lv_argumentList_1_0= ruleArgumentList ) ) otherlv_2= ColonHyphenMinus ( (lv_body_3_0= ruleExpression ) ) ) |
976 | int alt7=3; | 1234 | // InternalSolverLanguageParser.g:476:3: otherlv_0= Error ( (lv_argumentList_1_0= ruleArgumentList ) ) otherlv_2= ColonHyphenMinus ( (lv_body_3_0= ruleExpression ) ) |
977 | switch ( input.LA(1) ) { | 1235 | { |
978 | case RULE_ID: | 1236 | otherlv_0=(Token)match(input,Error,FOLLOW_11); |
979 | case 21: | ||
980 | case 22: | ||
981 | case 23: | ||
982 | case 24: | ||
983 | case 25: | ||
984 | case 26: | ||
985 | { | ||
986 | alt7=1; | ||
987 | } | ||
988 | break; | ||
989 | case 32: | ||
990 | { | ||
991 | alt7=2; | ||
992 | } | ||
993 | break; | ||
994 | case 33: | ||
995 | case 34: | ||
996 | case 38: | ||
997 | case 39: | ||
998 | case 40: | ||
999 | { | ||
1000 | alt7=3; | ||
1001 | } | ||
1002 | break; | ||
1003 | default: | ||
1004 | NoViableAltException nvae = | ||
1005 | new NoViableAltException("", 7, 0, input); | ||
1006 | 1237 | ||
1007 | throw nvae; | 1238 | newLeafNode(otherlv_0, grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getErrorKeyword_0()); |
1008 | } | 1239 | |
1240 | // InternalSolverLanguageParser.g:480:3: ( (lv_argumentList_1_0= ruleArgumentList ) ) | ||
1241 | // InternalSolverLanguageParser.g:481:4: (lv_argumentList_1_0= ruleArgumentList ) | ||
1242 | { | ||
1243 | // InternalSolverLanguageParser.g:481:4: (lv_argumentList_1_0= ruleArgumentList ) | ||
1244 | // InternalSolverLanguageParser.g:482:5: lv_argumentList_1_0= ruleArgumentList | ||
1245 | { | ||
1009 | 1246 | ||
1010 | switch (alt7) { | 1247 | newCompositeNode(grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getArgumentListArgumentListParserRuleCall_1_0()); |
1011 | case 1 : | 1248 | |
1012 | // InternalSolverLanguage.g:349:3: this_BasicInterpretation_0= ruleBasicInterpretation | 1249 | pushFollow(FOLLOW_10); |
1013 | { | 1250 | lv_argumentList_1_0=ruleArgumentList(); |
1014 | 1251 | ||
1015 | newCompositeNode(grammarAccess.getInterpretationAccess().getBasicInterpretationParserRuleCall_0()); | 1252 | state._fsp--; |
1016 | |||
1017 | pushFollow(FOLLOW_2); | ||
1018 | this_BasicInterpretation_0=ruleBasicInterpretation(); | ||
1019 | 1253 | ||
1020 | state._fsp--; | ||
1021 | 1254 | ||
1255 | if (current==null) { | ||
1256 | current = createModelElementForParent(grammarAccess.getUnnamedErrorPrediateDefinitionRule()); | ||
1257 | } | ||
1258 | set( | ||
1259 | current, | ||
1260 | "argumentList", | ||
1261 | lv_argumentList_1_0, | ||
1262 | "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList"); | ||
1263 | afterParserOrEnumRuleCall(); | ||
1264 | |||
1022 | 1265 | ||
1023 | current = this_BasicInterpretation_0; | 1266 | } |
1024 | afterParserOrEnumRuleCall(); | ||
1025 | |||
1026 | 1267 | ||
1027 | } | ||
1028 | break; | ||
1029 | case 2 : | ||
1030 | // InternalSolverLanguage.g:358:3: this_DefaultInterpretation_1= ruleDefaultInterpretation | ||
1031 | { | ||
1032 | 1268 | ||
1033 | newCompositeNode(grammarAccess.getInterpretationAccess().getDefaultInterpretationParserRuleCall_1()); | 1269 | } |
1034 | |||
1035 | pushFollow(FOLLOW_2); | ||
1036 | this_DefaultInterpretation_1=ruleDefaultInterpretation(); | ||
1037 | 1270 | ||
1038 | state._fsp--; | 1271 | otherlv_2=(Token)match(input,ColonHyphenMinus,FOLLOW_6); |
1039 | 1272 | ||
1273 | newLeafNode(otherlv_2, grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getColonHyphenMinusKeyword_2()); | ||
1274 | |||
1275 | // InternalSolverLanguageParser.g:503:3: ( (lv_body_3_0= ruleExpression ) ) | ||
1276 | // InternalSolverLanguageParser.g:504:4: (lv_body_3_0= ruleExpression ) | ||
1277 | { | ||
1278 | // InternalSolverLanguageParser.g:504:4: (lv_body_3_0= ruleExpression ) | ||
1279 | // InternalSolverLanguageParser.g:505:5: lv_body_3_0= ruleExpression | ||
1280 | { | ||
1040 | 1281 | ||
1041 | current = this_DefaultInterpretation_1; | 1282 | newCompositeNode(grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getBodyExpressionParserRuleCall_3_0()); |
1042 | afterParserOrEnumRuleCall(); | 1283 | |
1043 | 1284 | pushFollow(FOLLOW_2); | |
1285 | lv_body_3_0=ruleExpression(); | ||
1044 | 1286 | ||
1045 | } | 1287 | state._fsp--; |
1046 | break; | ||
1047 | case 3 : | ||
1048 | // InternalSolverLanguage.g:367:3: this_CDInterpretation_2= ruleCDInterpretation | ||
1049 | { | ||
1050 | 1288 | ||
1051 | newCompositeNode(grammarAccess.getInterpretationAccess().getCDInterpretationParserRuleCall_2()); | ||
1052 | |||
1053 | pushFollow(FOLLOW_2); | ||
1054 | this_CDInterpretation_2=ruleCDInterpretation(); | ||
1055 | 1289 | ||
1056 | state._fsp--; | 1290 | if (current==null) { |
1291 | current = createModelElementForParent(grammarAccess.getUnnamedErrorPrediateDefinitionRule()); | ||
1292 | } | ||
1293 | set( | ||
1294 | current, | ||
1295 | "body", | ||
1296 | lv_body_3_0, | ||
1297 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
1298 | afterParserOrEnumRuleCall(); | ||
1299 | |||
1057 | 1300 | ||
1301 | } | ||
1058 | 1302 | ||
1059 | current = this_CDInterpretation_2; | ||
1060 | afterParserOrEnumRuleCall(); | ||
1061 | |||
1062 | 1303 | ||
1063 | } | 1304 | } |
1064 | break; | 1305 | |
1065 | 1306 | ||
1066 | } | 1307 | } |
1067 | 1308 | ||
@@ -1081,28 +1322,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1081 | } | 1322 | } |
1082 | return current; | 1323 | return current; |
1083 | } | 1324 | } |
1084 | // $ANTLR end "ruleInterpretation" | 1325 | // $ANTLR end "ruleUnnamedErrorPrediateDefinition" |
1085 | 1326 | ||
1086 | 1327 | ||
1087 | // $ANTLR start "entryRuleBasicInterpretation" | 1328 | // $ANTLR start "entryRuleDefaultDefinition" |
1088 | // InternalSolverLanguage.g:379:1: entryRuleBasicInterpretation returns [EObject current=null] : iv_ruleBasicInterpretation= ruleBasicInterpretation EOF ; | 1329 | // InternalSolverLanguageParser.g:526:1: entryRuleDefaultDefinition returns [EObject current=null] : iv_ruleDefaultDefinition= ruleDefaultDefinition EOF ; |
1089 | public final EObject entryRuleBasicInterpretation() throws RecognitionException { | 1330 | public final EObject entryRuleDefaultDefinition() throws RecognitionException { |
1090 | EObject current = null; | 1331 | EObject current = null; |
1091 | 1332 | ||
1092 | EObject iv_ruleBasicInterpretation = null; | 1333 | EObject iv_ruleDefaultDefinition = null; |
1093 | 1334 | ||
1094 | 1335 | ||
1095 | try { | 1336 | try { |
1096 | // InternalSolverLanguage.g:379:60: (iv_ruleBasicInterpretation= ruleBasicInterpretation EOF ) | 1337 | // InternalSolverLanguageParser.g:526:58: (iv_ruleDefaultDefinition= ruleDefaultDefinition EOF ) |
1097 | // InternalSolverLanguage.g:380:2: iv_ruleBasicInterpretation= ruleBasicInterpretation EOF | 1338 | // InternalSolverLanguageParser.g:527:2: iv_ruleDefaultDefinition= ruleDefaultDefinition EOF |
1098 | { | 1339 | { |
1099 | newCompositeNode(grammarAccess.getBasicInterpretationRule()); | 1340 | newCompositeNode(grammarAccess.getDefaultDefinitionRule()); |
1100 | pushFollow(FOLLOW_1); | 1341 | pushFollow(FOLLOW_1); |
1101 | iv_ruleBasicInterpretation=ruleBasicInterpretation(); | 1342 | iv_ruleDefaultDefinition=ruleDefaultDefinition(); |
1102 | 1343 | ||
1103 | state._fsp--; | 1344 | state._fsp--; |
1104 | 1345 | ||
1105 | current =iv_ruleBasicInterpretation; | 1346 | current =iv_ruleDefaultDefinition; |
1106 | match(input,EOF,FOLLOW_2); | 1347 | match(input,EOF,FOLLOW_2); |
1107 | 1348 | ||
1108 | } | 1349 | } |
@@ -1117,60 +1358,58 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1117 | } | 1358 | } |
1118 | return current; | 1359 | return current; |
1119 | } | 1360 | } |
1120 | // $ANTLR end "entryRuleBasicInterpretation" | 1361 | // $ANTLR end "entryRuleDefaultDefinition" |
1121 | 1362 | ||
1122 | 1363 | ||
1123 | // $ANTLR start "ruleBasicInterpretation" | 1364 | // $ANTLR start "ruleDefaultDefinition" |
1124 | // InternalSolverLanguage.g:386:1: ruleBasicInterpretation returns [EObject current=null] : ( ( (lv_symbol_0_0= ruleSymbol ) ) (otherlv_1= '(' ( ( (lv_objects_2_0= ruleComplexObject ) ) (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* )? otherlv_5= ')' )? otherlv_6= ':' ( (lv_value_7_0= ruleTruthValue ) ) ) ; | 1365 | // InternalSolverLanguageParser.g:533:1: ruleDefaultDefinition returns [EObject current=null] : (otherlv_0= Default ( (lv_head_1_0= ruleCall ) ) otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) ) ; |
1125 | public final EObject ruleBasicInterpretation() throws RecognitionException { | 1366 | public final EObject ruleDefaultDefinition() throws RecognitionException { |
1126 | EObject current = null; | 1367 | EObject current = null; |
1127 | 1368 | ||
1128 | Token otherlv_1=null; | 1369 | Token otherlv_0=null; |
1129 | Token otherlv_3=null; | 1370 | Token otherlv_2=null; |
1130 | Token otherlv_5=null; | 1371 | EObject lv_head_1_0 = null; |
1131 | Token otherlv_6=null; | ||
1132 | EObject lv_symbol_0_0 = null; | ||
1133 | |||
1134 | EObject lv_objects_2_0 = null; | ||
1135 | |||
1136 | EObject lv_objects_4_0 = null; | ||
1137 | 1372 | ||
1138 | EObject lv_value_7_0 = null; | 1373 | EObject lv_range_3_0 = null; |
1139 | 1374 | ||
1140 | 1375 | ||
1141 | 1376 | ||
1142 | enterRule(); | 1377 | enterRule(); |
1143 | 1378 | ||
1144 | try { | 1379 | try { |
1145 | // InternalSolverLanguage.g:392:2: ( ( ( (lv_symbol_0_0= ruleSymbol ) ) (otherlv_1= '(' ( ( (lv_objects_2_0= ruleComplexObject ) ) (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* )? otherlv_5= ')' )? otherlv_6= ':' ( (lv_value_7_0= ruleTruthValue ) ) ) ) | 1380 | // InternalSolverLanguageParser.g:539:2: ( (otherlv_0= Default ( (lv_head_1_0= ruleCall ) ) otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) ) ) |
1146 | // InternalSolverLanguage.g:393:2: ( ( (lv_symbol_0_0= ruleSymbol ) ) (otherlv_1= '(' ( ( (lv_objects_2_0= ruleComplexObject ) ) (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* )? otherlv_5= ')' )? otherlv_6= ':' ( (lv_value_7_0= ruleTruthValue ) ) ) | 1381 | // InternalSolverLanguageParser.g:540:2: (otherlv_0= Default ( (lv_head_1_0= ruleCall ) ) otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) ) |
1147 | { | 1382 | { |
1148 | // InternalSolverLanguage.g:393:2: ( ( (lv_symbol_0_0= ruleSymbol ) ) (otherlv_1= '(' ( ( (lv_objects_2_0= ruleComplexObject ) ) (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* )? otherlv_5= ')' )? otherlv_6= ':' ( (lv_value_7_0= ruleTruthValue ) ) ) | 1383 | // InternalSolverLanguageParser.g:540:2: (otherlv_0= Default ( (lv_head_1_0= ruleCall ) ) otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) ) |
1149 | // InternalSolverLanguage.g:394:3: ( (lv_symbol_0_0= ruleSymbol ) ) (otherlv_1= '(' ( ( (lv_objects_2_0= ruleComplexObject ) ) (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* )? otherlv_5= ')' )? otherlv_6= ':' ( (lv_value_7_0= ruleTruthValue ) ) | 1384 | // InternalSolverLanguageParser.g:541:3: otherlv_0= Default ( (lv_head_1_0= ruleCall ) ) otherlv_2= Colon ( (lv_range_3_0= ruleExpression ) ) |
1150 | { | 1385 | { |
1151 | // InternalSolverLanguage.g:394:3: ( (lv_symbol_0_0= ruleSymbol ) ) | 1386 | otherlv_0=(Token)match(input,Default,FOLLOW_8); |
1152 | // InternalSolverLanguage.g:395:4: (lv_symbol_0_0= ruleSymbol ) | 1387 | |
1388 | newLeafNode(otherlv_0, grammarAccess.getDefaultDefinitionAccess().getDefaultKeyword_0()); | ||
1389 | |||
1390 | // InternalSolverLanguageParser.g:545:3: ( (lv_head_1_0= ruleCall ) ) | ||
1391 | // InternalSolverLanguageParser.g:546:4: (lv_head_1_0= ruleCall ) | ||
1153 | { | 1392 | { |
1154 | // InternalSolverLanguage.g:395:4: (lv_symbol_0_0= ruleSymbol ) | 1393 | // InternalSolverLanguageParser.g:546:4: (lv_head_1_0= ruleCall ) |
1155 | // InternalSolverLanguage.g:396:5: lv_symbol_0_0= ruleSymbol | 1394 | // InternalSolverLanguageParser.g:547:5: lv_head_1_0= ruleCall |
1156 | { | 1395 | { |
1157 | 1396 | ||
1158 | newCompositeNode(grammarAccess.getBasicInterpretationAccess().getSymbolSymbolParserRuleCall_0_0()); | 1397 | newCompositeNode(grammarAccess.getDefaultDefinitionAccess().getHeadCallParserRuleCall_1_0()); |
1159 | 1398 | ||
1160 | pushFollow(FOLLOW_6); | 1399 | pushFollow(FOLLOW_12); |
1161 | lv_symbol_0_0=ruleSymbol(); | 1400 | lv_head_1_0=ruleCall(); |
1162 | 1401 | ||
1163 | state._fsp--; | 1402 | state._fsp--; |
1164 | 1403 | ||
1165 | 1404 | ||
1166 | if (current==null) { | 1405 | if (current==null) { |
1167 | current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); | 1406 | current = createModelElementForParent(grammarAccess.getDefaultDefinitionRule()); |
1168 | } | 1407 | } |
1169 | set( | 1408 | set( |
1170 | current, | 1409 | current, |
1171 | "symbol", | 1410 | "head", |
1172 | lv_symbol_0_0, | 1411 | lv_head_1_0, |
1173 | "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); | 1412 | "org.eclipse.viatra.solver.language.SolverLanguage.Call"); |
1174 | afterParserOrEnumRuleCall(); | 1413 | afterParserOrEnumRuleCall(); |
1175 | 1414 | ||
1176 | 1415 | ||
@@ -1179,165 +1418,145 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1179 | 1418 | ||
1180 | } | 1419 | } |
1181 | 1420 | ||
1182 | // InternalSolverLanguage.g:413:3: (otherlv_1= '(' ( ( (lv_objects_2_0= ruleComplexObject ) ) (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* )? otherlv_5= ')' )? | 1421 | otherlv_2=(Token)match(input,Colon,FOLLOW_6); |
1183 | int alt10=2; | ||
1184 | int LA10_0 = input.LA(1); | ||
1185 | 1422 | ||
1186 | if ( (LA10_0==17) ) { | 1423 | newLeafNode(otherlv_2, grammarAccess.getDefaultDefinitionAccess().getColonKeyword_2()); |
1187 | alt10=1; | 1424 | |
1188 | } | 1425 | // InternalSolverLanguageParser.g:568:3: ( (lv_range_3_0= ruleExpression ) ) |
1189 | switch (alt10) { | 1426 | // InternalSolverLanguageParser.g:569:4: (lv_range_3_0= ruleExpression ) |
1190 | case 1 : | 1427 | { |
1191 | // InternalSolverLanguage.g:414:4: otherlv_1= '(' ( ( (lv_objects_2_0= ruleComplexObject ) ) (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* )? otherlv_5= ')' | 1428 | // InternalSolverLanguageParser.g:569:4: (lv_range_3_0= ruleExpression ) |
1192 | { | 1429 | // InternalSolverLanguageParser.g:570:5: lv_range_3_0= ruleExpression |
1193 | otherlv_1=(Token)match(input,17,FOLLOW_7); | 1430 | { |
1194 | 1431 | ||
1195 | newLeafNode(otherlv_1, grammarAccess.getBasicInterpretationAccess().getLeftParenthesisKeyword_1_0()); | 1432 | newCompositeNode(grammarAccess.getDefaultDefinitionAccess().getRangeExpressionParserRuleCall_3_0()); |
1196 | 1433 | ||
1197 | // InternalSolverLanguage.g:418:4: ( ( (lv_objects_2_0= ruleComplexObject ) ) (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* )? | 1434 | pushFollow(FOLLOW_2); |
1198 | int alt9=2; | 1435 | lv_range_3_0=ruleExpression(); |
1199 | int LA9_0 = input.LA(1); | ||
1200 | 1436 | ||
1201 | if ( ((LA9_0>=RULE_INT && LA9_0<=RULE_STRING)||LA9_0==11||(LA9_0>=13 && LA9_0<=14)||LA9_0==20||LA9_0==27||LA9_0==31) ) { | 1437 | state._fsp--; |
1202 | alt9=1; | ||
1203 | } | ||
1204 | switch (alt9) { | ||
1205 | case 1 : | ||
1206 | // InternalSolverLanguage.g:419:5: ( (lv_objects_2_0= ruleComplexObject ) ) (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* | ||
1207 | { | ||
1208 | // InternalSolverLanguage.g:419:5: ( (lv_objects_2_0= ruleComplexObject ) ) | ||
1209 | // InternalSolverLanguage.g:420:6: (lv_objects_2_0= ruleComplexObject ) | ||
1210 | { | ||
1211 | // InternalSolverLanguage.g:420:6: (lv_objects_2_0= ruleComplexObject ) | ||
1212 | // InternalSolverLanguage.g:421:7: lv_objects_2_0= ruleComplexObject | ||
1213 | { | ||
1214 | 1438 | ||
1215 | newCompositeNode(grammarAccess.getBasicInterpretationAccess().getObjectsComplexObjectParserRuleCall_1_1_0_0()); | ||
1216 | |||
1217 | pushFollow(FOLLOW_8); | ||
1218 | lv_objects_2_0=ruleComplexObject(); | ||
1219 | 1439 | ||
1220 | state._fsp--; | 1440 | if (current==null) { |
1441 | current = createModelElementForParent(grammarAccess.getDefaultDefinitionRule()); | ||
1442 | } | ||
1443 | set( | ||
1444 | current, | ||
1445 | "range", | ||
1446 | lv_range_3_0, | ||
1447 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
1448 | afterParserOrEnumRuleCall(); | ||
1449 | |||
1221 | 1450 | ||
1451 | } | ||
1222 | 1452 | ||
1223 | if (current==null) { | ||
1224 | current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); | ||
1225 | } | ||
1226 | add( | ||
1227 | current, | ||
1228 | "objects", | ||
1229 | lv_objects_2_0, | ||
1230 | "org.eclipse.viatra.solver.language.SolverLanguage.ComplexObject"); | ||
1231 | afterParserOrEnumRuleCall(); | ||
1232 | |||
1233 | 1453 | ||
1234 | } | 1454 | } |
1235 | 1455 | ||
1236 | 1456 | ||
1237 | } | 1457 | } |
1238 | 1458 | ||
1239 | // InternalSolverLanguage.g:438:5: (otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) )* | ||
1240 | loop8: | ||
1241 | do { | ||
1242 | int alt8=2; | ||
1243 | int LA8_0 = input.LA(1); | ||
1244 | 1459 | ||
1245 | if ( (LA8_0==18) ) { | 1460 | } |
1246 | alt8=1; | ||
1247 | } | ||
1248 | 1461 | ||
1249 | 1462 | ||
1250 | switch (alt8) { | 1463 | leaveRule(); |
1251 | case 1 : | ||
1252 | // InternalSolverLanguage.g:439:6: otherlv_3= ',' ( (lv_objects_4_0= ruleComplexObject ) ) | ||
1253 | { | ||
1254 | otherlv_3=(Token)match(input,18,FOLLOW_9); | ||
1255 | 1464 | ||
1256 | newLeafNode(otherlv_3, grammarAccess.getBasicInterpretationAccess().getCommaKeyword_1_1_1_0()); | 1465 | } |
1257 | |||
1258 | // InternalSolverLanguage.g:443:6: ( (lv_objects_4_0= ruleComplexObject ) ) | ||
1259 | // InternalSolverLanguage.g:444:7: (lv_objects_4_0= ruleComplexObject ) | ||
1260 | { | ||
1261 | // InternalSolverLanguage.g:444:7: (lv_objects_4_0= ruleComplexObject ) | ||
1262 | // InternalSolverLanguage.g:445:8: lv_objects_4_0= ruleComplexObject | ||
1263 | { | ||
1264 | 1466 | ||
1265 | newCompositeNode(grammarAccess.getBasicInterpretationAccess().getObjectsComplexObjectParserRuleCall_1_1_1_1_0()); | 1467 | catch (RecognitionException re) { |
1266 | 1468 | recover(input,re); | |
1267 | pushFollow(FOLLOW_8); | 1469 | appendSkippedTokens(); |
1268 | lv_objects_4_0=ruleComplexObject(); | 1470 | } |
1471 | finally { | ||
1472 | } | ||
1473 | return current; | ||
1474 | } | ||
1475 | // $ANTLR end "ruleDefaultDefinition" | ||
1269 | 1476 | ||
1270 | state._fsp--; | ||
1271 | 1477 | ||
1478 | // $ANTLR start "entryRuleExternPredicateDefinition" | ||
1479 | // InternalSolverLanguageParser.g:591:1: entryRuleExternPredicateDefinition returns [EObject current=null] : iv_ruleExternPredicateDefinition= ruleExternPredicateDefinition EOF ; | ||
1480 | public final EObject entryRuleExternPredicateDefinition() throws RecognitionException { | ||
1481 | EObject current = null; | ||
1272 | 1482 | ||
1273 | if (current==null) { | 1483 | EObject iv_ruleExternPredicateDefinition = null; |
1274 | current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); | ||
1275 | } | ||
1276 | add( | ||
1277 | current, | ||
1278 | "objects", | ||
1279 | lv_objects_4_0, | ||
1280 | "org.eclipse.viatra.solver.language.SolverLanguage.ComplexObject"); | ||
1281 | afterParserOrEnumRuleCall(); | ||
1282 | |||
1283 | 1484 | ||
1284 | } | ||
1285 | 1485 | ||
1486 | try { | ||
1487 | // InternalSolverLanguageParser.g:591:66: (iv_ruleExternPredicateDefinition= ruleExternPredicateDefinition EOF ) | ||
1488 | // InternalSolverLanguageParser.g:592:2: iv_ruleExternPredicateDefinition= ruleExternPredicateDefinition EOF | ||
1489 | { | ||
1490 | newCompositeNode(grammarAccess.getExternPredicateDefinitionRule()); | ||
1491 | pushFollow(FOLLOW_1); | ||
1492 | iv_ruleExternPredicateDefinition=ruleExternPredicateDefinition(); | ||
1286 | 1493 | ||
1287 | } | 1494 | state._fsp--; |
1288 | 1495 | ||
1496 | current =iv_ruleExternPredicateDefinition; | ||
1497 | match(input,EOF,FOLLOW_2); | ||
1289 | 1498 | ||
1290 | } | 1499 | } |
1291 | break; | ||
1292 | 1500 | ||
1293 | default : | 1501 | } |
1294 | break loop8; | ||
1295 | } | ||
1296 | } while (true); | ||
1297 | 1502 | ||
1503 | catch (RecognitionException re) { | ||
1504 | recover(input,re); | ||
1505 | appendSkippedTokens(); | ||
1506 | } | ||
1507 | finally { | ||
1508 | } | ||
1509 | return current; | ||
1510 | } | ||
1511 | // $ANTLR end "entryRuleExternPredicateDefinition" | ||
1298 | 1512 | ||
1299 | } | ||
1300 | break; | ||
1301 | 1513 | ||
1302 | } | 1514 | // $ANTLR start "ruleExternPredicateDefinition" |
1515 | // InternalSolverLanguageParser.g:598:1: ruleExternPredicateDefinition returns [EObject current=null] : (otherlv_0= Extern ( (lv_head_1_0= ruleCall ) ) ) ; | ||
1516 | public final EObject ruleExternPredicateDefinition() throws RecognitionException { | ||
1517 | EObject current = null; | ||
1303 | 1518 | ||
1304 | otherlv_5=(Token)match(input,19,FOLLOW_10); | 1519 | Token otherlv_0=null; |
1520 | EObject lv_head_1_0 = null; | ||
1305 | 1521 | ||
1306 | newLeafNode(otherlv_5, grammarAccess.getBasicInterpretationAccess().getRightParenthesisKeyword_1_2()); | ||
1307 | |||
1308 | 1522 | ||
1309 | } | ||
1310 | break; | ||
1311 | 1523 | ||
1312 | } | 1524 | enterRule(); |
1313 | 1525 | ||
1314 | otherlv_6=(Token)match(input,20,FOLLOW_11); | 1526 | try { |
1527 | // InternalSolverLanguageParser.g:604:2: ( (otherlv_0= Extern ( (lv_head_1_0= ruleCall ) ) ) ) | ||
1528 | // InternalSolverLanguageParser.g:605:2: (otherlv_0= Extern ( (lv_head_1_0= ruleCall ) ) ) | ||
1529 | { | ||
1530 | // InternalSolverLanguageParser.g:605:2: (otherlv_0= Extern ( (lv_head_1_0= ruleCall ) ) ) | ||
1531 | // InternalSolverLanguageParser.g:606:3: otherlv_0= Extern ( (lv_head_1_0= ruleCall ) ) | ||
1532 | { | ||
1533 | otherlv_0=(Token)match(input,Extern,FOLLOW_8); | ||
1315 | 1534 | ||
1316 | newLeafNode(otherlv_6, grammarAccess.getBasicInterpretationAccess().getColonKeyword_2()); | 1535 | newLeafNode(otherlv_0, grammarAccess.getExternPredicateDefinitionAccess().getExternKeyword_0()); |
1317 | 1536 | ||
1318 | // InternalSolverLanguage.g:473:3: ( (lv_value_7_0= ruleTruthValue ) ) | 1537 | // InternalSolverLanguageParser.g:610:3: ( (lv_head_1_0= ruleCall ) ) |
1319 | // InternalSolverLanguage.g:474:4: (lv_value_7_0= ruleTruthValue ) | 1538 | // InternalSolverLanguageParser.g:611:4: (lv_head_1_0= ruleCall ) |
1320 | { | 1539 | { |
1321 | // InternalSolverLanguage.g:474:4: (lv_value_7_0= ruleTruthValue ) | 1540 | // InternalSolverLanguageParser.g:611:4: (lv_head_1_0= ruleCall ) |
1322 | // InternalSolverLanguage.g:475:5: lv_value_7_0= ruleTruthValue | 1541 | // InternalSolverLanguageParser.g:612:5: lv_head_1_0= ruleCall |
1323 | { | 1542 | { |
1324 | 1543 | ||
1325 | newCompositeNode(grammarAccess.getBasicInterpretationAccess().getValueTruthValueParserRuleCall_3_0()); | 1544 | newCompositeNode(grammarAccess.getExternPredicateDefinitionAccess().getHeadCallParserRuleCall_1_0()); |
1326 | 1545 | ||
1327 | pushFollow(FOLLOW_2); | 1546 | pushFollow(FOLLOW_2); |
1328 | lv_value_7_0=ruleTruthValue(); | 1547 | lv_head_1_0=ruleCall(); |
1329 | 1548 | ||
1330 | state._fsp--; | 1549 | state._fsp--; |
1331 | 1550 | ||
1332 | 1551 | ||
1333 | if (current==null) { | 1552 | if (current==null) { |
1334 | current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); | 1553 | current = createModelElementForParent(grammarAccess.getExternPredicateDefinitionRule()); |
1335 | } | 1554 | } |
1336 | set( | 1555 | set( |
1337 | current, | 1556 | current, |
1338 | "value", | 1557 | "head", |
1339 | lv_value_7_0, | 1558 | lv_head_1_0, |
1340 | "org.eclipse.viatra.solver.language.SolverLanguage.TruthValue"); | 1559 | "org.eclipse.viatra.solver.language.SolverLanguage.Call"); |
1341 | afterParserOrEnumRuleCall(); | 1560 | afterParserOrEnumRuleCall(); |
1342 | 1561 | ||
1343 | 1562 | ||
@@ -1365,28 +1584,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1365 | } | 1584 | } |
1366 | return current; | 1585 | return current; |
1367 | } | 1586 | } |
1368 | // $ANTLR end "ruleBasicInterpretation" | 1587 | // $ANTLR end "ruleExternPredicateDefinition" |
1369 | 1588 | ||
1370 | 1589 | ||
1371 | // $ANTLR start "entryRuleSymbol" | 1590 | // $ANTLR start "entryRuleMetricDefinition" |
1372 | // InternalSolverLanguage.g:496:1: entryRuleSymbol returns [EObject current=null] : iv_ruleSymbol= ruleSymbol EOF ; | 1591 | // InternalSolverLanguageParser.g:633:1: entryRuleMetricDefinition returns [EObject current=null] : iv_ruleMetricDefinition= ruleMetricDefinition EOF ; |
1373 | public final EObject entryRuleSymbol() throws RecognitionException { | 1592 | public final EObject entryRuleMetricDefinition() throws RecognitionException { |
1374 | EObject current = null; | 1593 | EObject current = null; |
1375 | 1594 | ||
1376 | EObject iv_ruleSymbol = null; | 1595 | EObject iv_ruleMetricDefinition = null; |
1377 | 1596 | ||
1378 | 1597 | ||
1379 | try { | 1598 | try { |
1380 | // InternalSolverLanguage.g:496:47: (iv_ruleSymbol= ruleSymbol EOF ) | 1599 | // InternalSolverLanguageParser.g:633:57: (iv_ruleMetricDefinition= ruleMetricDefinition EOF ) |
1381 | // InternalSolverLanguage.g:497:2: iv_ruleSymbol= ruleSymbol EOF | 1600 | // InternalSolverLanguageParser.g:634:2: iv_ruleMetricDefinition= ruleMetricDefinition EOF |
1382 | { | 1601 | { |
1383 | newCompositeNode(grammarAccess.getSymbolRule()); | 1602 | newCompositeNode(grammarAccess.getMetricDefinitionRule()); |
1384 | pushFollow(FOLLOW_1); | 1603 | pushFollow(FOLLOW_1); |
1385 | iv_ruleSymbol=ruleSymbol(); | 1604 | iv_ruleMetricDefinition=ruleMetricDefinition(); |
1386 | 1605 | ||
1387 | state._fsp--; | 1606 | state._fsp--; |
1388 | 1607 | ||
1389 | current =iv_ruleSymbol; | 1608 | current =iv_ruleMetricDefinition; |
1390 | match(input,EOF,FOLLOW_2); | 1609 | match(input,EOF,FOLLOW_2); |
1391 | 1610 | ||
1392 | } | 1611 | } |
@@ -1401,112 +1620,129 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1401 | } | 1620 | } |
1402 | return current; | 1621 | return current; |
1403 | } | 1622 | } |
1404 | // $ANTLR end "entryRuleSymbol" | 1623 | // $ANTLR end "entryRuleMetricDefinition" |
1405 | 1624 | ||
1406 | 1625 | ||
1407 | // $ANTLR start "ruleSymbol" | 1626 | // $ANTLR start "ruleMetricDefinition" |
1408 | // InternalSolverLanguage.g:503:1: ruleSymbol returns [EObject current=null] : (this_ModelSymbol_0= ruleModelSymbol | this_PartialitySymbol_1= rulePartialitySymbol | this_DataSymbol_2= ruleDataSymbol ) ; | 1627 | // InternalSolverLanguageParser.g:640:1: ruleMetricDefinition returns [EObject current=null] : ( ( (lv_type_0_0= ruleMetricType ) ) ( (lv_head_1_0= ruleExpression ) ) otherlv_2= EqualsSign ( (lv_body_3_0= ruleExpression ) ) ) ; |
1409 | public final EObject ruleSymbol() throws RecognitionException { | 1628 | public final EObject ruleMetricDefinition() throws RecognitionException { |
1410 | EObject current = null; | 1629 | EObject current = null; |
1411 | 1630 | ||
1412 | EObject this_ModelSymbol_0 = null; | 1631 | Token otherlv_2=null; |
1632 | Enumerator lv_type_0_0 = null; | ||
1413 | 1633 | ||
1414 | EObject this_PartialitySymbol_1 = null; | 1634 | EObject lv_head_1_0 = null; |
1415 | 1635 | ||
1416 | EObject this_DataSymbol_2 = null; | 1636 | EObject lv_body_3_0 = null; |
1417 | 1637 | ||
1418 | 1638 | ||
1419 | 1639 | ||
1420 | enterRule(); | 1640 | enterRule(); |
1421 | 1641 | ||
1422 | try { | 1642 | try { |
1423 | // InternalSolverLanguage.g:509:2: ( (this_ModelSymbol_0= ruleModelSymbol | this_PartialitySymbol_1= rulePartialitySymbol | this_DataSymbol_2= ruleDataSymbol ) ) | 1643 | // InternalSolverLanguageParser.g:646:2: ( ( ( (lv_type_0_0= ruleMetricType ) ) ( (lv_head_1_0= ruleExpression ) ) otherlv_2= EqualsSign ( (lv_body_3_0= ruleExpression ) ) ) ) |
1424 | // InternalSolverLanguage.g:510:2: (this_ModelSymbol_0= ruleModelSymbol | this_PartialitySymbol_1= rulePartialitySymbol | this_DataSymbol_2= ruleDataSymbol ) | 1644 | // InternalSolverLanguageParser.g:647:2: ( ( (lv_type_0_0= ruleMetricType ) ) ( (lv_head_1_0= ruleExpression ) ) otherlv_2= EqualsSign ( (lv_body_3_0= ruleExpression ) ) ) |
1645 | { | ||
1646 | // InternalSolverLanguageParser.g:647:2: ( ( (lv_type_0_0= ruleMetricType ) ) ( (lv_head_1_0= ruleExpression ) ) otherlv_2= EqualsSign ( (lv_body_3_0= ruleExpression ) ) ) | ||
1647 | // InternalSolverLanguageParser.g:648:3: ( (lv_type_0_0= ruleMetricType ) ) ( (lv_head_1_0= ruleExpression ) ) otherlv_2= EqualsSign ( (lv_body_3_0= ruleExpression ) ) | ||
1648 | { | ||
1649 | // InternalSolverLanguageParser.g:648:3: ( (lv_type_0_0= ruleMetricType ) ) | ||
1650 | // InternalSolverLanguageParser.g:649:4: (lv_type_0_0= ruleMetricType ) | ||
1651 | { | ||
1652 | // InternalSolverLanguageParser.g:649:4: (lv_type_0_0= ruleMetricType ) | ||
1653 | // InternalSolverLanguageParser.g:650:5: lv_type_0_0= ruleMetricType | ||
1425 | { | 1654 | { |
1426 | // InternalSolverLanguage.g:510:2: (this_ModelSymbol_0= ruleModelSymbol | this_PartialitySymbol_1= rulePartialitySymbol | this_DataSymbol_2= ruleDataSymbol ) | ||
1427 | int alt11=3; | ||
1428 | switch ( input.LA(1) ) { | ||
1429 | case RULE_ID: | ||
1430 | { | ||
1431 | alt11=1; | ||
1432 | } | ||
1433 | break; | ||
1434 | case 21: | ||
1435 | case 22: | ||
1436 | { | ||
1437 | alt11=2; | ||
1438 | } | ||
1439 | break; | ||
1440 | case 23: | ||
1441 | case 24: | ||
1442 | case 25: | ||
1443 | case 26: | ||
1444 | { | ||
1445 | alt11=3; | ||
1446 | } | ||
1447 | break; | ||
1448 | default: | ||
1449 | NoViableAltException nvae = | ||
1450 | new NoViableAltException("", 11, 0, input); | ||
1451 | 1655 | ||
1452 | throw nvae; | 1656 | newCompositeNode(grammarAccess.getMetricDefinitionAccess().getTypeMetricTypeEnumRuleCall_0_0()); |
1657 | |||
1658 | pushFollow(FOLLOW_6); | ||
1659 | lv_type_0_0=ruleMetricType(); | ||
1660 | |||
1661 | state._fsp--; | ||
1662 | |||
1663 | |||
1664 | if (current==null) { | ||
1665 | current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); | ||
1666 | } | ||
1667 | set( | ||
1668 | current, | ||
1669 | "type", | ||
1670 | lv_type_0_0, | ||
1671 | "org.eclipse.viatra.solver.language.SolverLanguage.MetricType"); | ||
1672 | afterParserOrEnumRuleCall(); | ||
1673 | |||
1674 | |||
1453 | } | 1675 | } |
1454 | 1676 | ||
1455 | switch (alt11) { | ||
1456 | case 1 : | ||
1457 | // InternalSolverLanguage.g:511:3: this_ModelSymbol_0= ruleModelSymbol | ||
1458 | { | ||
1459 | 1677 | ||
1460 | newCompositeNode(grammarAccess.getSymbolAccess().getModelSymbolParserRuleCall_0()); | 1678 | } |
1461 | |||
1462 | pushFollow(FOLLOW_2); | ||
1463 | this_ModelSymbol_0=ruleModelSymbol(); | ||
1464 | 1679 | ||
1465 | state._fsp--; | 1680 | // InternalSolverLanguageParser.g:667:3: ( (lv_head_1_0= ruleExpression ) ) |
1681 | // InternalSolverLanguageParser.g:668:4: (lv_head_1_0= ruleExpression ) | ||
1682 | { | ||
1683 | // InternalSolverLanguageParser.g:668:4: (lv_head_1_0= ruleExpression ) | ||
1684 | // InternalSolverLanguageParser.g:669:5: lv_head_1_0= ruleExpression | ||
1685 | { | ||
1466 | 1686 | ||
1687 | newCompositeNode(grammarAccess.getMetricDefinitionAccess().getHeadExpressionParserRuleCall_1_0()); | ||
1688 | |||
1689 | pushFollow(FOLLOW_13); | ||
1690 | lv_head_1_0=ruleExpression(); | ||
1467 | 1691 | ||
1468 | current = this_ModelSymbol_0; | 1692 | state._fsp--; |
1469 | afterParserOrEnumRuleCall(); | ||
1470 | |||
1471 | 1693 | ||
1472 | } | ||
1473 | break; | ||
1474 | case 2 : | ||
1475 | // InternalSolverLanguage.g:520:3: this_PartialitySymbol_1= rulePartialitySymbol | ||
1476 | { | ||
1477 | 1694 | ||
1478 | newCompositeNode(grammarAccess.getSymbolAccess().getPartialitySymbolParserRuleCall_1()); | 1695 | if (current==null) { |
1479 | 1696 | current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); | |
1480 | pushFollow(FOLLOW_2); | 1697 | } |
1481 | this_PartialitySymbol_1=rulePartialitySymbol(); | 1698 | set( |
1699 | current, | ||
1700 | "head", | ||
1701 | lv_head_1_0, | ||
1702 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
1703 | afterParserOrEnumRuleCall(); | ||
1704 | |||
1482 | 1705 | ||
1483 | state._fsp--; | 1706 | } |
1484 | 1707 | ||
1485 | 1708 | ||
1486 | current = this_PartialitySymbol_1; | 1709 | } |
1487 | afterParserOrEnumRuleCall(); | ||
1488 | |||
1489 | 1710 | ||
1490 | } | 1711 | otherlv_2=(Token)match(input,EqualsSign,FOLLOW_6); |
1491 | break; | ||
1492 | case 3 : | ||
1493 | // InternalSolverLanguage.g:529:3: this_DataSymbol_2= ruleDataSymbol | ||
1494 | { | ||
1495 | 1712 | ||
1496 | newCompositeNode(grammarAccess.getSymbolAccess().getDataSymbolParserRuleCall_2()); | 1713 | newLeafNode(otherlv_2, grammarAccess.getMetricDefinitionAccess().getEqualsSignKeyword_2()); |
1497 | 1714 | ||
1498 | pushFollow(FOLLOW_2); | 1715 | // InternalSolverLanguageParser.g:690:3: ( (lv_body_3_0= ruleExpression ) ) |
1499 | this_DataSymbol_2=ruleDataSymbol(); | 1716 | // InternalSolverLanguageParser.g:691:4: (lv_body_3_0= ruleExpression ) |
1717 | { | ||
1718 | // InternalSolverLanguageParser.g:691:4: (lv_body_3_0= ruleExpression ) | ||
1719 | // InternalSolverLanguageParser.g:692:5: lv_body_3_0= ruleExpression | ||
1720 | { | ||
1500 | 1721 | ||
1501 | state._fsp--; | 1722 | newCompositeNode(grammarAccess.getMetricDefinitionAccess().getBodyExpressionParserRuleCall_3_0()); |
1723 | |||
1724 | pushFollow(FOLLOW_2); | ||
1725 | lv_body_3_0=ruleExpression(); | ||
1502 | 1726 | ||
1727 | state._fsp--; | ||
1503 | 1728 | ||
1504 | current = this_DataSymbol_2; | ||
1505 | afterParserOrEnumRuleCall(); | ||
1506 | |||
1507 | 1729 | ||
1508 | } | 1730 | if (current==null) { |
1509 | break; | 1731 | current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); |
1732 | } | ||
1733 | set( | ||
1734 | current, | ||
1735 | "body", | ||
1736 | lv_body_3_0, | ||
1737 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
1738 | afterParserOrEnumRuleCall(); | ||
1739 | |||
1740 | |||
1741 | } | ||
1742 | |||
1743 | |||
1744 | } | ||
1745 | |||
1510 | 1746 | ||
1511 | } | 1747 | } |
1512 | 1748 | ||
@@ -1526,28 +1762,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1526 | } | 1762 | } |
1527 | return current; | 1763 | return current; |
1528 | } | 1764 | } |
1529 | // $ANTLR end "ruleSymbol" | 1765 | // $ANTLR end "ruleMetricDefinition" |
1530 | 1766 | ||
1531 | 1767 | ||
1532 | // $ANTLR start "entryRuleModelSymbol" | 1768 | // $ANTLR start "entryRuleExternMetricDefinition" |
1533 | // InternalSolverLanguage.g:541:1: entryRuleModelSymbol returns [EObject current=null] : iv_ruleModelSymbol= ruleModelSymbol EOF ; | 1769 | // InternalSolverLanguageParser.g:713:1: entryRuleExternMetricDefinition returns [EObject current=null] : iv_ruleExternMetricDefinition= ruleExternMetricDefinition EOF ; |
1534 | public final EObject entryRuleModelSymbol() throws RecognitionException { | 1770 | public final EObject entryRuleExternMetricDefinition() throws RecognitionException { |
1535 | EObject current = null; | 1771 | EObject current = null; |
1536 | 1772 | ||
1537 | EObject iv_ruleModelSymbol = null; | 1773 | EObject iv_ruleExternMetricDefinition = null; |
1538 | 1774 | ||
1539 | 1775 | ||
1540 | try { | 1776 | try { |
1541 | // InternalSolverLanguage.g:541:52: (iv_ruleModelSymbol= ruleModelSymbol EOF ) | 1777 | // InternalSolverLanguageParser.g:713:63: (iv_ruleExternMetricDefinition= ruleExternMetricDefinition EOF ) |
1542 | // InternalSolverLanguage.g:542:2: iv_ruleModelSymbol= ruleModelSymbol EOF | 1778 | // InternalSolverLanguageParser.g:714:2: iv_ruleExternMetricDefinition= ruleExternMetricDefinition EOF |
1543 | { | 1779 | { |
1544 | newCompositeNode(grammarAccess.getModelSymbolRule()); | 1780 | newCompositeNode(grammarAccess.getExternMetricDefinitionRule()); |
1545 | pushFollow(FOLLOW_1); | 1781 | pushFollow(FOLLOW_1); |
1546 | iv_ruleModelSymbol=ruleModelSymbol(); | 1782 | iv_ruleExternMetricDefinition=ruleExternMetricDefinition(); |
1547 | 1783 | ||
1548 | state._fsp--; | 1784 | state._fsp--; |
1549 | 1785 | ||
1550 | current =iv_ruleModelSymbol; | 1786 | current =iv_ruleExternMetricDefinition; |
1551 | match(input,EOF,FOLLOW_2); | 1787 | match(input,EOF,FOLLOW_2); |
1552 | 1788 | ||
1553 | } | 1789 | } |
@@ -1562,43 +1798,93 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1562 | } | 1798 | } |
1563 | return current; | 1799 | return current; |
1564 | } | 1800 | } |
1565 | // $ANTLR end "entryRuleModelSymbol" | 1801 | // $ANTLR end "entryRuleExternMetricDefinition" |
1566 | 1802 | ||
1567 | 1803 | ||
1568 | // $ANTLR start "ruleModelSymbol" | 1804 | // $ANTLR start "ruleExternMetricDefinition" |
1569 | // InternalSolverLanguage.g:548:1: ruleModelSymbol returns [EObject current=null] : ( (lv_name_0_0= RULE_ID ) ) ; | 1805 | // InternalSolverLanguageParser.g:720:1: ruleExternMetricDefinition returns [EObject current=null] : (otherlv_0= Extern ( (lv_type_1_0= ruleMetricType ) ) ( (lv_head_2_0= ruleCall ) ) ) ; |
1570 | public final EObject ruleModelSymbol() throws RecognitionException { | 1806 | public final EObject ruleExternMetricDefinition() throws RecognitionException { |
1571 | EObject current = null; | 1807 | EObject current = null; |
1572 | 1808 | ||
1573 | Token lv_name_0_0=null; | 1809 | Token otherlv_0=null; |
1810 | Enumerator lv_type_1_0 = null; | ||
1811 | |||
1812 | EObject lv_head_2_0 = null; | ||
1813 | |||
1574 | 1814 | ||
1575 | 1815 | ||
1576 | enterRule(); | 1816 | enterRule(); |
1577 | 1817 | ||
1578 | try { | 1818 | try { |
1579 | // InternalSolverLanguage.g:554:2: ( ( (lv_name_0_0= RULE_ID ) ) ) | 1819 | // InternalSolverLanguageParser.g:726:2: ( (otherlv_0= Extern ( (lv_type_1_0= ruleMetricType ) ) ( (lv_head_2_0= ruleCall ) ) ) ) |
1580 | // InternalSolverLanguage.g:555:2: ( (lv_name_0_0= RULE_ID ) ) | 1820 | // InternalSolverLanguageParser.g:727:2: (otherlv_0= Extern ( (lv_type_1_0= ruleMetricType ) ) ( (lv_head_2_0= ruleCall ) ) ) |
1821 | { | ||
1822 | // InternalSolverLanguageParser.g:727:2: (otherlv_0= Extern ( (lv_type_1_0= ruleMetricType ) ) ( (lv_head_2_0= ruleCall ) ) ) | ||
1823 | // InternalSolverLanguageParser.g:728:3: otherlv_0= Extern ( (lv_type_1_0= ruleMetricType ) ) ( (lv_head_2_0= ruleCall ) ) | ||
1581 | { | 1824 | { |
1582 | // InternalSolverLanguage.g:555:2: ( (lv_name_0_0= RULE_ID ) ) | 1825 | otherlv_0=(Token)match(input,Extern,FOLLOW_14); |
1583 | // InternalSolverLanguage.g:556:3: (lv_name_0_0= RULE_ID ) | 1826 | |
1827 | newLeafNode(otherlv_0, grammarAccess.getExternMetricDefinitionAccess().getExternKeyword_0()); | ||
1828 | |||
1829 | // InternalSolverLanguageParser.g:732:3: ( (lv_type_1_0= ruleMetricType ) ) | ||
1830 | // InternalSolverLanguageParser.g:733:4: (lv_type_1_0= ruleMetricType ) | ||
1584 | { | 1831 | { |
1585 | // InternalSolverLanguage.g:556:3: (lv_name_0_0= RULE_ID ) | 1832 | // InternalSolverLanguageParser.g:733:4: (lv_type_1_0= ruleMetricType ) |
1586 | // InternalSolverLanguage.g:557:4: lv_name_0_0= RULE_ID | 1833 | // InternalSolverLanguageParser.g:734:5: lv_type_1_0= ruleMetricType |
1587 | { | 1834 | { |
1588 | lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_2); | ||
1589 | 1835 | ||
1590 | newLeafNode(lv_name_0_0, grammarAccess.getModelSymbolAccess().getNameIDTerminalRuleCall_0()); | 1836 | newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getTypeMetricTypeEnumRuleCall_1_0()); |
1591 | 1837 | ||
1838 | pushFollow(FOLLOW_8); | ||
1839 | lv_type_1_0=ruleMetricType(); | ||
1840 | |||
1841 | state._fsp--; | ||
1842 | |||
1843 | |||
1844 | if (current==null) { | ||
1845 | current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule()); | ||
1846 | } | ||
1847 | set( | ||
1848 | current, | ||
1849 | "type", | ||
1850 | lv_type_1_0, | ||
1851 | "org.eclipse.viatra.solver.language.SolverLanguage.MetricType"); | ||
1852 | afterParserOrEnumRuleCall(); | ||
1853 | |||
1854 | |||
1855 | } | ||
1856 | |||
1857 | |||
1858 | } | ||
1859 | |||
1860 | // InternalSolverLanguageParser.g:751:3: ( (lv_head_2_0= ruleCall ) ) | ||
1861 | // InternalSolverLanguageParser.g:752:4: (lv_head_2_0= ruleCall ) | ||
1862 | { | ||
1863 | // InternalSolverLanguageParser.g:752:4: (lv_head_2_0= ruleCall ) | ||
1864 | // InternalSolverLanguageParser.g:753:5: lv_head_2_0= ruleCall | ||
1865 | { | ||
1866 | |||
1867 | newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getHeadCallParserRuleCall_2_0()); | ||
1868 | |||
1869 | pushFollow(FOLLOW_2); | ||
1870 | lv_head_2_0=ruleCall(); | ||
1871 | |||
1872 | state._fsp--; | ||
1873 | |||
1874 | |||
1875 | if (current==null) { | ||
1876 | current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule()); | ||
1877 | } | ||
1878 | set( | ||
1879 | current, | ||
1880 | "head", | ||
1881 | lv_head_2_0, | ||
1882 | "org.eclipse.viatra.solver.language.SolverLanguage.Call"); | ||
1883 | afterParserOrEnumRuleCall(); | ||
1884 | |||
1885 | |||
1886 | } | ||
1592 | 1887 | ||
1593 | if (current==null) { | ||
1594 | current = createModelElement(grammarAccess.getModelSymbolRule()); | ||
1595 | } | ||
1596 | setWithLastConsumed( | ||
1597 | current, | ||
1598 | "name", | ||
1599 | lv_name_0_0, | ||
1600 | "org.eclipse.xtext.common.Terminals.ID"); | ||
1601 | |||
1602 | 1888 | ||
1603 | } | 1889 | } |
1604 | 1890 | ||
@@ -1621,28 +1907,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1621 | } | 1907 | } |
1622 | return current; | 1908 | return current; |
1623 | } | 1909 | } |
1624 | // $ANTLR end "ruleModelSymbol" | 1910 | // $ANTLR end "ruleExternMetricDefinition" |
1625 | 1911 | ||
1626 | 1912 | ||
1627 | // $ANTLR start "entryRulePartialitySymbol" | 1913 | // $ANTLR start "entryRuleExpression" |
1628 | // InternalSolverLanguage.g:576:1: entryRulePartialitySymbol returns [EObject current=null] : iv_rulePartialitySymbol= rulePartialitySymbol EOF ; | 1914 | // InternalSolverLanguageParser.g:774:1: entryRuleExpression returns [EObject current=null] : iv_ruleExpression= ruleExpression EOF ; |
1629 | public final EObject entryRulePartialitySymbol() throws RecognitionException { | 1915 | public final EObject entryRuleExpression() throws RecognitionException { |
1630 | EObject current = null; | 1916 | EObject current = null; |
1631 | 1917 | ||
1632 | EObject iv_rulePartialitySymbol = null; | 1918 | EObject iv_ruleExpression = null; |
1633 | 1919 | ||
1634 | 1920 | ||
1635 | try { | 1921 | try { |
1636 | // InternalSolverLanguage.g:576:57: (iv_rulePartialitySymbol= rulePartialitySymbol EOF ) | 1922 | // InternalSolverLanguageParser.g:774:51: (iv_ruleExpression= ruleExpression EOF ) |
1637 | // InternalSolverLanguage.g:577:2: iv_rulePartialitySymbol= rulePartialitySymbol EOF | 1923 | // InternalSolverLanguageParser.g:775:2: iv_ruleExpression= ruleExpression EOF |
1638 | { | 1924 | { |
1639 | newCompositeNode(grammarAccess.getPartialitySymbolRule()); | 1925 | newCompositeNode(grammarAccess.getExpressionRule()); |
1640 | pushFollow(FOLLOW_1); | 1926 | pushFollow(FOLLOW_1); |
1641 | iv_rulePartialitySymbol=rulePartialitySymbol(); | 1927 | iv_ruleExpression=ruleExpression(); |
1642 | 1928 | ||
1643 | state._fsp--; | 1929 | state._fsp--; |
1644 | 1930 | ||
1645 | current =iv_rulePartialitySymbol; | 1931 | current =iv_ruleExpression; |
1646 | match(input,EOF,FOLLOW_2); | 1932 | match(input,EOF,FOLLOW_2); |
1647 | 1933 | ||
1648 | } | 1934 | } |
@@ -1657,74 +1943,74 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1657 | } | 1943 | } |
1658 | return current; | 1944 | return current; |
1659 | } | 1945 | } |
1660 | // $ANTLR end "entryRulePartialitySymbol" | 1946 | // $ANTLR end "entryRuleExpression" |
1661 | 1947 | ||
1662 | 1948 | ||
1663 | // $ANTLR start "rulePartialitySymbol" | 1949 | // $ANTLR start "ruleExpression" |
1664 | // InternalSolverLanguage.g:583:1: rulePartialitySymbol returns [EObject current=null] : (this_ExistSymbol_0= ruleExistSymbol | this_EqualsSymbol_1= ruleEqualsSymbol ) ; | 1950 | // InternalSolverLanguageParser.g:781:1: ruleExpression returns [EObject current=null] : (this_IfElse_0= ruleIfElse | this_DisjunctiveExpression_1= ruleDisjunctiveExpression ) ; |
1665 | public final EObject rulePartialitySymbol() throws RecognitionException { | 1951 | public final EObject ruleExpression() throws RecognitionException { |
1666 | EObject current = null; | 1952 | EObject current = null; |
1667 | 1953 | ||
1668 | EObject this_ExistSymbol_0 = null; | 1954 | EObject this_IfElse_0 = null; |
1669 | 1955 | ||
1670 | EObject this_EqualsSymbol_1 = null; | 1956 | EObject this_DisjunctiveExpression_1 = null; |
1671 | 1957 | ||
1672 | 1958 | ||
1673 | 1959 | ||
1674 | enterRule(); | 1960 | enterRule(); |
1675 | 1961 | ||
1676 | try { | 1962 | try { |
1677 | // InternalSolverLanguage.g:589:2: ( (this_ExistSymbol_0= ruleExistSymbol | this_EqualsSymbol_1= ruleEqualsSymbol ) ) | 1963 | // InternalSolverLanguageParser.g:787:2: ( (this_IfElse_0= ruleIfElse | this_DisjunctiveExpression_1= ruleDisjunctiveExpression ) ) |
1678 | // InternalSolverLanguage.g:590:2: (this_ExistSymbol_0= ruleExistSymbol | this_EqualsSymbol_1= ruleEqualsSymbol ) | 1964 | // InternalSolverLanguageParser.g:788:2: (this_IfElse_0= ruleIfElse | this_DisjunctiveExpression_1= ruleDisjunctiveExpression ) |
1679 | { | 1965 | { |
1680 | // InternalSolverLanguage.g:590:2: (this_ExistSymbol_0= ruleExistSymbol | this_EqualsSymbol_1= ruleEqualsSymbol ) | 1966 | // InternalSolverLanguageParser.g:788:2: (this_IfElse_0= ruleIfElse | this_DisjunctiveExpression_1= ruleDisjunctiveExpression ) |
1681 | int alt12=2; | 1967 | int alt8=2; |
1682 | int LA12_0 = input.LA(1); | 1968 | int LA8_0 = input.LA(1); |
1683 | 1969 | ||
1684 | if ( (LA12_0==21) ) { | 1970 | if ( (LA8_0==If) ) { |
1685 | alt12=1; | 1971 | alt8=1; |
1686 | } | 1972 | } |
1687 | else if ( (LA12_0==22) ) { | 1973 | else if ( (LA8_0==Current||LA8_0==Unknown||(LA8_0>=Count && LA8_0<=False)||(LA8_0>=Must && LA8_0<=Prod)||LA8_0==True||(LA8_0>=Avg && LA8_0<=Inf)||(LA8_0>=Max && LA8_0<=Sum)||(LA8_0>=ExclamationMark && LA8_0<=LeftParenthesis)||LA8_0==PlusSign||LA8_0==HyphenMinus||LA8_0==LeftSquareBracket||(LA8_0>=RULE_STRING && LA8_0<=RULE_QUOTED_ID)||(LA8_0>=RULE_ID && LA8_0<=RULE_INT)) ) { |
1688 | alt12=2; | 1974 | alt8=2; |
1689 | } | 1975 | } |
1690 | else { | 1976 | else { |
1691 | NoViableAltException nvae = | 1977 | NoViableAltException nvae = |
1692 | new NoViableAltException("", 12, 0, input); | 1978 | new NoViableAltException("", 8, 0, input); |
1693 | 1979 | ||
1694 | throw nvae; | 1980 | throw nvae; |
1695 | } | 1981 | } |
1696 | switch (alt12) { | 1982 | switch (alt8) { |
1697 | case 1 : | 1983 | case 1 : |
1698 | // InternalSolverLanguage.g:591:3: this_ExistSymbol_0= ruleExistSymbol | 1984 | // InternalSolverLanguageParser.g:789:3: this_IfElse_0= ruleIfElse |
1699 | { | 1985 | { |
1700 | 1986 | ||
1701 | newCompositeNode(grammarAccess.getPartialitySymbolAccess().getExistSymbolParserRuleCall_0()); | 1987 | newCompositeNode(grammarAccess.getExpressionAccess().getIfElseParserRuleCall_0()); |
1702 | 1988 | ||
1703 | pushFollow(FOLLOW_2); | 1989 | pushFollow(FOLLOW_2); |
1704 | this_ExistSymbol_0=ruleExistSymbol(); | 1990 | this_IfElse_0=ruleIfElse(); |
1705 | 1991 | ||
1706 | state._fsp--; | 1992 | state._fsp--; |
1707 | 1993 | ||
1708 | 1994 | ||
1709 | current = this_ExistSymbol_0; | 1995 | current = this_IfElse_0; |
1710 | afterParserOrEnumRuleCall(); | 1996 | afterParserOrEnumRuleCall(); |
1711 | 1997 | ||
1712 | 1998 | ||
1713 | } | 1999 | } |
1714 | break; | 2000 | break; |
1715 | case 2 : | 2001 | case 2 : |
1716 | // InternalSolverLanguage.g:600:3: this_EqualsSymbol_1= ruleEqualsSymbol | 2002 | // InternalSolverLanguageParser.g:798:3: this_DisjunctiveExpression_1= ruleDisjunctiveExpression |
1717 | { | 2003 | { |
1718 | 2004 | ||
1719 | newCompositeNode(grammarAccess.getPartialitySymbolAccess().getEqualsSymbolParserRuleCall_1()); | 2005 | newCompositeNode(grammarAccess.getExpressionAccess().getDisjunctiveExpressionParserRuleCall_1()); |
1720 | 2006 | ||
1721 | pushFollow(FOLLOW_2); | 2007 | pushFollow(FOLLOW_2); |
1722 | this_EqualsSymbol_1=ruleEqualsSymbol(); | 2008 | this_DisjunctiveExpression_1=ruleDisjunctiveExpression(); |
1723 | 2009 | ||
1724 | state._fsp--; | 2010 | state._fsp--; |
1725 | 2011 | ||
1726 | 2012 | ||
1727 | current = this_EqualsSymbol_1; | 2013 | current = this_DisjunctiveExpression_1; |
1728 | afterParserOrEnumRuleCall(); | 2014 | afterParserOrEnumRuleCall(); |
1729 | 2015 | ||
1730 | 2016 | ||
@@ -1749,28 +2035,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1749 | } | 2035 | } |
1750 | return current; | 2036 | return current; |
1751 | } | 2037 | } |
1752 | // $ANTLR end "rulePartialitySymbol" | 2038 | // $ANTLR end "ruleExpression" |
1753 | 2039 | ||
1754 | 2040 | ||
1755 | // $ANTLR start "entryRuleExistSymbol" | 2041 | // $ANTLR start "entryRuleIfElse" |
1756 | // InternalSolverLanguage.g:612:1: entryRuleExistSymbol returns [EObject current=null] : iv_ruleExistSymbol= ruleExistSymbol EOF ; | 2042 | // InternalSolverLanguageParser.g:810:1: entryRuleIfElse returns [EObject current=null] : iv_ruleIfElse= ruleIfElse EOF ; |
1757 | public final EObject entryRuleExistSymbol() throws RecognitionException { | 2043 | public final EObject entryRuleIfElse() throws RecognitionException { |
1758 | EObject current = null; | 2044 | EObject current = null; |
1759 | 2045 | ||
1760 | EObject iv_ruleExistSymbol = null; | 2046 | EObject iv_ruleIfElse = null; |
1761 | 2047 | ||
1762 | 2048 | ||
1763 | try { | 2049 | try { |
1764 | // InternalSolverLanguage.g:612:52: (iv_ruleExistSymbol= ruleExistSymbol EOF ) | 2050 | // InternalSolverLanguageParser.g:810:47: (iv_ruleIfElse= ruleIfElse EOF ) |
1765 | // InternalSolverLanguage.g:613:2: iv_ruleExistSymbol= ruleExistSymbol EOF | 2051 | // InternalSolverLanguageParser.g:811:2: iv_ruleIfElse= ruleIfElse EOF |
1766 | { | 2052 | { |
1767 | newCompositeNode(grammarAccess.getExistSymbolRule()); | 2053 | newCompositeNode(grammarAccess.getIfElseRule()); |
1768 | pushFollow(FOLLOW_1); | 2054 | pushFollow(FOLLOW_1); |
1769 | iv_ruleExistSymbol=ruleExistSymbol(); | 2055 | iv_ruleIfElse=ruleIfElse(); |
1770 | 2056 | ||
1771 | state._fsp--; | 2057 | state._fsp--; |
1772 | 2058 | ||
1773 | current =iv_ruleExistSymbol; | 2059 | current =iv_ruleIfElse; |
1774 | match(input,EOF,FOLLOW_2); | 2060 | match(input,EOF,FOLLOW_2); |
1775 | 2061 | ||
1776 | } | 2062 | } |
@@ -1785,38 +2071,136 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1785 | } | 2071 | } |
1786 | return current; | 2072 | return current; |
1787 | } | 2073 | } |
1788 | // $ANTLR end "entryRuleExistSymbol" | 2074 | // $ANTLR end "entryRuleIfElse" |
1789 | 2075 | ||
1790 | 2076 | ||
1791 | // $ANTLR start "ruleExistSymbol" | 2077 | // $ANTLR start "ruleIfElse" |
1792 | // InternalSolverLanguage.g:619:1: ruleExistSymbol returns [EObject current=null] : (otherlv_0= 'exists' () ) ; | 2078 | // InternalSolverLanguageParser.g:817:1: ruleIfElse returns [EObject current=null] : (otherlv_0= If ( (lv_condition_1_0= ruleExpression ) ) otherlv_2= Then ( (lv_then_3_0= ruleExpression ) ) otherlv_4= Else ( (lv_else_5_0= ruleExpression ) ) ) ; |
1793 | public final EObject ruleExistSymbol() throws RecognitionException { | 2079 | public final EObject ruleIfElse() throws RecognitionException { |
1794 | EObject current = null; | 2080 | EObject current = null; |
1795 | 2081 | ||
1796 | Token otherlv_0=null; | 2082 | Token otherlv_0=null; |
2083 | Token otherlv_2=null; | ||
2084 | Token otherlv_4=null; | ||
2085 | EObject lv_condition_1_0 = null; | ||
2086 | |||
2087 | EObject lv_then_3_0 = null; | ||
2088 | |||
2089 | EObject lv_else_5_0 = null; | ||
2090 | |||
1797 | 2091 | ||
1798 | 2092 | ||
1799 | enterRule(); | 2093 | enterRule(); |
1800 | 2094 | ||
1801 | try { | 2095 | try { |
1802 | // InternalSolverLanguage.g:625:2: ( (otherlv_0= 'exists' () ) ) | 2096 | // InternalSolverLanguageParser.g:823:2: ( (otherlv_0= If ( (lv_condition_1_0= ruleExpression ) ) otherlv_2= Then ( (lv_then_3_0= ruleExpression ) ) otherlv_4= Else ( (lv_else_5_0= ruleExpression ) ) ) ) |
1803 | // InternalSolverLanguage.g:626:2: (otherlv_0= 'exists' () ) | 2097 | // InternalSolverLanguageParser.g:824:2: (otherlv_0= If ( (lv_condition_1_0= ruleExpression ) ) otherlv_2= Then ( (lv_then_3_0= ruleExpression ) ) otherlv_4= Else ( (lv_else_5_0= ruleExpression ) ) ) |
1804 | { | 2098 | { |
1805 | // InternalSolverLanguage.g:626:2: (otherlv_0= 'exists' () ) | 2099 | // InternalSolverLanguageParser.g:824:2: (otherlv_0= If ( (lv_condition_1_0= ruleExpression ) ) otherlv_2= Then ( (lv_then_3_0= ruleExpression ) ) otherlv_4= Else ( (lv_else_5_0= ruleExpression ) ) ) |
1806 | // InternalSolverLanguage.g:627:3: otherlv_0= 'exists' () | 2100 | // InternalSolverLanguageParser.g:825:3: otherlv_0= If ( (lv_condition_1_0= ruleExpression ) ) otherlv_2= Then ( (lv_then_3_0= ruleExpression ) ) otherlv_4= Else ( (lv_else_5_0= ruleExpression ) ) |
1807 | { | 2101 | { |
1808 | otherlv_0=(Token)match(input,21,FOLLOW_2); | 2102 | otherlv_0=(Token)match(input,If,FOLLOW_6); |
1809 | 2103 | ||
1810 | newLeafNode(otherlv_0, grammarAccess.getExistSymbolAccess().getExistsKeyword_0()); | 2104 | newLeafNode(otherlv_0, grammarAccess.getIfElseAccess().getIfKeyword_0()); |
1811 | 2105 | ||
1812 | // InternalSolverLanguage.g:631:3: () | 2106 | // InternalSolverLanguageParser.g:829:3: ( (lv_condition_1_0= ruleExpression ) ) |
1813 | // InternalSolverLanguage.g:632:4: | 2107 | // InternalSolverLanguageParser.g:830:4: (lv_condition_1_0= ruleExpression ) |
2108 | { | ||
2109 | // InternalSolverLanguageParser.g:830:4: (lv_condition_1_0= ruleExpression ) | ||
2110 | // InternalSolverLanguageParser.g:831:5: lv_condition_1_0= ruleExpression | ||
1814 | { | 2111 | { |
1815 | 2112 | ||
1816 | current = forceCreateModelElement( | 2113 | newCompositeNode(grammarAccess.getIfElseAccess().getConditionExpressionParserRuleCall_1_0()); |
1817 | grammarAccess.getExistSymbolAccess().getExistSymbolAction_1(), | 2114 | |
1818 | current); | 2115 | pushFollow(FOLLOW_15); |
1819 | 2116 | lv_condition_1_0=ruleExpression(); | |
2117 | |||
2118 | state._fsp--; | ||
2119 | |||
2120 | |||
2121 | if (current==null) { | ||
2122 | current = createModelElementForParent(grammarAccess.getIfElseRule()); | ||
2123 | } | ||
2124 | set( | ||
2125 | current, | ||
2126 | "condition", | ||
2127 | lv_condition_1_0, | ||
2128 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
2129 | afterParserOrEnumRuleCall(); | ||
2130 | |||
2131 | |||
2132 | } | ||
2133 | |||
2134 | |||
2135 | } | ||
2136 | |||
2137 | otherlv_2=(Token)match(input,Then,FOLLOW_6); | ||
2138 | |||
2139 | newLeafNode(otherlv_2, grammarAccess.getIfElseAccess().getThenKeyword_2()); | ||
2140 | |||
2141 | // InternalSolverLanguageParser.g:852:3: ( (lv_then_3_0= ruleExpression ) ) | ||
2142 | // InternalSolverLanguageParser.g:853:4: (lv_then_3_0= ruleExpression ) | ||
2143 | { | ||
2144 | // InternalSolverLanguageParser.g:853:4: (lv_then_3_0= ruleExpression ) | ||
2145 | // InternalSolverLanguageParser.g:854:5: lv_then_3_0= ruleExpression | ||
2146 | { | ||
2147 | |||
2148 | newCompositeNode(grammarAccess.getIfElseAccess().getThenExpressionParserRuleCall_3_0()); | ||
2149 | |||
2150 | pushFollow(FOLLOW_16); | ||
2151 | lv_then_3_0=ruleExpression(); | ||
2152 | |||
2153 | state._fsp--; | ||
2154 | |||
2155 | |||
2156 | if (current==null) { | ||
2157 | current = createModelElementForParent(grammarAccess.getIfElseRule()); | ||
2158 | } | ||
2159 | set( | ||
2160 | current, | ||
2161 | "then", | ||
2162 | lv_then_3_0, | ||
2163 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
2164 | afterParserOrEnumRuleCall(); | ||
2165 | |||
2166 | |||
2167 | } | ||
2168 | |||
2169 | |||
2170 | } | ||
2171 | |||
2172 | otherlv_4=(Token)match(input,Else,FOLLOW_6); | ||
2173 | |||
2174 | newLeafNode(otherlv_4, grammarAccess.getIfElseAccess().getElseKeyword_4()); | ||
2175 | |||
2176 | // InternalSolverLanguageParser.g:875:3: ( (lv_else_5_0= ruleExpression ) ) | ||
2177 | // InternalSolverLanguageParser.g:876:4: (lv_else_5_0= ruleExpression ) | ||
2178 | { | ||
2179 | // InternalSolverLanguageParser.g:876:4: (lv_else_5_0= ruleExpression ) | ||
2180 | // InternalSolverLanguageParser.g:877:5: lv_else_5_0= ruleExpression | ||
2181 | { | ||
2182 | |||
2183 | newCompositeNode(grammarAccess.getIfElseAccess().getElseExpressionParserRuleCall_5_0()); | ||
2184 | |||
2185 | pushFollow(FOLLOW_2); | ||
2186 | lv_else_5_0=ruleExpression(); | ||
2187 | |||
2188 | state._fsp--; | ||
2189 | |||
2190 | |||
2191 | if (current==null) { | ||
2192 | current = createModelElementForParent(grammarAccess.getIfElseRule()); | ||
2193 | } | ||
2194 | set( | ||
2195 | current, | ||
2196 | "else", | ||
2197 | lv_else_5_0, | ||
2198 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
2199 | afterParserOrEnumRuleCall(); | ||
2200 | |||
2201 | |||
2202 | } | ||
2203 | |||
1820 | 2204 | ||
1821 | } | 2205 | } |
1822 | 2206 | ||
@@ -1839,28 +2223,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1839 | } | 2223 | } |
1840 | return current; | 2224 | return current; |
1841 | } | 2225 | } |
1842 | // $ANTLR end "ruleExistSymbol" | 2226 | // $ANTLR end "ruleIfElse" |
1843 | 2227 | ||
1844 | 2228 | ||
1845 | // $ANTLR start "entryRuleEqualsSymbol" | 2229 | // $ANTLR start "entryRuleDisjunctiveExpression" |
1846 | // InternalSolverLanguage.g:642:1: entryRuleEqualsSymbol returns [EObject current=null] : iv_ruleEqualsSymbol= ruleEqualsSymbol EOF ; | 2230 | // InternalSolverLanguageParser.g:898:1: entryRuleDisjunctiveExpression returns [EObject current=null] : iv_ruleDisjunctiveExpression= ruleDisjunctiveExpression EOF ; |
1847 | public final EObject entryRuleEqualsSymbol() throws RecognitionException { | 2231 | public final EObject entryRuleDisjunctiveExpression() throws RecognitionException { |
1848 | EObject current = null; | 2232 | EObject current = null; |
1849 | 2233 | ||
1850 | EObject iv_ruleEqualsSymbol = null; | 2234 | EObject iv_ruleDisjunctiveExpression = null; |
1851 | 2235 | ||
1852 | 2236 | ||
1853 | try { | 2237 | try { |
1854 | // InternalSolverLanguage.g:642:53: (iv_ruleEqualsSymbol= ruleEqualsSymbol EOF ) | 2238 | // InternalSolverLanguageParser.g:898:62: (iv_ruleDisjunctiveExpression= ruleDisjunctiveExpression EOF ) |
1855 | // InternalSolverLanguage.g:643:2: iv_ruleEqualsSymbol= ruleEqualsSymbol EOF | 2239 | // InternalSolverLanguageParser.g:899:2: iv_ruleDisjunctiveExpression= ruleDisjunctiveExpression EOF |
1856 | { | 2240 | { |
1857 | newCompositeNode(grammarAccess.getEqualsSymbolRule()); | 2241 | newCompositeNode(grammarAccess.getDisjunctiveExpressionRule()); |
1858 | pushFollow(FOLLOW_1); | 2242 | pushFollow(FOLLOW_1); |
1859 | iv_ruleEqualsSymbol=ruleEqualsSymbol(); | 2243 | iv_ruleDisjunctiveExpression=ruleDisjunctiveExpression(); |
1860 | 2244 | ||
1861 | state._fsp--; | 2245 | state._fsp--; |
1862 | 2246 | ||
1863 | current =iv_ruleEqualsSymbol; | 2247 | current =iv_ruleDisjunctiveExpression; |
1864 | match(input,EOF,FOLLOW_2); | 2248 | match(input,EOF,FOLLOW_2); |
1865 | 2249 | ||
1866 | } | 2250 | } |
@@ -1875,38 +2259,274 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1875 | } | 2259 | } |
1876 | return current; | 2260 | return current; |
1877 | } | 2261 | } |
1878 | // $ANTLR end "entryRuleEqualsSymbol" | 2262 | // $ANTLR end "entryRuleDisjunctiveExpression" |
1879 | 2263 | ||
1880 | 2264 | ||
1881 | // $ANTLR start "ruleEqualsSymbol" | 2265 | // $ANTLR start "ruleDisjunctiveExpression" |
1882 | // InternalSolverLanguage.g:649:1: ruleEqualsSymbol returns [EObject current=null] : (otherlv_0= 'equals' () ) ; | 2266 | // InternalSolverLanguageParser.g:905:1: ruleDisjunctiveExpression returns [EObject current=null] : (this_ConjunctiveExpression_0= ruleConjunctiveExpression ( ( () (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ ) | ( () otherlv_5= HyphenMinusGreaterThanSign ( (lv_body_6_0= ruleConjunctiveExpression ) ) () (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* ) )? ) ; |
1883 | public final EObject ruleEqualsSymbol() throws RecognitionException { | 2267 | public final EObject ruleDisjunctiveExpression() throws RecognitionException { |
1884 | EObject current = null; | 2268 | EObject current = null; |
1885 | 2269 | ||
1886 | Token otherlv_0=null; | 2270 | Token otherlv_2=null; |
2271 | Token otherlv_5=null; | ||
2272 | Token otherlv_8=null; | ||
2273 | EObject this_ConjunctiveExpression_0 = null; | ||
2274 | |||
2275 | EObject lv_children_3_0 = null; | ||
2276 | |||
2277 | EObject lv_body_6_0 = null; | ||
2278 | |||
2279 | EObject lv_cases_9_0 = null; | ||
2280 | |||
1887 | 2281 | ||
1888 | 2282 | ||
1889 | enterRule(); | 2283 | enterRule(); |
1890 | 2284 | ||
1891 | try { | 2285 | try { |
1892 | // InternalSolverLanguage.g:655:2: ( (otherlv_0= 'equals' () ) ) | 2286 | // InternalSolverLanguageParser.g:911:2: ( (this_ConjunctiveExpression_0= ruleConjunctiveExpression ( ( () (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ ) | ( () otherlv_5= HyphenMinusGreaterThanSign ( (lv_body_6_0= ruleConjunctiveExpression ) ) () (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* ) )? ) ) |
1893 | // InternalSolverLanguage.g:656:2: (otherlv_0= 'equals' () ) | 2287 | // InternalSolverLanguageParser.g:912:2: (this_ConjunctiveExpression_0= ruleConjunctiveExpression ( ( () (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ ) | ( () otherlv_5= HyphenMinusGreaterThanSign ( (lv_body_6_0= ruleConjunctiveExpression ) ) () (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* ) )? ) |
1894 | { | 2288 | { |
1895 | // InternalSolverLanguage.g:656:2: (otherlv_0= 'equals' () ) | 2289 | // InternalSolverLanguageParser.g:912:2: (this_ConjunctiveExpression_0= ruleConjunctiveExpression ( ( () (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ ) | ( () otherlv_5= HyphenMinusGreaterThanSign ( (lv_body_6_0= ruleConjunctiveExpression ) ) () (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* ) )? ) |
1896 | // InternalSolverLanguage.g:657:3: otherlv_0= 'equals' () | 2290 | // InternalSolverLanguageParser.g:913:3: this_ConjunctiveExpression_0= ruleConjunctiveExpression ( ( () (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ ) | ( () otherlv_5= HyphenMinusGreaterThanSign ( (lv_body_6_0= ruleConjunctiveExpression ) ) () (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* ) )? |
1897 | { | 2291 | { |
1898 | otherlv_0=(Token)match(input,22,FOLLOW_2); | ||
1899 | 2292 | ||
1900 | newLeafNode(otherlv_0, grammarAccess.getEqualsSymbolAccess().getEqualsKeyword_0()); | 2293 | newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getConjunctiveExpressionParserRuleCall_0()); |
1901 | 2294 | ||
1902 | // InternalSolverLanguage.g:661:3: () | 2295 | pushFollow(FOLLOW_17); |
1903 | // InternalSolverLanguage.g:662:4: | 2296 | this_ConjunctiveExpression_0=ruleConjunctiveExpression(); |
1904 | { | 2297 | |
2298 | state._fsp--; | ||
1905 | 2299 | ||
1906 | current = forceCreateModelElement( | 2300 | |
1907 | grammarAccess.getEqualsSymbolAccess().getEqualsSymbolAction_1(), | 2301 | current = this_ConjunctiveExpression_0; |
1908 | current); | 2302 | afterParserOrEnumRuleCall(); |
1909 | 2303 | ||
2304 | // InternalSolverLanguageParser.g:921:3: ( ( () (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ ) | ( () otherlv_5= HyphenMinusGreaterThanSign ( (lv_body_6_0= ruleConjunctiveExpression ) ) () (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* ) )? | ||
2305 | int alt11=3; | ||
2306 | int LA11_0 = input.LA(1); | ||
2307 | |||
2308 | if ( (LA11_0==Semicolon) ) { | ||
2309 | alt11=1; | ||
2310 | } | ||
2311 | else if ( (LA11_0==HyphenMinusGreaterThanSign) ) { | ||
2312 | alt11=2; | ||
2313 | } | ||
2314 | switch (alt11) { | ||
2315 | case 1 : | ||
2316 | // InternalSolverLanguageParser.g:922:4: ( () (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ ) | ||
2317 | { | ||
2318 | // InternalSolverLanguageParser.g:922:4: ( () (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ ) | ||
2319 | // InternalSolverLanguageParser.g:923:5: () (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ | ||
2320 | { | ||
2321 | // InternalSolverLanguageParser.g:923:5: () | ||
2322 | // InternalSolverLanguageParser.g:924:6: | ||
2323 | { | ||
2324 | |||
2325 | current = forceCreateModelElementAndAdd( | ||
2326 | grammarAccess.getDisjunctiveExpressionAccess().getDisjunctionChildrenAction_1_0_0(), | ||
2327 | current); | ||
2328 | |||
2329 | |||
2330 | } | ||
2331 | |||
2332 | // InternalSolverLanguageParser.g:930:5: (otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) )+ | ||
2333 | int cnt9=0; | ||
2334 | loop9: | ||
2335 | do { | ||
2336 | int alt9=2; | ||
2337 | int LA9_0 = input.LA(1); | ||
2338 | |||
2339 | if ( (LA9_0==Semicolon) ) { | ||
2340 | alt9=1; | ||
2341 | } | ||
2342 | |||
2343 | |||
2344 | switch (alt9) { | ||
2345 | case 1 : | ||
2346 | // InternalSolverLanguageParser.g:931:6: otherlv_2= Semicolon ( (lv_children_3_0= ruleConjunctiveExpression ) ) | ||
2347 | { | ||
2348 | otherlv_2=(Token)match(input,Semicolon,FOLLOW_6); | ||
2349 | |||
2350 | newLeafNode(otherlv_2, grammarAccess.getDisjunctiveExpressionAccess().getSemicolonKeyword_1_0_1_0()); | ||
2351 | |||
2352 | // InternalSolverLanguageParser.g:935:6: ( (lv_children_3_0= ruleConjunctiveExpression ) ) | ||
2353 | // InternalSolverLanguageParser.g:936:7: (lv_children_3_0= ruleConjunctiveExpression ) | ||
2354 | { | ||
2355 | // InternalSolverLanguageParser.g:936:7: (lv_children_3_0= ruleConjunctiveExpression ) | ||
2356 | // InternalSolverLanguageParser.g:937:8: lv_children_3_0= ruleConjunctiveExpression | ||
2357 | { | ||
2358 | |||
2359 | newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getChildrenConjunctiveExpressionParserRuleCall_1_0_1_1_0()); | ||
2360 | |||
2361 | pushFollow(FOLLOW_18); | ||
2362 | lv_children_3_0=ruleConjunctiveExpression(); | ||
2363 | |||
2364 | state._fsp--; | ||
2365 | |||
2366 | |||
2367 | if (current==null) { | ||
2368 | current = createModelElementForParent(grammarAccess.getDisjunctiveExpressionRule()); | ||
2369 | } | ||
2370 | add( | ||
2371 | current, | ||
2372 | "children", | ||
2373 | lv_children_3_0, | ||
2374 | "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression"); | ||
2375 | afterParserOrEnumRuleCall(); | ||
2376 | |||
2377 | |||
2378 | } | ||
2379 | |||
2380 | |||
2381 | } | ||
2382 | |||
2383 | |||
2384 | } | ||
2385 | break; | ||
2386 | |||
2387 | default : | ||
2388 | if ( cnt9 >= 1 ) break loop9; | ||
2389 | EarlyExitException eee = | ||
2390 | new EarlyExitException(9, input); | ||
2391 | throw eee; | ||
2392 | } | ||
2393 | cnt9++; | ||
2394 | } while (true); | ||
2395 | |||
2396 | |||
2397 | } | ||
2398 | |||
2399 | |||
2400 | } | ||
2401 | break; | ||
2402 | case 2 : | ||
2403 | // InternalSolverLanguageParser.g:957:4: ( () otherlv_5= HyphenMinusGreaterThanSign ( (lv_body_6_0= ruleConjunctiveExpression ) ) () (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* ) | ||
2404 | { | ||
2405 | // InternalSolverLanguageParser.g:957:4: ( () otherlv_5= HyphenMinusGreaterThanSign ( (lv_body_6_0= ruleConjunctiveExpression ) ) () (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* ) | ||
2406 | // InternalSolverLanguageParser.g:958:5: () otherlv_5= HyphenMinusGreaterThanSign ( (lv_body_6_0= ruleConjunctiveExpression ) ) () (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* | ||
2407 | { | ||
2408 | // InternalSolverLanguageParser.g:958:5: () | ||
2409 | // InternalSolverLanguageParser.g:959:6: | ||
2410 | { | ||
2411 | |||
2412 | current = forceCreateModelElementAndSet( | ||
2413 | grammarAccess.getDisjunctiveExpressionAccess().getCaseConditionAction_1_1_0(), | ||
2414 | current); | ||
2415 | |||
2416 | |||
2417 | } | ||
2418 | |||
2419 | otherlv_5=(Token)match(input,HyphenMinusGreaterThanSign,FOLLOW_6); | ||
2420 | |||
2421 | newLeafNode(otherlv_5, grammarAccess.getDisjunctiveExpressionAccess().getHyphenMinusGreaterThanSignKeyword_1_1_1()); | ||
2422 | |||
2423 | // InternalSolverLanguageParser.g:969:5: ( (lv_body_6_0= ruleConjunctiveExpression ) ) | ||
2424 | // InternalSolverLanguageParser.g:970:6: (lv_body_6_0= ruleConjunctiveExpression ) | ||
2425 | { | ||
2426 | // InternalSolverLanguageParser.g:970:6: (lv_body_6_0= ruleConjunctiveExpression ) | ||
2427 | // InternalSolverLanguageParser.g:971:7: lv_body_6_0= ruleConjunctiveExpression | ||
2428 | { | ||
2429 | |||
2430 | newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getBodyConjunctiveExpressionParserRuleCall_1_1_2_0()); | ||
2431 | |||
2432 | pushFollow(FOLLOW_18); | ||
2433 | lv_body_6_0=ruleConjunctiveExpression(); | ||
2434 | |||
2435 | state._fsp--; | ||
2436 | |||
2437 | |||
2438 | if (current==null) { | ||
2439 | current = createModelElementForParent(grammarAccess.getDisjunctiveExpressionRule()); | ||
2440 | } | ||
2441 | set( | ||
2442 | current, | ||
2443 | "body", | ||
2444 | lv_body_6_0, | ||
2445 | "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression"); | ||
2446 | afterParserOrEnumRuleCall(); | ||
2447 | |||
2448 | |||
2449 | } | ||
2450 | |||
2451 | |||
2452 | } | ||
2453 | |||
2454 | // InternalSolverLanguageParser.g:988:5: () | ||
2455 | // InternalSolverLanguageParser.g:989:6: | ||
2456 | { | ||
2457 | |||
2458 | current = forceCreateModelElementAndAdd( | ||
2459 | grammarAccess.getDisjunctiveExpressionAccess().getSwitchCasesAction_1_1_3(), | ||
2460 | current); | ||
2461 | |||
2462 | |||
2463 | } | ||
2464 | |||
2465 | // InternalSolverLanguageParser.g:995:5: (otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) )* | ||
2466 | loop10: | ||
2467 | do { | ||
2468 | int alt10=2; | ||
2469 | int LA10_0 = input.LA(1); | ||
2470 | |||
2471 | if ( (LA10_0==Semicolon) ) { | ||
2472 | alt10=1; | ||
2473 | } | ||
2474 | |||
2475 | |||
2476 | switch (alt10) { | ||
2477 | case 1 : | ||
2478 | // InternalSolverLanguageParser.g:996:6: otherlv_8= Semicolon ( (lv_cases_9_0= ruleCase ) ) | ||
2479 | { | ||
2480 | otherlv_8=(Token)match(input,Semicolon,FOLLOW_6); | ||
2481 | |||
2482 | newLeafNode(otherlv_8, grammarAccess.getDisjunctiveExpressionAccess().getSemicolonKeyword_1_1_4_0()); | ||
2483 | |||
2484 | // InternalSolverLanguageParser.g:1000:6: ( (lv_cases_9_0= ruleCase ) ) | ||
2485 | // InternalSolverLanguageParser.g:1001:7: (lv_cases_9_0= ruleCase ) | ||
2486 | { | ||
2487 | // InternalSolverLanguageParser.g:1001:7: (lv_cases_9_0= ruleCase ) | ||
2488 | // InternalSolverLanguageParser.g:1002:8: lv_cases_9_0= ruleCase | ||
2489 | { | ||
2490 | |||
2491 | newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getCasesCaseParserRuleCall_1_1_4_1_0()); | ||
2492 | |||
2493 | pushFollow(FOLLOW_18); | ||
2494 | lv_cases_9_0=ruleCase(); | ||
2495 | |||
2496 | state._fsp--; | ||
2497 | |||
2498 | |||
2499 | if (current==null) { | ||
2500 | current = createModelElementForParent(grammarAccess.getDisjunctiveExpressionRule()); | ||
2501 | } | ||
2502 | add( | ||
2503 | current, | ||
2504 | "cases", | ||
2505 | lv_cases_9_0, | ||
2506 | "org.eclipse.viatra.solver.language.SolverLanguage.Case"); | ||
2507 | afterParserOrEnumRuleCall(); | ||
2508 | |||
2509 | |||
2510 | } | ||
2511 | |||
2512 | |||
2513 | } | ||
2514 | |||
2515 | |||
2516 | } | ||
2517 | break; | ||
2518 | |||
2519 | default : | ||
2520 | break loop10; | ||
2521 | } | ||
2522 | } while (true); | ||
2523 | |||
2524 | |||
2525 | } | ||
2526 | |||
2527 | |||
2528 | } | ||
2529 | break; | ||
1910 | 2530 | ||
1911 | } | 2531 | } |
1912 | 2532 | ||
@@ -1929,28 +2549,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1929 | } | 2549 | } |
1930 | return current; | 2550 | return current; |
1931 | } | 2551 | } |
1932 | // $ANTLR end "ruleEqualsSymbol" | 2552 | // $ANTLR end "ruleDisjunctiveExpression" |
1933 | 2553 | ||
1934 | 2554 | ||
1935 | // $ANTLR start "entryRuleDataSymbol" | 2555 | // $ANTLR start "entryRuleCase" |
1936 | // InternalSolverLanguage.g:672:1: entryRuleDataSymbol returns [EObject current=null] : iv_ruleDataSymbol= ruleDataSymbol EOF ; | 2556 | // InternalSolverLanguageParser.g:1026:1: entryRuleCase returns [EObject current=null] : iv_ruleCase= ruleCase EOF ; |
1937 | public final EObject entryRuleDataSymbol() throws RecognitionException { | 2557 | public final EObject entryRuleCase() throws RecognitionException { |
1938 | EObject current = null; | 2558 | EObject current = null; |
1939 | 2559 | ||
1940 | EObject iv_ruleDataSymbol = null; | 2560 | EObject iv_ruleCase = null; |
1941 | 2561 | ||
1942 | 2562 | ||
1943 | try { | 2563 | try { |
1944 | // InternalSolverLanguage.g:672:51: (iv_ruleDataSymbol= ruleDataSymbol EOF ) | 2564 | // InternalSolverLanguageParser.g:1026:45: (iv_ruleCase= ruleCase EOF ) |
1945 | // InternalSolverLanguage.g:673:2: iv_ruleDataSymbol= ruleDataSymbol EOF | 2565 | // InternalSolverLanguageParser.g:1027:2: iv_ruleCase= ruleCase EOF |
1946 | { | 2566 | { |
1947 | newCompositeNode(grammarAccess.getDataSymbolRule()); | 2567 | newCompositeNode(grammarAccess.getCaseRule()); |
1948 | pushFollow(FOLLOW_1); | 2568 | pushFollow(FOLLOW_1); |
1949 | iv_ruleDataSymbol=ruleDataSymbol(); | 2569 | iv_ruleCase=ruleCase(); |
1950 | 2570 | ||
1951 | state._fsp--; | 2571 | state._fsp--; |
1952 | 2572 | ||
1953 | current =iv_ruleDataSymbol; | 2573 | current =iv_ruleCase; |
1954 | match(input,EOF,FOLLOW_2); | 2574 | match(input,EOF,FOLLOW_2); |
1955 | 2575 | ||
1956 | } | 2576 | } |
@@ -1965,130 +2585,273 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
1965 | } | 2585 | } |
1966 | return current; | 2586 | return current; |
1967 | } | 2587 | } |
1968 | // $ANTLR end "entryRuleDataSymbol" | 2588 | // $ANTLR end "entryRuleCase" |
1969 | 2589 | ||
1970 | 2590 | ||
1971 | // $ANTLR start "ruleDataSymbol" | 2591 | // $ANTLR start "ruleCase" |
1972 | // InternalSolverLanguage.g:679:1: ruleDataSymbol returns [EObject current=null] : (this_BooleanSymbol_0= ruleBooleanSymbol | this_IntegerSymbol_1= ruleIntegerSymbol | this_RealSymbol_2= ruleRealSymbol | this_StringSymbol_3= ruleStringSymbol ) ; | 2592 | // InternalSolverLanguageParser.g:1033:1: ruleCase returns [EObject current=null] : ( ( (lv_condition_0_0= ruleConjunctiveExpression ) ) otherlv_1= HyphenMinusGreaterThanSign ( (lv_body_2_0= ruleConjunctiveExpression ) ) ) ; |
1973 | public final EObject ruleDataSymbol() throws RecognitionException { | 2593 | public final EObject ruleCase() throws RecognitionException { |
1974 | EObject current = null; | 2594 | EObject current = null; |
1975 | 2595 | ||
1976 | EObject this_BooleanSymbol_0 = null; | 2596 | Token otherlv_1=null; |
2597 | EObject lv_condition_0_0 = null; | ||
1977 | 2598 | ||
1978 | EObject this_IntegerSymbol_1 = null; | 2599 | EObject lv_body_2_0 = null; |
1979 | 2600 | ||
1980 | EObject this_RealSymbol_2 = null; | ||
1981 | 2601 | ||
1982 | EObject this_StringSymbol_3 = null; | ||
1983 | 2602 | ||
2603 | enterRule(); | ||
1984 | 2604 | ||
2605 | try { | ||
2606 | // InternalSolverLanguageParser.g:1039:2: ( ( ( (lv_condition_0_0= ruleConjunctiveExpression ) ) otherlv_1= HyphenMinusGreaterThanSign ( (lv_body_2_0= ruleConjunctiveExpression ) ) ) ) | ||
2607 | // InternalSolverLanguageParser.g:1040:2: ( ( (lv_condition_0_0= ruleConjunctiveExpression ) ) otherlv_1= HyphenMinusGreaterThanSign ( (lv_body_2_0= ruleConjunctiveExpression ) ) ) | ||
2608 | { | ||
2609 | // InternalSolverLanguageParser.g:1040:2: ( ( (lv_condition_0_0= ruleConjunctiveExpression ) ) otherlv_1= HyphenMinusGreaterThanSign ( (lv_body_2_0= ruleConjunctiveExpression ) ) ) | ||
2610 | // InternalSolverLanguageParser.g:1041:3: ( (lv_condition_0_0= ruleConjunctiveExpression ) ) otherlv_1= HyphenMinusGreaterThanSign ( (lv_body_2_0= ruleConjunctiveExpression ) ) | ||
2611 | { | ||
2612 | // InternalSolverLanguageParser.g:1041:3: ( (lv_condition_0_0= ruleConjunctiveExpression ) ) | ||
2613 | // InternalSolverLanguageParser.g:1042:4: (lv_condition_0_0= ruleConjunctiveExpression ) | ||
2614 | { | ||
2615 | // InternalSolverLanguageParser.g:1042:4: (lv_condition_0_0= ruleConjunctiveExpression ) | ||
2616 | // InternalSolverLanguageParser.g:1043:5: lv_condition_0_0= ruleConjunctiveExpression | ||
2617 | { | ||
2618 | |||
2619 | newCompositeNode(grammarAccess.getCaseAccess().getConditionConjunctiveExpressionParserRuleCall_0_0()); | ||
2620 | |||
2621 | pushFollow(FOLLOW_19); | ||
2622 | lv_condition_0_0=ruleConjunctiveExpression(); | ||
2623 | |||
2624 | state._fsp--; | ||
2625 | |||
2626 | |||
2627 | if (current==null) { | ||
2628 | current = createModelElementForParent(grammarAccess.getCaseRule()); | ||
2629 | } | ||
2630 | set( | ||
2631 | current, | ||
2632 | "condition", | ||
2633 | lv_condition_0_0, | ||
2634 | "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression"); | ||
2635 | afterParserOrEnumRuleCall(); | ||
2636 | |||
2637 | |||
2638 | } | ||
2639 | |||
2640 | |||
2641 | } | ||
2642 | |||
2643 | otherlv_1=(Token)match(input,HyphenMinusGreaterThanSign,FOLLOW_6); | ||
2644 | |||
2645 | newLeafNode(otherlv_1, grammarAccess.getCaseAccess().getHyphenMinusGreaterThanSignKeyword_1()); | ||
2646 | |||
2647 | // InternalSolverLanguageParser.g:1064:3: ( (lv_body_2_0= ruleConjunctiveExpression ) ) | ||
2648 | // InternalSolverLanguageParser.g:1065:4: (lv_body_2_0= ruleConjunctiveExpression ) | ||
2649 | { | ||
2650 | // InternalSolverLanguageParser.g:1065:4: (lv_body_2_0= ruleConjunctiveExpression ) | ||
2651 | // InternalSolverLanguageParser.g:1066:5: lv_body_2_0= ruleConjunctiveExpression | ||
2652 | { | ||
2653 | |||
2654 | newCompositeNode(grammarAccess.getCaseAccess().getBodyConjunctiveExpressionParserRuleCall_2_0()); | ||
2655 | |||
2656 | pushFollow(FOLLOW_2); | ||
2657 | lv_body_2_0=ruleConjunctiveExpression(); | ||
2658 | |||
2659 | state._fsp--; | ||
2660 | |||
2661 | |||
2662 | if (current==null) { | ||
2663 | current = createModelElementForParent(grammarAccess.getCaseRule()); | ||
2664 | } | ||
2665 | set( | ||
2666 | current, | ||
2667 | "body", | ||
2668 | lv_body_2_0, | ||
2669 | "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression"); | ||
2670 | afterParserOrEnumRuleCall(); | ||
2671 | |||
2672 | |||
2673 | } | ||
2674 | |||
2675 | |||
2676 | } | ||
2677 | |||
2678 | |||
2679 | } | ||
2680 | |||
2681 | |||
2682 | } | ||
2683 | |||
2684 | |||
2685 | leaveRule(); | ||
2686 | |||
2687 | } | ||
2688 | |||
2689 | catch (RecognitionException re) { | ||
2690 | recover(input,re); | ||
2691 | appendSkippedTokens(); | ||
2692 | } | ||
2693 | finally { | ||
2694 | } | ||
2695 | return current; | ||
2696 | } | ||
2697 | // $ANTLR end "ruleCase" | ||
2698 | |||
2699 | |||
2700 | // $ANTLR start "entryRuleConjunctiveExpression" | ||
2701 | // InternalSolverLanguageParser.g:1087:1: entryRuleConjunctiveExpression returns [EObject current=null] : iv_ruleConjunctiveExpression= ruleConjunctiveExpression EOF ; | ||
2702 | public final EObject entryRuleConjunctiveExpression() throws RecognitionException { | ||
2703 | EObject current = null; | ||
2704 | |||
2705 | EObject iv_ruleConjunctiveExpression = null; | ||
1985 | 2706 | ||
1986 | enterRule(); | ||
1987 | 2707 | ||
1988 | try { | 2708 | try { |
1989 | // InternalSolverLanguage.g:685:2: ( (this_BooleanSymbol_0= ruleBooleanSymbol | this_IntegerSymbol_1= ruleIntegerSymbol | this_RealSymbol_2= ruleRealSymbol | this_StringSymbol_3= ruleStringSymbol ) ) | 2709 | // InternalSolverLanguageParser.g:1087:62: (iv_ruleConjunctiveExpression= ruleConjunctiveExpression EOF ) |
1990 | // InternalSolverLanguage.g:686:2: (this_BooleanSymbol_0= ruleBooleanSymbol | this_IntegerSymbol_1= ruleIntegerSymbol | this_RealSymbol_2= ruleRealSymbol | this_StringSymbol_3= ruleStringSymbol ) | 2710 | // InternalSolverLanguageParser.g:1088:2: iv_ruleConjunctiveExpression= ruleConjunctiveExpression EOF |
1991 | { | 2711 | { |
1992 | // InternalSolverLanguage.g:686:2: (this_BooleanSymbol_0= ruleBooleanSymbol | this_IntegerSymbol_1= ruleIntegerSymbol | this_RealSymbol_2= ruleRealSymbol | this_StringSymbol_3= ruleStringSymbol ) | 2712 | newCompositeNode(grammarAccess.getConjunctiveExpressionRule()); |
1993 | int alt13=4; | 2713 | pushFollow(FOLLOW_1); |
1994 | switch ( input.LA(1) ) { | 2714 | iv_ruleConjunctiveExpression=ruleConjunctiveExpression(); |
1995 | case 23: | 2715 | |
1996 | { | 2716 | state._fsp--; |
1997 | alt13=1; | 2717 | |
1998 | } | 2718 | current =iv_ruleConjunctiveExpression; |
1999 | break; | 2719 | match(input,EOF,FOLLOW_2); |
2000 | case 24: | ||
2001 | { | ||
2002 | alt13=2; | ||
2003 | } | ||
2004 | break; | ||
2005 | case 25: | ||
2006 | { | ||
2007 | alt13=3; | ||
2008 | } | ||
2009 | break; | ||
2010 | case 26: | ||
2011 | { | ||
2012 | alt13=4; | ||
2013 | } | ||
2014 | break; | ||
2015 | default: | ||
2016 | NoViableAltException nvae = | ||
2017 | new NoViableAltException("", 13, 0, input); | ||
2018 | 2720 | ||
2019 | throw nvae; | ||
2020 | } | 2721 | } |
2021 | 2722 | ||
2723 | } | ||
2724 | |||
2725 | catch (RecognitionException re) { | ||
2726 | recover(input,re); | ||
2727 | appendSkippedTokens(); | ||
2728 | } | ||
2729 | finally { | ||
2730 | } | ||
2731 | return current; | ||
2732 | } | ||
2733 | // $ANTLR end "entryRuleConjunctiveExpression" | ||
2734 | |||
2735 | |||
2736 | // $ANTLR start "ruleConjunctiveExpression" | ||
2737 | // InternalSolverLanguageParser.g:1094:1: ruleConjunctiveExpression returns [EObject current=null] : (this_ComparisonExpression_0= ruleComparisonExpression ( () (otherlv_2= Comma ( (lv_children_3_0= ruleComparisonExpression ) ) )+ )? ) ; | ||
2738 | public final EObject ruleConjunctiveExpression() throws RecognitionException { | ||
2739 | EObject current = null; | ||
2740 | |||
2741 | Token otherlv_2=null; | ||
2742 | EObject this_ComparisonExpression_0 = null; | ||
2743 | |||
2744 | EObject lv_children_3_0 = null; | ||
2745 | |||
2746 | |||
2747 | |||
2748 | enterRule(); | ||
2749 | |||
2750 | try { | ||
2751 | // InternalSolverLanguageParser.g:1100:2: ( (this_ComparisonExpression_0= ruleComparisonExpression ( () (otherlv_2= Comma ( (lv_children_3_0= ruleComparisonExpression ) ) )+ )? ) ) | ||
2752 | // InternalSolverLanguageParser.g:1101:2: (this_ComparisonExpression_0= ruleComparisonExpression ( () (otherlv_2= Comma ( (lv_children_3_0= ruleComparisonExpression ) ) )+ )? ) | ||
2753 | { | ||
2754 | // InternalSolverLanguageParser.g:1101:2: (this_ComparisonExpression_0= ruleComparisonExpression ( () (otherlv_2= Comma ( (lv_children_3_0= ruleComparisonExpression ) ) )+ )? ) | ||
2755 | // InternalSolverLanguageParser.g:1102:3: this_ComparisonExpression_0= ruleComparisonExpression ( () (otherlv_2= Comma ( (lv_children_3_0= ruleComparisonExpression ) ) )+ )? | ||
2756 | { | ||
2757 | |||
2758 | newCompositeNode(grammarAccess.getConjunctiveExpressionAccess().getComparisonExpressionParserRuleCall_0()); | ||
2759 | |||
2760 | pushFollow(FOLLOW_20); | ||
2761 | this_ComparisonExpression_0=ruleComparisonExpression(); | ||
2762 | |||
2763 | state._fsp--; | ||
2764 | |||
2765 | |||
2766 | current = this_ComparisonExpression_0; | ||
2767 | afterParserOrEnumRuleCall(); | ||
2768 | |||
2769 | // InternalSolverLanguageParser.g:1110:3: ( () (otherlv_2= Comma ( (lv_children_3_0= ruleComparisonExpression ) ) )+ )? | ||
2770 | int alt13=2; | ||
2771 | int LA13_0 = input.LA(1); | ||
2772 | |||
2773 | if ( (LA13_0==Comma) ) { | ||
2774 | alt13=1; | ||
2775 | } | ||
2022 | switch (alt13) { | 2776 | switch (alt13) { |
2023 | case 1 : | 2777 | case 1 : |
2024 | // InternalSolverLanguage.g:687:3: this_BooleanSymbol_0= ruleBooleanSymbol | 2778 | // InternalSolverLanguageParser.g:1111:4: () (otherlv_2= Comma ( (lv_children_3_0= ruleComparisonExpression ) ) )+ |
2779 | { | ||
2780 | // InternalSolverLanguageParser.g:1111:4: () | ||
2781 | // InternalSolverLanguageParser.g:1112:5: | ||
2025 | { | 2782 | { |
2026 | 2783 | ||
2027 | newCompositeNode(grammarAccess.getDataSymbolAccess().getBooleanSymbolParserRuleCall_0()); | 2784 | current = forceCreateModelElementAndAdd( |
2028 | 2785 | grammarAccess.getConjunctiveExpressionAccess().getConjunctionChildrenAction_1_0(), | |
2029 | pushFollow(FOLLOW_2); | 2786 | current); |
2030 | this_BooleanSymbol_0=ruleBooleanSymbol(); | 2787 | |
2031 | |||
2032 | state._fsp--; | ||
2033 | 2788 | ||
2789 | } | ||
2034 | 2790 | ||
2035 | current = this_BooleanSymbol_0; | 2791 | // InternalSolverLanguageParser.g:1118:4: (otherlv_2= Comma ( (lv_children_3_0= ruleComparisonExpression ) ) )+ |
2036 | afterParserOrEnumRuleCall(); | 2792 | int cnt12=0; |
2037 | 2793 | loop12: | |
2794 | do { | ||
2795 | int alt12=2; | ||
2796 | int LA12_0 = input.LA(1); | ||
2038 | 2797 | ||
2039 | } | 2798 | if ( (LA12_0==Comma) ) { |
2040 | break; | 2799 | alt12=1; |
2041 | case 2 : | 2800 | } |
2042 | // InternalSolverLanguage.g:696:3: this_IntegerSymbol_1= ruleIntegerSymbol | ||
2043 | { | ||
2044 | 2801 | ||
2045 | newCompositeNode(grammarAccess.getDataSymbolAccess().getIntegerSymbolParserRuleCall_1()); | ||
2046 | |||
2047 | pushFollow(FOLLOW_2); | ||
2048 | this_IntegerSymbol_1=ruleIntegerSymbol(); | ||
2049 | 2802 | ||
2050 | state._fsp--; | 2803 | switch (alt12) { |
2804 | case 1 : | ||
2805 | // InternalSolverLanguageParser.g:1119:5: otherlv_2= Comma ( (lv_children_3_0= ruleComparisonExpression ) ) | ||
2806 | { | ||
2807 | otherlv_2=(Token)match(input,Comma,FOLLOW_6); | ||
2051 | 2808 | ||
2809 | newLeafNode(otherlv_2, grammarAccess.getConjunctiveExpressionAccess().getCommaKeyword_1_1_0()); | ||
2810 | |||
2811 | // InternalSolverLanguageParser.g:1123:5: ( (lv_children_3_0= ruleComparisonExpression ) ) | ||
2812 | // InternalSolverLanguageParser.g:1124:6: (lv_children_3_0= ruleComparisonExpression ) | ||
2813 | { | ||
2814 | // InternalSolverLanguageParser.g:1124:6: (lv_children_3_0= ruleComparisonExpression ) | ||
2815 | // InternalSolverLanguageParser.g:1125:7: lv_children_3_0= ruleComparisonExpression | ||
2816 | { | ||
2052 | 2817 | ||
2053 | current = this_IntegerSymbol_1; | 2818 | newCompositeNode(grammarAccess.getConjunctiveExpressionAccess().getChildrenComparisonExpressionParserRuleCall_1_1_1_0()); |
2054 | afterParserOrEnumRuleCall(); | 2819 | |
2055 | 2820 | pushFollow(FOLLOW_20); | |
2821 | lv_children_3_0=ruleComparisonExpression(); | ||
2056 | 2822 | ||
2057 | } | 2823 | state._fsp--; |
2058 | break; | ||
2059 | case 3 : | ||
2060 | // InternalSolverLanguage.g:705:3: this_RealSymbol_2= ruleRealSymbol | ||
2061 | { | ||
2062 | 2824 | ||
2063 | newCompositeNode(grammarAccess.getDataSymbolAccess().getRealSymbolParserRuleCall_2()); | ||
2064 | |||
2065 | pushFollow(FOLLOW_2); | ||
2066 | this_RealSymbol_2=ruleRealSymbol(); | ||
2067 | 2825 | ||
2068 | state._fsp--; | 2826 | if (current==null) { |
2827 | current = createModelElementForParent(grammarAccess.getConjunctiveExpressionRule()); | ||
2828 | } | ||
2829 | add( | ||
2830 | current, | ||
2831 | "children", | ||
2832 | lv_children_3_0, | ||
2833 | "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonExpression"); | ||
2834 | afterParserOrEnumRuleCall(); | ||
2835 | |||
2069 | 2836 | ||
2837 | } | ||
2070 | 2838 | ||
2071 | current = this_RealSymbol_2; | ||
2072 | afterParserOrEnumRuleCall(); | ||
2073 | |||
2074 | 2839 | ||
2075 | } | 2840 | } |
2076 | break; | ||
2077 | case 4 : | ||
2078 | // InternalSolverLanguage.g:714:3: this_StringSymbol_3= ruleStringSymbol | ||
2079 | { | ||
2080 | 2841 | ||
2081 | newCompositeNode(grammarAccess.getDataSymbolAccess().getStringSymbolParserRuleCall_3()); | ||
2082 | |||
2083 | pushFollow(FOLLOW_2); | ||
2084 | this_StringSymbol_3=ruleStringSymbol(); | ||
2085 | 2842 | ||
2086 | state._fsp--; | 2843 | } |
2844 | break; | ||
2087 | 2845 | ||
2846 | default : | ||
2847 | if ( cnt12 >= 1 ) break loop12; | ||
2848 | EarlyExitException eee = | ||
2849 | new EarlyExitException(12, input); | ||
2850 | throw eee; | ||
2851 | } | ||
2852 | cnt12++; | ||
2853 | } while (true); | ||
2088 | 2854 | ||
2089 | current = this_StringSymbol_3; | ||
2090 | afterParserOrEnumRuleCall(); | ||
2091 | |||
2092 | 2855 | ||
2093 | } | 2856 | } |
2094 | break; | 2857 | break; |
@@ -2099,6 +2862,9 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2099 | } | 2862 | } |
2100 | 2863 | ||
2101 | 2864 | ||
2865 | } | ||
2866 | |||
2867 | |||
2102 | leaveRule(); | 2868 | leaveRule(); |
2103 | 2869 | ||
2104 | } | 2870 | } |
@@ -2111,28 +2877,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2111 | } | 2877 | } |
2112 | return current; | 2878 | return current; |
2113 | } | 2879 | } |
2114 | // $ANTLR end "ruleDataSymbol" | 2880 | // $ANTLR end "ruleConjunctiveExpression" |
2115 | 2881 | ||
2116 | 2882 | ||
2117 | // $ANTLR start "entryRuleBooleanSymbol" | 2883 | // $ANTLR start "entryRuleComparisonExpression" |
2118 | // InternalSolverLanguage.g:726:1: entryRuleBooleanSymbol returns [EObject current=null] : iv_ruleBooleanSymbol= ruleBooleanSymbol EOF ; | 2884 | // InternalSolverLanguageParser.g:1148:1: entryRuleComparisonExpression returns [EObject current=null] : iv_ruleComparisonExpression= ruleComparisonExpression EOF ; |
2119 | public final EObject entryRuleBooleanSymbol() throws RecognitionException { | 2885 | public final EObject entryRuleComparisonExpression() throws RecognitionException { |
2120 | EObject current = null; | 2886 | EObject current = null; |
2121 | 2887 | ||
2122 | EObject iv_ruleBooleanSymbol = null; | 2888 | EObject iv_ruleComparisonExpression = null; |
2123 | 2889 | ||
2124 | 2890 | ||
2125 | try { | 2891 | try { |
2126 | // InternalSolverLanguage.g:726:54: (iv_ruleBooleanSymbol= ruleBooleanSymbol EOF ) | 2892 | // InternalSolverLanguageParser.g:1148:61: (iv_ruleComparisonExpression= ruleComparisonExpression EOF ) |
2127 | // InternalSolverLanguage.g:727:2: iv_ruleBooleanSymbol= ruleBooleanSymbol EOF | 2893 | // InternalSolverLanguageParser.g:1149:2: iv_ruleComparisonExpression= ruleComparisonExpression EOF |
2128 | { | 2894 | { |
2129 | newCompositeNode(grammarAccess.getBooleanSymbolRule()); | 2895 | newCompositeNode(grammarAccess.getComparisonExpressionRule()); |
2130 | pushFollow(FOLLOW_1); | 2896 | pushFollow(FOLLOW_1); |
2131 | iv_ruleBooleanSymbol=ruleBooleanSymbol(); | 2897 | iv_ruleComparisonExpression=ruleComparisonExpression(); |
2132 | 2898 | ||
2133 | state._fsp--; | 2899 | state._fsp--; |
2134 | 2900 | ||
2135 | current =iv_ruleBooleanSymbol; | 2901 | current =iv_ruleComparisonExpression; |
2136 | match(input,EOF,FOLLOW_2); | 2902 | match(input,EOF,FOLLOW_2); |
2137 | 2903 | ||
2138 | } | 2904 | } |
@@ -2147,38 +2913,130 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2147 | } | 2913 | } |
2148 | return current; | 2914 | return current; |
2149 | } | 2915 | } |
2150 | // $ANTLR end "entryRuleBooleanSymbol" | 2916 | // $ANTLR end "entryRuleComparisonExpression" |
2151 | 2917 | ||
2152 | 2918 | ||
2153 | // $ANTLR start "ruleBooleanSymbol" | 2919 | // $ANTLR start "ruleComparisonExpression" |
2154 | // InternalSolverLanguage.g:733:1: ruleBooleanSymbol returns [EObject current=null] : (otherlv_0= 'bool' () ) ; | 2920 | // InternalSolverLanguageParser.g:1155:1: ruleComparisonExpression returns [EObject current=null] : (this_AdditiveExpression_0= ruleAdditiveExpression ( () ( (lv_op_2_0= ruleComparisonOperator ) ) ( (lv_right_3_0= ruleAdditiveExpression ) ) )? ) ; |
2155 | public final EObject ruleBooleanSymbol() throws RecognitionException { | 2921 | public final EObject ruleComparisonExpression() throws RecognitionException { |
2156 | EObject current = null; | 2922 | EObject current = null; |
2157 | 2923 | ||
2158 | Token otherlv_0=null; | 2924 | EObject this_AdditiveExpression_0 = null; |
2925 | |||
2926 | Enumerator lv_op_2_0 = null; | ||
2927 | |||
2928 | EObject lv_right_3_0 = null; | ||
2929 | |||
2159 | 2930 | ||
2160 | 2931 | ||
2161 | enterRule(); | 2932 | enterRule(); |
2162 | 2933 | ||
2163 | try { | 2934 | try { |
2164 | // InternalSolverLanguage.g:739:2: ( (otherlv_0= 'bool' () ) ) | 2935 | // InternalSolverLanguageParser.g:1161:2: ( (this_AdditiveExpression_0= ruleAdditiveExpression ( () ( (lv_op_2_0= ruleComparisonOperator ) ) ( (lv_right_3_0= ruleAdditiveExpression ) ) )? ) ) |
2165 | // InternalSolverLanguage.g:740:2: (otherlv_0= 'bool' () ) | 2936 | // InternalSolverLanguageParser.g:1162:2: (this_AdditiveExpression_0= ruleAdditiveExpression ( () ( (lv_op_2_0= ruleComparisonOperator ) ) ( (lv_right_3_0= ruleAdditiveExpression ) ) )? ) |
2166 | { | 2937 | { |
2167 | // InternalSolverLanguage.g:740:2: (otherlv_0= 'bool' () ) | 2938 | // InternalSolverLanguageParser.g:1162:2: (this_AdditiveExpression_0= ruleAdditiveExpression ( () ( (lv_op_2_0= ruleComparisonOperator ) ) ( (lv_right_3_0= ruleAdditiveExpression ) ) )? ) |
2168 | // InternalSolverLanguage.g:741:3: otherlv_0= 'bool' () | 2939 | // InternalSolverLanguageParser.g:1163:3: this_AdditiveExpression_0= ruleAdditiveExpression ( () ( (lv_op_2_0= ruleComparisonOperator ) ) ( (lv_right_3_0= ruleAdditiveExpression ) ) )? |
2169 | { | 2940 | { |
2170 | otherlv_0=(Token)match(input,23,FOLLOW_2); | ||
2171 | 2941 | ||
2172 | newLeafNode(otherlv_0, grammarAccess.getBooleanSymbolAccess().getBoolKeyword_0()); | 2942 | newCompositeNode(grammarAccess.getComparisonExpressionAccess().getAdditiveExpressionParserRuleCall_0()); |
2173 | 2943 | ||
2174 | // InternalSolverLanguage.g:745:3: () | 2944 | pushFollow(FOLLOW_21); |
2175 | // InternalSolverLanguage.g:746:4: | 2945 | this_AdditiveExpression_0=ruleAdditiveExpression(); |
2176 | { | ||
2177 | 2946 | ||
2178 | current = forceCreateModelElement( | 2947 | state._fsp--; |
2179 | grammarAccess.getBooleanSymbolAccess().getBooleanSymbolAction_1(), | 2948 | |
2180 | current); | 2949 | |
2181 | 2950 | current = this_AdditiveExpression_0; | |
2951 | afterParserOrEnumRuleCall(); | ||
2952 | |||
2953 | // InternalSolverLanguageParser.g:1171:3: ( () ( (lv_op_2_0= ruleComparisonOperator ) ) ( (lv_right_3_0= ruleAdditiveExpression ) ) )? | ||
2954 | int alt14=2; | ||
2955 | int LA14_0 = input.LA(1); | ||
2956 | |||
2957 | if ( (LA14_0==ExclamationMarkEqualsSign||(LA14_0>=LessThanSignEqualsSign && LA14_0<=GreaterThanSignEqualsSign)||LA14_0==In||LA14_0==LessThanSign||LA14_0==GreaterThanSign) ) { | ||
2958 | alt14=1; | ||
2959 | } | ||
2960 | switch (alt14) { | ||
2961 | case 1 : | ||
2962 | // InternalSolverLanguageParser.g:1172:4: () ( (lv_op_2_0= ruleComparisonOperator ) ) ( (lv_right_3_0= ruleAdditiveExpression ) ) | ||
2963 | { | ||
2964 | // InternalSolverLanguageParser.g:1172:4: () | ||
2965 | // InternalSolverLanguageParser.g:1173:5: | ||
2966 | { | ||
2967 | |||
2968 | current = forceCreateModelElementAndSet( | ||
2969 | grammarAccess.getComparisonExpressionAccess().getComparisonLeftAction_1_0(), | ||
2970 | current); | ||
2971 | |||
2972 | |||
2973 | } | ||
2974 | |||
2975 | // InternalSolverLanguageParser.g:1179:4: ( (lv_op_2_0= ruleComparisonOperator ) ) | ||
2976 | // InternalSolverLanguageParser.g:1180:5: (lv_op_2_0= ruleComparisonOperator ) | ||
2977 | { | ||
2978 | // InternalSolverLanguageParser.g:1180:5: (lv_op_2_0= ruleComparisonOperator ) | ||
2979 | // InternalSolverLanguageParser.g:1181:6: lv_op_2_0= ruleComparisonOperator | ||
2980 | { | ||
2981 | |||
2982 | newCompositeNode(grammarAccess.getComparisonExpressionAccess().getOpComparisonOperatorEnumRuleCall_1_1_0()); | ||
2983 | |||
2984 | pushFollow(FOLLOW_6); | ||
2985 | lv_op_2_0=ruleComparisonOperator(); | ||
2986 | |||
2987 | state._fsp--; | ||
2988 | |||
2989 | |||
2990 | if (current==null) { | ||
2991 | current = createModelElementForParent(grammarAccess.getComparisonExpressionRule()); | ||
2992 | } | ||
2993 | set( | ||
2994 | current, | ||
2995 | "op", | ||
2996 | lv_op_2_0, | ||
2997 | "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonOperator"); | ||
2998 | afterParserOrEnumRuleCall(); | ||
2999 | |||
3000 | |||
3001 | } | ||
3002 | |||
3003 | |||
3004 | } | ||
3005 | |||
3006 | // InternalSolverLanguageParser.g:1198:4: ( (lv_right_3_0= ruleAdditiveExpression ) ) | ||
3007 | // InternalSolverLanguageParser.g:1199:5: (lv_right_3_0= ruleAdditiveExpression ) | ||
3008 | { | ||
3009 | // InternalSolverLanguageParser.g:1199:5: (lv_right_3_0= ruleAdditiveExpression ) | ||
3010 | // InternalSolverLanguageParser.g:1200:6: lv_right_3_0= ruleAdditiveExpression | ||
3011 | { | ||
3012 | |||
3013 | newCompositeNode(grammarAccess.getComparisonExpressionAccess().getRightAdditiveExpressionParserRuleCall_1_2_0()); | ||
3014 | |||
3015 | pushFollow(FOLLOW_2); | ||
3016 | lv_right_3_0=ruleAdditiveExpression(); | ||
3017 | |||
3018 | state._fsp--; | ||
3019 | |||
3020 | |||
3021 | if (current==null) { | ||
3022 | current = createModelElementForParent(grammarAccess.getComparisonExpressionRule()); | ||
3023 | } | ||
3024 | set( | ||
3025 | current, | ||
3026 | "right", | ||
3027 | lv_right_3_0, | ||
3028 | "org.eclipse.viatra.solver.language.SolverLanguage.AdditiveExpression"); | ||
3029 | afterParserOrEnumRuleCall(); | ||
3030 | |||
3031 | |||
3032 | } | ||
3033 | |||
3034 | |||
3035 | } | ||
3036 | |||
3037 | |||
3038 | } | ||
3039 | break; | ||
2182 | 3040 | ||
2183 | } | 3041 | } |
2184 | 3042 | ||
@@ -2201,28 +3059,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2201 | } | 3059 | } |
2202 | return current; | 3060 | return current; |
2203 | } | 3061 | } |
2204 | // $ANTLR end "ruleBooleanSymbol" | 3062 | // $ANTLR end "ruleComparisonExpression" |
2205 | 3063 | ||
2206 | 3064 | ||
2207 | // $ANTLR start "entryRuleIntegerSymbol" | 3065 | // $ANTLR start "entryRuleAdditiveExpression" |
2208 | // InternalSolverLanguage.g:756:1: entryRuleIntegerSymbol returns [EObject current=null] : iv_ruleIntegerSymbol= ruleIntegerSymbol EOF ; | 3066 | // InternalSolverLanguageParser.g:1222:1: entryRuleAdditiveExpression returns [EObject current=null] : iv_ruleAdditiveExpression= ruleAdditiveExpression EOF ; |
2209 | public final EObject entryRuleIntegerSymbol() throws RecognitionException { | 3067 | public final EObject entryRuleAdditiveExpression() throws RecognitionException { |
2210 | EObject current = null; | 3068 | EObject current = null; |
2211 | 3069 | ||
2212 | EObject iv_ruleIntegerSymbol = null; | 3070 | EObject iv_ruleAdditiveExpression = null; |
2213 | 3071 | ||
2214 | 3072 | ||
2215 | try { | 3073 | try { |
2216 | // InternalSolverLanguage.g:756:54: (iv_ruleIntegerSymbol= ruleIntegerSymbol EOF ) | 3074 | // InternalSolverLanguageParser.g:1222:59: (iv_ruleAdditiveExpression= ruleAdditiveExpression EOF ) |
2217 | // InternalSolverLanguage.g:757:2: iv_ruleIntegerSymbol= ruleIntegerSymbol EOF | 3075 | // InternalSolverLanguageParser.g:1223:2: iv_ruleAdditiveExpression= ruleAdditiveExpression EOF |
2218 | { | 3076 | { |
2219 | newCompositeNode(grammarAccess.getIntegerSymbolRule()); | 3077 | newCompositeNode(grammarAccess.getAdditiveExpressionRule()); |
2220 | pushFollow(FOLLOW_1); | 3078 | pushFollow(FOLLOW_1); |
2221 | iv_ruleIntegerSymbol=ruleIntegerSymbol(); | 3079 | iv_ruleAdditiveExpression=ruleAdditiveExpression(); |
2222 | 3080 | ||
2223 | state._fsp--; | 3081 | state._fsp--; |
2224 | 3082 | ||
2225 | current =iv_ruleIntegerSymbol; | 3083 | current =iv_ruleAdditiveExpression; |
2226 | match(input,EOF,FOLLOW_2); | 3084 | match(input,EOF,FOLLOW_2); |
2227 | 3085 | ||
2228 | } | 3086 | } |
@@ -2237,40 +3095,139 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2237 | } | 3095 | } |
2238 | return current; | 3096 | return current; |
2239 | } | 3097 | } |
2240 | // $ANTLR end "entryRuleIntegerSymbol" | 3098 | // $ANTLR end "entryRuleAdditiveExpression" |
2241 | 3099 | ||
2242 | 3100 | ||
2243 | // $ANTLR start "ruleIntegerSymbol" | 3101 | // $ANTLR start "ruleAdditiveExpression" |
2244 | // InternalSolverLanguage.g:763:1: ruleIntegerSymbol returns [EObject current=null] : (otherlv_0= 'int' () ) ; | 3102 | // InternalSolverLanguageParser.g:1229:1: ruleAdditiveExpression returns [EObject current=null] : (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( (lv_op_2_0= ruleAdditiveBinaryOperator ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) ; |
2245 | public final EObject ruleIntegerSymbol() throws RecognitionException { | 3103 | public final EObject ruleAdditiveExpression() throws RecognitionException { |
2246 | EObject current = null; | 3104 | EObject current = null; |
2247 | 3105 | ||
2248 | Token otherlv_0=null; | 3106 | EObject this_MultiplicativeExpression_0 = null; |
3107 | |||
3108 | Enumerator lv_op_2_0 = null; | ||
3109 | |||
3110 | EObject lv_right_3_0 = null; | ||
3111 | |||
2249 | 3112 | ||
2250 | 3113 | ||
2251 | enterRule(); | 3114 | enterRule(); |
2252 | 3115 | ||
2253 | try { | 3116 | try { |
2254 | // InternalSolverLanguage.g:769:2: ( (otherlv_0= 'int' () ) ) | 3117 | // InternalSolverLanguageParser.g:1235:2: ( (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( (lv_op_2_0= ruleAdditiveBinaryOperator ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) ) |
2255 | // InternalSolverLanguage.g:770:2: (otherlv_0= 'int' () ) | 3118 | // InternalSolverLanguageParser.g:1236:2: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( (lv_op_2_0= ruleAdditiveBinaryOperator ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) |
2256 | { | 3119 | { |
2257 | // InternalSolverLanguage.g:770:2: (otherlv_0= 'int' () ) | 3120 | // InternalSolverLanguageParser.g:1236:2: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( (lv_op_2_0= ruleAdditiveBinaryOperator ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) |
2258 | // InternalSolverLanguage.g:771:3: otherlv_0= 'int' () | 3121 | // InternalSolverLanguageParser.g:1237:3: this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( (lv_op_2_0= ruleAdditiveBinaryOperator ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* |
2259 | { | 3122 | { |
2260 | otherlv_0=(Token)match(input,24,FOLLOW_2); | ||
2261 | 3123 | ||
2262 | newLeafNode(otherlv_0, grammarAccess.getIntegerSymbolAccess().getIntKeyword_0()); | 3124 | newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0()); |
2263 | 3125 | ||
2264 | // InternalSolverLanguage.g:775:3: () | 3126 | pushFollow(FOLLOW_22); |
2265 | // InternalSolverLanguage.g:776:4: | 3127 | this_MultiplicativeExpression_0=ruleMultiplicativeExpression(); |
2266 | { | ||
2267 | 3128 | ||
2268 | current = forceCreateModelElement( | 3129 | state._fsp--; |
2269 | grammarAccess.getIntegerSymbolAccess().getIntegerSymbolAction_1(), | ||
2270 | current); | ||
2271 | |||
2272 | 3130 | ||
2273 | } | 3131 | |
3132 | current = this_MultiplicativeExpression_0; | ||
3133 | afterParserOrEnumRuleCall(); | ||
3134 | |||
3135 | // InternalSolverLanguageParser.g:1245:3: ( () ( (lv_op_2_0= ruleAdditiveBinaryOperator ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* | ||
3136 | loop15: | ||
3137 | do { | ||
3138 | int alt15=2; | ||
3139 | int LA15_0 = input.LA(1); | ||
3140 | |||
3141 | if ( (LA15_0==PlusSign||LA15_0==HyphenMinus) ) { | ||
3142 | alt15=1; | ||
3143 | } | ||
3144 | |||
3145 | |||
3146 | switch (alt15) { | ||
3147 | case 1 : | ||
3148 | // InternalSolverLanguageParser.g:1246:4: () ( (lv_op_2_0= ruleAdditiveBinaryOperator ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) | ||
3149 | { | ||
3150 | // InternalSolverLanguageParser.g:1246:4: () | ||
3151 | // InternalSolverLanguageParser.g:1247:5: | ||
3152 | { | ||
3153 | |||
3154 | current = forceCreateModelElementAndSet( | ||
3155 | grammarAccess.getAdditiveExpressionAccess().getBinaryExpressionLeftAction_1_0(), | ||
3156 | current); | ||
3157 | |||
3158 | |||
3159 | } | ||
3160 | |||
3161 | // InternalSolverLanguageParser.g:1253:4: ( (lv_op_2_0= ruleAdditiveBinaryOperator ) ) | ||
3162 | // InternalSolverLanguageParser.g:1254:5: (lv_op_2_0= ruleAdditiveBinaryOperator ) | ||
3163 | { | ||
3164 | // InternalSolverLanguageParser.g:1254:5: (lv_op_2_0= ruleAdditiveBinaryOperator ) | ||
3165 | // InternalSolverLanguageParser.g:1255:6: lv_op_2_0= ruleAdditiveBinaryOperator | ||
3166 | { | ||
3167 | |||
3168 | newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getOpAdditiveBinaryOperatorEnumRuleCall_1_1_0()); | ||
3169 | |||
3170 | pushFollow(FOLLOW_6); | ||
3171 | lv_op_2_0=ruleAdditiveBinaryOperator(); | ||
3172 | |||
3173 | state._fsp--; | ||
3174 | |||
3175 | |||
3176 | if (current==null) { | ||
3177 | current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule()); | ||
3178 | } | ||
3179 | set( | ||
3180 | current, | ||
3181 | "op", | ||
3182 | lv_op_2_0, | ||
3183 | "org.eclipse.viatra.solver.language.SolverLanguage.AdditiveBinaryOperator"); | ||
3184 | afterParserOrEnumRuleCall(); | ||
3185 | |||
3186 | |||
3187 | } | ||
3188 | |||
3189 | |||
3190 | } | ||
3191 | |||
3192 | // InternalSolverLanguageParser.g:1272:4: ( (lv_right_3_0= ruleMultiplicativeExpression ) ) | ||
3193 | // InternalSolverLanguageParser.g:1273:5: (lv_right_3_0= ruleMultiplicativeExpression ) | ||
3194 | { | ||
3195 | // InternalSolverLanguageParser.g:1273:5: (lv_right_3_0= ruleMultiplicativeExpression ) | ||
3196 | // InternalSolverLanguageParser.g:1274:6: lv_right_3_0= ruleMultiplicativeExpression | ||
3197 | { | ||
3198 | |||
3199 | newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_2_0()); | ||
3200 | |||
3201 | pushFollow(FOLLOW_22); | ||
3202 | lv_right_3_0=ruleMultiplicativeExpression(); | ||
3203 | |||
3204 | state._fsp--; | ||
3205 | |||
3206 | |||
3207 | if (current==null) { | ||
3208 | current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule()); | ||
3209 | } | ||
3210 | set( | ||
3211 | current, | ||
3212 | "right", | ||
3213 | lv_right_3_0, | ||
3214 | "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicativeExpression"); | ||
3215 | afterParserOrEnumRuleCall(); | ||
3216 | |||
3217 | |||
3218 | } | ||
3219 | |||
3220 | |||
3221 | } | ||
3222 | |||
3223 | |||
3224 | } | ||
3225 | break; | ||
3226 | |||
3227 | default : | ||
3228 | break loop15; | ||
3229 | } | ||
3230 | } while (true); | ||
2274 | 3231 | ||
2275 | 3232 | ||
2276 | } | 3233 | } |
@@ -2291,28 +3248,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2291 | } | 3248 | } |
2292 | return current; | 3249 | return current; |
2293 | } | 3250 | } |
2294 | // $ANTLR end "ruleIntegerSymbol" | 3251 | // $ANTLR end "ruleAdditiveExpression" |
2295 | 3252 | ||
2296 | 3253 | ||
2297 | // $ANTLR start "entryRuleRealSymbol" | 3254 | // $ANTLR start "entryRuleMultiplicativeExpression" |
2298 | // InternalSolverLanguage.g:786:1: entryRuleRealSymbol returns [EObject current=null] : iv_ruleRealSymbol= ruleRealSymbol EOF ; | 3255 | // InternalSolverLanguageParser.g:1296:1: entryRuleMultiplicativeExpression returns [EObject current=null] : iv_ruleMultiplicativeExpression= ruleMultiplicativeExpression EOF ; |
2299 | public final EObject entryRuleRealSymbol() throws RecognitionException { | 3256 | public final EObject entryRuleMultiplicativeExpression() throws RecognitionException { |
2300 | EObject current = null; | 3257 | EObject current = null; |
2301 | 3258 | ||
2302 | EObject iv_ruleRealSymbol = null; | 3259 | EObject iv_ruleMultiplicativeExpression = null; |
2303 | 3260 | ||
2304 | 3261 | ||
2305 | try { | 3262 | try { |
2306 | // InternalSolverLanguage.g:786:51: (iv_ruleRealSymbol= ruleRealSymbol EOF ) | 3263 | // InternalSolverLanguageParser.g:1296:65: (iv_ruleMultiplicativeExpression= ruleMultiplicativeExpression EOF ) |
2307 | // InternalSolverLanguage.g:787:2: iv_ruleRealSymbol= ruleRealSymbol EOF | 3264 | // InternalSolverLanguageParser.g:1297:2: iv_ruleMultiplicativeExpression= ruleMultiplicativeExpression EOF |
2308 | { | 3265 | { |
2309 | newCompositeNode(grammarAccess.getRealSymbolRule()); | 3266 | newCompositeNode(grammarAccess.getMultiplicativeExpressionRule()); |
2310 | pushFollow(FOLLOW_1); | 3267 | pushFollow(FOLLOW_1); |
2311 | iv_ruleRealSymbol=ruleRealSymbol(); | 3268 | iv_ruleMultiplicativeExpression=ruleMultiplicativeExpression(); |
2312 | 3269 | ||
2313 | state._fsp--; | 3270 | state._fsp--; |
2314 | 3271 | ||
2315 | current =iv_ruleRealSymbol; | 3272 | current =iv_ruleMultiplicativeExpression; |
2316 | match(input,EOF,FOLLOW_2); | 3273 | match(input,EOF,FOLLOW_2); |
2317 | 3274 | ||
2318 | } | 3275 | } |
@@ -2327,40 +3284,139 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2327 | } | 3284 | } |
2328 | return current; | 3285 | return current; |
2329 | } | 3286 | } |
2330 | // $ANTLR end "entryRuleRealSymbol" | 3287 | // $ANTLR end "entryRuleMultiplicativeExpression" |
2331 | 3288 | ||
2332 | 3289 | ||
2333 | // $ANTLR start "ruleRealSymbol" | 3290 | // $ANTLR start "ruleMultiplicativeExpression" |
2334 | // InternalSolverLanguage.g:793:1: ruleRealSymbol returns [EObject current=null] : (otherlv_0= 'real' () ) ; | 3291 | // InternalSolverLanguageParser.g:1303:1: ruleMultiplicativeExpression returns [EObject current=null] : (this_ExponentialExpression_0= ruleExponentialExpression ( () ( (lv_op_2_0= ruleMultiplicativeBinaryOperator ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )* ) ; |
2335 | public final EObject ruleRealSymbol() throws RecognitionException { | 3292 | public final EObject ruleMultiplicativeExpression() throws RecognitionException { |
2336 | EObject current = null; | 3293 | EObject current = null; |
2337 | 3294 | ||
2338 | Token otherlv_0=null; | 3295 | EObject this_ExponentialExpression_0 = null; |
3296 | |||
3297 | Enumerator lv_op_2_0 = null; | ||
3298 | |||
3299 | EObject lv_right_3_0 = null; | ||
3300 | |||
2339 | 3301 | ||
2340 | 3302 | ||
2341 | enterRule(); | 3303 | enterRule(); |
2342 | 3304 | ||
2343 | try { | 3305 | try { |
2344 | // InternalSolverLanguage.g:799:2: ( (otherlv_0= 'real' () ) ) | 3306 | // InternalSolverLanguageParser.g:1309:2: ( (this_ExponentialExpression_0= ruleExponentialExpression ( () ( (lv_op_2_0= ruleMultiplicativeBinaryOperator ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )* ) ) |
2345 | // InternalSolverLanguage.g:800:2: (otherlv_0= 'real' () ) | 3307 | // InternalSolverLanguageParser.g:1310:2: (this_ExponentialExpression_0= ruleExponentialExpression ( () ( (lv_op_2_0= ruleMultiplicativeBinaryOperator ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )* ) |
2346 | { | 3308 | { |
2347 | // InternalSolverLanguage.g:800:2: (otherlv_0= 'real' () ) | 3309 | // InternalSolverLanguageParser.g:1310:2: (this_ExponentialExpression_0= ruleExponentialExpression ( () ( (lv_op_2_0= ruleMultiplicativeBinaryOperator ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )* ) |
2348 | // InternalSolverLanguage.g:801:3: otherlv_0= 'real' () | 3310 | // InternalSolverLanguageParser.g:1311:3: this_ExponentialExpression_0= ruleExponentialExpression ( () ( (lv_op_2_0= ruleMultiplicativeBinaryOperator ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )* |
2349 | { | 3311 | { |
2350 | otherlv_0=(Token)match(input,25,FOLLOW_2); | ||
2351 | 3312 | ||
2352 | newLeafNode(otherlv_0, grammarAccess.getRealSymbolAccess().getRealKeyword_0()); | 3313 | newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getExponentialExpressionParserRuleCall_0()); |
2353 | 3314 | ||
2354 | // InternalSolverLanguage.g:805:3: () | 3315 | pushFollow(FOLLOW_23); |
2355 | // InternalSolverLanguage.g:806:4: | 3316 | this_ExponentialExpression_0=ruleExponentialExpression(); |
2356 | { | ||
2357 | 3317 | ||
2358 | current = forceCreateModelElement( | 3318 | state._fsp--; |
2359 | grammarAccess.getRealSymbolAccess().getRealSymbolAction_1(), | ||
2360 | current); | ||
2361 | |||
2362 | 3319 | ||
2363 | } | 3320 | |
3321 | current = this_ExponentialExpression_0; | ||
3322 | afterParserOrEnumRuleCall(); | ||
3323 | |||
3324 | // InternalSolverLanguageParser.g:1319:3: ( () ( (lv_op_2_0= ruleMultiplicativeBinaryOperator ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )* | ||
3325 | loop16: | ||
3326 | do { | ||
3327 | int alt16=2; | ||
3328 | int LA16_0 = input.LA(1); | ||
3329 | |||
3330 | if ( (LA16_0==Asterisk||LA16_0==Solidus) ) { | ||
3331 | alt16=1; | ||
3332 | } | ||
3333 | |||
3334 | |||
3335 | switch (alt16) { | ||
3336 | case 1 : | ||
3337 | // InternalSolverLanguageParser.g:1320:4: () ( (lv_op_2_0= ruleMultiplicativeBinaryOperator ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) | ||
3338 | { | ||
3339 | // InternalSolverLanguageParser.g:1320:4: () | ||
3340 | // InternalSolverLanguageParser.g:1321:5: | ||
3341 | { | ||
3342 | |||
3343 | current = forceCreateModelElementAndSet( | ||
3344 | grammarAccess.getMultiplicativeExpressionAccess().getBinaryExpressionLeftAction_1_0(), | ||
3345 | current); | ||
3346 | |||
3347 | |||
3348 | } | ||
3349 | |||
3350 | // InternalSolverLanguageParser.g:1327:4: ( (lv_op_2_0= ruleMultiplicativeBinaryOperator ) ) | ||
3351 | // InternalSolverLanguageParser.g:1328:5: (lv_op_2_0= ruleMultiplicativeBinaryOperator ) | ||
3352 | { | ||
3353 | // InternalSolverLanguageParser.g:1328:5: (lv_op_2_0= ruleMultiplicativeBinaryOperator ) | ||
3354 | // InternalSolverLanguageParser.g:1329:6: lv_op_2_0= ruleMultiplicativeBinaryOperator | ||
3355 | { | ||
3356 | |||
3357 | newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getOpMultiplicativeBinaryOperatorEnumRuleCall_1_1_0()); | ||
3358 | |||
3359 | pushFollow(FOLLOW_6); | ||
3360 | lv_op_2_0=ruleMultiplicativeBinaryOperator(); | ||
3361 | |||
3362 | state._fsp--; | ||
3363 | |||
3364 | |||
3365 | if (current==null) { | ||
3366 | current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule()); | ||
3367 | } | ||
3368 | set( | ||
3369 | current, | ||
3370 | "op", | ||
3371 | lv_op_2_0, | ||
3372 | "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicativeBinaryOperator"); | ||
3373 | afterParserOrEnumRuleCall(); | ||
3374 | |||
3375 | |||
3376 | } | ||
3377 | |||
3378 | |||
3379 | } | ||
3380 | |||
3381 | // InternalSolverLanguageParser.g:1346:4: ( (lv_right_3_0= ruleExponentialExpression ) ) | ||
3382 | // InternalSolverLanguageParser.g:1347:5: (lv_right_3_0= ruleExponentialExpression ) | ||
3383 | { | ||
3384 | // InternalSolverLanguageParser.g:1347:5: (lv_right_3_0= ruleExponentialExpression ) | ||
3385 | // InternalSolverLanguageParser.g:1348:6: lv_right_3_0= ruleExponentialExpression | ||
3386 | { | ||
3387 | |||
3388 | newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getRightExponentialExpressionParserRuleCall_1_2_0()); | ||
3389 | |||
3390 | pushFollow(FOLLOW_23); | ||
3391 | lv_right_3_0=ruleExponentialExpression(); | ||
3392 | |||
3393 | state._fsp--; | ||
3394 | |||
3395 | |||
3396 | if (current==null) { | ||
3397 | current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule()); | ||
3398 | } | ||
3399 | set( | ||
3400 | current, | ||
3401 | "right", | ||
3402 | lv_right_3_0, | ||
3403 | "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialExpression"); | ||
3404 | afterParserOrEnumRuleCall(); | ||
3405 | |||
3406 | |||
3407 | } | ||
3408 | |||
3409 | |||
3410 | } | ||
3411 | |||
3412 | |||
3413 | } | ||
3414 | break; | ||
3415 | |||
3416 | default : | ||
3417 | break loop16; | ||
3418 | } | ||
3419 | } while (true); | ||
2364 | 3420 | ||
2365 | 3421 | ||
2366 | } | 3422 | } |
@@ -2381,28 +3437,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2381 | } | 3437 | } |
2382 | return current; | 3438 | return current; |
2383 | } | 3439 | } |
2384 | // $ANTLR end "ruleRealSymbol" | 3440 | // $ANTLR end "ruleMultiplicativeExpression" |
2385 | 3441 | ||
2386 | 3442 | ||
2387 | // $ANTLR start "entryRuleStringSymbol" | 3443 | // $ANTLR start "entryRuleExponentialExpression" |
2388 | // InternalSolverLanguage.g:816:1: entryRuleStringSymbol returns [EObject current=null] : iv_ruleStringSymbol= ruleStringSymbol EOF ; | 3444 | // InternalSolverLanguageParser.g:1370:1: entryRuleExponentialExpression returns [EObject current=null] : iv_ruleExponentialExpression= ruleExponentialExpression EOF ; |
2389 | public final EObject entryRuleStringSymbol() throws RecognitionException { | 3445 | public final EObject entryRuleExponentialExpression() throws RecognitionException { |
2390 | EObject current = null; | 3446 | EObject current = null; |
2391 | 3447 | ||
2392 | EObject iv_ruleStringSymbol = null; | 3448 | EObject iv_ruleExponentialExpression = null; |
2393 | 3449 | ||
2394 | 3450 | ||
2395 | try { | 3451 | try { |
2396 | // InternalSolverLanguage.g:816:53: (iv_ruleStringSymbol= ruleStringSymbol EOF ) | 3452 | // InternalSolverLanguageParser.g:1370:62: (iv_ruleExponentialExpression= ruleExponentialExpression EOF ) |
2397 | // InternalSolverLanguage.g:817:2: iv_ruleStringSymbol= ruleStringSymbol EOF | 3453 | // InternalSolverLanguageParser.g:1371:2: iv_ruleExponentialExpression= ruleExponentialExpression EOF |
2398 | { | 3454 | { |
2399 | newCompositeNode(grammarAccess.getStringSymbolRule()); | 3455 | newCompositeNode(grammarAccess.getExponentialExpressionRule()); |
2400 | pushFollow(FOLLOW_1); | 3456 | pushFollow(FOLLOW_1); |
2401 | iv_ruleStringSymbol=ruleStringSymbol(); | 3457 | iv_ruleExponentialExpression=ruleExponentialExpression(); |
2402 | 3458 | ||
2403 | state._fsp--; | 3459 | state._fsp--; |
2404 | 3460 | ||
2405 | current =iv_ruleStringSymbol; | 3461 | current =iv_ruleExponentialExpression; |
2406 | match(input,EOF,FOLLOW_2); | 3462 | match(input,EOF,FOLLOW_2); |
2407 | 3463 | ||
2408 | } | 3464 | } |
@@ -2417,38 +3473,130 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2417 | } | 3473 | } |
2418 | return current; | 3474 | return current; |
2419 | } | 3475 | } |
2420 | // $ANTLR end "entryRuleStringSymbol" | 3476 | // $ANTLR end "entryRuleExponentialExpression" |
2421 | 3477 | ||
2422 | 3478 | ||
2423 | // $ANTLR start "ruleStringSymbol" | 3479 | // $ANTLR start "ruleExponentialExpression" |
2424 | // InternalSolverLanguage.g:823:1: ruleStringSymbol returns [EObject current=null] : (otherlv_0= 'string' () ) ; | 3480 | // InternalSolverLanguageParser.g:1377:1: ruleExponentialExpression returns [EObject current=null] : (this_UnaryExpression_0= ruleUnaryExpression ( () ( (lv_op_2_0= ruleExponentialOp ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )? ) ; |
2425 | public final EObject ruleStringSymbol() throws RecognitionException { | 3481 | public final EObject ruleExponentialExpression() throws RecognitionException { |
2426 | EObject current = null; | 3482 | EObject current = null; |
2427 | 3483 | ||
2428 | Token otherlv_0=null; | 3484 | EObject this_UnaryExpression_0 = null; |
3485 | |||
3486 | Enumerator lv_op_2_0 = null; | ||
3487 | |||
3488 | EObject lv_right_3_0 = null; | ||
3489 | |||
2429 | 3490 | ||
2430 | 3491 | ||
2431 | enterRule(); | 3492 | enterRule(); |
2432 | 3493 | ||
2433 | try { | 3494 | try { |
2434 | // InternalSolverLanguage.g:829:2: ( (otherlv_0= 'string' () ) ) | 3495 | // InternalSolverLanguageParser.g:1383:2: ( (this_UnaryExpression_0= ruleUnaryExpression ( () ( (lv_op_2_0= ruleExponentialOp ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )? ) ) |
2435 | // InternalSolverLanguage.g:830:2: (otherlv_0= 'string' () ) | 3496 | // InternalSolverLanguageParser.g:1384:2: (this_UnaryExpression_0= ruleUnaryExpression ( () ( (lv_op_2_0= ruleExponentialOp ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )? ) |
2436 | { | 3497 | { |
2437 | // InternalSolverLanguage.g:830:2: (otherlv_0= 'string' () ) | 3498 | // InternalSolverLanguageParser.g:1384:2: (this_UnaryExpression_0= ruleUnaryExpression ( () ( (lv_op_2_0= ruleExponentialOp ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )? ) |
2438 | // InternalSolverLanguage.g:831:3: otherlv_0= 'string' () | 3499 | // InternalSolverLanguageParser.g:1385:3: this_UnaryExpression_0= ruleUnaryExpression ( () ( (lv_op_2_0= ruleExponentialOp ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )? |
2439 | { | 3500 | { |
2440 | otherlv_0=(Token)match(input,26,FOLLOW_2); | ||
2441 | 3501 | ||
2442 | newLeafNode(otherlv_0, grammarAccess.getStringSymbolAccess().getStringKeyword_0()); | 3502 | newCompositeNode(grammarAccess.getExponentialExpressionAccess().getUnaryExpressionParserRuleCall_0()); |
2443 | 3503 | ||
2444 | // InternalSolverLanguage.g:835:3: () | 3504 | pushFollow(FOLLOW_24); |
2445 | // InternalSolverLanguage.g:836:4: | 3505 | this_UnaryExpression_0=ruleUnaryExpression(); |
2446 | { | ||
2447 | 3506 | ||
2448 | current = forceCreateModelElement( | 3507 | state._fsp--; |
2449 | grammarAccess.getStringSymbolAccess().getStringSymbolAction_1(), | 3508 | |
2450 | current); | 3509 | |
2451 | 3510 | current = this_UnaryExpression_0; | |
3511 | afterParserOrEnumRuleCall(); | ||
3512 | |||
3513 | // InternalSolverLanguageParser.g:1393:3: ( () ( (lv_op_2_0= ruleExponentialOp ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) )? | ||
3514 | int alt17=2; | ||
3515 | int LA17_0 = input.LA(1); | ||
3516 | |||
3517 | if ( (LA17_0==CircumflexAccent) ) { | ||
3518 | alt17=1; | ||
3519 | } | ||
3520 | switch (alt17) { | ||
3521 | case 1 : | ||
3522 | // InternalSolverLanguageParser.g:1394:4: () ( (lv_op_2_0= ruleExponentialOp ) ) ( (lv_right_3_0= ruleExponentialExpression ) ) | ||
3523 | { | ||
3524 | // InternalSolverLanguageParser.g:1394:4: () | ||
3525 | // InternalSolverLanguageParser.g:1395:5: | ||
3526 | { | ||
3527 | |||
3528 | current = forceCreateModelElementAndSet( | ||
3529 | grammarAccess.getExponentialExpressionAccess().getBinaryExpressionLeftAction_1_0(), | ||
3530 | current); | ||
3531 | |||
3532 | |||
3533 | } | ||
3534 | |||
3535 | // InternalSolverLanguageParser.g:1401:4: ( (lv_op_2_0= ruleExponentialOp ) ) | ||
3536 | // InternalSolverLanguageParser.g:1402:5: (lv_op_2_0= ruleExponentialOp ) | ||
3537 | { | ||
3538 | // InternalSolverLanguageParser.g:1402:5: (lv_op_2_0= ruleExponentialOp ) | ||
3539 | // InternalSolverLanguageParser.g:1403:6: lv_op_2_0= ruleExponentialOp | ||
3540 | { | ||
3541 | |||
3542 | newCompositeNode(grammarAccess.getExponentialExpressionAccess().getOpExponentialOpEnumRuleCall_1_1_0()); | ||
3543 | |||
3544 | pushFollow(FOLLOW_6); | ||
3545 | lv_op_2_0=ruleExponentialOp(); | ||
3546 | |||
3547 | state._fsp--; | ||
3548 | |||
3549 | |||
3550 | if (current==null) { | ||
3551 | current = createModelElementForParent(grammarAccess.getExponentialExpressionRule()); | ||
3552 | } | ||
3553 | set( | ||
3554 | current, | ||
3555 | "op", | ||
3556 | lv_op_2_0, | ||
3557 | "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialOp"); | ||
3558 | afterParserOrEnumRuleCall(); | ||
3559 | |||
3560 | |||
3561 | } | ||
3562 | |||
3563 | |||
3564 | } | ||
3565 | |||
3566 | // InternalSolverLanguageParser.g:1420:4: ( (lv_right_3_0= ruleExponentialExpression ) ) | ||
3567 | // InternalSolverLanguageParser.g:1421:5: (lv_right_3_0= ruleExponentialExpression ) | ||
3568 | { | ||
3569 | // InternalSolverLanguageParser.g:1421:5: (lv_right_3_0= ruleExponentialExpression ) | ||
3570 | // InternalSolverLanguageParser.g:1422:6: lv_right_3_0= ruleExponentialExpression | ||
3571 | { | ||
3572 | |||
3573 | newCompositeNode(grammarAccess.getExponentialExpressionAccess().getRightExponentialExpressionParserRuleCall_1_2_0()); | ||
3574 | |||
3575 | pushFollow(FOLLOW_2); | ||
3576 | lv_right_3_0=ruleExponentialExpression(); | ||
3577 | |||
3578 | state._fsp--; | ||
3579 | |||
3580 | |||
3581 | if (current==null) { | ||
3582 | current = createModelElementForParent(grammarAccess.getExponentialExpressionRule()); | ||
3583 | } | ||
3584 | set( | ||
3585 | current, | ||
3586 | "right", | ||
3587 | lv_right_3_0, | ||
3588 | "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialExpression"); | ||
3589 | afterParserOrEnumRuleCall(); | ||
3590 | |||
3591 | |||
3592 | } | ||
3593 | |||
3594 | |||
3595 | } | ||
3596 | |||
3597 | |||
3598 | } | ||
3599 | break; | ||
2452 | 3600 | ||
2453 | } | 3601 | } |
2454 | 3602 | ||
@@ -2471,28 +3619,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2471 | } | 3619 | } |
2472 | return current; | 3620 | return current; |
2473 | } | 3621 | } |
2474 | // $ANTLR end "ruleStringSymbol" | 3622 | // $ANTLR end "ruleExponentialExpression" |
2475 | 3623 | ||
2476 | 3624 | ||
2477 | // $ANTLR start "entryRuleComplexObject" | 3625 | // $ANTLR start "entryRuleUnaryExpression" |
2478 | // InternalSolverLanguage.g:846:1: entryRuleComplexObject returns [EObject current=null] : iv_ruleComplexObject= ruleComplexObject EOF ; | 3626 | // InternalSolverLanguageParser.g:1444:1: entryRuleUnaryExpression returns [EObject current=null] : iv_ruleUnaryExpression= ruleUnaryExpression EOF ; |
2479 | public final EObject entryRuleComplexObject() throws RecognitionException { | 3627 | public final EObject entryRuleUnaryExpression() throws RecognitionException { |
2480 | EObject current = null; | 3628 | EObject current = null; |
2481 | 3629 | ||
2482 | EObject iv_ruleComplexObject = null; | 3630 | EObject iv_ruleUnaryExpression = null; |
2483 | 3631 | ||
2484 | 3632 | ||
2485 | try { | 3633 | try { |
2486 | // InternalSolverLanguage.g:846:54: (iv_ruleComplexObject= ruleComplexObject EOF ) | 3634 | // InternalSolverLanguageParser.g:1444:56: (iv_ruleUnaryExpression= ruleUnaryExpression EOF ) |
2487 | // InternalSolverLanguage.g:847:2: iv_ruleComplexObject= ruleComplexObject EOF | 3635 | // InternalSolverLanguageParser.g:1445:2: iv_ruleUnaryExpression= ruleUnaryExpression EOF |
2488 | { | 3636 | { |
2489 | newCompositeNode(grammarAccess.getComplexObjectRule()); | 3637 | newCompositeNode(grammarAccess.getUnaryExpressionRule()); |
2490 | pushFollow(FOLLOW_1); | 3638 | pushFollow(FOLLOW_1); |
2491 | iv_ruleComplexObject=ruleComplexObject(); | 3639 | iv_ruleUnaryExpression=ruleUnaryExpression(); |
2492 | 3640 | ||
2493 | state._fsp--; | 3641 | state._fsp--; |
2494 | 3642 | ||
2495 | current =iv_ruleComplexObject; | 3643 | current =iv_ruleUnaryExpression; |
2496 | match(input,EOF,FOLLOW_2); | 3644 | match(input,EOF,FOLLOW_2); |
2497 | 3645 | ||
2498 | } | 3646 | } |
@@ -2507,111 +3655,145 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2507 | } | 3655 | } |
2508 | return current; | 3656 | return current; |
2509 | } | 3657 | } |
2510 | // $ANTLR end "entryRuleComplexObject" | 3658 | // $ANTLR end "entryRuleUnaryExpression" |
2511 | 3659 | ||
2512 | 3660 | ||
2513 | // $ANTLR start "ruleComplexObject" | 3661 | // $ANTLR start "ruleUnaryExpression" |
2514 | // InternalSolverLanguage.g:853:1: ruleComplexObject returns [EObject current=null] : (this_Object_0= ruleObject | this_AllInstances_1= ruleAllInstances | this_AllObjects_2= ruleAllObjects ) ; | 3662 | // InternalSolverLanguageParser.g:1451:1: ruleUnaryExpression returns [EObject current=null] : (this_AggregationExpression_0= ruleAggregationExpression | ( () ( (lv_op_2_0= ruleUnaryOp ) ) ( (lv_body_3_0= ruleAggregationExpression ) ) ) ) ; |
2515 | public final EObject ruleComplexObject() throws RecognitionException { | 3663 | public final EObject ruleUnaryExpression() throws RecognitionException { |
2516 | EObject current = null; | 3664 | EObject current = null; |
2517 | 3665 | ||
2518 | EObject this_Object_0 = null; | 3666 | EObject this_AggregationExpression_0 = null; |
2519 | 3667 | ||
2520 | EObject this_AllInstances_1 = null; | 3668 | Enumerator lv_op_2_0 = null; |
2521 | 3669 | ||
2522 | EObject this_AllObjects_2 = null; | 3670 | EObject lv_body_3_0 = null; |
2523 | 3671 | ||
2524 | 3672 | ||
2525 | 3673 | ||
2526 | enterRule(); | 3674 | enterRule(); |
2527 | 3675 | ||
2528 | try { | 3676 | try { |
2529 | // InternalSolverLanguage.g:859:2: ( (this_Object_0= ruleObject | this_AllInstances_1= ruleAllInstances | this_AllObjects_2= ruleAllObjects ) ) | 3677 | // InternalSolverLanguageParser.g:1457:2: ( (this_AggregationExpression_0= ruleAggregationExpression | ( () ( (lv_op_2_0= ruleUnaryOp ) ) ( (lv_body_3_0= ruleAggregationExpression ) ) ) ) ) |
2530 | // InternalSolverLanguage.g:860:2: (this_Object_0= ruleObject | this_AllInstances_1= ruleAllInstances | this_AllObjects_2= ruleAllObjects ) | 3678 | // InternalSolverLanguageParser.g:1458:2: (this_AggregationExpression_0= ruleAggregationExpression | ( () ( (lv_op_2_0= ruleUnaryOp ) ) ( (lv_body_3_0= ruleAggregationExpression ) ) ) ) |
2531 | { | 3679 | { |
2532 | // InternalSolverLanguage.g:860:2: (this_Object_0= ruleObject | this_AllInstances_1= ruleAllInstances | this_AllObjects_2= ruleAllObjects ) | 3680 | // InternalSolverLanguageParser.g:1458:2: (this_AggregationExpression_0= ruleAggregationExpression | ( () ( (lv_op_2_0= ruleUnaryOp ) ) ( (lv_body_3_0= ruleAggregationExpression ) ) ) ) |
2533 | int alt14=3; | 3681 | int alt18=2; |
2534 | switch ( input.LA(1) ) { | 3682 | int LA18_0 = input.LA(1); |
2535 | case RULE_INT: | 3683 | |
2536 | case RULE_ID: | 3684 | if ( (LA18_0==Unknown||(LA18_0>=Count && LA18_0<=False)||(LA18_0>=Only && LA18_0<=Prod)||LA18_0==True||(LA18_0>=Avg && LA18_0<=Inf)||LA18_0==Max||(LA18_0>=Min && LA18_0<=Sum)||LA18_0==LeftParenthesis||LA18_0==LeftSquareBracket||(LA18_0>=RULE_STRING && LA18_0<=RULE_QUOTED_ID)||(LA18_0>=RULE_ID && LA18_0<=RULE_INT)) ) { |
2537 | case RULE_STRING: | 3685 | alt18=1; |
2538 | case 11: | 3686 | } |
2539 | case 13: | 3687 | else if ( (LA18_0==Current||LA18_0==Must||LA18_0==May||LA18_0==ExclamationMark||LA18_0==PlusSign||LA18_0==HyphenMinus) ) { |
2540 | case 14: | 3688 | alt18=2; |
2541 | case 27: | 3689 | } |
2542 | { | 3690 | else { |
2543 | alt14=1; | ||
2544 | } | ||
2545 | break; | ||
2546 | case 20: | ||
2547 | { | ||
2548 | alt14=2; | ||
2549 | } | ||
2550 | break; | ||
2551 | case 31: | ||
2552 | { | ||
2553 | alt14=3; | ||
2554 | } | ||
2555 | break; | ||
2556 | default: | ||
2557 | NoViableAltException nvae = | 3691 | NoViableAltException nvae = |
2558 | new NoViableAltException("", 14, 0, input); | 3692 | new NoViableAltException("", 18, 0, input); |
2559 | 3693 | ||
2560 | throw nvae; | 3694 | throw nvae; |
2561 | } | 3695 | } |
2562 | 3696 | switch (alt18) { | |
2563 | switch (alt14) { | ||
2564 | case 1 : | 3697 | case 1 : |
2565 | // InternalSolverLanguage.g:861:3: this_Object_0= ruleObject | 3698 | // InternalSolverLanguageParser.g:1459:3: this_AggregationExpression_0= ruleAggregationExpression |
2566 | { | 3699 | { |
2567 | 3700 | ||
2568 | newCompositeNode(grammarAccess.getComplexObjectAccess().getObjectParserRuleCall_0()); | 3701 | newCompositeNode(grammarAccess.getUnaryExpressionAccess().getAggregationExpressionParserRuleCall_0()); |
2569 | 3702 | ||
2570 | pushFollow(FOLLOW_2); | 3703 | pushFollow(FOLLOW_2); |
2571 | this_Object_0=ruleObject(); | 3704 | this_AggregationExpression_0=ruleAggregationExpression(); |
2572 | 3705 | ||
2573 | state._fsp--; | 3706 | state._fsp--; |
2574 | 3707 | ||
2575 | 3708 | ||
2576 | current = this_Object_0; | 3709 | current = this_AggregationExpression_0; |
2577 | afterParserOrEnumRuleCall(); | 3710 | afterParserOrEnumRuleCall(); |
2578 | 3711 | ||
2579 | 3712 | ||
2580 | } | 3713 | } |
2581 | break; | 3714 | break; |
2582 | case 2 : | 3715 | case 2 : |
2583 | // InternalSolverLanguage.g:870:3: this_AllInstances_1= ruleAllInstances | 3716 | // InternalSolverLanguageParser.g:1468:3: ( () ( (lv_op_2_0= ruleUnaryOp ) ) ( (lv_body_3_0= ruleAggregationExpression ) ) ) |
3717 | { | ||
3718 | // InternalSolverLanguageParser.g:1468:3: ( () ( (lv_op_2_0= ruleUnaryOp ) ) ( (lv_body_3_0= ruleAggregationExpression ) ) ) | ||
3719 | // InternalSolverLanguageParser.g:1469:4: () ( (lv_op_2_0= ruleUnaryOp ) ) ( (lv_body_3_0= ruleAggregationExpression ) ) | ||
3720 | { | ||
3721 | // InternalSolverLanguageParser.g:1469:4: () | ||
3722 | // InternalSolverLanguageParser.g:1470:5: | ||
2584 | { | 3723 | { |
2585 | 3724 | ||
2586 | newCompositeNode(grammarAccess.getComplexObjectAccess().getAllInstancesParserRuleCall_1()); | 3725 | current = forceCreateModelElement( |
2587 | 3726 | grammarAccess.getUnaryExpressionAccess().getUnaryExpressionAction_1_0(), | |
2588 | pushFollow(FOLLOW_2); | 3727 | current); |
2589 | this_AllInstances_1=ruleAllInstances(); | 3728 | |
3729 | |||
3730 | } | ||
3731 | |||
3732 | // InternalSolverLanguageParser.g:1476:4: ( (lv_op_2_0= ruleUnaryOp ) ) | ||
3733 | // InternalSolverLanguageParser.g:1477:5: (lv_op_2_0= ruleUnaryOp ) | ||
3734 | { | ||
3735 | // InternalSolverLanguageParser.g:1477:5: (lv_op_2_0= ruleUnaryOp ) | ||
3736 | // InternalSolverLanguageParser.g:1478:6: lv_op_2_0= ruleUnaryOp | ||
3737 | { | ||
3738 | |||
3739 | newCompositeNode(grammarAccess.getUnaryExpressionAccess().getOpUnaryOpEnumRuleCall_1_1_0()); | ||
3740 | |||
3741 | pushFollow(FOLLOW_25); | ||
3742 | lv_op_2_0=ruleUnaryOp(); | ||
2590 | 3743 | ||
2591 | state._fsp--; | 3744 | state._fsp--; |
2592 | 3745 | ||
2593 | 3746 | ||
2594 | current = this_AllInstances_1; | 3747 | if (current==null) { |
2595 | afterParserOrEnumRuleCall(); | 3748 | current = createModelElementForParent(grammarAccess.getUnaryExpressionRule()); |
2596 | 3749 | } | |
3750 | set( | ||
3751 | current, | ||
3752 | "op", | ||
3753 | lv_op_2_0, | ||
3754 | "org.eclipse.viatra.solver.language.SolverLanguage.UnaryOp"); | ||
3755 | afterParserOrEnumRuleCall(); | ||
3756 | |||
2597 | 3757 | ||
2598 | } | 3758 | } |
2599 | break; | 3759 | |
2600 | case 3 : | 3760 | |
2601 | // InternalSolverLanguage.g:879:3: this_AllObjects_2= ruleAllObjects | 3761 | } |
3762 | |||
3763 | // InternalSolverLanguageParser.g:1495:4: ( (lv_body_3_0= ruleAggregationExpression ) ) | ||
3764 | // InternalSolverLanguageParser.g:1496:5: (lv_body_3_0= ruleAggregationExpression ) | ||
3765 | { | ||
3766 | // InternalSolverLanguageParser.g:1496:5: (lv_body_3_0= ruleAggregationExpression ) | ||
3767 | // InternalSolverLanguageParser.g:1497:6: lv_body_3_0= ruleAggregationExpression | ||
2602 | { | 3768 | { |
2603 | 3769 | ||
2604 | newCompositeNode(grammarAccess.getComplexObjectAccess().getAllObjectsParserRuleCall_2()); | 3770 | newCompositeNode(grammarAccess.getUnaryExpressionAccess().getBodyAggregationExpressionParserRuleCall_1_2_0()); |
2605 | 3771 | ||
2606 | pushFollow(FOLLOW_2); | 3772 | pushFollow(FOLLOW_2); |
2607 | this_AllObjects_2=ruleAllObjects(); | 3773 | lv_body_3_0=ruleAggregationExpression(); |
2608 | 3774 | ||
2609 | state._fsp--; | 3775 | state._fsp--; |
2610 | 3776 | ||
2611 | 3777 | ||
2612 | current = this_AllObjects_2; | 3778 | if (current==null) { |
2613 | afterParserOrEnumRuleCall(); | 3779 | current = createModelElementForParent(grammarAccess.getUnaryExpressionRule()); |
2614 | 3780 | } | |
3781 | set( | ||
3782 | current, | ||
3783 | "body", | ||
3784 | lv_body_3_0, | ||
3785 | "org.eclipse.viatra.solver.language.SolverLanguage.AggregationExpression"); | ||
3786 | afterParserOrEnumRuleCall(); | ||
3787 | |||
3788 | |||
3789 | } | ||
3790 | |||
3791 | |||
3792 | } | ||
3793 | |||
3794 | |||
3795 | } | ||
3796 | |||
2615 | 3797 | ||
2616 | } | 3798 | } |
2617 | break; | 3799 | break; |
@@ -2634,28 +3816,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2634 | } | 3816 | } |
2635 | return current; | 3817 | return current; |
2636 | } | 3818 | } |
2637 | // $ANTLR end "ruleComplexObject" | 3819 | // $ANTLR end "ruleUnaryExpression" |
2638 | 3820 | ||
2639 | 3821 | ||
2640 | // $ANTLR start "entryRuleObject" | 3822 | // $ANTLR start "entryRuleAggregationExpression" |
2641 | // InternalSolverLanguage.g:891:1: entryRuleObject returns [EObject current=null] : iv_ruleObject= ruleObject EOF ; | 3823 | // InternalSolverLanguageParser.g:1519:1: entryRuleAggregationExpression returns [EObject current=null] : iv_ruleAggregationExpression= ruleAggregationExpression EOF ; |
2642 | public final EObject entryRuleObject() throws RecognitionException { | 3824 | public final EObject entryRuleAggregationExpression() throws RecognitionException { |
2643 | EObject current = null; | 3825 | EObject current = null; |
2644 | 3826 | ||
2645 | EObject iv_ruleObject = null; | 3827 | EObject iv_ruleAggregationExpression = null; |
2646 | 3828 | ||
2647 | 3829 | ||
2648 | try { | 3830 | try { |
2649 | // InternalSolverLanguage.g:891:47: (iv_ruleObject= ruleObject EOF ) | 3831 | // InternalSolverLanguageParser.g:1519:62: (iv_ruleAggregationExpression= ruleAggregationExpression EOF ) |
2650 | // InternalSolverLanguage.g:892:2: iv_ruleObject= ruleObject EOF | 3832 | // InternalSolverLanguageParser.g:1520:2: iv_ruleAggregationExpression= ruleAggregationExpression EOF |
2651 | { | 3833 | { |
2652 | newCompositeNode(grammarAccess.getObjectRule()); | 3834 | newCompositeNode(grammarAccess.getAggregationExpressionRule()); |
2653 | pushFollow(FOLLOW_1); | 3835 | pushFollow(FOLLOW_1); |
2654 | iv_ruleObject=ruleObject(); | 3836 | iv_ruleAggregationExpression=ruleAggregationExpression(); |
2655 | 3837 | ||
2656 | state._fsp--; | 3838 | state._fsp--; |
2657 | 3839 | ||
2658 | current =iv_ruleObject; | 3840 | current =iv_ruleAggregationExpression; |
2659 | match(input,EOF,FOLLOW_2); | 3841 | match(input,EOF,FOLLOW_2); |
2660 | 3842 | ||
2661 | } | 3843 | } |
@@ -2670,107 +3852,119 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2670 | } | 3852 | } |
2671 | return current; | 3853 | return current; |
2672 | } | 3854 | } |
2673 | // $ANTLR end "entryRuleObject" | 3855 | // $ANTLR end "entryRuleAggregationExpression" |
2674 | 3856 | ||
2675 | 3857 | ||
2676 | // $ANTLR start "ruleObject" | 3858 | // $ANTLR start "ruleAggregationExpression" |
2677 | // InternalSolverLanguage.g:898:1: ruleObject returns [EObject current=null] : (this_NamedObject_0= ruleNamedObject | this_UnnamedObject_1= ruleUnnamedObject | this_DataObject_2= ruleDataObject ) ; | 3859 | // InternalSolverLanguageParser.g:1526:1: ruleAggregationExpression returns [EObject current=null] : (this_AtomicExpression_0= ruleAtomicExpression | this_Count_1= ruleCount | this_Aggregation_2= ruleAggregation ) ; |
2678 | public final EObject ruleObject() throws RecognitionException { | 3860 | public final EObject ruleAggregationExpression() throws RecognitionException { |
2679 | EObject current = null; | 3861 | EObject current = null; |
2680 | 3862 | ||
2681 | EObject this_NamedObject_0 = null; | 3863 | EObject this_AtomicExpression_0 = null; |
2682 | 3864 | ||
2683 | EObject this_UnnamedObject_1 = null; | 3865 | EObject this_Count_1 = null; |
2684 | 3866 | ||
2685 | EObject this_DataObject_2 = null; | 3867 | EObject this_Aggregation_2 = null; |
2686 | 3868 | ||
2687 | 3869 | ||
2688 | 3870 | ||
2689 | enterRule(); | 3871 | enterRule(); |
2690 | 3872 | ||
2691 | try { | 3873 | try { |
2692 | // InternalSolverLanguage.g:904:2: ( (this_NamedObject_0= ruleNamedObject | this_UnnamedObject_1= ruleUnnamedObject | this_DataObject_2= ruleDataObject ) ) | 3874 | // InternalSolverLanguageParser.g:1532:2: ( (this_AtomicExpression_0= ruleAtomicExpression | this_Count_1= ruleCount | this_Aggregation_2= ruleAggregation ) ) |
2693 | // InternalSolverLanguage.g:905:2: (this_NamedObject_0= ruleNamedObject | this_UnnamedObject_1= ruleUnnamedObject | this_DataObject_2= ruleDataObject ) | 3875 | // InternalSolverLanguageParser.g:1533:2: (this_AtomicExpression_0= ruleAtomicExpression | this_Count_1= ruleCount | this_Aggregation_2= ruleAggregation ) |
2694 | { | 3876 | { |
2695 | // InternalSolverLanguage.g:905:2: (this_NamedObject_0= ruleNamedObject | this_UnnamedObject_1= ruleUnnamedObject | this_DataObject_2= ruleDataObject ) | 3877 | // InternalSolverLanguageParser.g:1533:2: (this_AtomicExpression_0= ruleAtomicExpression | this_Count_1= ruleCount | this_Aggregation_2= ruleAggregation ) |
2696 | int alt15=3; | 3878 | int alt19=3; |
2697 | switch ( input.LA(1) ) { | 3879 | switch ( input.LA(1) ) { |
2698 | case 27: | 3880 | case Unknown: |
3881 | case Empty: | ||
3882 | case Error: | ||
3883 | case False: | ||
3884 | case True: | ||
3885 | case Inf: | ||
3886 | case LeftParenthesis: | ||
3887 | case LeftSquareBracket: | ||
3888 | case RULE_STRING: | ||
3889 | case RULE_QUOTED_ID: | ||
3890 | case RULE_ID: | ||
3891 | case RULE_INT: | ||
2699 | { | 3892 | { |
2700 | alt15=1; | 3893 | alt19=1; |
2701 | } | 3894 | } |
2702 | break; | 3895 | break; |
2703 | case RULE_ID: | 3896 | case Count: |
2704 | { | 3897 | { |
2705 | alt15=2; | 3898 | alt19=2; |
2706 | } | 3899 | } |
2707 | break; | 3900 | break; |
2708 | case RULE_INT: | 3901 | case Only: |
2709 | case RULE_STRING: | 3902 | case Prod: |
2710 | case 11: | 3903 | case Avg: |
2711 | case 13: | 3904 | case Max: |
2712 | case 14: | 3905 | case Min: |
3906 | case Sum: | ||
2713 | { | 3907 | { |
2714 | alt15=3; | 3908 | alt19=3; |
2715 | } | 3909 | } |
2716 | break; | 3910 | break; |
2717 | default: | 3911 | default: |
2718 | NoViableAltException nvae = | 3912 | NoViableAltException nvae = |
2719 | new NoViableAltException("", 15, 0, input); | 3913 | new NoViableAltException("", 19, 0, input); |
2720 | 3914 | ||
2721 | throw nvae; | 3915 | throw nvae; |
2722 | } | 3916 | } |
2723 | 3917 | ||
2724 | switch (alt15) { | 3918 | switch (alt19) { |
2725 | case 1 : | 3919 | case 1 : |
2726 | // InternalSolverLanguage.g:906:3: this_NamedObject_0= ruleNamedObject | 3920 | // InternalSolverLanguageParser.g:1534:3: this_AtomicExpression_0= ruleAtomicExpression |
2727 | { | 3921 | { |
2728 | 3922 | ||
2729 | newCompositeNode(grammarAccess.getObjectAccess().getNamedObjectParserRuleCall_0()); | 3923 | newCompositeNode(grammarAccess.getAggregationExpressionAccess().getAtomicExpressionParserRuleCall_0()); |
2730 | 3924 | ||
2731 | pushFollow(FOLLOW_2); | 3925 | pushFollow(FOLLOW_2); |
2732 | this_NamedObject_0=ruleNamedObject(); | 3926 | this_AtomicExpression_0=ruleAtomicExpression(); |
2733 | 3927 | ||
2734 | state._fsp--; | 3928 | state._fsp--; |
2735 | 3929 | ||
2736 | 3930 | ||
2737 | current = this_NamedObject_0; | 3931 | current = this_AtomicExpression_0; |
2738 | afterParserOrEnumRuleCall(); | 3932 | afterParserOrEnumRuleCall(); |
2739 | 3933 | ||
2740 | 3934 | ||
2741 | } | 3935 | } |
2742 | break; | 3936 | break; |
2743 | case 2 : | 3937 | case 2 : |
2744 | // InternalSolverLanguage.g:915:3: this_UnnamedObject_1= ruleUnnamedObject | 3938 | // InternalSolverLanguageParser.g:1543:3: this_Count_1= ruleCount |
2745 | { | 3939 | { |
2746 | 3940 | ||
2747 | newCompositeNode(grammarAccess.getObjectAccess().getUnnamedObjectParserRuleCall_1()); | 3941 | newCompositeNode(grammarAccess.getAggregationExpressionAccess().getCountParserRuleCall_1()); |
2748 | 3942 | ||
2749 | pushFollow(FOLLOW_2); | 3943 | pushFollow(FOLLOW_2); |
2750 | this_UnnamedObject_1=ruleUnnamedObject(); | 3944 | this_Count_1=ruleCount(); |
2751 | 3945 | ||
2752 | state._fsp--; | 3946 | state._fsp--; |
2753 | 3947 | ||
2754 | 3948 | ||
2755 | current = this_UnnamedObject_1; | 3949 | current = this_Count_1; |
2756 | afterParserOrEnumRuleCall(); | 3950 | afterParserOrEnumRuleCall(); |
2757 | 3951 | ||
2758 | 3952 | ||
2759 | } | 3953 | } |
2760 | break; | 3954 | break; |
2761 | case 3 : | 3955 | case 3 : |
2762 | // InternalSolverLanguage.g:924:3: this_DataObject_2= ruleDataObject | 3956 | // InternalSolverLanguageParser.g:1552:3: this_Aggregation_2= ruleAggregation |
2763 | { | 3957 | { |
2764 | 3958 | ||
2765 | newCompositeNode(grammarAccess.getObjectAccess().getDataObjectParserRuleCall_2()); | 3959 | newCompositeNode(grammarAccess.getAggregationExpressionAccess().getAggregationParserRuleCall_2()); |
2766 | 3960 | ||
2767 | pushFollow(FOLLOW_2); | 3961 | pushFollow(FOLLOW_2); |
2768 | this_DataObject_2=ruleDataObject(); | 3962 | this_Aggregation_2=ruleAggregation(); |
2769 | 3963 | ||
2770 | state._fsp--; | 3964 | state._fsp--; |
2771 | 3965 | ||
2772 | 3966 | ||
2773 | current = this_DataObject_2; | 3967 | current = this_Aggregation_2; |
2774 | afterParserOrEnumRuleCall(); | 3968 | afterParserOrEnumRuleCall(); |
2775 | 3969 | ||
2776 | 3970 | ||
@@ -2795,28 +3989,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2795 | } | 3989 | } |
2796 | return current; | 3990 | return current; |
2797 | } | 3991 | } |
2798 | // $ANTLR end "ruleObject" | 3992 | // $ANTLR end "ruleAggregationExpression" |
2799 | 3993 | ||
2800 | 3994 | ||
2801 | // $ANTLR start "entryRuleNamedObject" | 3995 | // $ANTLR start "entryRuleCount" |
2802 | // InternalSolverLanguage.g:936:1: entryRuleNamedObject returns [EObject current=null] : iv_ruleNamedObject= ruleNamedObject EOF ; | 3996 | // InternalSolverLanguageParser.g:1564:1: entryRuleCount returns [EObject current=null] : iv_ruleCount= ruleCount EOF ; |
2803 | public final EObject entryRuleNamedObject() throws RecognitionException { | 3997 | public final EObject entryRuleCount() throws RecognitionException { |
2804 | EObject current = null; | 3998 | EObject current = null; |
2805 | 3999 | ||
2806 | EObject iv_ruleNamedObject = null; | 4000 | EObject iv_ruleCount = null; |
2807 | 4001 | ||
2808 | 4002 | ||
2809 | try { | 4003 | try { |
2810 | // InternalSolverLanguage.g:936:52: (iv_ruleNamedObject= ruleNamedObject EOF ) | 4004 | // InternalSolverLanguageParser.g:1564:46: (iv_ruleCount= ruleCount EOF ) |
2811 | // InternalSolverLanguage.g:937:2: iv_ruleNamedObject= ruleNamedObject EOF | 4005 | // InternalSolverLanguageParser.g:1565:2: iv_ruleCount= ruleCount EOF |
2812 | { | 4006 | { |
2813 | newCompositeNode(grammarAccess.getNamedObjectRule()); | 4007 | newCompositeNode(grammarAccess.getCountRule()); |
2814 | pushFollow(FOLLOW_1); | 4008 | pushFollow(FOLLOW_1); |
2815 | iv_ruleNamedObject=ruleNamedObject(); | 4009 | iv_ruleCount=ruleCount(); |
2816 | 4010 | ||
2817 | state._fsp--; | 4011 | state._fsp--; |
2818 | 4012 | ||
2819 | current =iv_ruleNamedObject; | 4013 | current =iv_ruleCount; |
2820 | match(input,EOF,FOLLOW_2); | 4014 | match(input,EOF,FOLLOW_2); |
2821 | 4015 | ||
2822 | } | 4016 | } |
@@ -2831,51 +4025,62 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2831 | } | 4025 | } |
2832 | return current; | 4026 | return current; |
2833 | } | 4027 | } |
2834 | // $ANTLR end "entryRuleNamedObject" | 4028 | // $ANTLR end "entryRuleCount" |
2835 | 4029 | ||
2836 | 4030 | ||
2837 | // $ANTLR start "ruleNamedObject" | 4031 | // $ANTLR start "ruleCount" |
2838 | // InternalSolverLanguage.g:943:1: ruleNamedObject returns [EObject current=null] : (otherlv_0= '\\'' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '\\'' ) ; | 4032 | // InternalSolverLanguageParser.g:1571:1: ruleCount returns [EObject current=null] : (otherlv_0= Count otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= RightCurlyBracket ) ; |
2839 | public final EObject ruleNamedObject() throws RecognitionException { | 4033 | public final EObject ruleCount() throws RecognitionException { |
2840 | EObject current = null; | 4034 | EObject current = null; |
2841 | 4035 | ||
2842 | Token otherlv_0=null; | 4036 | Token otherlv_0=null; |
2843 | Token lv_name_1_0=null; | 4037 | Token otherlv_1=null; |
2844 | Token otherlv_2=null; | 4038 | Token otherlv_3=null; |
4039 | EObject lv_body_2_0 = null; | ||
4040 | |||
2845 | 4041 | ||
2846 | 4042 | ||
2847 | enterRule(); | 4043 | enterRule(); |
2848 | 4044 | ||
2849 | try { | 4045 | try { |
2850 | // InternalSolverLanguage.g:949:2: ( (otherlv_0= '\\'' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '\\'' ) ) | 4046 | // InternalSolverLanguageParser.g:1577:2: ( (otherlv_0= Count otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= RightCurlyBracket ) ) |
2851 | // InternalSolverLanguage.g:950:2: (otherlv_0= '\\'' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '\\'' ) | 4047 | // InternalSolverLanguageParser.g:1578:2: (otherlv_0= Count otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= RightCurlyBracket ) |
2852 | { | 4048 | { |
2853 | // InternalSolverLanguage.g:950:2: (otherlv_0= '\\'' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '\\'' ) | 4049 | // InternalSolverLanguageParser.g:1578:2: (otherlv_0= Count otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= RightCurlyBracket ) |
2854 | // InternalSolverLanguage.g:951:3: otherlv_0= '\\'' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '\\'' | 4050 | // InternalSolverLanguageParser.g:1579:3: otherlv_0= Count otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= RightCurlyBracket |
2855 | { | 4051 | { |
2856 | otherlv_0=(Token)match(input,27,FOLLOW_12); | 4052 | otherlv_0=(Token)match(input,Count,FOLLOW_26); |
4053 | |||
4054 | newLeafNode(otherlv_0, grammarAccess.getCountAccess().getCountKeyword_0()); | ||
4055 | |||
4056 | otherlv_1=(Token)match(input,LeftCurlyBracket,FOLLOW_6); | ||
2857 | 4057 | ||
2858 | newLeafNode(otherlv_0, grammarAccess.getNamedObjectAccess().getApostropheKeyword_0()); | 4058 | newLeafNode(otherlv_1, grammarAccess.getCountAccess().getLeftCurlyBracketKeyword_1()); |
2859 | 4059 | ||
2860 | // InternalSolverLanguage.g:955:3: ( (lv_name_1_0= RULE_ID ) ) | 4060 | // InternalSolverLanguageParser.g:1587:3: ( (lv_body_2_0= ruleExpression ) ) |
2861 | // InternalSolverLanguage.g:956:4: (lv_name_1_0= RULE_ID ) | 4061 | // InternalSolverLanguageParser.g:1588:4: (lv_body_2_0= ruleExpression ) |
2862 | { | 4062 | { |
2863 | // InternalSolverLanguage.g:956:4: (lv_name_1_0= RULE_ID ) | 4063 | // InternalSolverLanguageParser.g:1588:4: (lv_body_2_0= ruleExpression ) |
2864 | // InternalSolverLanguage.g:957:5: lv_name_1_0= RULE_ID | 4064 | // InternalSolverLanguageParser.g:1589:5: lv_body_2_0= ruleExpression |
2865 | { | 4065 | { |
2866 | lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_13); | ||
2867 | 4066 | ||
2868 | newLeafNode(lv_name_1_0, grammarAccess.getNamedObjectAccess().getNameIDTerminalRuleCall_1_0()); | 4067 | newCompositeNode(grammarAccess.getCountAccess().getBodyExpressionParserRuleCall_2_0()); |
2869 | 4068 | ||
4069 | pushFollow(FOLLOW_27); | ||
4070 | lv_body_2_0=ruleExpression(); | ||
4071 | |||
4072 | state._fsp--; | ||
4073 | |||
2870 | 4074 | ||
2871 | if (current==null) { | 4075 | if (current==null) { |
2872 | current = createModelElement(grammarAccess.getNamedObjectRule()); | 4076 | current = createModelElementForParent(grammarAccess.getCountRule()); |
2873 | } | 4077 | } |
2874 | setWithLastConsumed( | 4078 | set( |
2875 | current, | 4079 | current, |
2876 | "name", | 4080 | "body", |
2877 | lv_name_1_0, | 4081 | lv_body_2_0, |
2878 | "org.eclipse.xtext.common.Terminals.ID"); | 4082 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); |
4083 | afterParserOrEnumRuleCall(); | ||
2879 | 4084 | ||
2880 | 4085 | ||
2881 | } | 4086 | } |
@@ -2883,9 +4088,9 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2883 | 4088 | ||
2884 | } | 4089 | } |
2885 | 4090 | ||
2886 | otherlv_2=(Token)match(input,27,FOLLOW_2); | 4091 | otherlv_3=(Token)match(input,RightCurlyBracket,FOLLOW_2); |
2887 | 4092 | ||
2888 | newLeafNode(otherlv_2, grammarAccess.getNamedObjectAccess().getApostropheKeyword_2()); | 4093 | newLeafNode(otherlv_3, grammarAccess.getCountAccess().getRightCurlyBracketKeyword_3()); |
2889 | 4094 | ||
2890 | 4095 | ||
2891 | } | 4096 | } |
@@ -2906,28 +4111,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2906 | } | 4111 | } |
2907 | return current; | 4112 | return current; |
2908 | } | 4113 | } |
2909 | // $ANTLR end "ruleNamedObject" | 4114 | // $ANTLR end "ruleCount" |
2910 | 4115 | ||
2911 | 4116 | ||
2912 | // $ANTLR start "entryRuleUnnamedObject" | 4117 | // $ANTLR start "entryRuleAggregation" |
2913 | // InternalSolverLanguage.g:981:1: entryRuleUnnamedObject returns [EObject current=null] : iv_ruleUnnamedObject= ruleUnnamedObject EOF ; | 4118 | // InternalSolverLanguageParser.g:1614:1: entryRuleAggregation returns [EObject current=null] : iv_ruleAggregation= ruleAggregation EOF ; |
2914 | public final EObject entryRuleUnnamedObject() throws RecognitionException { | 4119 | public final EObject entryRuleAggregation() throws RecognitionException { |
2915 | EObject current = null; | 4120 | EObject current = null; |
2916 | 4121 | ||
2917 | EObject iv_ruleUnnamedObject = null; | 4122 | EObject iv_ruleAggregation = null; |
2918 | 4123 | ||
2919 | 4124 | ||
2920 | try { | 4125 | try { |
2921 | // InternalSolverLanguage.g:981:54: (iv_ruleUnnamedObject= ruleUnnamedObject EOF ) | 4126 | // InternalSolverLanguageParser.g:1614:52: (iv_ruleAggregation= ruleAggregation EOF ) |
2922 | // InternalSolverLanguage.g:982:2: iv_ruleUnnamedObject= ruleUnnamedObject EOF | 4127 | // InternalSolverLanguageParser.g:1615:2: iv_ruleAggregation= ruleAggregation EOF |
2923 | { | 4128 | { |
2924 | newCompositeNode(grammarAccess.getUnnamedObjectRule()); | 4129 | newCompositeNode(grammarAccess.getAggregationRule()); |
2925 | pushFollow(FOLLOW_1); | 4130 | pushFollow(FOLLOW_1); |
2926 | iv_ruleUnnamedObject=ruleUnnamedObject(); | 4131 | iv_ruleAggregation=ruleAggregation(); |
2927 | 4132 | ||
2928 | state._fsp--; | 4133 | state._fsp--; |
2929 | 4134 | ||
2930 | current =iv_ruleUnnamedObject; | 4135 | current =iv_ruleAggregation; |
2931 | match(input,EOF,FOLLOW_2); | 4136 | match(input,EOF,FOLLOW_2); |
2932 | 4137 | ||
2933 | } | 4138 | } |
@@ -2942,46 +4147,139 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
2942 | } | 4147 | } |
2943 | return current; | 4148 | return current; |
2944 | } | 4149 | } |
2945 | // $ANTLR end "entryRuleUnnamedObject" | 4150 | // $ANTLR end "entryRuleAggregation" |
2946 | 4151 | ||
2947 | 4152 | ||
2948 | // $ANTLR start "ruleUnnamedObject" | 4153 | // $ANTLR start "ruleAggregation" |
2949 | // InternalSolverLanguage.g:988:1: ruleUnnamedObject returns [EObject current=null] : ( (lv_name_0_0= RULE_ID ) ) ; | 4154 | // InternalSolverLanguageParser.g:1621:1: ruleAggregation returns [EObject current=null] : ( ( (lv_op_0_0= ruleAggregationOp ) ) otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= VerticalLine ( (lv_condition_4_0= ruleExpression ) ) otherlv_5= RightCurlyBracket ) ; |
2950 | public final EObject ruleUnnamedObject() throws RecognitionException { | 4155 | public final EObject ruleAggregation() throws RecognitionException { |
2951 | EObject current = null; | 4156 | EObject current = null; |
2952 | 4157 | ||
2953 | Token lv_name_0_0=null; | 4158 | Token otherlv_1=null; |
4159 | Token otherlv_3=null; | ||
4160 | Token otherlv_5=null; | ||
4161 | Enumerator lv_op_0_0 = null; | ||
4162 | |||
4163 | EObject lv_body_2_0 = null; | ||
4164 | |||
4165 | EObject lv_condition_4_0 = null; | ||
4166 | |||
2954 | 4167 | ||
2955 | 4168 | ||
2956 | enterRule(); | 4169 | enterRule(); |
2957 | 4170 | ||
2958 | try { | 4171 | try { |
2959 | // InternalSolverLanguage.g:994:2: ( ( (lv_name_0_0= RULE_ID ) ) ) | 4172 | // InternalSolverLanguageParser.g:1627:2: ( ( ( (lv_op_0_0= ruleAggregationOp ) ) otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= VerticalLine ( (lv_condition_4_0= ruleExpression ) ) otherlv_5= RightCurlyBracket ) ) |
2960 | // InternalSolverLanguage.g:995:2: ( (lv_name_0_0= RULE_ID ) ) | 4173 | // InternalSolverLanguageParser.g:1628:2: ( ( (lv_op_0_0= ruleAggregationOp ) ) otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= VerticalLine ( (lv_condition_4_0= ruleExpression ) ) otherlv_5= RightCurlyBracket ) |
2961 | { | 4174 | { |
2962 | // InternalSolverLanguage.g:995:2: ( (lv_name_0_0= RULE_ID ) ) | 4175 | // InternalSolverLanguageParser.g:1628:2: ( ( (lv_op_0_0= ruleAggregationOp ) ) otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= VerticalLine ( (lv_condition_4_0= ruleExpression ) ) otherlv_5= RightCurlyBracket ) |
2963 | // InternalSolverLanguage.g:996:3: (lv_name_0_0= RULE_ID ) | 4176 | // InternalSolverLanguageParser.g:1629:3: ( (lv_op_0_0= ruleAggregationOp ) ) otherlv_1= LeftCurlyBracket ( (lv_body_2_0= ruleExpression ) ) otherlv_3= VerticalLine ( (lv_condition_4_0= ruleExpression ) ) otherlv_5= RightCurlyBracket |
2964 | { | 4177 | { |
2965 | // InternalSolverLanguage.g:996:3: (lv_name_0_0= RULE_ID ) | 4178 | // InternalSolverLanguageParser.g:1629:3: ( (lv_op_0_0= ruleAggregationOp ) ) |
2966 | // InternalSolverLanguage.g:997:4: lv_name_0_0= RULE_ID | 4179 | // InternalSolverLanguageParser.g:1630:4: (lv_op_0_0= ruleAggregationOp ) |
4180 | { | ||
4181 | // InternalSolverLanguageParser.g:1630:4: (lv_op_0_0= ruleAggregationOp ) | ||
4182 | // InternalSolverLanguageParser.g:1631:5: lv_op_0_0= ruleAggregationOp | ||
2967 | { | 4183 | { |
2968 | lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_2); | ||
2969 | 4184 | ||
2970 | newLeafNode(lv_name_0_0, grammarAccess.getUnnamedObjectAccess().getNameIDTerminalRuleCall_0()); | 4185 | newCompositeNode(grammarAccess.getAggregationAccess().getOpAggregationOpEnumRuleCall_0_0()); |
2971 | 4186 | ||
4187 | pushFollow(FOLLOW_26); | ||
4188 | lv_op_0_0=ruleAggregationOp(); | ||
4189 | |||
4190 | state._fsp--; | ||
4191 | |||
4192 | |||
4193 | if (current==null) { | ||
4194 | current = createModelElementForParent(grammarAccess.getAggregationRule()); | ||
4195 | } | ||
4196 | set( | ||
4197 | current, | ||
4198 | "op", | ||
4199 | lv_op_0_0, | ||
4200 | "org.eclipse.viatra.solver.language.SolverLanguage.AggregationOp"); | ||
4201 | afterParserOrEnumRuleCall(); | ||
4202 | |||
4203 | |||
4204 | } | ||
4205 | |||
4206 | |||
4207 | } | ||
4208 | |||
4209 | otherlv_1=(Token)match(input,LeftCurlyBracket,FOLLOW_6); | ||
4210 | |||
4211 | newLeafNode(otherlv_1, grammarAccess.getAggregationAccess().getLeftCurlyBracketKeyword_1()); | ||
4212 | |||
4213 | // InternalSolverLanguageParser.g:1652:3: ( (lv_body_2_0= ruleExpression ) ) | ||
4214 | // InternalSolverLanguageParser.g:1653:4: (lv_body_2_0= ruleExpression ) | ||
4215 | { | ||
4216 | // InternalSolverLanguageParser.g:1653:4: (lv_body_2_0= ruleExpression ) | ||
4217 | // InternalSolverLanguageParser.g:1654:5: lv_body_2_0= ruleExpression | ||
4218 | { | ||
4219 | |||
4220 | newCompositeNode(grammarAccess.getAggregationAccess().getBodyExpressionParserRuleCall_2_0()); | ||
4221 | |||
4222 | pushFollow(FOLLOW_28); | ||
4223 | lv_body_2_0=ruleExpression(); | ||
4224 | |||
4225 | state._fsp--; | ||
4226 | |||
4227 | |||
4228 | if (current==null) { | ||
4229 | current = createModelElementForParent(grammarAccess.getAggregationRule()); | ||
4230 | } | ||
4231 | set( | ||
4232 | current, | ||
4233 | "body", | ||
4234 | lv_body_2_0, | ||
4235 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
4236 | afterParserOrEnumRuleCall(); | ||
4237 | |||
4238 | |||
4239 | } | ||
2972 | 4240 | ||
2973 | if (current==null) { | ||
2974 | current = createModelElement(grammarAccess.getUnnamedObjectRule()); | ||
2975 | } | ||
2976 | setWithLastConsumed( | ||
2977 | current, | ||
2978 | "name", | ||
2979 | lv_name_0_0, | ||
2980 | "org.eclipse.xtext.common.Terminals.ID"); | ||
2981 | |||
2982 | 4241 | ||
2983 | } | 4242 | } |
2984 | 4243 | ||
4244 | otherlv_3=(Token)match(input,VerticalLine,FOLLOW_6); | ||
4245 | |||
4246 | newLeafNode(otherlv_3, grammarAccess.getAggregationAccess().getVerticalLineKeyword_3()); | ||
4247 | |||
4248 | // InternalSolverLanguageParser.g:1675:3: ( (lv_condition_4_0= ruleExpression ) ) | ||
4249 | // InternalSolverLanguageParser.g:1676:4: (lv_condition_4_0= ruleExpression ) | ||
4250 | { | ||
4251 | // InternalSolverLanguageParser.g:1676:4: (lv_condition_4_0= ruleExpression ) | ||
4252 | // InternalSolverLanguageParser.g:1677:5: lv_condition_4_0= ruleExpression | ||
4253 | { | ||
4254 | |||
4255 | newCompositeNode(grammarAccess.getAggregationAccess().getConditionExpressionParserRuleCall_4_0()); | ||
4256 | |||
4257 | pushFollow(FOLLOW_27); | ||
4258 | lv_condition_4_0=ruleExpression(); | ||
4259 | |||
4260 | state._fsp--; | ||
4261 | |||
4262 | |||
4263 | if (current==null) { | ||
4264 | current = createModelElementForParent(grammarAccess.getAggregationRule()); | ||
4265 | } | ||
4266 | set( | ||
4267 | current, | ||
4268 | "condition", | ||
4269 | lv_condition_4_0, | ||
4270 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
4271 | afterParserOrEnumRuleCall(); | ||
4272 | |||
4273 | |||
4274 | } | ||
4275 | |||
4276 | |||
4277 | } | ||
4278 | |||
4279 | otherlv_5=(Token)match(input,RightCurlyBracket,FOLLOW_2); | ||
4280 | |||
4281 | newLeafNode(otherlv_5, grammarAccess.getAggregationAccess().getRightCurlyBracketKeyword_5()); | ||
4282 | |||
2985 | 4283 | ||
2986 | } | 4284 | } |
2987 | 4285 | ||
@@ -3001,28 +4299,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3001 | } | 4299 | } |
3002 | return current; | 4300 | return current; |
3003 | } | 4301 | } |
3004 | // $ANTLR end "ruleUnnamedObject" | 4302 | // $ANTLR end "ruleAggregation" |
3005 | 4303 | ||
3006 | 4304 | ||
3007 | // $ANTLR start "entryRuleDataObject" | 4305 | // $ANTLR start "entryRuleAtomicExpression" |
3008 | // InternalSolverLanguage.g:1016:1: entryRuleDataObject returns [EObject current=null] : iv_ruleDataObject= ruleDataObject EOF ; | 4306 | // InternalSolverLanguageParser.g:1702:1: entryRuleAtomicExpression returns [EObject current=null] : iv_ruleAtomicExpression= ruleAtomicExpression EOF ; |
3009 | public final EObject entryRuleDataObject() throws RecognitionException { | 4307 | public final EObject entryRuleAtomicExpression() throws RecognitionException { |
3010 | EObject current = null; | 4308 | EObject current = null; |
3011 | 4309 | ||
3012 | EObject iv_ruleDataObject = null; | 4310 | EObject iv_ruleAtomicExpression = null; |
3013 | 4311 | ||
3014 | 4312 | ||
3015 | try { | 4313 | try { |
3016 | // InternalSolverLanguage.g:1016:51: (iv_ruleDataObject= ruleDataObject EOF ) | 4314 | // InternalSolverLanguageParser.g:1702:57: (iv_ruleAtomicExpression= ruleAtomicExpression EOF ) |
3017 | // InternalSolverLanguage.g:1017:2: iv_ruleDataObject= ruleDataObject EOF | 4315 | // InternalSolverLanguageParser.g:1703:2: iv_ruleAtomicExpression= ruleAtomicExpression EOF |
3018 | { | 4316 | { |
3019 | newCompositeNode(grammarAccess.getDataObjectRule()); | 4317 | newCompositeNode(grammarAccess.getAtomicExpressionRule()); |
3020 | pushFollow(FOLLOW_1); | 4318 | pushFollow(FOLLOW_1); |
3021 | iv_ruleDataObject=ruleDataObject(); | 4319 | iv_ruleAtomicExpression=ruleAtomicExpression(); |
3022 | 4320 | ||
3023 | state._fsp--; | 4321 | state._fsp--; |
3024 | 4322 | ||
3025 | current =iv_ruleDataObject; | 4323 | current =iv_ruleAtomicExpression; |
3026 | match(input,EOF,FOLLOW_2); | 4324 | match(input,EOF,FOLLOW_2); |
3027 | 4325 | ||
3028 | } | 4326 | } |
@@ -3037,170 +4335,142 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3037 | } | 4335 | } |
3038 | return current; | 4336 | return current; |
3039 | } | 4337 | } |
3040 | // $ANTLR end "entryRuleDataObject" | 4338 | // $ANTLR end "entryRuleAtomicExpression" |
3041 | 4339 | ||
3042 | 4340 | ||
3043 | // $ANTLR start "ruleDataObject" | 4341 | // $ANTLR start "ruleAtomicExpression" |
3044 | // InternalSolverLanguage.g:1023:1: ruleDataObject returns [EObject current=null] : (this_BooleanObject_0= ruleBooleanObject | this_IntObject_1= ruleIntObject | this_RealObject_2= ruleRealObject | this_StringObject_3= ruleStringObject ) ; | 4342 | // InternalSolverLanguageParser.g:1709:1: ruleAtomicExpression returns [EObject current=null] : (this_Reference_0= ruleReference | this_Call_1= ruleCall | this_Interval_2= ruleInterval | this_Literal_3= ruleLiteral | (otherlv_4= LeftParenthesis this_Expression_5= ruleExpression otherlv_6= RightParenthesis ) ) ; |
3045 | public final EObject ruleDataObject() throws RecognitionException { | 4343 | public final EObject ruleAtomicExpression() throws RecognitionException { |
3046 | EObject current = null; | 4344 | EObject current = null; |
3047 | 4345 | ||
3048 | EObject this_BooleanObject_0 = null; | 4346 | Token otherlv_4=null; |
4347 | Token otherlv_6=null; | ||
4348 | EObject this_Reference_0 = null; | ||
4349 | |||
4350 | EObject this_Call_1 = null; | ||
3049 | 4351 | ||
3050 | EObject this_IntObject_1 = null; | 4352 | EObject this_Interval_2 = null; |
3051 | 4353 | ||
3052 | EObject this_RealObject_2 = null; | 4354 | EObject this_Literal_3 = null; |
3053 | 4355 | ||
3054 | EObject this_StringObject_3 = null; | 4356 | EObject this_Expression_5 = null; |
3055 | 4357 | ||
3056 | 4358 | ||
3057 | 4359 | ||
3058 | enterRule(); | 4360 | enterRule(); |
3059 | 4361 | ||
3060 | try { | 4362 | try { |
3061 | // InternalSolverLanguage.g:1029:2: ( (this_BooleanObject_0= ruleBooleanObject | this_IntObject_1= ruleIntObject | this_RealObject_2= ruleRealObject | this_StringObject_3= ruleStringObject ) ) | 4363 | // InternalSolverLanguageParser.g:1715:2: ( (this_Reference_0= ruleReference | this_Call_1= ruleCall | this_Interval_2= ruleInterval | this_Literal_3= ruleLiteral | (otherlv_4= LeftParenthesis this_Expression_5= ruleExpression otherlv_6= RightParenthesis ) ) ) |
3062 | // InternalSolverLanguage.g:1030:2: (this_BooleanObject_0= ruleBooleanObject | this_IntObject_1= ruleIntObject | this_RealObject_2= ruleRealObject | this_StringObject_3= ruleStringObject ) | 4364 | // InternalSolverLanguageParser.g:1716:2: (this_Reference_0= ruleReference | this_Call_1= ruleCall | this_Interval_2= ruleInterval | this_Literal_3= ruleLiteral | (otherlv_4= LeftParenthesis this_Expression_5= ruleExpression otherlv_6= RightParenthesis ) ) |
3063 | { | 4365 | { |
3064 | // InternalSolverLanguage.g:1030:2: (this_BooleanObject_0= ruleBooleanObject | this_IntObject_1= ruleIntObject | this_RealObject_2= ruleRealObject | this_StringObject_3= ruleStringObject ) | 4366 | // InternalSolverLanguageParser.g:1716:2: (this_Reference_0= ruleReference | this_Call_1= ruleCall | this_Interval_2= ruleInterval | this_Literal_3= ruleLiteral | (otherlv_4= LeftParenthesis this_Expression_5= ruleExpression otherlv_6= RightParenthesis ) ) |
3065 | int alt16=4; | 4367 | int alt20=5; |
3066 | switch ( input.LA(1) ) { | 4368 | alt20 = dfa20.predict(input); |
3067 | case 13: | 4369 | switch (alt20) { |
3068 | case 14: | ||
3069 | { | ||
3070 | alt16=1; | ||
3071 | } | ||
3072 | break; | ||
3073 | case 11: | ||
3074 | { | ||
3075 | int LA16_2 = input.LA(2); | ||
3076 | |||
3077 | if ( (LA16_2==RULE_INT) ) { | ||
3078 | int LA16_3 = input.LA(3); | ||
3079 | |||
3080 | if ( (LA16_3==12) ) { | ||
3081 | alt16=3; | ||
3082 | } | ||
3083 | else if ( (LA16_3==EOF||(LA16_3>=18 && LA16_3<=19)) ) { | ||
3084 | alt16=2; | ||
3085 | } | ||
3086 | else { | ||
3087 | NoViableAltException nvae = | ||
3088 | new NoViableAltException("", 16, 3, input); | ||
3089 | |||
3090 | throw nvae; | ||
3091 | } | ||
3092 | } | ||
3093 | else { | ||
3094 | NoViableAltException nvae = | ||
3095 | new NoViableAltException("", 16, 2, input); | ||
3096 | |||
3097 | throw nvae; | ||
3098 | } | ||
3099 | } | ||
3100 | break; | ||
3101 | case RULE_INT: | ||
3102 | { | ||
3103 | int LA16_3 = input.LA(2); | ||
3104 | |||
3105 | if ( (LA16_3==12) ) { | ||
3106 | alt16=3; | ||
3107 | } | ||
3108 | else if ( (LA16_3==EOF||(LA16_3>=18 && LA16_3<=19)) ) { | ||
3109 | alt16=2; | ||
3110 | } | ||
3111 | else { | ||
3112 | NoViableAltException nvae = | ||
3113 | new NoViableAltException("", 16, 3, input); | ||
3114 | |||
3115 | throw nvae; | ||
3116 | } | ||
3117 | } | ||
3118 | break; | ||
3119 | case RULE_STRING: | ||
3120 | { | ||
3121 | alt16=4; | ||
3122 | } | ||
3123 | break; | ||
3124 | default: | ||
3125 | NoViableAltException nvae = | ||
3126 | new NoViableAltException("", 16, 0, input); | ||
3127 | |||
3128 | throw nvae; | ||
3129 | } | ||
3130 | |||
3131 | switch (alt16) { | ||
3132 | case 1 : | 4370 | case 1 : |
3133 | // InternalSolverLanguage.g:1031:3: this_BooleanObject_0= ruleBooleanObject | 4371 | // InternalSolverLanguageParser.g:1717:3: this_Reference_0= ruleReference |
3134 | { | 4372 | { |
3135 | 4373 | ||
3136 | newCompositeNode(grammarAccess.getDataObjectAccess().getBooleanObjectParserRuleCall_0()); | 4374 | newCompositeNode(grammarAccess.getAtomicExpressionAccess().getReferenceParserRuleCall_0()); |
3137 | 4375 | ||
3138 | pushFollow(FOLLOW_2); | 4376 | pushFollow(FOLLOW_2); |
3139 | this_BooleanObject_0=ruleBooleanObject(); | 4377 | this_Reference_0=ruleReference(); |
3140 | 4378 | ||
3141 | state._fsp--; | 4379 | state._fsp--; |
3142 | 4380 | ||
3143 | 4381 | ||
3144 | current = this_BooleanObject_0; | 4382 | current = this_Reference_0; |
3145 | afterParserOrEnumRuleCall(); | 4383 | afterParserOrEnumRuleCall(); |
3146 | 4384 | ||
3147 | 4385 | ||
3148 | } | 4386 | } |
3149 | break; | 4387 | break; |
3150 | case 2 : | 4388 | case 2 : |
3151 | // InternalSolverLanguage.g:1040:3: this_IntObject_1= ruleIntObject | 4389 | // InternalSolverLanguageParser.g:1726:3: this_Call_1= ruleCall |
3152 | { | 4390 | { |
3153 | 4391 | ||
3154 | newCompositeNode(grammarAccess.getDataObjectAccess().getIntObjectParserRuleCall_1()); | 4392 | newCompositeNode(grammarAccess.getAtomicExpressionAccess().getCallParserRuleCall_1()); |
3155 | 4393 | ||
3156 | pushFollow(FOLLOW_2); | 4394 | pushFollow(FOLLOW_2); |
3157 | this_IntObject_1=ruleIntObject(); | 4395 | this_Call_1=ruleCall(); |
3158 | 4396 | ||
3159 | state._fsp--; | 4397 | state._fsp--; |
3160 | 4398 | ||
3161 | 4399 | ||
3162 | current = this_IntObject_1; | 4400 | current = this_Call_1; |
3163 | afterParserOrEnumRuleCall(); | 4401 | afterParserOrEnumRuleCall(); |
3164 | 4402 | ||
3165 | 4403 | ||
3166 | } | 4404 | } |
3167 | break; | 4405 | break; |
3168 | case 3 : | 4406 | case 3 : |
3169 | // InternalSolverLanguage.g:1049:3: this_RealObject_2= ruleRealObject | 4407 | // InternalSolverLanguageParser.g:1735:3: this_Interval_2= ruleInterval |
3170 | { | 4408 | { |
3171 | 4409 | ||
3172 | newCompositeNode(grammarAccess.getDataObjectAccess().getRealObjectParserRuleCall_2()); | 4410 | newCompositeNode(grammarAccess.getAtomicExpressionAccess().getIntervalParserRuleCall_2()); |
3173 | 4411 | ||
3174 | pushFollow(FOLLOW_2); | 4412 | pushFollow(FOLLOW_2); |
3175 | this_RealObject_2=ruleRealObject(); | 4413 | this_Interval_2=ruleInterval(); |
3176 | 4414 | ||
3177 | state._fsp--; | 4415 | state._fsp--; |
3178 | 4416 | ||
3179 | 4417 | ||
3180 | current = this_RealObject_2; | 4418 | current = this_Interval_2; |
3181 | afterParserOrEnumRuleCall(); | 4419 | afterParserOrEnumRuleCall(); |
3182 | 4420 | ||
3183 | 4421 | ||
3184 | } | 4422 | } |
3185 | break; | 4423 | break; |
3186 | case 4 : | 4424 | case 4 : |
3187 | // InternalSolverLanguage.g:1058:3: this_StringObject_3= ruleStringObject | 4425 | // InternalSolverLanguageParser.g:1744:3: this_Literal_3= ruleLiteral |
3188 | { | 4426 | { |
3189 | 4427 | ||
3190 | newCompositeNode(grammarAccess.getDataObjectAccess().getStringObjectParserRuleCall_3()); | 4428 | newCompositeNode(grammarAccess.getAtomicExpressionAccess().getLiteralParserRuleCall_3()); |
3191 | 4429 | ||
3192 | pushFollow(FOLLOW_2); | 4430 | pushFollow(FOLLOW_2); |
3193 | this_StringObject_3=ruleStringObject(); | 4431 | this_Literal_3=ruleLiteral(); |
3194 | 4432 | ||
3195 | state._fsp--; | 4433 | state._fsp--; |
3196 | 4434 | ||
3197 | 4435 | ||
3198 | current = this_StringObject_3; | 4436 | current = this_Literal_3; |
3199 | afterParserOrEnumRuleCall(); | 4437 | afterParserOrEnumRuleCall(); |
3200 | 4438 | ||
3201 | 4439 | ||
3202 | } | 4440 | } |
3203 | break; | 4441 | break; |
4442 | case 5 : | ||
4443 | // InternalSolverLanguageParser.g:1753:3: (otherlv_4= LeftParenthesis this_Expression_5= ruleExpression otherlv_6= RightParenthesis ) | ||
4444 | { | ||
4445 | // InternalSolverLanguageParser.g:1753:3: (otherlv_4= LeftParenthesis this_Expression_5= ruleExpression otherlv_6= RightParenthesis ) | ||
4446 | // InternalSolverLanguageParser.g:1754:4: otherlv_4= LeftParenthesis this_Expression_5= ruleExpression otherlv_6= RightParenthesis | ||
4447 | { | ||
4448 | otherlv_4=(Token)match(input,LeftParenthesis,FOLLOW_6); | ||
4449 | |||
4450 | newLeafNode(otherlv_4, grammarAccess.getAtomicExpressionAccess().getLeftParenthesisKeyword_4_0()); | ||
4451 | |||
4452 | |||
4453 | newCompositeNode(grammarAccess.getAtomicExpressionAccess().getExpressionParserRuleCall_4_1()); | ||
4454 | |||
4455 | pushFollow(FOLLOW_29); | ||
4456 | this_Expression_5=ruleExpression(); | ||
4457 | |||
4458 | state._fsp--; | ||
4459 | |||
4460 | |||
4461 | current = this_Expression_5; | ||
4462 | afterParserOrEnumRuleCall(); | ||
4463 | |||
4464 | otherlv_6=(Token)match(input,RightParenthesis,FOLLOW_2); | ||
4465 | |||
4466 | newLeafNode(otherlv_6, grammarAccess.getAtomicExpressionAccess().getRightParenthesisKeyword_4_2()); | ||
4467 | |||
4468 | |||
4469 | } | ||
4470 | |||
4471 | |||
4472 | } | ||
4473 | break; | ||
3204 | 4474 | ||
3205 | } | 4475 | } |
3206 | 4476 | ||
@@ -3220,28 +4490,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3220 | } | 4490 | } |
3221 | return current; | 4491 | return current; |
3222 | } | 4492 | } |
3223 | // $ANTLR end "ruleDataObject" | 4493 | // $ANTLR end "ruleAtomicExpression" |
3224 | 4494 | ||
3225 | 4495 | ||
3226 | // $ANTLR start "entryRuleBooleanObject" | 4496 | // $ANTLR start "entryRuleCall" |
3227 | // InternalSolverLanguage.g:1070:1: entryRuleBooleanObject returns [EObject current=null] : iv_ruleBooleanObject= ruleBooleanObject EOF ; | 4497 | // InternalSolverLanguageParser.g:1775:1: entryRuleCall returns [EObject current=null] : iv_ruleCall= ruleCall EOF ; |
3228 | public final EObject entryRuleBooleanObject() throws RecognitionException { | 4498 | public final EObject entryRuleCall() throws RecognitionException { |
3229 | EObject current = null; | 4499 | EObject current = null; |
3230 | 4500 | ||
3231 | EObject iv_ruleBooleanObject = null; | 4501 | EObject iv_ruleCall = null; |
3232 | 4502 | ||
3233 | 4503 | ||
3234 | try { | 4504 | try { |
3235 | // InternalSolverLanguage.g:1070:54: (iv_ruleBooleanObject= ruleBooleanObject EOF ) | 4505 | // InternalSolverLanguageParser.g:1775:45: (iv_ruleCall= ruleCall EOF ) |
3236 | // InternalSolverLanguage.g:1071:2: iv_ruleBooleanObject= ruleBooleanObject EOF | 4506 | // InternalSolverLanguageParser.g:1776:2: iv_ruleCall= ruleCall EOF |
3237 | { | 4507 | { |
3238 | newCompositeNode(grammarAccess.getBooleanObjectRule()); | 4508 | newCompositeNode(grammarAccess.getCallRule()); |
3239 | pushFollow(FOLLOW_1); | 4509 | pushFollow(FOLLOW_1); |
3240 | iv_ruleBooleanObject=ruleBooleanObject(); | 4510 | iv_ruleCall=ruleCall(); |
3241 | 4511 | ||
3242 | state._fsp--; | 4512 | state._fsp--; |
3243 | 4513 | ||
3244 | current =iv_ruleBooleanObject; | 4514 | current =iv_ruleCall; |
3245 | match(input,EOF,FOLLOW_2); | 4515 | match(input,EOF,FOLLOW_2); |
3246 | 4516 | ||
3247 | } | 4517 | } |
@@ -3256,49 +4526,168 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3256 | } | 4526 | } |
3257 | return current; | 4527 | return current; |
3258 | } | 4528 | } |
3259 | // $ANTLR end "entryRuleBooleanObject" | 4529 | // $ANTLR end "entryRuleCall" |
3260 | 4530 | ||
3261 | 4531 | ||
3262 | // $ANTLR start "ruleBooleanObject" | 4532 | // $ANTLR start "ruleCall" |
3263 | // InternalSolverLanguage.g:1077:1: ruleBooleanObject returns [EObject current=null] : ( (lv_value_0_0= ruleBooleanValue ) ) ; | 4533 | // InternalSolverLanguageParser.g:1782:1: ruleCall returns [EObject current=null] : ( ( (lv_functor_0_0= ruleReference ) ) ( ( (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) ) | ( (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) ) )? ( (lv_argumentList_3_0= ruleArgumentList ) ) ) ; |
3264 | public final EObject ruleBooleanObject() throws RecognitionException { | 4534 | public final EObject ruleCall() throws RecognitionException { |
3265 | EObject current = null; | 4535 | EObject current = null; |
3266 | 4536 | ||
3267 | EObject lv_value_0_0 = null; | 4537 | Token lv_transitiveClosure_1_0=null; |
4538 | Token lv_reflexiveTransitiveClosure_2_0=null; | ||
4539 | EObject lv_functor_0_0 = null; | ||
4540 | |||
4541 | EObject lv_argumentList_3_0 = null; | ||
3268 | 4542 | ||
3269 | 4543 | ||
3270 | 4544 | ||
3271 | enterRule(); | 4545 | enterRule(); |
3272 | 4546 | ||
3273 | try { | 4547 | try { |
3274 | // InternalSolverLanguage.g:1083:2: ( ( (lv_value_0_0= ruleBooleanValue ) ) ) | 4548 | // InternalSolverLanguageParser.g:1788:2: ( ( ( (lv_functor_0_0= ruleReference ) ) ( ( (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) ) | ( (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) ) )? ( (lv_argumentList_3_0= ruleArgumentList ) ) ) ) |
3275 | // InternalSolverLanguage.g:1084:2: ( (lv_value_0_0= ruleBooleanValue ) ) | 4549 | // InternalSolverLanguageParser.g:1789:2: ( ( (lv_functor_0_0= ruleReference ) ) ( ( (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) ) | ( (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) ) )? ( (lv_argumentList_3_0= ruleArgumentList ) ) ) |
3276 | { | 4550 | { |
3277 | // InternalSolverLanguage.g:1084:2: ( (lv_value_0_0= ruleBooleanValue ) ) | 4551 | // InternalSolverLanguageParser.g:1789:2: ( ( (lv_functor_0_0= ruleReference ) ) ( ( (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) ) | ( (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) ) )? ( (lv_argumentList_3_0= ruleArgumentList ) ) ) |
3278 | // InternalSolverLanguage.g:1085:3: (lv_value_0_0= ruleBooleanValue ) | 4552 | // InternalSolverLanguageParser.g:1790:3: ( (lv_functor_0_0= ruleReference ) ) ( ( (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) ) | ( (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) ) )? ( (lv_argumentList_3_0= ruleArgumentList ) ) |
3279 | { | 4553 | { |
3280 | // InternalSolverLanguage.g:1085:3: (lv_value_0_0= ruleBooleanValue ) | 4554 | // InternalSolverLanguageParser.g:1790:3: ( (lv_functor_0_0= ruleReference ) ) |
3281 | // InternalSolverLanguage.g:1086:4: lv_value_0_0= ruleBooleanValue | 4555 | // InternalSolverLanguageParser.g:1791:4: (lv_functor_0_0= ruleReference ) |
4556 | { | ||
4557 | // InternalSolverLanguageParser.g:1791:4: (lv_functor_0_0= ruleReference ) | ||
4558 | // InternalSolverLanguageParser.g:1792:5: lv_functor_0_0= ruleReference | ||
3282 | { | 4559 | { |
3283 | 4560 | ||
3284 | newCompositeNode(grammarAccess.getBooleanObjectAccess().getValueBooleanValueParserRuleCall_0()); | 4561 | newCompositeNode(grammarAccess.getCallAccess().getFunctorReferenceParserRuleCall_0_0()); |
3285 | 4562 | ||
4563 | pushFollow(FOLLOW_30); | ||
4564 | lv_functor_0_0=ruleReference(); | ||
4565 | |||
4566 | state._fsp--; | ||
4567 | |||
4568 | |||
4569 | if (current==null) { | ||
4570 | current = createModelElementForParent(grammarAccess.getCallRule()); | ||
4571 | } | ||
4572 | set( | ||
4573 | current, | ||
4574 | "functor", | ||
4575 | lv_functor_0_0, | ||
4576 | "org.eclipse.viatra.solver.language.SolverLanguage.Reference"); | ||
4577 | afterParserOrEnumRuleCall(); | ||
4578 | |||
4579 | |||
4580 | } | ||
4581 | |||
4582 | |||
4583 | } | ||
4584 | |||
4585 | // InternalSolverLanguageParser.g:1809:3: ( ( (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) ) | ( (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) ) )? | ||
4586 | int alt21=3; | ||
4587 | int LA21_0 = input.LA(1); | ||
4588 | |||
4589 | if ( (LA21_0==RULE_TRANSITIVE_CLOSURE) ) { | ||
4590 | alt21=1; | ||
4591 | } | ||
4592 | else if ( (LA21_0==RULE_REFLEXIVE_TRANSITIVE_CLOSURE) ) { | ||
4593 | alt21=2; | ||
4594 | } | ||
4595 | switch (alt21) { | ||
4596 | case 1 : | ||
4597 | // InternalSolverLanguageParser.g:1810:4: ( (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) ) | ||
4598 | { | ||
4599 | // InternalSolverLanguageParser.g:1810:4: ( (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) ) | ||
4600 | // InternalSolverLanguageParser.g:1811:5: (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) | ||
4601 | { | ||
4602 | // InternalSolverLanguageParser.g:1811:5: (lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE ) | ||
4603 | // InternalSolverLanguageParser.g:1812:6: lv_transitiveClosure_1_0= RULE_TRANSITIVE_CLOSURE | ||
4604 | { | ||
4605 | lv_transitiveClosure_1_0=(Token)match(input,RULE_TRANSITIVE_CLOSURE,FOLLOW_11); | ||
4606 | |||
4607 | newLeafNode(lv_transitiveClosure_1_0, grammarAccess.getCallAccess().getTransitiveClosureTRANSITIVE_CLOSURETerminalRuleCall_1_0_0()); | ||
4608 | |||
4609 | |||
4610 | if (current==null) { | ||
4611 | current = createModelElement(grammarAccess.getCallRule()); | ||
4612 | } | ||
4613 | setWithLastConsumed( | ||
4614 | current, | ||
4615 | "transitiveClosure", | ||
4616 | true, | ||
4617 | "org.eclipse.viatra.solver.language.SolverLanguage.TRANSITIVE_CLOSURE"); | ||
4618 | |||
4619 | |||
4620 | } | ||
4621 | |||
4622 | |||
4623 | } | ||
4624 | |||
4625 | |||
4626 | } | ||
4627 | break; | ||
4628 | case 2 : | ||
4629 | // InternalSolverLanguageParser.g:1829:4: ( (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) ) | ||
4630 | { | ||
4631 | // InternalSolverLanguageParser.g:1829:4: ( (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) ) | ||
4632 | // InternalSolverLanguageParser.g:1830:5: (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) | ||
4633 | { | ||
4634 | // InternalSolverLanguageParser.g:1830:5: (lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE ) | ||
4635 | // InternalSolverLanguageParser.g:1831:6: lv_reflexiveTransitiveClosure_2_0= RULE_REFLEXIVE_TRANSITIVE_CLOSURE | ||
4636 | { | ||
4637 | lv_reflexiveTransitiveClosure_2_0=(Token)match(input,RULE_REFLEXIVE_TRANSITIVE_CLOSURE,FOLLOW_11); | ||
4638 | |||
4639 | newLeafNode(lv_reflexiveTransitiveClosure_2_0, grammarAccess.getCallAccess().getReflexiveTransitiveClosureREFLEXIVE_TRANSITIVE_CLOSURETerminalRuleCall_1_1_0()); | ||
4640 | |||
4641 | |||
4642 | if (current==null) { | ||
4643 | current = createModelElement(grammarAccess.getCallRule()); | ||
4644 | } | ||
4645 | setWithLastConsumed( | ||
4646 | current, | ||
4647 | "reflexiveTransitiveClosure", | ||
4648 | true, | ||
4649 | "org.eclipse.viatra.solver.language.SolverLanguage.REFLEXIVE_TRANSITIVE_CLOSURE"); | ||
4650 | |||
4651 | |||
4652 | } | ||
4653 | |||
4654 | |||
4655 | } | ||
4656 | |||
4657 | |||
4658 | } | ||
4659 | break; | ||
4660 | |||
4661 | } | ||
4662 | |||
4663 | // InternalSolverLanguageParser.g:1848:3: ( (lv_argumentList_3_0= ruleArgumentList ) ) | ||
4664 | // InternalSolverLanguageParser.g:1849:4: (lv_argumentList_3_0= ruleArgumentList ) | ||
4665 | { | ||
4666 | // InternalSolverLanguageParser.g:1849:4: (lv_argumentList_3_0= ruleArgumentList ) | ||
4667 | // InternalSolverLanguageParser.g:1850:5: lv_argumentList_3_0= ruleArgumentList | ||
4668 | { | ||
4669 | |||
4670 | newCompositeNode(grammarAccess.getCallAccess().getArgumentListArgumentListParserRuleCall_2_0()); | ||
4671 | |||
3286 | pushFollow(FOLLOW_2); | 4672 | pushFollow(FOLLOW_2); |
3287 | lv_value_0_0=ruleBooleanValue(); | 4673 | lv_argumentList_3_0=ruleArgumentList(); |
3288 | 4674 | ||
3289 | state._fsp--; | 4675 | state._fsp--; |
3290 | 4676 | ||
3291 | 4677 | ||
3292 | if (current==null) { | 4678 | if (current==null) { |
3293 | current = createModelElementForParent(grammarAccess.getBooleanObjectRule()); | 4679 | current = createModelElementForParent(grammarAccess.getCallRule()); |
3294 | } | 4680 | } |
3295 | set( | 4681 | set( |
3296 | current, | 4682 | current, |
3297 | "value", | 4683 | "argumentList", |
3298 | lv_value_0_0, | 4684 | lv_argumentList_3_0, |
3299 | "org.eclipse.viatra.solver.language.SolverLanguage.BooleanValue"); | 4685 | "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList"); |
3300 | afterParserOrEnumRuleCall(); | 4686 | afterParserOrEnumRuleCall(); |
3301 | 4687 | ||
4688 | |||
4689 | } | ||
4690 | |||
3302 | 4691 | ||
3303 | } | 4692 | } |
3304 | 4693 | ||
@@ -3321,28 +4710,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3321 | } | 4710 | } |
3322 | return current; | 4711 | return current; |
3323 | } | 4712 | } |
3324 | // $ANTLR end "ruleBooleanObject" | 4713 | // $ANTLR end "ruleCall" |
3325 | 4714 | ||
3326 | 4715 | ||
3327 | // $ANTLR start "entryRuleIntObject" | 4716 | // $ANTLR start "entryRuleArgumentList" |
3328 | // InternalSolverLanguage.g:1106:1: entryRuleIntObject returns [EObject current=null] : iv_ruleIntObject= ruleIntObject EOF ; | 4717 | // InternalSolverLanguageParser.g:1871:1: entryRuleArgumentList returns [EObject current=null] : iv_ruleArgumentList= ruleArgumentList EOF ; |
3329 | public final EObject entryRuleIntObject() throws RecognitionException { | 4718 | public final EObject entryRuleArgumentList() throws RecognitionException { |
3330 | EObject current = null; | 4719 | EObject current = null; |
3331 | 4720 | ||
3332 | EObject iv_ruleIntObject = null; | 4721 | EObject iv_ruleArgumentList = null; |
3333 | 4722 | ||
3334 | 4723 | ||
3335 | try { | 4724 | try { |
3336 | // InternalSolverLanguage.g:1106:50: (iv_ruleIntObject= ruleIntObject EOF ) | 4725 | // InternalSolverLanguageParser.g:1871:53: (iv_ruleArgumentList= ruleArgumentList EOF ) |
3337 | // InternalSolverLanguage.g:1107:2: iv_ruleIntObject= ruleIntObject EOF | 4726 | // InternalSolverLanguageParser.g:1872:2: iv_ruleArgumentList= ruleArgumentList EOF |
3338 | { | 4727 | { |
3339 | newCompositeNode(grammarAccess.getIntObjectRule()); | 4728 | newCompositeNode(grammarAccess.getArgumentListRule()); |
3340 | pushFollow(FOLLOW_1); | 4729 | pushFollow(FOLLOW_1); |
3341 | iv_ruleIntObject=ruleIntObject(); | 4730 | iv_ruleArgumentList=ruleArgumentList(); |
3342 | 4731 | ||
3343 | state._fsp--; | 4732 | state._fsp--; |
3344 | 4733 | ||
3345 | current =iv_ruleIntObject; | 4734 | current =iv_ruleArgumentList; |
3346 | match(input,EOF,FOLLOW_2); | 4735 | match(input,EOF,FOLLOW_2); |
3347 | 4736 | ||
3348 | } | 4737 | } |
@@ -3357,53 +4746,314 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3357 | } | 4746 | } |
3358 | return current; | 4747 | return current; |
3359 | } | 4748 | } |
3360 | // $ANTLR end "entryRuleIntObject" | 4749 | // $ANTLR end "entryRuleArgumentList" |
3361 | 4750 | ||
3362 | 4751 | ||
3363 | // $ANTLR start "ruleIntObject" | 4752 | // $ANTLR start "ruleArgumentList" |
3364 | // InternalSolverLanguage.g:1113:1: ruleIntObject returns [EObject current=null] : ( (lv_value_0_0= ruleINTLiteral ) ) ; | 4753 | // InternalSolverLanguageParser.g:1878:1: ruleArgumentList returns [EObject current=null] : ( () otherlv_1= LeftParenthesis ( ( (lv_arguments_2_0= ruleArgument ) ) (otherlv_3= Comma ( (lv_arguments_4_0= ruleArgument ) ) )* )? otherlv_5= RightParenthesis ) ; |
3365 | public final EObject ruleIntObject() throws RecognitionException { | 4754 | public final EObject ruleArgumentList() throws RecognitionException { |
3366 | EObject current = null; | 4755 | EObject current = null; |
3367 | 4756 | ||
3368 | AntlrDatatypeRuleToken lv_value_0_0 = null; | 4757 | Token otherlv_1=null; |
4758 | Token otherlv_3=null; | ||
4759 | Token otherlv_5=null; | ||
4760 | EObject lv_arguments_2_0 = null; | ||
4761 | |||
4762 | EObject lv_arguments_4_0 = null; | ||
3369 | 4763 | ||
3370 | 4764 | ||
3371 | 4765 | ||
3372 | enterRule(); | 4766 | enterRule(); |
3373 | 4767 | ||
3374 | try { | 4768 | try { |
3375 | // InternalSolverLanguage.g:1119:2: ( ( (lv_value_0_0= ruleINTLiteral ) ) ) | 4769 | // InternalSolverLanguageParser.g:1884:2: ( ( () otherlv_1= LeftParenthesis ( ( (lv_arguments_2_0= ruleArgument ) ) (otherlv_3= Comma ( (lv_arguments_4_0= ruleArgument ) ) )* )? otherlv_5= RightParenthesis ) ) |
3376 | // InternalSolverLanguage.g:1120:2: ( (lv_value_0_0= ruleINTLiteral ) ) | 4770 | // InternalSolverLanguageParser.g:1885:2: ( () otherlv_1= LeftParenthesis ( ( (lv_arguments_2_0= ruleArgument ) ) (otherlv_3= Comma ( (lv_arguments_4_0= ruleArgument ) ) )* )? otherlv_5= RightParenthesis ) |
3377 | { | 4771 | { |
3378 | // InternalSolverLanguage.g:1120:2: ( (lv_value_0_0= ruleINTLiteral ) ) | 4772 | // InternalSolverLanguageParser.g:1885:2: ( () otherlv_1= LeftParenthesis ( ( (lv_arguments_2_0= ruleArgument ) ) (otherlv_3= Comma ( (lv_arguments_4_0= ruleArgument ) ) )* )? otherlv_5= RightParenthesis ) |
3379 | // InternalSolverLanguage.g:1121:3: (lv_value_0_0= ruleINTLiteral ) | 4773 | // InternalSolverLanguageParser.g:1886:3: () otherlv_1= LeftParenthesis ( ( (lv_arguments_2_0= ruleArgument ) ) (otherlv_3= Comma ( (lv_arguments_4_0= ruleArgument ) ) )* )? otherlv_5= RightParenthesis |
3380 | { | 4774 | { |
3381 | // InternalSolverLanguage.g:1121:3: (lv_value_0_0= ruleINTLiteral ) | 4775 | // InternalSolverLanguageParser.g:1886:3: () |
3382 | // InternalSolverLanguage.g:1122:4: lv_value_0_0= ruleINTLiteral | 4776 | // InternalSolverLanguageParser.g:1887:4: |
3383 | { | 4777 | { |
3384 | 4778 | ||
3385 | newCompositeNode(grammarAccess.getIntObjectAccess().getValueINTLiteralParserRuleCall_0()); | 4779 | current = forceCreateModelElement( |
4780 | grammarAccess.getArgumentListAccess().getArgumentListAction_0(), | ||
4781 | current); | ||
3386 | 4782 | ||
3387 | pushFollow(FOLLOW_2); | 4783 | |
3388 | lv_value_0_0=ruleINTLiteral(); | 4784 | } |
4785 | |||
4786 | otherlv_1=(Token)match(input,LeftParenthesis,FOLLOW_31); | ||
4787 | |||
4788 | newLeafNode(otherlv_1, grammarAccess.getArgumentListAccess().getLeftParenthesisKeyword_1()); | ||
4789 | |||
4790 | // InternalSolverLanguageParser.g:1897:3: ( ( (lv_arguments_2_0= ruleArgument ) ) (otherlv_3= Comma ( (lv_arguments_4_0= ruleArgument ) ) )* )? | ||
4791 | int alt23=2; | ||
4792 | int LA23_0 = input.LA(1); | ||
4793 | |||
4794 | if ( (LA23_0==Current||LA23_0==Unknown||(LA23_0>=Count && LA23_0<=False)||(LA23_0>=Must && LA23_0<=Prod)||LA23_0==True||(LA23_0>=Avg && LA23_0<=Inf)||(LA23_0>=Max && LA23_0<=Sum)||(LA23_0>=ExclamationMark && LA23_0<=LeftParenthesis)||(LA23_0>=Asterisk && LA23_0<=PlusSign)||LA23_0==HyphenMinus||LA23_0==LeftSquareBracket||(LA23_0>=RULE_STRING && LA23_0<=RULE_QUOTED_ID)||(LA23_0>=RULE_ID && LA23_0<=RULE_INT)) ) { | ||
4795 | alt23=1; | ||
4796 | } | ||
4797 | switch (alt23) { | ||
4798 | case 1 : | ||
4799 | // InternalSolverLanguageParser.g:1898:4: ( (lv_arguments_2_0= ruleArgument ) ) (otherlv_3= Comma ( (lv_arguments_4_0= ruleArgument ) ) )* | ||
4800 | { | ||
4801 | // InternalSolverLanguageParser.g:1898:4: ( (lv_arguments_2_0= ruleArgument ) ) | ||
4802 | // InternalSolverLanguageParser.g:1899:5: (lv_arguments_2_0= ruleArgument ) | ||
4803 | { | ||
4804 | // InternalSolverLanguageParser.g:1899:5: (lv_arguments_2_0= ruleArgument ) | ||
4805 | // InternalSolverLanguageParser.g:1900:6: lv_arguments_2_0= ruleArgument | ||
4806 | { | ||
4807 | |||
4808 | newCompositeNode(grammarAccess.getArgumentListAccess().getArgumentsArgumentParserRuleCall_2_0_0()); | ||
4809 | |||
4810 | pushFollow(FOLLOW_32); | ||
4811 | lv_arguments_2_0=ruleArgument(); | ||
4812 | |||
4813 | state._fsp--; | ||
4814 | |||
4815 | |||
4816 | if (current==null) { | ||
4817 | current = createModelElementForParent(grammarAccess.getArgumentListRule()); | ||
4818 | } | ||
4819 | add( | ||
4820 | current, | ||
4821 | "arguments", | ||
4822 | lv_arguments_2_0, | ||
4823 | "org.eclipse.viatra.solver.language.SolverLanguage.Argument"); | ||
4824 | afterParserOrEnumRuleCall(); | ||
4825 | |||
4826 | |||
4827 | } | ||
4828 | |||
4829 | |||
4830 | } | ||
4831 | |||
4832 | // InternalSolverLanguageParser.g:1917:4: (otherlv_3= Comma ( (lv_arguments_4_0= ruleArgument ) ) )* | ||
4833 | loop22: | ||
4834 | do { | ||
4835 | int alt22=2; | ||
4836 | int LA22_0 = input.LA(1); | ||
4837 | |||
4838 | if ( (LA22_0==Comma) ) { | ||
4839 | alt22=1; | ||
4840 | } | ||
4841 | |||
4842 | |||
4843 | switch (alt22) { | ||
4844 | case 1 : | ||
4845 | // InternalSolverLanguageParser.g:1918:5: otherlv_3= Comma ( (lv_arguments_4_0= ruleArgument ) ) | ||
4846 | { | ||
4847 | otherlv_3=(Token)match(input,Comma,FOLLOW_33); | ||
4848 | |||
4849 | newLeafNode(otherlv_3, grammarAccess.getArgumentListAccess().getCommaKeyword_2_1_0()); | ||
4850 | |||
4851 | // InternalSolverLanguageParser.g:1922:5: ( (lv_arguments_4_0= ruleArgument ) ) | ||
4852 | // InternalSolverLanguageParser.g:1923:6: (lv_arguments_4_0= ruleArgument ) | ||
4853 | { | ||
4854 | // InternalSolverLanguageParser.g:1923:6: (lv_arguments_4_0= ruleArgument ) | ||
4855 | // InternalSolverLanguageParser.g:1924:7: lv_arguments_4_0= ruleArgument | ||
4856 | { | ||
4857 | |||
4858 | newCompositeNode(grammarAccess.getArgumentListAccess().getArgumentsArgumentParserRuleCall_2_1_1_0()); | ||
4859 | |||
4860 | pushFollow(FOLLOW_32); | ||
4861 | lv_arguments_4_0=ruleArgument(); | ||
4862 | |||
4863 | state._fsp--; | ||
4864 | |||
4865 | |||
4866 | if (current==null) { | ||
4867 | current = createModelElementForParent(grammarAccess.getArgumentListRule()); | ||
4868 | } | ||
4869 | add( | ||
4870 | current, | ||
4871 | "arguments", | ||
4872 | lv_arguments_4_0, | ||
4873 | "org.eclipse.viatra.solver.language.SolverLanguage.Argument"); | ||
4874 | afterParserOrEnumRuleCall(); | ||
4875 | |||
4876 | |||
4877 | } | ||
4878 | |||
4879 | |||
4880 | } | ||
4881 | |||
4882 | |||
4883 | } | ||
4884 | break; | ||
4885 | |||
4886 | default : | ||
4887 | break loop22; | ||
4888 | } | ||
4889 | } while (true); | ||
4890 | |||
4891 | |||
4892 | } | ||
4893 | break; | ||
4894 | |||
4895 | } | ||
4896 | |||
4897 | otherlv_5=(Token)match(input,RightParenthesis,FOLLOW_2); | ||
4898 | |||
4899 | newLeafNode(otherlv_5, grammarAccess.getArgumentListAccess().getRightParenthesisKeyword_3()); | ||
4900 | |||
4901 | |||
4902 | } | ||
4903 | |||
4904 | |||
4905 | } | ||
4906 | |||
4907 | |||
4908 | leaveRule(); | ||
4909 | |||
4910 | } | ||
4911 | |||
4912 | catch (RecognitionException re) { | ||
4913 | recover(input,re); | ||
4914 | appendSkippedTokens(); | ||
4915 | } | ||
4916 | finally { | ||
4917 | } | ||
4918 | return current; | ||
4919 | } | ||
4920 | // $ANTLR end "ruleArgumentList" | ||
4921 | |||
4922 | |||
4923 | // $ANTLR start "entryRuleArgument" | ||
4924 | // InternalSolverLanguageParser.g:1951:1: entryRuleArgument returns [EObject current=null] : iv_ruleArgument= ruleArgument EOF ; | ||
4925 | public final EObject entryRuleArgument() throws RecognitionException { | ||
4926 | EObject current = null; | ||
4927 | |||
4928 | EObject iv_ruleArgument = null; | ||
4929 | |||
4930 | |||
4931 | try { | ||
4932 | // InternalSolverLanguageParser.g:1951:49: (iv_ruleArgument= ruleArgument EOF ) | ||
4933 | // InternalSolverLanguageParser.g:1952:2: iv_ruleArgument= ruleArgument EOF | ||
4934 | { | ||
4935 | newCompositeNode(grammarAccess.getArgumentRule()); | ||
4936 | pushFollow(FOLLOW_1); | ||
4937 | iv_ruleArgument=ruleArgument(); | ||
3389 | 4938 | ||
3390 | state._fsp--; | 4939 | state._fsp--; |
3391 | 4940 | ||
4941 | current =iv_ruleArgument; | ||
4942 | match(input,EOF,FOLLOW_2); | ||
3392 | 4943 | ||
3393 | if (current==null) { | 4944 | } |
3394 | current = createModelElementForParent(grammarAccess.getIntObjectRule()); | 4945 | |
3395 | } | 4946 | } |
3396 | set( | ||
3397 | current, | ||
3398 | "value", | ||
3399 | lv_value_0_0, | ||
3400 | "org.eclipse.viatra.solver.language.SolverLanguage.INTLiteral"); | ||
3401 | afterParserOrEnumRuleCall(); | ||
3402 | |||
3403 | 4947 | ||
4948 | catch (RecognitionException re) { | ||
4949 | recover(input,re); | ||
4950 | appendSkippedTokens(); | ||
3404 | } | 4951 | } |
4952 | finally { | ||
4953 | } | ||
4954 | return current; | ||
4955 | } | ||
4956 | // $ANTLR end "entryRuleArgument" | ||
3405 | 4957 | ||
3406 | 4958 | ||
4959 | // $ANTLR start "ruleArgument" | ||
4960 | // InternalSolverLanguageParser.g:1958:1: ruleArgument returns [EObject current=null] : (this_ExpressionArgument_0= ruleExpressionArgument | this_StarArgument_1= ruleStarArgument | this_TypedArgument_2= ruleTypedArgument | this_TypedStarArgument_3= ruleTypedStarArgument ) ; | ||
4961 | public final EObject ruleArgument() throws RecognitionException { | ||
4962 | EObject current = null; | ||
4963 | |||
4964 | EObject this_ExpressionArgument_0 = null; | ||
4965 | |||
4966 | EObject this_StarArgument_1 = null; | ||
4967 | |||
4968 | EObject this_TypedArgument_2 = null; | ||
4969 | |||
4970 | EObject this_TypedStarArgument_3 = null; | ||
4971 | |||
4972 | |||
4973 | |||
4974 | enterRule(); | ||
4975 | |||
4976 | try { | ||
4977 | // InternalSolverLanguageParser.g:1964:2: ( (this_ExpressionArgument_0= ruleExpressionArgument | this_StarArgument_1= ruleStarArgument | this_TypedArgument_2= ruleTypedArgument | this_TypedStarArgument_3= ruleTypedStarArgument ) ) | ||
4978 | // InternalSolverLanguageParser.g:1965:2: (this_ExpressionArgument_0= ruleExpressionArgument | this_StarArgument_1= ruleStarArgument | this_TypedArgument_2= ruleTypedArgument | this_TypedStarArgument_3= ruleTypedStarArgument ) | ||
4979 | { | ||
4980 | // InternalSolverLanguageParser.g:1965:2: (this_ExpressionArgument_0= ruleExpressionArgument | this_StarArgument_1= ruleStarArgument | this_TypedArgument_2= ruleTypedArgument | this_TypedStarArgument_3= ruleTypedStarArgument ) | ||
4981 | int alt24=4; | ||
4982 | alt24 = dfa24.predict(input); | ||
4983 | switch (alt24) { | ||
4984 | case 1 : | ||
4985 | // InternalSolverLanguageParser.g:1966:3: this_ExpressionArgument_0= ruleExpressionArgument | ||
4986 | { | ||
4987 | |||
4988 | newCompositeNode(grammarAccess.getArgumentAccess().getExpressionArgumentParserRuleCall_0()); | ||
4989 | |||
4990 | pushFollow(FOLLOW_2); | ||
4991 | this_ExpressionArgument_0=ruleExpressionArgument(); | ||
4992 | |||
4993 | state._fsp--; | ||
4994 | |||
4995 | |||
4996 | current = this_ExpressionArgument_0; | ||
4997 | afterParserOrEnumRuleCall(); | ||
4998 | |||
4999 | |||
5000 | } | ||
5001 | break; | ||
5002 | case 2 : | ||
5003 | // InternalSolverLanguageParser.g:1975:3: this_StarArgument_1= ruleStarArgument | ||
5004 | { | ||
5005 | |||
5006 | newCompositeNode(grammarAccess.getArgumentAccess().getStarArgumentParserRuleCall_1()); | ||
5007 | |||
5008 | pushFollow(FOLLOW_2); | ||
5009 | this_StarArgument_1=ruleStarArgument(); | ||
5010 | |||
5011 | state._fsp--; | ||
5012 | |||
5013 | |||
5014 | current = this_StarArgument_1; | ||
5015 | afterParserOrEnumRuleCall(); | ||
5016 | |||
5017 | |||
5018 | } | ||
5019 | break; | ||
5020 | case 3 : | ||
5021 | // InternalSolverLanguageParser.g:1984:3: this_TypedArgument_2= ruleTypedArgument | ||
5022 | { | ||
5023 | |||
5024 | newCompositeNode(grammarAccess.getArgumentAccess().getTypedArgumentParserRuleCall_2()); | ||
5025 | |||
5026 | pushFollow(FOLLOW_2); | ||
5027 | this_TypedArgument_2=ruleTypedArgument(); | ||
5028 | |||
5029 | state._fsp--; | ||
5030 | |||
5031 | |||
5032 | current = this_TypedArgument_2; | ||
5033 | afterParserOrEnumRuleCall(); | ||
5034 | |||
5035 | |||
5036 | } | ||
5037 | break; | ||
5038 | case 4 : | ||
5039 | // InternalSolverLanguageParser.g:1993:3: this_TypedStarArgument_3= ruleTypedStarArgument | ||
5040 | { | ||
5041 | |||
5042 | newCompositeNode(grammarAccess.getArgumentAccess().getTypedStarArgumentParserRuleCall_3()); | ||
5043 | |||
5044 | pushFollow(FOLLOW_2); | ||
5045 | this_TypedStarArgument_3=ruleTypedStarArgument(); | ||
5046 | |||
5047 | state._fsp--; | ||
5048 | |||
5049 | |||
5050 | current = this_TypedStarArgument_3; | ||
5051 | afterParserOrEnumRuleCall(); | ||
5052 | |||
5053 | |||
5054 | } | ||
5055 | break; | ||
5056 | |||
3407 | } | 5057 | } |
3408 | 5058 | ||
3409 | 5059 | ||
@@ -3422,28 +5072,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3422 | } | 5072 | } |
3423 | return current; | 5073 | return current; |
3424 | } | 5074 | } |
3425 | // $ANTLR end "ruleIntObject" | 5075 | // $ANTLR end "ruleArgument" |
3426 | 5076 | ||
3427 | 5077 | ||
3428 | // $ANTLR start "entryRuleRealObject" | 5078 | // $ANTLR start "entryRuleExpressionArgument" |
3429 | // InternalSolverLanguage.g:1142:1: entryRuleRealObject returns [EObject current=null] : iv_ruleRealObject= ruleRealObject EOF ; | 5079 | // InternalSolverLanguageParser.g:2005:1: entryRuleExpressionArgument returns [EObject current=null] : iv_ruleExpressionArgument= ruleExpressionArgument EOF ; |
3430 | public final EObject entryRuleRealObject() throws RecognitionException { | 5080 | public final EObject entryRuleExpressionArgument() throws RecognitionException { |
3431 | EObject current = null; | 5081 | EObject current = null; |
3432 | 5082 | ||
3433 | EObject iv_ruleRealObject = null; | 5083 | EObject iv_ruleExpressionArgument = null; |
3434 | 5084 | ||
3435 | 5085 | ||
3436 | try { | 5086 | try { |
3437 | // InternalSolverLanguage.g:1142:51: (iv_ruleRealObject= ruleRealObject EOF ) | 5087 | // InternalSolverLanguageParser.g:2005:59: (iv_ruleExpressionArgument= ruleExpressionArgument EOF ) |
3438 | // InternalSolverLanguage.g:1143:2: iv_ruleRealObject= ruleRealObject EOF | 5088 | // InternalSolverLanguageParser.g:2006:2: iv_ruleExpressionArgument= ruleExpressionArgument EOF |
3439 | { | 5089 | { |
3440 | newCompositeNode(grammarAccess.getRealObjectRule()); | 5090 | newCompositeNode(grammarAccess.getExpressionArgumentRule()); |
3441 | pushFollow(FOLLOW_1); | 5091 | pushFollow(FOLLOW_1); |
3442 | iv_ruleRealObject=ruleRealObject(); | 5092 | iv_ruleExpressionArgument=ruleExpressionArgument(); |
3443 | 5093 | ||
3444 | state._fsp--; | 5094 | state._fsp--; |
3445 | 5095 | ||
3446 | current =iv_ruleRealObject; | 5096 | current =iv_ruleExpressionArgument; |
3447 | match(input,EOF,FOLLOW_2); | 5097 | match(input,EOF,FOLLOW_2); |
3448 | 5098 | ||
3449 | } | 5099 | } |
@@ -3458,47 +5108,47 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3458 | } | 5108 | } |
3459 | return current; | 5109 | return current; |
3460 | } | 5110 | } |
3461 | // $ANTLR end "entryRuleRealObject" | 5111 | // $ANTLR end "entryRuleExpressionArgument" |
3462 | 5112 | ||
3463 | 5113 | ||
3464 | // $ANTLR start "ruleRealObject" | 5114 | // $ANTLR start "ruleExpressionArgument" |
3465 | // InternalSolverLanguage.g:1149:1: ruleRealObject returns [EObject current=null] : ( (lv_value_0_0= ruleREALLiteral ) ) ; | 5115 | // InternalSolverLanguageParser.g:2012:1: ruleExpressionArgument returns [EObject current=null] : ( (lv_body_0_0= ruleComparisonExpression ) ) ; |
3466 | public final EObject ruleRealObject() throws RecognitionException { | 5116 | public final EObject ruleExpressionArgument() throws RecognitionException { |
3467 | EObject current = null; | 5117 | EObject current = null; |
3468 | 5118 | ||
3469 | AntlrDatatypeRuleToken lv_value_0_0 = null; | 5119 | EObject lv_body_0_0 = null; |
3470 | 5120 | ||
3471 | 5121 | ||
3472 | 5122 | ||
3473 | enterRule(); | 5123 | enterRule(); |
3474 | 5124 | ||
3475 | try { | 5125 | try { |
3476 | // InternalSolverLanguage.g:1155:2: ( ( (lv_value_0_0= ruleREALLiteral ) ) ) | 5126 | // InternalSolverLanguageParser.g:2018:2: ( ( (lv_body_0_0= ruleComparisonExpression ) ) ) |
3477 | // InternalSolverLanguage.g:1156:2: ( (lv_value_0_0= ruleREALLiteral ) ) | 5127 | // InternalSolverLanguageParser.g:2019:2: ( (lv_body_0_0= ruleComparisonExpression ) ) |
3478 | { | 5128 | { |
3479 | // InternalSolverLanguage.g:1156:2: ( (lv_value_0_0= ruleREALLiteral ) ) | 5129 | // InternalSolverLanguageParser.g:2019:2: ( (lv_body_0_0= ruleComparisonExpression ) ) |
3480 | // InternalSolverLanguage.g:1157:3: (lv_value_0_0= ruleREALLiteral ) | 5130 | // InternalSolverLanguageParser.g:2020:3: (lv_body_0_0= ruleComparisonExpression ) |
3481 | { | 5131 | { |
3482 | // InternalSolverLanguage.g:1157:3: (lv_value_0_0= ruleREALLiteral ) | 5132 | // InternalSolverLanguageParser.g:2020:3: (lv_body_0_0= ruleComparisonExpression ) |
3483 | // InternalSolverLanguage.g:1158:4: lv_value_0_0= ruleREALLiteral | 5133 | // InternalSolverLanguageParser.g:2021:4: lv_body_0_0= ruleComparisonExpression |
3484 | { | 5134 | { |
3485 | 5135 | ||
3486 | newCompositeNode(grammarAccess.getRealObjectAccess().getValueREALLiteralParserRuleCall_0()); | 5136 | newCompositeNode(grammarAccess.getExpressionArgumentAccess().getBodyComparisonExpressionParserRuleCall_0()); |
3487 | 5137 | ||
3488 | pushFollow(FOLLOW_2); | 5138 | pushFollow(FOLLOW_2); |
3489 | lv_value_0_0=ruleREALLiteral(); | 5139 | lv_body_0_0=ruleComparisonExpression(); |
3490 | 5140 | ||
3491 | state._fsp--; | 5141 | state._fsp--; |
3492 | 5142 | ||
3493 | 5143 | ||
3494 | if (current==null) { | 5144 | if (current==null) { |
3495 | current = createModelElementForParent(grammarAccess.getRealObjectRule()); | 5145 | current = createModelElementForParent(grammarAccess.getExpressionArgumentRule()); |
3496 | } | 5146 | } |
3497 | set( | 5147 | set( |
3498 | current, | 5148 | current, |
3499 | "value", | 5149 | "body", |
3500 | lv_value_0_0, | 5150 | lv_body_0_0, |
3501 | "org.eclipse.viatra.solver.language.SolverLanguage.REALLiteral"); | 5151 | "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonExpression"); |
3502 | afterParserOrEnumRuleCall(); | 5152 | afterParserOrEnumRuleCall(); |
3503 | 5153 | ||
3504 | 5154 | ||
@@ -3523,28 +5173,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3523 | } | 5173 | } |
3524 | return current; | 5174 | return current; |
3525 | } | 5175 | } |
3526 | // $ANTLR end "ruleRealObject" | 5176 | // $ANTLR end "ruleExpressionArgument" |
3527 | 5177 | ||
3528 | 5178 | ||
3529 | // $ANTLR start "entryRuleStringObject" | 5179 | // $ANTLR start "entryRuleStarArgument" |
3530 | // InternalSolverLanguage.g:1178:1: entryRuleStringObject returns [EObject current=null] : iv_ruleStringObject= ruleStringObject EOF ; | 5180 | // InternalSolverLanguageParser.g:2041:1: entryRuleStarArgument returns [EObject current=null] : iv_ruleStarArgument= ruleStarArgument EOF ; |
3531 | public final EObject entryRuleStringObject() throws RecognitionException { | 5181 | public final EObject entryRuleStarArgument() throws RecognitionException { |
3532 | EObject current = null; | 5182 | EObject current = null; |
3533 | 5183 | ||
3534 | EObject iv_ruleStringObject = null; | 5184 | EObject iv_ruleStarArgument = null; |
3535 | 5185 | ||
3536 | 5186 | ||
3537 | try { | 5187 | try { |
3538 | // InternalSolverLanguage.g:1178:53: (iv_ruleStringObject= ruleStringObject EOF ) | 5188 | // InternalSolverLanguageParser.g:2041:53: (iv_ruleStarArgument= ruleStarArgument EOF ) |
3539 | // InternalSolverLanguage.g:1179:2: iv_ruleStringObject= ruleStringObject EOF | 5189 | // InternalSolverLanguageParser.g:2042:2: iv_ruleStarArgument= ruleStarArgument EOF |
3540 | { | 5190 | { |
3541 | newCompositeNode(grammarAccess.getStringObjectRule()); | 5191 | newCompositeNode(grammarAccess.getStarArgumentRule()); |
3542 | pushFollow(FOLLOW_1); | 5192 | pushFollow(FOLLOW_1); |
3543 | iv_ruleStringObject=ruleStringObject(); | 5193 | iv_ruleStarArgument=ruleStarArgument(); |
3544 | 5194 | ||
3545 | state._fsp--; | 5195 | state._fsp--; |
3546 | 5196 | ||
3547 | current =iv_ruleStringObject; | 5197 | current =iv_ruleStarArgument; |
3548 | match(input,EOF,FOLLOW_2); | 5198 | match(input,EOF,FOLLOW_2); |
3549 | 5199 | ||
3550 | } | 5200 | } |
@@ -3559,46 +5209,41 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3559 | } | 5209 | } |
3560 | return current; | 5210 | return current; |
3561 | } | 5211 | } |
3562 | // $ANTLR end "entryRuleStringObject" | 5212 | // $ANTLR end "entryRuleStarArgument" |
3563 | 5213 | ||
3564 | 5214 | ||
3565 | // $ANTLR start "ruleStringObject" | 5215 | // $ANTLR start "ruleStarArgument" |
3566 | // InternalSolverLanguage.g:1185:1: ruleStringObject returns [EObject current=null] : ( (lv_value_0_0= RULE_STRING ) ) ; | 5216 | // InternalSolverLanguageParser.g:2048:1: ruleStarArgument returns [EObject current=null] : ( () otherlv_1= Asterisk ) ; |
3567 | public final EObject ruleStringObject() throws RecognitionException { | 5217 | public final EObject ruleStarArgument() throws RecognitionException { |
3568 | EObject current = null; | 5218 | EObject current = null; |
3569 | 5219 | ||
3570 | Token lv_value_0_0=null; | 5220 | Token otherlv_1=null; |
3571 | 5221 | ||
3572 | 5222 | ||
3573 | enterRule(); | 5223 | enterRule(); |
3574 | 5224 | ||
3575 | try { | 5225 | try { |
3576 | // InternalSolverLanguage.g:1191:2: ( ( (lv_value_0_0= RULE_STRING ) ) ) | 5226 | // InternalSolverLanguageParser.g:2054:2: ( ( () otherlv_1= Asterisk ) ) |
3577 | // InternalSolverLanguage.g:1192:2: ( (lv_value_0_0= RULE_STRING ) ) | 5227 | // InternalSolverLanguageParser.g:2055:2: ( () otherlv_1= Asterisk ) |
3578 | { | 5228 | { |
3579 | // InternalSolverLanguage.g:1192:2: ( (lv_value_0_0= RULE_STRING ) ) | 5229 | // InternalSolverLanguageParser.g:2055:2: ( () otherlv_1= Asterisk ) |
3580 | // InternalSolverLanguage.g:1193:3: (lv_value_0_0= RULE_STRING ) | 5230 | // InternalSolverLanguageParser.g:2056:3: () otherlv_1= Asterisk |
3581 | { | 5231 | { |
3582 | // InternalSolverLanguage.g:1193:3: (lv_value_0_0= RULE_STRING ) | 5232 | // InternalSolverLanguageParser.g:2056:3: () |
3583 | // InternalSolverLanguage.g:1194:4: lv_value_0_0= RULE_STRING | 5233 | // InternalSolverLanguageParser.g:2057:4: |
3584 | { | 5234 | { |
3585 | lv_value_0_0=(Token)match(input,RULE_STRING,FOLLOW_2); | ||
3586 | |||
3587 | newLeafNode(lv_value_0_0, grammarAccess.getStringObjectAccess().getValueSTRINGTerminalRuleCall_0()); | ||
3588 | |||
3589 | 5235 | ||
3590 | if (current==null) { | 5236 | current = forceCreateModelElement( |
3591 | current = createModelElement(grammarAccess.getStringObjectRule()); | 5237 | grammarAccess.getStarArgumentAccess().getStarArgumentAction_0(), |
3592 | } | 5238 | current); |
3593 | setWithLastConsumed( | ||
3594 | current, | ||
3595 | "value", | ||
3596 | lv_value_0_0, | ||
3597 | "org.eclipse.viatra.solver.language.SolverLanguage.STRING"); | ||
3598 | 5239 | ||
3599 | 5240 | ||
3600 | } | 5241 | } |
3601 | 5242 | ||
5243 | otherlv_1=(Token)match(input,Asterisk,FOLLOW_2); | ||
5244 | |||
5245 | newLeafNode(otherlv_1, grammarAccess.getStarArgumentAccess().getAsteriskKeyword_1()); | ||
5246 | |||
3602 | 5247 | ||
3603 | } | 5248 | } |
3604 | 5249 | ||
@@ -3618,28 +5263,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3618 | } | 5263 | } |
3619 | return current; | 5264 | return current; |
3620 | } | 5265 | } |
3621 | // $ANTLR end "ruleStringObject" | 5266 | // $ANTLR end "ruleStarArgument" |
3622 | 5267 | ||
3623 | 5268 | ||
3624 | // $ANTLR start "entryRulePredicate" | 5269 | // $ANTLR start "entryRuleTypedArgument" |
3625 | // InternalSolverLanguage.g:1213:1: entryRulePredicate returns [EObject current=null] : iv_rulePredicate= rulePredicate EOF ; | 5270 | // InternalSolverLanguageParser.g:2071:1: entryRuleTypedArgument returns [EObject current=null] : iv_ruleTypedArgument= ruleTypedArgument EOF ; |
3626 | public final EObject entryRulePredicate() throws RecognitionException { | 5271 | public final EObject entryRuleTypedArgument() throws RecognitionException { |
3627 | EObject current = null; | 5272 | EObject current = null; |
3628 | 5273 | ||
3629 | EObject iv_rulePredicate = null; | 5274 | EObject iv_ruleTypedArgument = null; |
3630 | 5275 | ||
3631 | 5276 | ||
3632 | try { | 5277 | try { |
3633 | // InternalSolverLanguage.g:1213:50: (iv_rulePredicate= rulePredicate EOF ) | 5278 | // InternalSolverLanguageParser.g:2071:54: (iv_ruleTypedArgument= ruleTypedArgument EOF ) |
3634 | // InternalSolverLanguage.g:1214:2: iv_rulePredicate= rulePredicate EOF | 5279 | // InternalSolverLanguageParser.g:2072:2: iv_ruleTypedArgument= ruleTypedArgument EOF |
3635 | { | 5280 | { |
3636 | newCompositeNode(grammarAccess.getPredicateRule()); | 5281 | newCompositeNode(grammarAccess.getTypedArgumentRule()); |
3637 | pushFollow(FOLLOW_1); | 5282 | pushFollow(FOLLOW_1); |
3638 | iv_rulePredicate=rulePredicate(); | 5283 | iv_ruleTypedArgument=ruleTypedArgument(); |
3639 | 5284 | ||
3640 | state._fsp--; | 5285 | state._fsp--; |
3641 | 5286 | ||
3642 | current =iv_rulePredicate; | 5287 | current =iv_ruleTypedArgument; |
3643 | match(input,EOF,FOLLOW_2); | 5288 | match(input,EOF,FOLLOW_2); |
3644 | 5289 | ||
3645 | } | 5290 | } |
@@ -3654,99 +5299,72 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3654 | } | 5299 | } |
3655 | return current; | 5300 | return current; |
3656 | } | 5301 | } |
3657 | // $ANTLR end "entryRulePredicate" | 5302 | // $ANTLR end "entryRuleTypedArgument" |
3658 | 5303 | ||
3659 | 5304 | ||
3660 | // $ANTLR start "rulePredicate" | 5305 | // $ANTLR start "ruleTypedArgument" |
3661 | // InternalSolverLanguage.g:1220:1: rulePredicate returns [EObject current=null] : ( ( (lv_isError_0_0= 'error' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* )? otherlv_6= ')' )? otherlv_7= ':-' (otherlv_8= 'false' | ( ( (lv_bodies_9_0= rulePatternBody ) ) (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* ) ) otherlv_12= '.' ) ; | 5306 | // InternalSolverLanguageParser.g:2078:1: ruleTypedArgument returns [EObject current=null] : ( ( ( ruleQualifiedName ) ) ( ( ruleQualifiedName ) ) ) ; |
3662 | public final EObject rulePredicate() throws RecognitionException { | 5307 | public final EObject ruleTypedArgument() throws RecognitionException { |
3663 | EObject current = null; | 5308 | EObject current = null; |
3664 | 5309 | ||
3665 | Token lv_isError_0_0=null; | ||
3666 | Token otherlv_2=null; | ||
3667 | Token otherlv_4=null; | ||
3668 | Token otherlv_6=null; | ||
3669 | Token otherlv_7=null; | ||
3670 | Token otherlv_8=null; | ||
3671 | Token otherlv_10=null; | ||
3672 | Token otherlv_12=null; | ||
3673 | EObject lv_symbol_1_0 = null; | ||
3674 | |||
3675 | EObject lv_parameters_3_0 = null; | ||
3676 | |||
3677 | EObject lv_parameters_5_0 = null; | ||
3678 | |||
3679 | EObject lv_bodies_9_0 = null; | ||
3680 | |||
3681 | EObject lv_bodies_11_0 = null; | ||
3682 | |||
3683 | |||
3684 | 5310 | ||
3685 | enterRule(); | 5311 | enterRule(); |
3686 | 5312 | ||
3687 | try { | 5313 | try { |
3688 | // InternalSolverLanguage.g:1226:2: ( ( ( (lv_isError_0_0= 'error' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* )? otherlv_6= ')' )? otherlv_7= ':-' (otherlv_8= 'false' | ( ( (lv_bodies_9_0= rulePatternBody ) ) (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* ) ) otherlv_12= '.' ) ) | 5314 | // InternalSolverLanguageParser.g:2084:2: ( ( ( ( ruleQualifiedName ) ) ( ( ruleQualifiedName ) ) ) ) |
3689 | // InternalSolverLanguage.g:1227:2: ( ( (lv_isError_0_0= 'error' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* )? otherlv_6= ')' )? otherlv_7= ':-' (otherlv_8= 'false' | ( ( (lv_bodies_9_0= rulePatternBody ) ) (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* ) ) otherlv_12= '.' ) | 5315 | // InternalSolverLanguageParser.g:2085:2: ( ( ( ruleQualifiedName ) ) ( ( ruleQualifiedName ) ) ) |
3690 | { | 5316 | { |
3691 | // InternalSolverLanguage.g:1227:2: ( ( (lv_isError_0_0= 'error' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* )? otherlv_6= ')' )? otherlv_7= ':-' (otherlv_8= 'false' | ( ( (lv_bodies_9_0= rulePatternBody ) ) (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* ) ) otherlv_12= '.' ) | 5317 | // InternalSolverLanguageParser.g:2085:2: ( ( ( ruleQualifiedName ) ) ( ( ruleQualifiedName ) ) ) |
3692 | // InternalSolverLanguage.g:1228:3: ( (lv_isError_0_0= 'error' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* )? otherlv_6= ')' )? otherlv_7= ':-' (otherlv_8= 'false' | ( ( (lv_bodies_9_0= rulePatternBody ) ) (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* ) ) otherlv_12= '.' | 5318 | // InternalSolverLanguageParser.g:2086:3: ( ( ruleQualifiedName ) ) ( ( ruleQualifiedName ) ) |
5319 | { | ||
5320 | // InternalSolverLanguageParser.g:2086:3: ( ( ruleQualifiedName ) ) | ||
5321 | // InternalSolverLanguageParser.g:2087:4: ( ruleQualifiedName ) | ||
5322 | { | ||
5323 | // InternalSolverLanguageParser.g:2087:4: ( ruleQualifiedName ) | ||
5324 | // InternalSolverLanguageParser.g:2088:5: ruleQualifiedName | ||
3693 | { | 5325 | { |
3694 | // InternalSolverLanguage.g:1228:3: ( (lv_isError_0_0= 'error' ) )? | ||
3695 | int alt17=2; | ||
3696 | int LA17_0 = input.LA(1); | ||
3697 | 5326 | ||
3698 | if ( (LA17_0==16) ) { | 5327 | if (current==null) { |
3699 | alt17=1; | 5328 | current = createModelElement(grammarAccess.getTypedArgumentRule()); |
3700 | } | 5329 | } |
3701 | switch (alt17) { | 5330 | |
3702 | case 1 : | ||
3703 | // InternalSolverLanguage.g:1229:4: (lv_isError_0_0= 'error' ) | ||
3704 | { | ||
3705 | // InternalSolverLanguage.g:1229:4: (lv_isError_0_0= 'error' ) | ||
3706 | // InternalSolverLanguage.g:1230:5: lv_isError_0_0= 'error' | ||
3707 | { | ||
3708 | lv_isError_0_0=(Token)match(input,16,FOLLOW_12); | ||
3709 | 5331 | ||
3710 | newLeafNode(lv_isError_0_0, grammarAccess.getPredicateAccess().getIsErrorErrorKeyword_0_0()); | 5332 | newCompositeNode(grammarAccess.getTypedArgumentAccess().getTypeNamedElementCrossReference_0_0()); |
3711 | 5333 | ||
5334 | pushFollow(FOLLOW_8); | ||
5335 | ruleQualifiedName(); | ||
3712 | 5336 | ||
3713 | if (current==null) { | 5337 | state._fsp--; |
3714 | current = createModelElement(grammarAccess.getPredicateRule()); | ||
3715 | } | ||
3716 | setWithLastConsumed(current, "isError", true, "error"); | ||
3717 | |||
3718 | 5338 | ||
3719 | } | ||
3720 | 5339 | ||
5340 | afterParserOrEnumRuleCall(); | ||
5341 | |||
5342 | |||
5343 | } | ||
3721 | 5344 | ||
3722 | } | ||
3723 | break; | ||
3724 | 5345 | ||
3725 | } | 5346 | } |
3726 | 5347 | ||
3727 | // InternalSolverLanguage.g:1242:3: ( (lv_symbol_1_0= ruleModelSymbol ) ) | 5348 | // InternalSolverLanguageParser.g:2102:3: ( ( ruleQualifiedName ) ) |
3728 | // InternalSolverLanguage.g:1243:4: (lv_symbol_1_0= ruleModelSymbol ) | 5349 | // InternalSolverLanguageParser.g:2103:4: ( ruleQualifiedName ) |
3729 | { | 5350 | { |
3730 | // InternalSolverLanguage.g:1243:4: (lv_symbol_1_0= ruleModelSymbol ) | 5351 | // InternalSolverLanguageParser.g:2103:4: ( ruleQualifiedName ) |
3731 | // InternalSolverLanguage.g:1244:5: lv_symbol_1_0= ruleModelSymbol | 5352 | // InternalSolverLanguageParser.g:2104:5: ruleQualifiedName |
3732 | { | 5353 | { |
3733 | 5354 | ||
3734 | newCompositeNode(grammarAccess.getPredicateAccess().getSymbolModelSymbolParserRuleCall_1_0()); | 5355 | if (current==null) { |
5356 | current = createModelElement(grammarAccess.getTypedArgumentRule()); | ||
5357 | } | ||
5358 | |||
5359 | |||
5360 | newCompositeNode(grammarAccess.getTypedArgumentAccess().getVariableNamedElementCrossReference_1_0()); | ||
3735 | 5361 | ||
3736 | pushFollow(FOLLOW_14); | 5362 | pushFollow(FOLLOW_2); |
3737 | lv_symbol_1_0=ruleModelSymbol(); | 5363 | ruleQualifiedName(); |
3738 | 5364 | ||
3739 | state._fsp--; | 5365 | state._fsp--; |
3740 | 5366 | ||
3741 | 5367 | ||
3742 | if (current==null) { | ||
3743 | current = createModelElementForParent(grammarAccess.getPredicateRule()); | ||
3744 | } | ||
3745 | set( | ||
3746 | current, | ||
3747 | "symbol", | ||
3748 | lv_symbol_1_0, | ||
3749 | "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); | ||
3750 | afterParserOrEnumRuleCall(); | 5368 | afterParserOrEnumRuleCall(); |
3751 | 5369 | ||
3752 | 5370 | ||
@@ -3755,278 +5373,208 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
3755 | 5373 | ||
3756 | } | 5374 | } |
3757 | 5375 | ||
3758 | // InternalSolverLanguage.g:1261:3: (otherlv_2= '(' ( ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* )? otherlv_6= ')' )? | ||
3759 | int alt20=2; | ||
3760 | int LA20_0 = input.LA(1); | ||
3761 | 5376 | ||
3762 | if ( (LA20_0==17) ) { | ||
3763 | alt20=1; | ||
3764 | } | 5377 | } |
3765 | switch (alt20) { | ||
3766 | case 1 : | ||
3767 | // InternalSolverLanguage.g:1262:4: otherlv_2= '(' ( ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* )? otherlv_6= ')' | ||
3768 | { | ||
3769 | otherlv_2=(Token)match(input,17,FOLLOW_15); | ||
3770 | |||
3771 | newLeafNode(otherlv_2, grammarAccess.getPredicateAccess().getLeftParenthesisKeyword_2_0()); | ||
3772 | |||
3773 | // InternalSolverLanguage.g:1266:4: ( ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* )? | ||
3774 | int alt19=2; | ||
3775 | int LA19_0 = input.LA(1); | ||
3776 | 5378 | ||
3777 | if ( (LA19_0==RULE_ID) ) { | ||
3778 | alt19=1; | ||
3779 | } | ||
3780 | switch (alt19) { | ||
3781 | case 1 : | ||
3782 | // InternalSolverLanguage.g:1267:5: ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* | ||
3783 | { | ||
3784 | // InternalSolverLanguage.g:1267:5: ( (lv_parameters_3_0= ruleParameter ) ) | ||
3785 | // InternalSolverLanguage.g:1268:6: (lv_parameters_3_0= ruleParameter ) | ||
3786 | { | ||
3787 | // InternalSolverLanguage.g:1268:6: (lv_parameters_3_0= ruleParameter ) | ||
3788 | // InternalSolverLanguage.g:1269:7: lv_parameters_3_0= ruleParameter | ||
3789 | { | ||
3790 | 5379 | ||
3791 | newCompositeNode(grammarAccess.getPredicateAccess().getParametersParameterParserRuleCall_2_1_0_0()); | 5380 | } |
3792 | |||
3793 | pushFollow(FOLLOW_8); | ||
3794 | lv_parameters_3_0=ruleParameter(); | ||
3795 | 5381 | ||
3796 | state._fsp--; | ||
3797 | 5382 | ||
5383 | leaveRule(); | ||
3798 | 5384 | ||
3799 | if (current==null) { | 5385 | } |
3800 | current = createModelElementForParent(grammarAccess.getPredicateRule()); | ||
3801 | } | ||
3802 | add( | ||
3803 | current, | ||
3804 | "parameters", | ||
3805 | lv_parameters_3_0, | ||
3806 | "org.eclipse.viatra.solver.language.SolverLanguage.Parameter"); | ||
3807 | afterParserOrEnumRuleCall(); | ||
3808 | |||
3809 | 5386 | ||
3810 | } | 5387 | catch (RecognitionException re) { |
5388 | recover(input,re); | ||
5389 | appendSkippedTokens(); | ||
5390 | } | ||
5391 | finally { | ||
5392 | } | ||
5393 | return current; | ||
5394 | } | ||
5395 | // $ANTLR end "ruleTypedArgument" | ||
3811 | 5396 | ||
3812 | 5397 | ||
3813 | } | 5398 | // $ANTLR start "entryRuleTypedStarArgument" |
5399 | // InternalSolverLanguageParser.g:2122:1: entryRuleTypedStarArgument returns [EObject current=null] : iv_ruleTypedStarArgument= ruleTypedStarArgument EOF ; | ||
5400 | public final EObject entryRuleTypedStarArgument() throws RecognitionException { | ||
5401 | EObject current = null; | ||
3814 | 5402 | ||
3815 | // InternalSolverLanguage.g:1286:5: (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* | 5403 | EObject iv_ruleTypedStarArgument = null; |
3816 | loop18: | ||
3817 | do { | ||
3818 | int alt18=2; | ||
3819 | int LA18_0 = input.LA(1); | ||
3820 | 5404 | ||
3821 | if ( (LA18_0==18) ) { | ||
3822 | alt18=1; | ||
3823 | } | ||
3824 | 5405 | ||
5406 | try { | ||
5407 | // InternalSolverLanguageParser.g:2122:58: (iv_ruleTypedStarArgument= ruleTypedStarArgument EOF ) | ||
5408 | // InternalSolverLanguageParser.g:2123:2: iv_ruleTypedStarArgument= ruleTypedStarArgument EOF | ||
5409 | { | ||
5410 | newCompositeNode(grammarAccess.getTypedStarArgumentRule()); | ||
5411 | pushFollow(FOLLOW_1); | ||
5412 | iv_ruleTypedStarArgument=ruleTypedStarArgument(); | ||
3825 | 5413 | ||
3826 | switch (alt18) { | 5414 | state._fsp--; |
3827 | case 1 : | ||
3828 | // InternalSolverLanguage.g:1287:6: otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) | ||
3829 | { | ||
3830 | otherlv_4=(Token)match(input,18,FOLLOW_12); | ||
3831 | 5415 | ||
3832 | newLeafNode(otherlv_4, grammarAccess.getPredicateAccess().getCommaKeyword_2_1_1_0()); | 5416 | current =iv_ruleTypedStarArgument; |
3833 | 5417 | match(input,EOF,FOLLOW_2); | |
3834 | // InternalSolverLanguage.g:1291:6: ( (lv_parameters_5_0= ruleParameter ) ) | ||
3835 | // InternalSolverLanguage.g:1292:7: (lv_parameters_5_0= ruleParameter ) | ||
3836 | { | ||
3837 | // InternalSolverLanguage.g:1292:7: (lv_parameters_5_0= ruleParameter ) | ||
3838 | // InternalSolverLanguage.g:1293:8: lv_parameters_5_0= ruleParameter | ||
3839 | { | ||
3840 | 5418 | ||
3841 | newCompositeNode(grammarAccess.getPredicateAccess().getParametersParameterParserRuleCall_2_1_1_1_0()); | 5419 | } |
3842 | |||
3843 | pushFollow(FOLLOW_8); | ||
3844 | lv_parameters_5_0=ruleParameter(); | ||
3845 | 5420 | ||
3846 | state._fsp--; | 5421 | } |
3847 | 5422 | ||
5423 | catch (RecognitionException re) { | ||
5424 | recover(input,re); | ||
5425 | appendSkippedTokens(); | ||
5426 | } | ||
5427 | finally { | ||
5428 | } | ||
5429 | return current; | ||
5430 | } | ||
5431 | // $ANTLR end "entryRuleTypedStarArgument" | ||
3848 | 5432 | ||
3849 | if (current==null) { | ||
3850 | current = createModelElementForParent(grammarAccess.getPredicateRule()); | ||
3851 | } | ||
3852 | add( | ||
3853 | current, | ||
3854 | "parameters", | ||
3855 | lv_parameters_5_0, | ||
3856 | "org.eclipse.viatra.solver.language.SolverLanguage.Parameter"); | ||
3857 | afterParserOrEnumRuleCall(); | ||
3858 | |||
3859 | 5433 | ||
3860 | } | 5434 | // $ANTLR start "ruleTypedStarArgument" |
5435 | // InternalSolverLanguageParser.g:2129:1: ruleTypedStarArgument returns [EObject current=null] : ( ( ( ruleQualifiedName ) ) otherlv_1= Asterisk ) ; | ||
5436 | public final EObject ruleTypedStarArgument() throws RecognitionException { | ||
5437 | EObject current = null; | ||
3861 | 5438 | ||
5439 | Token otherlv_1=null; | ||
3862 | 5440 | ||
3863 | } | ||
3864 | 5441 | ||
5442 | enterRule(); | ||
3865 | 5443 | ||
3866 | } | 5444 | try { |
3867 | break; | 5445 | // InternalSolverLanguageParser.g:2135:2: ( ( ( ( ruleQualifiedName ) ) otherlv_1= Asterisk ) ) |
5446 | // InternalSolverLanguageParser.g:2136:2: ( ( ( ruleQualifiedName ) ) otherlv_1= Asterisk ) | ||
5447 | { | ||
5448 | // InternalSolverLanguageParser.g:2136:2: ( ( ( ruleQualifiedName ) ) otherlv_1= Asterisk ) | ||
5449 | // InternalSolverLanguageParser.g:2137:3: ( ( ruleQualifiedName ) ) otherlv_1= Asterisk | ||
5450 | { | ||
5451 | // InternalSolverLanguageParser.g:2137:3: ( ( ruleQualifiedName ) ) | ||
5452 | // InternalSolverLanguageParser.g:2138:4: ( ruleQualifiedName ) | ||
5453 | { | ||
5454 | // InternalSolverLanguageParser.g:2138:4: ( ruleQualifiedName ) | ||
5455 | // InternalSolverLanguageParser.g:2139:5: ruleQualifiedName | ||
5456 | { | ||
3868 | 5457 | ||
3869 | default : | 5458 | if (current==null) { |
3870 | break loop18; | 5459 | current = createModelElement(grammarAccess.getTypedStarArgumentRule()); |
3871 | } | 5460 | } |
3872 | } while (true); | 5461 | |
3873 | 5462 | ||
5463 | newCompositeNode(grammarAccess.getTypedStarArgumentAccess().getTypeNamedElementCrossReference_0_0()); | ||
5464 | |||
5465 | pushFollow(FOLLOW_34); | ||
5466 | ruleQualifiedName(); | ||
3874 | 5467 | ||
3875 | } | 5468 | state._fsp--; |
3876 | break; | ||
3877 | 5469 | ||
3878 | } | ||
3879 | 5470 | ||
3880 | otherlv_6=(Token)match(input,19,FOLLOW_16); | 5471 | afterParserOrEnumRuleCall(); |
5472 | |||
3881 | 5473 | ||
3882 | newLeafNode(otherlv_6, grammarAccess.getPredicateAccess().getRightParenthesisKeyword_2_2()); | 5474 | } |
3883 | |||
3884 | 5475 | ||
3885 | } | ||
3886 | break; | ||
3887 | 5476 | ||
3888 | } | 5477 | } |
3889 | 5478 | ||
3890 | otherlv_7=(Token)match(input,28,FOLLOW_17); | 5479 | otherlv_1=(Token)match(input,Asterisk,FOLLOW_2); |
3891 | 5480 | ||
3892 | newLeafNode(otherlv_7, grammarAccess.getPredicateAccess().getColonHyphenMinusKeyword_3()); | 5481 | newLeafNode(otherlv_1, grammarAccess.getTypedStarArgumentAccess().getAsteriskKeyword_1()); |
3893 | 5482 | ||
3894 | // InternalSolverLanguage.g:1321:3: (otherlv_8= 'false' | ( ( (lv_bodies_9_0= rulePatternBody ) ) (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* ) ) | ||
3895 | int alt22=2; | ||
3896 | int LA22_0 = input.LA(1); | ||
3897 | 5483 | ||
3898 | if ( (LA22_0==14) ) { | ||
3899 | alt22=1; | ||
3900 | } | ||
3901 | else if ( (LA22_0==EOF||LA22_0==RULE_ID||(LA22_0>=11 && LA22_0<=13)||(LA22_0>=29 && LA22_0<=31)) ) { | ||
3902 | alt22=2; | ||
3903 | } | 5484 | } |
3904 | else { | ||
3905 | NoViableAltException nvae = | ||
3906 | new NoViableAltException("", 22, 0, input); | ||
3907 | |||
3908 | throw nvae; | ||
3909 | } | ||
3910 | switch (alt22) { | ||
3911 | case 1 : | ||
3912 | // InternalSolverLanguage.g:1322:4: otherlv_8= 'false' | ||
3913 | { | ||
3914 | otherlv_8=(Token)match(input,14,FOLLOW_5); | ||
3915 | |||
3916 | newLeafNode(otherlv_8, grammarAccess.getPredicateAccess().getFalseKeyword_4_0()); | ||
3917 | |||
3918 | |||
3919 | } | ||
3920 | break; | ||
3921 | case 2 : | ||
3922 | // InternalSolverLanguage.g:1327:4: ( ( (lv_bodies_9_0= rulePatternBody ) ) (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* ) | ||
3923 | { | ||
3924 | // InternalSolverLanguage.g:1327:4: ( ( (lv_bodies_9_0= rulePatternBody ) ) (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* ) | ||
3925 | // InternalSolverLanguage.g:1328:5: ( (lv_bodies_9_0= rulePatternBody ) ) (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* | ||
3926 | { | ||
3927 | // InternalSolverLanguage.g:1328:5: ( (lv_bodies_9_0= rulePatternBody ) ) | ||
3928 | // InternalSolverLanguage.g:1329:6: (lv_bodies_9_0= rulePatternBody ) | ||
3929 | { | ||
3930 | // InternalSolverLanguage.g:1329:6: (lv_bodies_9_0= rulePatternBody ) | ||
3931 | // InternalSolverLanguage.g:1330:7: lv_bodies_9_0= rulePatternBody | ||
3932 | { | ||
3933 | 5485 | ||
3934 | newCompositeNode(grammarAccess.getPredicateAccess().getBodiesPatternBodyParserRuleCall_4_1_0_0()); | ||
3935 | |||
3936 | pushFollow(FOLLOW_18); | ||
3937 | lv_bodies_9_0=rulePatternBody(); | ||
3938 | 5486 | ||
3939 | state._fsp--; | 5487 | } |
3940 | 5488 | ||
3941 | 5489 | ||
3942 | if (current==null) { | 5490 | leaveRule(); |
3943 | current = createModelElementForParent(grammarAccess.getPredicateRule()); | ||
3944 | } | ||
3945 | add( | ||
3946 | current, | ||
3947 | "bodies", | ||
3948 | lv_bodies_9_0, | ||
3949 | "org.eclipse.viatra.solver.language.SolverLanguage.PatternBody"); | ||
3950 | afterParserOrEnumRuleCall(); | ||
3951 | |||
3952 | 5491 | ||
3953 | } | 5492 | } |
3954 | 5493 | ||
5494 | catch (RecognitionException re) { | ||
5495 | recover(input,re); | ||
5496 | appendSkippedTokens(); | ||
5497 | } | ||
5498 | finally { | ||
5499 | } | ||
5500 | return current; | ||
5501 | } | ||
5502 | // $ANTLR end "ruleTypedStarArgument" | ||
3955 | 5503 | ||
3956 | } | ||
3957 | 5504 | ||
3958 | // InternalSolverLanguage.g:1347:5: (otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) )* | 5505 | // $ANTLR start "entryRuleReference" |
3959 | loop21: | 5506 | // InternalSolverLanguageParser.g:2161:1: entryRuleReference returns [EObject current=null] : iv_ruleReference= ruleReference EOF ; |
3960 | do { | 5507 | public final EObject entryRuleReference() throws RecognitionException { |
3961 | int alt21=2; | 5508 | EObject current = null; |
3962 | int LA21_0 = input.LA(1); | ||
3963 | 5509 | ||
3964 | if ( (LA21_0==29) ) { | 5510 | EObject iv_ruleReference = null; |
3965 | alt21=1; | ||
3966 | } | ||
3967 | 5511 | ||
3968 | 5512 | ||
3969 | switch (alt21) { | 5513 | try { |
3970 | case 1 : | 5514 | // InternalSolverLanguageParser.g:2161:50: (iv_ruleReference= ruleReference EOF ) |
3971 | // InternalSolverLanguage.g:1348:6: otherlv_10= '|' ( (lv_bodies_11_0= rulePatternBody ) ) | 5515 | // InternalSolverLanguageParser.g:2162:2: iv_ruleReference= ruleReference EOF |
3972 | { | 5516 | { |
3973 | otherlv_10=(Token)match(input,29,FOLLOW_19); | 5517 | newCompositeNode(grammarAccess.getReferenceRule()); |
5518 | pushFollow(FOLLOW_1); | ||
5519 | iv_ruleReference=ruleReference(); | ||
3974 | 5520 | ||
3975 | newLeafNode(otherlv_10, grammarAccess.getPredicateAccess().getVerticalLineKeyword_4_1_1_0()); | 5521 | state._fsp--; |
3976 | |||
3977 | // InternalSolverLanguage.g:1352:6: ( (lv_bodies_11_0= rulePatternBody ) ) | ||
3978 | // InternalSolverLanguage.g:1353:7: (lv_bodies_11_0= rulePatternBody ) | ||
3979 | { | ||
3980 | // InternalSolverLanguage.g:1353:7: (lv_bodies_11_0= rulePatternBody ) | ||
3981 | // InternalSolverLanguage.g:1354:8: lv_bodies_11_0= rulePatternBody | ||
3982 | { | ||
3983 | 5522 | ||
3984 | newCompositeNode(grammarAccess.getPredicateAccess().getBodiesPatternBodyParserRuleCall_4_1_1_1_0()); | 5523 | current =iv_ruleReference; |
3985 | 5524 | match(input,EOF,FOLLOW_2); | |
3986 | pushFollow(FOLLOW_18); | ||
3987 | lv_bodies_11_0=rulePatternBody(); | ||
3988 | 5525 | ||
3989 | state._fsp--; | 5526 | } |
3990 | 5527 | ||
5528 | } | ||
3991 | 5529 | ||
3992 | if (current==null) { | 5530 | catch (RecognitionException re) { |
3993 | current = createModelElementForParent(grammarAccess.getPredicateRule()); | 5531 | recover(input,re); |
3994 | } | 5532 | appendSkippedTokens(); |
3995 | add( | 5533 | } |
3996 | current, | 5534 | finally { |
3997 | "bodies", | 5535 | } |
3998 | lv_bodies_11_0, | 5536 | return current; |
3999 | "org.eclipse.viatra.solver.language.SolverLanguage.PatternBody"); | 5537 | } |
4000 | afterParserOrEnumRuleCall(); | 5538 | // $ANTLR end "entryRuleReference" |
4001 | |||
4002 | 5539 | ||
4003 | } | ||
4004 | 5540 | ||
5541 | // $ANTLR start "ruleReference" | ||
5542 | // InternalSolverLanguageParser.g:2168:1: ruleReference returns [EObject current=null] : ( ( ruleQualifiedName ) ) ; | ||
5543 | public final EObject ruleReference() throws RecognitionException { | ||
5544 | EObject current = null; | ||
4005 | 5545 | ||
4006 | } | ||
4007 | 5546 | ||
5547 | enterRule(); | ||
4008 | 5548 | ||
4009 | } | 5549 | try { |
4010 | break; | 5550 | // InternalSolverLanguageParser.g:2174:2: ( ( ( ruleQualifiedName ) ) ) |
5551 | // InternalSolverLanguageParser.g:2175:2: ( ( ruleQualifiedName ) ) | ||
5552 | { | ||
5553 | // InternalSolverLanguageParser.g:2175:2: ( ( ruleQualifiedName ) ) | ||
5554 | // InternalSolverLanguageParser.g:2176:3: ( ruleQualifiedName ) | ||
5555 | { | ||
5556 | // InternalSolverLanguageParser.g:2176:3: ( ruleQualifiedName ) | ||
5557 | // InternalSolverLanguageParser.g:2177:4: ruleQualifiedName | ||
5558 | { | ||
4011 | 5559 | ||
4012 | default : | 5560 | if (current==null) { |
4013 | break loop21; | 5561 | current = createModelElement(grammarAccess.getReferenceRule()); |
4014 | } | 5562 | } |
4015 | } while (true); | 5563 | |
4016 | 5564 | ||
5565 | newCompositeNode(grammarAccess.getReferenceAccess().getReferredNamedElementCrossReference_0()); | ||
5566 | |||
5567 | pushFollow(FOLLOW_2); | ||
5568 | ruleQualifiedName(); | ||
4017 | 5569 | ||
4018 | } | 5570 | state._fsp--; |
4019 | 5571 | ||
4020 | 5572 | ||
4021 | } | 5573 | afterParserOrEnumRuleCall(); |
4022 | break; | 5574 | |
4023 | 5575 | ||
4024 | } | 5576 | } |
4025 | 5577 | ||
4026 | otherlv_12=(Token)match(input,12,FOLLOW_2); | ||
4027 | |||
4028 | newLeafNode(otherlv_12, grammarAccess.getPredicateAccess().getFullStopKeyword_5()); | ||
4029 | |||
4030 | 5578 | ||
4031 | } | 5579 | } |
4032 | 5580 | ||
@@ -4046,28 +5594,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4046 | } | 5594 | } |
4047 | return current; | 5595 | return current; |
4048 | } | 5596 | } |
4049 | // $ANTLR end "rulePredicate" | 5597 | // $ANTLR end "ruleReference" |
4050 | 5598 | ||
4051 | 5599 | ||
4052 | // $ANTLR start "entryRuleParameter" | 5600 | // $ANTLR start "entryRuleInterval" |
4053 | // InternalSolverLanguage.g:1382:1: entryRuleParameter returns [EObject current=null] : iv_ruleParameter= ruleParameter EOF ; | 5601 | // InternalSolverLanguageParser.g:2194:1: entryRuleInterval returns [EObject current=null] : iv_ruleInterval= ruleInterval EOF ; |
4054 | public final EObject entryRuleParameter() throws RecognitionException { | 5602 | public final EObject entryRuleInterval() throws RecognitionException { |
4055 | EObject current = null; | 5603 | EObject current = null; |
4056 | 5604 | ||
4057 | EObject iv_ruleParameter = null; | 5605 | EObject iv_ruleInterval = null; |
4058 | 5606 | ||
4059 | 5607 | ||
4060 | try { | 5608 | try { |
4061 | // InternalSolverLanguage.g:1382:50: (iv_ruleParameter= ruleParameter EOF ) | 5609 | // InternalSolverLanguageParser.g:2194:49: (iv_ruleInterval= ruleInterval EOF ) |
4062 | // InternalSolverLanguage.g:1383:2: iv_ruleParameter= ruleParameter EOF | 5610 | // InternalSolverLanguageParser.g:2195:2: iv_ruleInterval= ruleInterval EOF |
4063 | { | 5611 | { |
4064 | newCompositeNode(grammarAccess.getParameterRule()); | 5612 | newCompositeNode(grammarAccess.getIntervalRule()); |
4065 | pushFollow(FOLLOW_1); | 5613 | pushFollow(FOLLOW_1); |
4066 | iv_ruleParameter=ruleParameter(); | 5614 | iv_ruleInterval=ruleInterval(); |
4067 | 5615 | ||
4068 | state._fsp--; | 5616 | state._fsp--; |
4069 | 5617 | ||
4070 | current =iv_ruleParameter; | 5618 | current =iv_ruleInterval; |
4071 | match(input,EOF,FOLLOW_2); | 5619 | match(input,EOF,FOLLOW_2); |
4072 | 5620 | ||
4073 | } | 5621 | } |
@@ -4082,53 +5630,59 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4082 | } | 5630 | } |
4083 | return current; | 5631 | return current; |
4084 | } | 5632 | } |
4085 | // $ANTLR end "entryRuleParameter" | 5633 | // $ANTLR end "entryRuleInterval" |
4086 | 5634 | ||
4087 | 5635 | ||
4088 | // $ANTLR start "ruleParameter" | 5636 | // $ANTLR start "ruleInterval" |
4089 | // InternalSolverLanguage.g:1389:1: ruleParameter returns [EObject current=null] : ( ( (lv_variable_0_0= ruleVariable ) ) (otherlv_1= ':' ( (lv_type_2_0= ruleSymbol ) ) )? ) ; | 5637 | // InternalSolverLanguageParser.g:2201:1: ruleInterval returns [EObject current=null] : (otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= ruleExpression ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleExpression ) ) otherlv_4= RightSquareBracket ) ; |
4090 | public final EObject ruleParameter() throws RecognitionException { | 5638 | public final EObject ruleInterval() throws RecognitionException { |
4091 | EObject current = null; | 5639 | EObject current = null; |
4092 | 5640 | ||
4093 | Token otherlv_1=null; | 5641 | Token otherlv_0=null; |
4094 | EObject lv_variable_0_0 = null; | 5642 | Token otherlv_2=null; |
5643 | Token otherlv_4=null; | ||
5644 | EObject lv_lowerBound_1_0 = null; | ||
4095 | 5645 | ||
4096 | EObject lv_type_2_0 = null; | 5646 | EObject lv_upperBound_3_0 = null; |
4097 | 5647 | ||
4098 | 5648 | ||
4099 | 5649 | ||
4100 | enterRule(); | 5650 | enterRule(); |
4101 | 5651 | ||
4102 | try { | 5652 | try { |
4103 | // InternalSolverLanguage.g:1395:2: ( ( ( (lv_variable_0_0= ruleVariable ) ) (otherlv_1= ':' ( (lv_type_2_0= ruleSymbol ) ) )? ) ) | 5653 | // InternalSolverLanguageParser.g:2207:2: ( (otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= ruleExpression ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleExpression ) ) otherlv_4= RightSquareBracket ) ) |
4104 | // InternalSolverLanguage.g:1396:2: ( ( (lv_variable_0_0= ruleVariable ) ) (otherlv_1= ':' ( (lv_type_2_0= ruleSymbol ) ) )? ) | 5654 | // InternalSolverLanguageParser.g:2208:2: (otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= ruleExpression ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleExpression ) ) otherlv_4= RightSquareBracket ) |
4105 | { | 5655 | { |
4106 | // InternalSolverLanguage.g:1396:2: ( ( (lv_variable_0_0= ruleVariable ) ) (otherlv_1= ':' ( (lv_type_2_0= ruleSymbol ) ) )? ) | 5656 | // InternalSolverLanguageParser.g:2208:2: (otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= ruleExpression ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleExpression ) ) otherlv_4= RightSquareBracket ) |
4107 | // InternalSolverLanguage.g:1397:3: ( (lv_variable_0_0= ruleVariable ) ) (otherlv_1= ':' ( (lv_type_2_0= ruleSymbol ) ) )? | 5657 | // InternalSolverLanguageParser.g:2209:3: otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= ruleExpression ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleExpression ) ) otherlv_4= RightSquareBracket |
4108 | { | 5658 | { |
4109 | // InternalSolverLanguage.g:1397:3: ( (lv_variable_0_0= ruleVariable ) ) | 5659 | otherlv_0=(Token)match(input,LeftSquareBracket,FOLLOW_6); |
4110 | // InternalSolverLanguage.g:1398:4: (lv_variable_0_0= ruleVariable ) | 5660 | |
5661 | newLeafNode(otherlv_0, grammarAccess.getIntervalAccess().getLeftSquareBracketKeyword_0()); | ||
5662 | |||
5663 | // InternalSolverLanguageParser.g:2213:3: ( (lv_lowerBound_1_0= ruleExpression ) ) | ||
5664 | // InternalSolverLanguageParser.g:2214:4: (lv_lowerBound_1_0= ruleExpression ) | ||
4111 | { | 5665 | { |
4112 | // InternalSolverLanguage.g:1398:4: (lv_variable_0_0= ruleVariable ) | 5666 | // InternalSolverLanguageParser.g:2214:4: (lv_lowerBound_1_0= ruleExpression ) |
4113 | // InternalSolverLanguage.g:1399:5: lv_variable_0_0= ruleVariable | 5667 | // InternalSolverLanguageParser.g:2215:5: lv_lowerBound_1_0= ruleExpression |
4114 | { | 5668 | { |
4115 | 5669 | ||
4116 | newCompositeNode(grammarAccess.getParameterAccess().getVariableVariableParserRuleCall_0_0()); | 5670 | newCompositeNode(grammarAccess.getIntervalAccess().getLowerBoundExpressionParserRuleCall_1_0()); |
4117 | 5671 | ||
4118 | pushFollow(FOLLOW_20); | 5672 | pushFollow(FOLLOW_35); |
4119 | lv_variable_0_0=ruleVariable(); | 5673 | lv_lowerBound_1_0=ruleExpression(); |
4120 | 5674 | ||
4121 | state._fsp--; | 5675 | state._fsp--; |
4122 | 5676 | ||
4123 | 5677 | ||
4124 | if (current==null) { | 5678 | if (current==null) { |
4125 | current = createModelElementForParent(grammarAccess.getParameterRule()); | 5679 | current = createModelElementForParent(grammarAccess.getIntervalRule()); |
4126 | } | 5680 | } |
4127 | set( | 5681 | set( |
4128 | current, | 5682 | current, |
4129 | "variable", | 5683 | "lowerBound", |
4130 | lv_variable_0_0, | 5684 | lv_lowerBound_1_0, |
4131 | "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); | 5685 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); |
4132 | afterParserOrEnumRuleCall(); | 5686 | afterParserOrEnumRuleCall(); |
4133 | 5687 | ||
4134 | 5688 | ||
@@ -4137,58 +5691,45 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4137 | 5691 | ||
4138 | } | 5692 | } |
4139 | 5693 | ||
4140 | // InternalSolverLanguage.g:1416:3: (otherlv_1= ':' ( (lv_type_2_0= ruleSymbol ) ) )? | 5694 | otherlv_2=(Token)match(input,FullStopFullStop,FOLLOW_6); |
4141 | int alt23=2; | ||
4142 | int LA23_0 = input.LA(1); | ||
4143 | |||
4144 | if ( (LA23_0==20) ) { | ||
4145 | alt23=1; | ||
4146 | } | ||
4147 | switch (alt23) { | ||
4148 | case 1 : | ||
4149 | // InternalSolverLanguage.g:1417:4: otherlv_1= ':' ( (lv_type_2_0= ruleSymbol ) ) | ||
4150 | { | ||
4151 | otherlv_1=(Token)match(input,20,FOLLOW_21); | ||
4152 | |||
4153 | newLeafNode(otherlv_1, grammarAccess.getParameterAccess().getColonKeyword_1_0()); | ||
4154 | |||
4155 | // InternalSolverLanguage.g:1421:4: ( (lv_type_2_0= ruleSymbol ) ) | ||
4156 | // InternalSolverLanguage.g:1422:5: (lv_type_2_0= ruleSymbol ) | ||
4157 | { | ||
4158 | // InternalSolverLanguage.g:1422:5: (lv_type_2_0= ruleSymbol ) | ||
4159 | // InternalSolverLanguage.g:1423:6: lv_type_2_0= ruleSymbol | ||
4160 | { | ||
4161 | |||
4162 | newCompositeNode(grammarAccess.getParameterAccess().getTypeSymbolParserRuleCall_1_1_0()); | ||
4163 | |||
4164 | pushFollow(FOLLOW_2); | ||
4165 | lv_type_2_0=ruleSymbol(); | ||
4166 | |||
4167 | state._fsp--; | ||
4168 | 5695 | ||
5696 | newLeafNode(otherlv_2, grammarAccess.getIntervalAccess().getFullStopFullStopKeyword_2()); | ||
5697 | |||
5698 | // InternalSolverLanguageParser.g:2236:3: ( (lv_upperBound_3_0= ruleExpression ) ) | ||
5699 | // InternalSolverLanguageParser.g:2237:4: (lv_upperBound_3_0= ruleExpression ) | ||
5700 | { | ||
5701 | // InternalSolverLanguageParser.g:2237:4: (lv_upperBound_3_0= ruleExpression ) | ||
5702 | // InternalSolverLanguageParser.g:2238:5: lv_upperBound_3_0= ruleExpression | ||
5703 | { | ||
4169 | 5704 | ||
4170 | if (current==null) { | 5705 | newCompositeNode(grammarAccess.getIntervalAccess().getUpperBoundExpressionParserRuleCall_3_0()); |
4171 | current = createModelElementForParent(grammarAccess.getParameterRule()); | 5706 | |
4172 | } | 5707 | pushFollow(FOLLOW_36); |
4173 | set( | 5708 | lv_upperBound_3_0=ruleExpression(); |
4174 | current, | ||
4175 | "type", | ||
4176 | lv_type_2_0, | ||
4177 | "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); | ||
4178 | afterParserOrEnumRuleCall(); | ||
4179 | |||
4180 | 5709 | ||
4181 | } | 5710 | state._fsp--; |
4182 | 5711 | ||
4183 | 5712 | ||
4184 | } | 5713 | if (current==null) { |
5714 | current = createModelElementForParent(grammarAccess.getIntervalRule()); | ||
5715 | } | ||
5716 | set( | ||
5717 | current, | ||
5718 | "upperBound", | ||
5719 | lv_upperBound_3_0, | ||
5720 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
5721 | afterParserOrEnumRuleCall(); | ||
5722 | |||
4185 | 5723 | ||
5724 | } | ||
4186 | 5725 | ||
4187 | } | ||
4188 | break; | ||
4189 | 5726 | ||
4190 | } | 5727 | } |
4191 | 5728 | ||
5729 | otherlv_4=(Token)match(input,RightSquareBracket,FOLLOW_2); | ||
5730 | |||
5731 | newLeafNode(otherlv_4, grammarAccess.getIntervalAccess().getRightSquareBracketKeyword_4()); | ||
5732 | |||
4192 | 5733 | ||
4193 | } | 5734 | } |
4194 | 5735 | ||
@@ -4208,28 +5749,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4208 | } | 5749 | } |
4209 | return current; | 5750 | return current; |
4210 | } | 5751 | } |
4211 | // $ANTLR end "ruleParameter" | 5752 | // $ANTLR end "ruleInterval" |
4212 | 5753 | ||
4213 | 5754 | ||
4214 | // $ANTLR start "entryRulePatternBody" | 5755 | // $ANTLR start "entryRuleLiteral" |
4215 | // InternalSolverLanguage.g:1445:1: entryRulePatternBody returns [EObject current=null] : iv_rulePatternBody= rulePatternBody EOF ; | 5756 | // InternalSolverLanguageParser.g:2263:1: entryRuleLiteral returns [EObject current=null] : iv_ruleLiteral= ruleLiteral EOF ; |
4216 | public final EObject entryRulePatternBody() throws RecognitionException { | 5757 | public final EObject entryRuleLiteral() throws RecognitionException { |
4217 | EObject current = null; | 5758 | EObject current = null; |
4218 | 5759 | ||
4219 | EObject iv_rulePatternBody = null; | 5760 | EObject iv_ruleLiteral = null; |
4220 | 5761 | ||
4221 | 5762 | ||
4222 | try { | 5763 | try { |
4223 | // InternalSolverLanguage.g:1445:52: (iv_rulePatternBody= rulePatternBody EOF ) | 5764 | // InternalSolverLanguageParser.g:2263:48: (iv_ruleLiteral= ruleLiteral EOF ) |
4224 | // InternalSolverLanguage.g:1446:2: iv_rulePatternBody= rulePatternBody EOF | 5765 | // InternalSolverLanguageParser.g:2264:2: iv_ruleLiteral= ruleLiteral EOF |
4225 | { | 5766 | { |
4226 | newCompositeNode(grammarAccess.getPatternBodyRule()); | 5767 | newCompositeNode(grammarAccess.getLiteralRule()); |
4227 | pushFollow(FOLLOW_1); | 5768 | pushFollow(FOLLOW_1); |
4228 | iv_rulePatternBody=rulePatternBody(); | 5769 | iv_ruleLiteral=ruleLiteral(); |
4229 | 5770 | ||
4230 | state._fsp--; | 5771 | state._fsp--; |
4231 | 5772 | ||
4232 | current =iv_rulePatternBody; | 5773 | current =iv_ruleLiteral; |
4233 | match(input,EOF,FOLLOW_2); | 5774 | match(input,EOF,FOLLOW_2); |
4234 | 5775 | ||
4235 | } | 5776 | } |
@@ -4244,125 +5785,162 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4244 | } | 5785 | } |
4245 | return current; | 5786 | return current; |
4246 | } | 5787 | } |
4247 | // $ANTLR end "entryRulePatternBody" | 5788 | // $ANTLR end "entryRuleLiteral" |
4248 | 5789 | ||
4249 | 5790 | ||
4250 | // $ANTLR start "rulePatternBody" | 5791 | // $ANTLR start "ruleLiteral" |
4251 | // InternalSolverLanguage.g:1452:1: rulePatternBody returns [EObject current=null] : ( () (otherlv_1= 'true' | ( (lv_constraints_2_0= ruleConstraint ) )* ) ) ; | 5792 | // InternalSolverLanguageParser.g:2270:1: ruleLiteral returns [EObject current=null] : (this_LogicLiteral_0= ruleLogicLiteral | this_NumericLiteral_1= ruleNumericLiteral | this_InfinityLiteral_2= ruleInfinityLiteral | this_EmptyIntervalLiteral_3= ruleEmptyIntervalLiteral | this_StringLiteral_4= ruleStringLiteral ) ; |
4252 | public final EObject rulePatternBody() throws RecognitionException { | 5793 | public final EObject ruleLiteral() throws RecognitionException { |
4253 | EObject current = null; | 5794 | EObject current = null; |
4254 | 5795 | ||
4255 | Token otherlv_1=null; | 5796 | EObject this_LogicLiteral_0 = null; |
4256 | EObject lv_constraints_2_0 = null; | ||
4257 | 5797 | ||
5798 | EObject this_NumericLiteral_1 = null; | ||
4258 | 5799 | ||
5800 | EObject this_InfinityLiteral_2 = null; | ||
4259 | 5801 | ||
4260 | enterRule(); | 5802 | EObject this_EmptyIntervalLiteral_3 = null; |
4261 | 5803 | ||
4262 | try { | 5804 | EObject this_StringLiteral_4 = null; |
4263 | // InternalSolverLanguage.g:1458:2: ( ( () (otherlv_1= 'true' | ( (lv_constraints_2_0= ruleConstraint ) )* ) ) ) | ||
4264 | // InternalSolverLanguage.g:1459:2: ( () (otherlv_1= 'true' | ( (lv_constraints_2_0= ruleConstraint ) )* ) ) | ||
4265 | { | ||
4266 | // InternalSolverLanguage.g:1459:2: ( () (otherlv_1= 'true' | ( (lv_constraints_2_0= ruleConstraint ) )* ) ) | ||
4267 | // InternalSolverLanguage.g:1460:3: () (otherlv_1= 'true' | ( (lv_constraints_2_0= ruleConstraint ) )* ) | ||
4268 | { | ||
4269 | // InternalSolverLanguage.g:1460:3: () | ||
4270 | // InternalSolverLanguage.g:1461:4: | ||
4271 | { | ||
4272 | 5805 | ||
4273 | current = forceCreateModelElement( | ||
4274 | grammarAccess.getPatternBodyAccess().getPatternBodyAction_0(), | ||
4275 | current); | ||
4276 | |||
4277 | 5806 | ||
4278 | } | ||
4279 | 5807 | ||
4280 | // InternalSolverLanguage.g:1467:3: (otherlv_1= 'true' | ( (lv_constraints_2_0= ruleConstraint ) )* ) | 5808 | enterRule(); |
4281 | int alt25=2; | ||
4282 | int LA25_0 = input.LA(1); | ||
4283 | 5809 | ||
4284 | if ( (LA25_0==13) ) { | 5810 | try { |
5811 | // InternalSolverLanguageParser.g:2276:2: ( (this_LogicLiteral_0= ruleLogicLiteral | this_NumericLiteral_1= ruleNumericLiteral | this_InfinityLiteral_2= ruleInfinityLiteral | this_EmptyIntervalLiteral_3= ruleEmptyIntervalLiteral | this_StringLiteral_4= ruleStringLiteral ) ) | ||
5812 | // InternalSolverLanguageParser.g:2277:2: (this_LogicLiteral_0= ruleLogicLiteral | this_NumericLiteral_1= ruleNumericLiteral | this_InfinityLiteral_2= ruleInfinityLiteral | this_EmptyIntervalLiteral_3= ruleEmptyIntervalLiteral | this_StringLiteral_4= ruleStringLiteral ) | ||
5813 | { | ||
5814 | // InternalSolverLanguageParser.g:2277:2: (this_LogicLiteral_0= ruleLogicLiteral | this_NumericLiteral_1= ruleNumericLiteral | this_InfinityLiteral_2= ruleInfinityLiteral | this_EmptyIntervalLiteral_3= ruleEmptyIntervalLiteral | this_StringLiteral_4= ruleStringLiteral ) | ||
5815 | int alt25=5; | ||
5816 | switch ( input.LA(1) ) { | ||
5817 | case Unknown: | ||
5818 | case Error: | ||
5819 | case False: | ||
5820 | case True: | ||
5821 | { | ||
4285 | alt25=1; | 5822 | alt25=1; |
4286 | } | 5823 | } |
4287 | else if ( (LA25_0==EOF||LA25_0==RULE_ID||(LA25_0>=11 && LA25_0<=12)||(LA25_0>=29 && LA25_0<=31)) ) { | 5824 | break; |
5825 | case RULE_INT: | ||
5826 | { | ||
4288 | alt25=2; | 5827 | alt25=2; |
4289 | } | 5828 | } |
4290 | else { | 5829 | break; |
5830 | case Inf: | ||
5831 | { | ||
5832 | alt25=3; | ||
5833 | } | ||
5834 | break; | ||
5835 | case Empty: | ||
5836 | { | ||
5837 | alt25=4; | ||
5838 | } | ||
5839 | break; | ||
5840 | case RULE_STRING: | ||
5841 | { | ||
5842 | alt25=5; | ||
5843 | } | ||
5844 | break; | ||
5845 | default: | ||
4291 | NoViableAltException nvae = | 5846 | NoViableAltException nvae = |
4292 | new NoViableAltException("", 25, 0, input); | 5847 | new NoViableAltException("", 25, 0, input); |
4293 | 5848 | ||
4294 | throw nvae; | 5849 | throw nvae; |
4295 | } | 5850 | } |
5851 | |||
4296 | switch (alt25) { | 5852 | switch (alt25) { |
4297 | case 1 : | 5853 | case 1 : |
4298 | // InternalSolverLanguage.g:1468:4: otherlv_1= 'true' | 5854 | // InternalSolverLanguageParser.g:2278:3: this_LogicLiteral_0= ruleLogicLiteral |
4299 | { | 5855 | { |
4300 | otherlv_1=(Token)match(input,13,FOLLOW_2); | ||
4301 | 5856 | ||
4302 | newLeafNode(otherlv_1, grammarAccess.getPatternBodyAccess().getTrueKeyword_1_0()); | 5857 | newCompositeNode(grammarAccess.getLiteralAccess().getLogicLiteralParserRuleCall_0()); |
4303 | 5858 | ||
5859 | pushFollow(FOLLOW_2); | ||
5860 | this_LogicLiteral_0=ruleLogicLiteral(); | ||
5861 | |||
5862 | state._fsp--; | ||
5863 | |||
5864 | |||
5865 | current = this_LogicLiteral_0; | ||
5866 | afterParserOrEnumRuleCall(); | ||
5867 | |||
4304 | 5868 | ||
4305 | } | 5869 | } |
4306 | break; | 5870 | break; |
4307 | case 2 : | 5871 | case 2 : |
4308 | // InternalSolverLanguage.g:1473:4: ( (lv_constraints_2_0= ruleConstraint ) )* | 5872 | // InternalSolverLanguageParser.g:2287:3: this_NumericLiteral_1= ruleNumericLiteral |
4309 | { | 5873 | { |
4310 | // InternalSolverLanguage.g:1473:4: ( (lv_constraints_2_0= ruleConstraint ) )* | ||
4311 | loop24: | ||
4312 | do { | ||
4313 | int alt24=2; | ||
4314 | int LA24_0 = input.LA(1); | ||
4315 | 5874 | ||
4316 | if ( (LA24_0==RULE_ID||LA24_0==11||(LA24_0>=30 && LA24_0<=31)) ) { | 5875 | newCompositeNode(grammarAccess.getLiteralAccess().getNumericLiteralParserRuleCall_1()); |
4317 | alt24=1; | 5876 | |
4318 | } | 5877 | pushFollow(FOLLOW_2); |
5878 | this_NumericLiteral_1=ruleNumericLiteral(); | ||
4319 | 5879 | ||
5880 | state._fsp--; | ||
4320 | 5881 | ||
4321 | switch (alt24) { | ||
4322 | case 1 : | ||
4323 | // InternalSolverLanguage.g:1474:5: (lv_constraints_2_0= ruleConstraint ) | ||
4324 | { | ||
4325 | // InternalSolverLanguage.g:1474:5: (lv_constraints_2_0= ruleConstraint ) | ||
4326 | // InternalSolverLanguage.g:1475:6: lv_constraints_2_0= ruleConstraint | ||
4327 | { | ||
4328 | 5882 | ||
4329 | newCompositeNode(grammarAccess.getPatternBodyAccess().getConstraintsConstraintParserRuleCall_1_1_0()); | 5883 | current = this_NumericLiteral_1; |
4330 | 5884 | afterParserOrEnumRuleCall(); | |
4331 | pushFollow(FOLLOW_22); | 5885 | |
4332 | lv_constraints_2_0=ruleConstraint(); | ||
4333 | 5886 | ||
4334 | state._fsp--; | 5887 | } |
5888 | break; | ||
5889 | case 3 : | ||
5890 | // InternalSolverLanguageParser.g:2296:3: this_InfinityLiteral_2= ruleInfinityLiteral | ||
5891 | { | ||
4335 | 5892 | ||
5893 | newCompositeNode(grammarAccess.getLiteralAccess().getInfinityLiteralParserRuleCall_2()); | ||
5894 | |||
5895 | pushFollow(FOLLOW_2); | ||
5896 | this_InfinityLiteral_2=ruleInfinityLiteral(); | ||
4336 | 5897 | ||
4337 | if (current==null) { | 5898 | state._fsp--; |
4338 | current = createModelElementForParent(grammarAccess.getPatternBodyRule()); | ||
4339 | } | ||
4340 | add( | ||
4341 | current, | ||
4342 | "constraints", | ||
4343 | lv_constraints_2_0, | ||
4344 | "org.eclipse.viatra.solver.language.SolverLanguage.Constraint"); | ||
4345 | afterParserOrEnumRuleCall(); | ||
4346 | |||
4347 | 5899 | ||
4348 | } | ||
4349 | 5900 | ||
5901 | current = this_InfinityLiteral_2; | ||
5902 | afterParserOrEnumRuleCall(); | ||
5903 | |||
4350 | 5904 | ||
4351 | } | 5905 | } |
4352 | break; | 5906 | break; |
5907 | case 4 : | ||
5908 | // InternalSolverLanguageParser.g:2305:3: this_EmptyIntervalLiteral_3= ruleEmptyIntervalLiteral | ||
5909 | { | ||
4353 | 5910 | ||
4354 | default : | 5911 | newCompositeNode(grammarAccess.getLiteralAccess().getEmptyIntervalLiteralParserRuleCall_3()); |
4355 | break loop24; | 5912 | |
4356 | } | 5913 | pushFollow(FOLLOW_2); |
4357 | } while (true); | 5914 | this_EmptyIntervalLiteral_3=ruleEmptyIntervalLiteral(); |
4358 | 5915 | ||
5916 | state._fsp--; | ||
5917 | |||
5918 | |||
5919 | current = this_EmptyIntervalLiteral_3; | ||
5920 | afterParserOrEnumRuleCall(); | ||
5921 | |||
4359 | 5922 | ||
4360 | } | 5923 | } |
4361 | break; | 5924 | break; |
5925 | case 5 : | ||
5926 | // InternalSolverLanguageParser.g:2314:3: this_StringLiteral_4= ruleStringLiteral | ||
5927 | { | ||
4362 | 5928 | ||
4363 | } | 5929 | newCompositeNode(grammarAccess.getLiteralAccess().getStringLiteralParserRuleCall_4()); |
5930 | |||
5931 | pushFollow(FOLLOW_2); | ||
5932 | this_StringLiteral_4=ruleStringLiteral(); | ||
5933 | |||
5934 | state._fsp--; | ||
4364 | 5935 | ||
4365 | 5936 | ||
5937 | current = this_StringLiteral_4; | ||
5938 | afterParserOrEnumRuleCall(); | ||
5939 | |||
5940 | |||
5941 | } | ||
5942 | break; | ||
5943 | |||
4366 | } | 5944 | } |
4367 | 5945 | ||
4368 | 5946 | ||
@@ -4381,28 +5959,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4381 | } | 5959 | } |
4382 | return current; | 5960 | return current; |
4383 | } | 5961 | } |
4384 | // $ANTLR end "rulePatternBody" | 5962 | // $ANTLR end "ruleLiteral" |
4385 | 5963 | ||
4386 | 5964 | ||
4387 | // $ANTLR start "entryRulePolarity" | 5965 | // $ANTLR start "entryRuleLogicLiteral" |
4388 | // InternalSolverLanguage.g:1497:1: entryRulePolarity returns [EObject current=null] : iv_rulePolarity= rulePolarity EOF ; | 5966 | // InternalSolverLanguageParser.g:2326:1: entryRuleLogicLiteral returns [EObject current=null] : iv_ruleLogicLiteral= ruleLogicLiteral EOF ; |
4389 | public final EObject entryRulePolarity() throws RecognitionException { | 5967 | public final EObject entryRuleLogicLiteral() throws RecognitionException { |
4390 | EObject current = null; | 5968 | EObject current = null; |
4391 | 5969 | ||
4392 | EObject iv_rulePolarity = null; | 5970 | EObject iv_ruleLogicLiteral = null; |
4393 | 5971 | ||
4394 | 5972 | ||
4395 | try { | 5973 | try { |
4396 | // InternalSolverLanguage.g:1497:49: (iv_rulePolarity= rulePolarity EOF ) | 5974 | // InternalSolverLanguageParser.g:2326:53: (iv_ruleLogicLiteral= ruleLogicLiteral EOF ) |
4397 | // InternalSolverLanguage.g:1498:2: iv_rulePolarity= rulePolarity EOF | 5975 | // InternalSolverLanguageParser.g:2327:2: iv_ruleLogicLiteral= ruleLogicLiteral EOF |
4398 | { | 5976 | { |
4399 | newCompositeNode(grammarAccess.getPolarityRule()); | 5977 | newCompositeNode(grammarAccess.getLogicLiteralRule()); |
4400 | pushFollow(FOLLOW_1); | 5978 | pushFollow(FOLLOW_1); |
4401 | iv_rulePolarity=rulePolarity(); | 5979 | iv_ruleLogicLiteral=ruleLogicLiteral(); |
4402 | 5980 | ||
4403 | state._fsp--; | 5981 | state._fsp--; |
4404 | 5982 | ||
4405 | current =iv_rulePolarity; | 5983 | current =iv_ruleLogicLiteral; |
4406 | match(input,EOF,FOLLOW_2); | 5984 | match(input,EOF,FOLLOW_2); |
4407 | 5985 | ||
4408 | } | 5986 | } |
@@ -4417,95 +5995,153 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4417 | } | 5995 | } |
4418 | return current; | 5996 | return current; |
4419 | } | 5997 | } |
4420 | // $ANTLR end "entryRulePolarity" | 5998 | // $ANTLR end "entryRuleLogicLiteral" |
4421 | 5999 | ||
4422 | 6000 | ||
4423 | // $ANTLR start "rulePolarity" | 6001 | // $ANTLR start "ruleLogicLiteral" |
4424 | // InternalSolverLanguage.g:1504:1: rulePolarity returns [EObject current=null] : ( ( () otherlv_1= '+' ) | ( () otherlv_3= '-' ) ) ; | 6002 | // InternalSolverLanguageParser.g:2333:1: ruleLogicLiteral returns [EObject current=null] : ( (lv_value_0_0= ruleLogicValue ) ) ; |
4425 | public final EObject rulePolarity() throws RecognitionException { | 6003 | public final EObject ruleLogicLiteral() throws RecognitionException { |
4426 | EObject current = null; | 6004 | EObject current = null; |
4427 | 6005 | ||
4428 | Token otherlv_1=null; | 6006 | Enumerator lv_value_0_0 = null; |
4429 | Token otherlv_3=null; | 6007 | |
4430 | 6008 | ||
4431 | 6009 | ||
4432 | enterRule(); | 6010 | enterRule(); |
4433 | 6011 | ||
4434 | try { | 6012 | try { |
4435 | // InternalSolverLanguage.g:1510:2: ( ( ( () otherlv_1= '+' ) | ( () otherlv_3= '-' ) ) ) | 6013 | // InternalSolverLanguageParser.g:2339:2: ( ( (lv_value_0_0= ruleLogicValue ) ) ) |
4436 | // InternalSolverLanguage.g:1511:2: ( ( () otherlv_1= '+' ) | ( () otherlv_3= '-' ) ) | 6014 | // InternalSolverLanguageParser.g:2340:2: ( (lv_value_0_0= ruleLogicValue ) ) |
6015 | { | ||
6016 | // InternalSolverLanguageParser.g:2340:2: ( (lv_value_0_0= ruleLogicValue ) ) | ||
6017 | // InternalSolverLanguageParser.g:2341:3: (lv_value_0_0= ruleLogicValue ) | ||
6018 | { | ||
6019 | // InternalSolverLanguageParser.g:2341:3: (lv_value_0_0= ruleLogicValue ) | ||
6020 | // InternalSolverLanguageParser.g:2342:4: lv_value_0_0= ruleLogicValue | ||
4437 | { | 6021 | { |
4438 | // InternalSolverLanguage.g:1511:2: ( ( () otherlv_1= '+' ) | ( () otherlv_3= '-' ) ) | ||
4439 | int alt26=2; | ||
4440 | int LA26_0 = input.LA(1); | ||
4441 | 6022 | ||
4442 | if ( (LA26_0==30) ) { | 6023 | newCompositeNode(grammarAccess.getLogicLiteralAccess().getValueLogicValueEnumRuleCall_0()); |
4443 | alt26=1; | 6024 | |
6025 | pushFollow(FOLLOW_2); | ||
6026 | lv_value_0_0=ruleLogicValue(); | ||
6027 | |||
6028 | state._fsp--; | ||
6029 | |||
6030 | |||
6031 | if (current==null) { | ||
6032 | current = createModelElementForParent(grammarAccess.getLogicLiteralRule()); | ||
6033 | } | ||
6034 | set( | ||
6035 | current, | ||
6036 | "value", | ||
6037 | lv_value_0_0, | ||
6038 | "org.eclipse.viatra.solver.language.SolverLanguage.LogicValue"); | ||
6039 | afterParserOrEnumRuleCall(); | ||
6040 | |||
6041 | |||
4444 | } | 6042 | } |
4445 | else if ( (LA26_0==11) ) { | 6043 | |
4446 | alt26=2; | 6044 | |
4447 | } | 6045 | } |
4448 | else { | ||
4449 | NoViableAltException nvae = | ||
4450 | new NoViableAltException("", 26, 0, input); | ||
4451 | 6046 | ||
4452 | throw nvae; | 6047 | |
4453 | } | 6048 | } |
4454 | switch (alt26) { | ||
4455 | case 1 : | ||
4456 | // InternalSolverLanguage.g:1512:3: ( () otherlv_1= '+' ) | ||
4457 | { | ||
4458 | // InternalSolverLanguage.g:1512:3: ( () otherlv_1= '+' ) | ||
4459 | // InternalSolverLanguage.g:1513:4: () otherlv_1= '+' | ||
4460 | { | ||
4461 | // InternalSolverLanguage.g:1513:4: () | ||
4462 | // InternalSolverLanguage.g:1514:5: | ||
4463 | { | ||
4464 | 6049 | ||
4465 | current = forceCreateModelElement( | ||
4466 | grammarAccess.getPolarityAccess().getPositiveAction_0_0(), | ||
4467 | current); | ||
4468 | |||
4469 | 6050 | ||
4470 | } | 6051 | leaveRule(); |
4471 | 6052 | ||
4472 | otherlv_1=(Token)match(input,30,FOLLOW_2); | 6053 | } |
4473 | 6054 | ||
4474 | newLeafNode(otherlv_1, grammarAccess.getPolarityAccess().getPlusSignKeyword_0_1()); | 6055 | catch (RecognitionException re) { |
4475 | 6056 | recover(input,re); | |
6057 | appendSkippedTokens(); | ||
6058 | } | ||
6059 | finally { | ||
6060 | } | ||
6061 | return current; | ||
6062 | } | ||
6063 | // $ANTLR end "ruleLogicLiteral" | ||
4476 | 6064 | ||
4477 | } | ||
4478 | 6065 | ||
6066 | // $ANTLR start "entryRuleNumericLiteral" | ||
6067 | // InternalSolverLanguageParser.g:2362:1: entryRuleNumericLiteral returns [EObject current=null] : iv_ruleNumericLiteral= ruleNumericLiteral EOF ; | ||
6068 | public final EObject entryRuleNumericLiteral() throws RecognitionException { | ||
6069 | EObject current = null; | ||
4479 | 6070 | ||
4480 | } | 6071 | EObject iv_ruleNumericLiteral = null; |
4481 | break; | ||
4482 | case 2 : | ||
4483 | // InternalSolverLanguage.g:1526:3: ( () otherlv_3= '-' ) | ||
4484 | { | ||
4485 | // InternalSolverLanguage.g:1526:3: ( () otherlv_3= '-' ) | ||
4486 | // InternalSolverLanguage.g:1527:4: () otherlv_3= '-' | ||
4487 | { | ||
4488 | // InternalSolverLanguage.g:1527:4: () | ||
4489 | // InternalSolverLanguage.g:1528:5: | ||
4490 | { | ||
4491 | 6072 | ||
4492 | current = forceCreateModelElement( | ||
4493 | grammarAccess.getPolarityAccess().getNegativeAction_1_0(), | ||
4494 | current); | ||
4495 | |||
4496 | 6073 | ||
4497 | } | 6074 | try { |
6075 | // InternalSolverLanguageParser.g:2362:55: (iv_ruleNumericLiteral= ruleNumericLiteral EOF ) | ||
6076 | // InternalSolverLanguageParser.g:2363:2: iv_ruleNumericLiteral= ruleNumericLiteral EOF | ||
6077 | { | ||
6078 | newCompositeNode(grammarAccess.getNumericLiteralRule()); | ||
6079 | pushFollow(FOLLOW_1); | ||
6080 | iv_ruleNumericLiteral=ruleNumericLiteral(); | ||
4498 | 6081 | ||
4499 | otherlv_3=(Token)match(input,11,FOLLOW_2); | 6082 | state._fsp--; |
4500 | 6083 | ||
4501 | newLeafNode(otherlv_3, grammarAccess.getPolarityAccess().getHyphenMinusKeyword_1_1()); | 6084 | current =iv_ruleNumericLiteral; |
4502 | 6085 | match(input,EOF,FOLLOW_2); | |
4503 | 6086 | ||
4504 | } | 6087 | } |
4505 | 6088 | ||
6089 | } | ||
6090 | |||
6091 | catch (RecognitionException re) { | ||
6092 | recover(input,re); | ||
6093 | appendSkippedTokens(); | ||
6094 | } | ||
6095 | finally { | ||
6096 | } | ||
6097 | return current; | ||
6098 | } | ||
6099 | // $ANTLR end "entryRuleNumericLiteral" | ||
6100 | |||
6101 | |||
6102 | // $ANTLR start "ruleNumericLiteral" | ||
6103 | // InternalSolverLanguageParser.g:2369:1: ruleNumericLiteral returns [EObject current=null] : ( (lv_value_0_0= ruleReal ) ) ; | ||
6104 | public final EObject ruleNumericLiteral() throws RecognitionException { | ||
6105 | EObject current = null; | ||
6106 | |||
6107 | AntlrDatatypeRuleToken lv_value_0_0 = null; | ||
6108 | |||
6109 | |||
6110 | |||
6111 | enterRule(); | ||
6112 | |||
6113 | try { | ||
6114 | // InternalSolverLanguageParser.g:2375:2: ( ( (lv_value_0_0= ruleReal ) ) ) | ||
6115 | // InternalSolverLanguageParser.g:2376:2: ( (lv_value_0_0= ruleReal ) ) | ||
6116 | { | ||
6117 | // InternalSolverLanguageParser.g:2376:2: ( (lv_value_0_0= ruleReal ) ) | ||
6118 | // InternalSolverLanguageParser.g:2377:3: (lv_value_0_0= ruleReal ) | ||
6119 | { | ||
6120 | // InternalSolverLanguageParser.g:2377:3: (lv_value_0_0= ruleReal ) | ||
6121 | // InternalSolverLanguageParser.g:2378:4: lv_value_0_0= ruleReal | ||
6122 | { | ||
6123 | |||
6124 | newCompositeNode(grammarAccess.getNumericLiteralAccess().getValueRealParserRuleCall_0()); | ||
6125 | |||
6126 | pushFollow(FOLLOW_2); | ||
6127 | lv_value_0_0=ruleReal(); | ||
6128 | |||
6129 | state._fsp--; | ||
6130 | |||
6131 | |||
6132 | if (current==null) { | ||
6133 | current = createModelElementForParent(grammarAccess.getNumericLiteralRule()); | ||
6134 | } | ||
6135 | set( | ||
6136 | current, | ||
6137 | "value", | ||
6138 | lv_value_0_0, | ||
6139 | "org.eclipse.viatra.solver.language.SolverLanguage.Real"); | ||
6140 | afterParserOrEnumRuleCall(); | ||
6141 | |||
6142 | |||
6143 | } | ||
4506 | 6144 | ||
4507 | } | ||
4508 | break; | ||
4509 | 6145 | ||
4510 | } | 6146 | } |
4511 | 6147 | ||
@@ -4525,28 +6161,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4525 | } | 6161 | } |
4526 | return current; | 6162 | return current; |
4527 | } | 6163 | } |
4528 | // $ANTLR end "rulePolarity" | 6164 | // $ANTLR end "ruleNumericLiteral" |
4529 | 6165 | ||
4530 | 6166 | ||
4531 | // $ANTLR start "entryRuleConstraint" | 6167 | // $ANTLR start "entryRuleInfinityLiteral" |
4532 | // InternalSolverLanguage.g:1543:1: entryRuleConstraint returns [EObject current=null] : iv_ruleConstraint= ruleConstraint EOF ; | 6168 | // InternalSolverLanguageParser.g:2398:1: entryRuleInfinityLiteral returns [EObject current=null] : iv_ruleInfinityLiteral= ruleInfinityLiteral EOF ; |
4533 | public final EObject entryRuleConstraint() throws RecognitionException { | 6169 | public final EObject entryRuleInfinityLiteral() throws RecognitionException { |
4534 | EObject current = null; | 6170 | EObject current = null; |
4535 | 6171 | ||
4536 | EObject iv_ruleConstraint = null; | 6172 | EObject iv_ruleInfinityLiteral = null; |
4537 | 6173 | ||
4538 | 6174 | ||
4539 | try { | 6175 | try { |
4540 | // InternalSolverLanguage.g:1543:51: (iv_ruleConstraint= ruleConstraint EOF ) | 6176 | // InternalSolverLanguageParser.g:2398:56: (iv_ruleInfinityLiteral= ruleInfinityLiteral EOF ) |
4541 | // InternalSolverLanguage.g:1544:2: iv_ruleConstraint= ruleConstraint EOF | 6177 | // InternalSolverLanguageParser.g:2399:2: iv_ruleInfinityLiteral= ruleInfinityLiteral EOF |
4542 | { | 6178 | { |
4543 | newCompositeNode(grammarAccess.getConstraintRule()); | 6179 | newCompositeNode(grammarAccess.getInfinityLiteralRule()); |
4544 | pushFollow(FOLLOW_1); | 6180 | pushFollow(FOLLOW_1); |
4545 | iv_ruleConstraint=ruleConstraint(); | 6181 | iv_ruleInfinityLiteral=ruleInfinityLiteral(); |
4546 | 6182 | ||
4547 | state._fsp--; | 6183 | state._fsp--; |
4548 | 6184 | ||
4549 | current =iv_ruleConstraint; | 6185 | current =iv_ruleInfinityLiteral; |
4550 | match(input,EOF,FOLLOW_2); | 6186 | match(input,EOF,FOLLOW_2); |
4551 | 6187 | ||
4552 | } | 6188 | } |
@@ -4561,418 +6197,454 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4561 | } | 6197 | } |
4562 | return current; | 6198 | return current; |
4563 | } | 6199 | } |
4564 | // $ANTLR end "entryRuleConstraint" | 6200 | // $ANTLR end "entryRuleInfinityLiteral" |
4565 | 6201 | ||
4566 | 6202 | ||
4567 | // $ANTLR start "ruleConstraint" | 6203 | // $ANTLR start "ruleInfinityLiteral" |
4568 | // InternalSolverLanguage.g:1550:1: ruleConstraint returns [EObject current=null] : ( ( ( (lv_polarity_0_0= rulePolarity ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( (lv_params_3_0= ruleLiteral ) )? (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* otherlv_6= ')' )? ) | ( ( (lv_closureType_7_0= ruleClosureType ) ) otherlv_8= '(' ( (lv_params_9_0= ruleLiteral ) )? (otherlv_10= ',' ( (lv_params_11_0= ruleLiteral ) ) )* otherlv_12= ')' ) ) ; | 6204 | // InternalSolverLanguageParser.g:2405:1: ruleInfinityLiteral returns [EObject current=null] : ( () otherlv_1= Inf ) ; |
4569 | public final EObject ruleConstraint() throws RecognitionException { | 6205 | public final EObject ruleInfinityLiteral() throws RecognitionException { |
4570 | EObject current = null; | 6206 | EObject current = null; |
4571 | 6207 | ||
4572 | Token otherlv_2=null; | 6208 | Token otherlv_1=null; |
4573 | Token otherlv_4=null; | 6209 | |
4574 | Token otherlv_6=null; | 6210 | |
4575 | Token otherlv_8=null; | 6211 | enterRule(); |
4576 | Token otherlv_10=null; | 6212 | |
4577 | Token otherlv_12=null; | 6213 | try { |
4578 | EObject lv_polarity_0_0 = null; | 6214 | // InternalSolverLanguageParser.g:2411:2: ( ( () otherlv_1= Inf ) ) |
6215 | // InternalSolverLanguageParser.g:2412:2: ( () otherlv_1= Inf ) | ||
6216 | { | ||
6217 | // InternalSolverLanguageParser.g:2412:2: ( () otherlv_1= Inf ) | ||
6218 | // InternalSolverLanguageParser.g:2413:3: () otherlv_1= Inf | ||
6219 | { | ||
6220 | // InternalSolverLanguageParser.g:2413:3: () | ||
6221 | // InternalSolverLanguageParser.g:2414:4: | ||
6222 | { | ||
4579 | 6223 | ||
4580 | EObject lv_symbol_1_0 = null; | 6224 | current = forceCreateModelElement( |
6225 | grammarAccess.getInfinityLiteralAccess().getInfinityLiteralAction_0(), | ||
6226 | current); | ||
6227 | |||
4581 | 6228 | ||
4582 | EObject lv_params_3_0 = null; | 6229 | } |
4583 | 6230 | ||
4584 | EObject lv_params_5_0 = null; | 6231 | otherlv_1=(Token)match(input,Inf,FOLLOW_2); |
4585 | 6232 | ||
4586 | EObject lv_closureType_7_0 = null; | 6233 | newLeafNode(otherlv_1, grammarAccess.getInfinityLiteralAccess().getInfKeyword_1()); |
6234 | |||
4587 | 6235 | ||
4588 | EObject lv_params_9_0 = null; | 6236 | } |
4589 | 6237 | ||
4590 | EObject lv_params_11_0 = null; | ||
4591 | 6238 | ||
6239 | } | ||
6240 | |||
6241 | |||
6242 | leaveRule(); | ||
6243 | |||
6244 | } | ||
6245 | |||
6246 | catch (RecognitionException re) { | ||
6247 | recover(input,re); | ||
6248 | appendSkippedTokens(); | ||
6249 | } | ||
6250 | finally { | ||
6251 | } | ||
6252 | return current; | ||
6253 | } | ||
6254 | // $ANTLR end "ruleInfinityLiteral" | ||
6255 | |||
6256 | |||
6257 | // $ANTLR start "entryRuleEmptyIntervalLiteral" | ||
6258 | // InternalSolverLanguageParser.g:2428:1: entryRuleEmptyIntervalLiteral returns [EObject current=null] : iv_ruleEmptyIntervalLiteral= ruleEmptyIntervalLiteral EOF ; | ||
6259 | public final EObject entryRuleEmptyIntervalLiteral() throws RecognitionException { | ||
6260 | EObject current = null; | ||
6261 | |||
6262 | EObject iv_ruleEmptyIntervalLiteral = null; | ||
6263 | |||
6264 | |||
6265 | try { | ||
6266 | // InternalSolverLanguageParser.g:2428:61: (iv_ruleEmptyIntervalLiteral= ruleEmptyIntervalLiteral EOF ) | ||
6267 | // InternalSolverLanguageParser.g:2429:2: iv_ruleEmptyIntervalLiteral= ruleEmptyIntervalLiteral EOF | ||
6268 | { | ||
6269 | newCompositeNode(grammarAccess.getEmptyIntervalLiteralRule()); | ||
6270 | pushFollow(FOLLOW_1); | ||
6271 | iv_ruleEmptyIntervalLiteral=ruleEmptyIntervalLiteral(); | ||
6272 | |||
6273 | state._fsp--; | ||
6274 | |||
6275 | current =iv_ruleEmptyIntervalLiteral; | ||
6276 | match(input,EOF,FOLLOW_2); | ||
6277 | |||
6278 | } | ||
6279 | |||
6280 | } | ||
6281 | |||
6282 | catch (RecognitionException re) { | ||
6283 | recover(input,re); | ||
6284 | appendSkippedTokens(); | ||
6285 | } | ||
6286 | finally { | ||
6287 | } | ||
6288 | return current; | ||
6289 | } | ||
6290 | // $ANTLR end "entryRuleEmptyIntervalLiteral" | ||
6291 | |||
6292 | |||
6293 | // $ANTLR start "ruleEmptyIntervalLiteral" | ||
6294 | // InternalSolverLanguageParser.g:2435:1: ruleEmptyIntervalLiteral returns [EObject current=null] : ( () otherlv_1= Empty ) ; | ||
6295 | public final EObject ruleEmptyIntervalLiteral() throws RecognitionException { | ||
6296 | EObject current = null; | ||
6297 | |||
6298 | Token otherlv_1=null; | ||
4592 | 6299 | ||
4593 | 6300 | ||
4594 | enterRule(); | 6301 | enterRule(); |
4595 | 6302 | ||
4596 | try { | 6303 | try { |
4597 | // InternalSolverLanguage.g:1556:2: ( ( ( ( (lv_polarity_0_0= rulePolarity ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( (lv_params_3_0= ruleLiteral ) )? (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* otherlv_6= ')' )? ) | ( ( (lv_closureType_7_0= ruleClosureType ) ) otherlv_8= '(' ( (lv_params_9_0= ruleLiteral ) )? (otherlv_10= ',' ( (lv_params_11_0= ruleLiteral ) ) )* otherlv_12= ')' ) ) ) | 6304 | // InternalSolverLanguageParser.g:2441:2: ( ( () otherlv_1= Empty ) ) |
4598 | // InternalSolverLanguage.g:1557:2: ( ( ( (lv_polarity_0_0= rulePolarity ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( (lv_params_3_0= ruleLiteral ) )? (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* otherlv_6= ')' )? ) | ( ( (lv_closureType_7_0= ruleClosureType ) ) otherlv_8= '(' ( (lv_params_9_0= ruleLiteral ) )? (otherlv_10= ',' ( (lv_params_11_0= ruleLiteral ) ) )* otherlv_12= ')' ) ) | 6305 | // InternalSolverLanguageParser.g:2442:2: ( () otherlv_1= Empty ) |
6306 | { | ||
6307 | // InternalSolverLanguageParser.g:2442:2: ( () otherlv_1= Empty ) | ||
6308 | // InternalSolverLanguageParser.g:2443:3: () otherlv_1= Empty | ||
6309 | { | ||
6310 | // InternalSolverLanguageParser.g:2443:3: () | ||
6311 | // InternalSolverLanguageParser.g:2444:4: | ||
4599 | { | 6312 | { |
4600 | // InternalSolverLanguage.g:1557:2: ( ( ( (lv_polarity_0_0= rulePolarity ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( (lv_params_3_0= ruleLiteral ) )? (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* otherlv_6= ')' )? ) | ( ( (lv_closureType_7_0= ruleClosureType ) ) otherlv_8= '(' ( (lv_params_9_0= ruleLiteral ) )? (otherlv_10= ',' ( (lv_params_11_0= ruleLiteral ) ) )* otherlv_12= ')' ) ) | ||
4601 | int alt33=2; | ||
4602 | switch ( input.LA(1) ) { | ||
4603 | case 30: | ||
4604 | { | ||
4605 | int LA33_1 = input.LA(2); | ||
4606 | 6313 | ||
4607 | if ( (LA33_1==17) ) { | 6314 | current = forceCreateModelElement( |
4608 | alt33=2; | 6315 | grammarAccess.getEmptyIntervalLiteralAccess().getEmptyIntervalLiteralAction_0(), |
4609 | } | 6316 | current); |
4610 | else if ( (LA33_1==RULE_ID) ) { | 6317 | |
4611 | alt33=1; | ||
4612 | } | ||
4613 | else { | ||
4614 | NoViableAltException nvae = | ||
4615 | new NoViableAltException("", 33, 1, input); | ||
4616 | 6318 | ||
4617 | throw nvae; | 6319 | } |
4618 | } | 6320 | |
4619 | } | 6321 | otherlv_1=(Token)match(input,Empty,FOLLOW_2); |
4620 | break; | 6322 | |
4621 | case RULE_ID: | 6323 | newLeafNode(otherlv_1, grammarAccess.getEmptyIntervalLiteralAccess().getEmptyKeyword_1()); |
4622 | case 11: | 6324 | |
4623 | { | ||
4624 | alt33=1; | ||
4625 | } | ||
4626 | break; | ||
4627 | case 31: | ||
4628 | { | ||
4629 | alt33=2; | ||
4630 | } | ||
4631 | break; | ||
4632 | default: | ||
4633 | NoViableAltException nvae = | ||
4634 | new NoViableAltException("", 33, 0, input); | ||
4635 | 6325 | ||
4636 | throw nvae; | ||
4637 | } | 6326 | } |
4638 | 6327 | ||
4639 | switch (alt33) { | ||
4640 | case 1 : | ||
4641 | // InternalSolverLanguage.g:1558:3: ( ( (lv_polarity_0_0= rulePolarity ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( (lv_params_3_0= ruleLiteral ) )? (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* otherlv_6= ')' )? ) | ||
4642 | { | ||
4643 | // InternalSolverLanguage.g:1558:3: ( ( (lv_polarity_0_0= rulePolarity ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( (lv_params_3_0= ruleLiteral ) )? (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* otherlv_6= ')' )? ) | ||
4644 | // InternalSolverLanguage.g:1559:4: ( (lv_polarity_0_0= rulePolarity ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) (otherlv_2= '(' ( (lv_params_3_0= ruleLiteral ) )? (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* otherlv_6= ')' )? | ||
4645 | { | ||
4646 | // InternalSolverLanguage.g:1559:4: ( (lv_polarity_0_0= rulePolarity ) )? | ||
4647 | int alt27=2; | ||
4648 | int LA27_0 = input.LA(1); | ||
4649 | 6328 | ||
4650 | if ( (LA27_0==11||LA27_0==30) ) { | 6329 | } |
4651 | alt27=1; | ||
4652 | } | ||
4653 | switch (alt27) { | ||
4654 | case 1 : | ||
4655 | // InternalSolverLanguage.g:1560:5: (lv_polarity_0_0= rulePolarity ) | ||
4656 | { | ||
4657 | // InternalSolverLanguage.g:1560:5: (lv_polarity_0_0= rulePolarity ) | ||
4658 | // InternalSolverLanguage.g:1561:6: lv_polarity_0_0= rulePolarity | ||
4659 | { | ||
4660 | 6330 | ||
4661 | newCompositeNode(grammarAccess.getConstraintAccess().getPolarityPolarityParserRuleCall_0_0_0()); | ||
4662 | |||
4663 | pushFollow(FOLLOW_12); | ||
4664 | lv_polarity_0_0=rulePolarity(); | ||
4665 | 6331 | ||
4666 | state._fsp--; | 6332 | leaveRule(); |
4667 | 6333 | ||
6334 | } | ||
4668 | 6335 | ||
4669 | if (current==null) { | 6336 | catch (RecognitionException re) { |
4670 | current = createModelElementForParent(grammarAccess.getConstraintRule()); | 6337 | recover(input,re); |
4671 | } | 6338 | appendSkippedTokens(); |
4672 | set( | 6339 | } |
4673 | current, | 6340 | finally { |
4674 | "polarity", | 6341 | } |
4675 | lv_polarity_0_0, | 6342 | return current; |
4676 | "org.eclipse.viatra.solver.language.SolverLanguage.Polarity"); | 6343 | } |
4677 | afterParserOrEnumRuleCall(); | 6344 | // $ANTLR end "ruleEmptyIntervalLiteral" |
4678 | |||
4679 | 6345 | ||
4680 | } | ||
4681 | 6346 | ||
6347 | // $ANTLR start "entryRuleStringLiteral" | ||
6348 | // InternalSolverLanguageParser.g:2458:1: entryRuleStringLiteral returns [EObject current=null] : iv_ruleStringLiteral= ruleStringLiteral EOF ; | ||
6349 | public final EObject entryRuleStringLiteral() throws RecognitionException { | ||
6350 | EObject current = null; | ||
4682 | 6351 | ||
4683 | } | 6352 | EObject iv_ruleStringLiteral = null; |
4684 | break; | ||
4685 | 6353 | ||
4686 | } | ||
4687 | 6354 | ||
4688 | // InternalSolverLanguage.g:1578:4: ( (lv_symbol_1_0= ruleModelSymbol ) ) | 6355 | try { |
4689 | // InternalSolverLanguage.g:1579:5: (lv_symbol_1_0= ruleModelSymbol ) | 6356 | // InternalSolverLanguageParser.g:2458:54: (iv_ruleStringLiteral= ruleStringLiteral EOF ) |
4690 | { | 6357 | // InternalSolverLanguageParser.g:2459:2: iv_ruleStringLiteral= ruleStringLiteral EOF |
4691 | // InternalSolverLanguage.g:1579:5: (lv_symbol_1_0= ruleModelSymbol ) | 6358 | { |
4692 | // InternalSolverLanguage.g:1580:6: lv_symbol_1_0= ruleModelSymbol | 6359 | newCompositeNode(grammarAccess.getStringLiteralRule()); |
4693 | { | 6360 | pushFollow(FOLLOW_1); |
6361 | iv_ruleStringLiteral=ruleStringLiteral(); | ||
4694 | 6362 | ||
4695 | newCompositeNode(grammarAccess.getConstraintAccess().getSymbolModelSymbolParserRuleCall_0_1_0()); | 6363 | state._fsp--; |
4696 | |||
4697 | pushFollow(FOLLOW_23); | ||
4698 | lv_symbol_1_0=ruleModelSymbol(); | ||
4699 | 6364 | ||
4700 | state._fsp--; | 6365 | current =iv_ruleStringLiteral; |
6366 | match(input,EOF,FOLLOW_2); | ||
4701 | 6367 | ||
6368 | } | ||
4702 | 6369 | ||
4703 | if (current==null) { | 6370 | } |
4704 | current = createModelElementForParent(grammarAccess.getConstraintRule()); | ||
4705 | } | ||
4706 | set( | ||
4707 | current, | ||
4708 | "symbol", | ||
4709 | lv_symbol_1_0, | ||
4710 | "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); | ||
4711 | afterParserOrEnumRuleCall(); | ||
4712 | |||
4713 | 6371 | ||
4714 | } | 6372 | catch (RecognitionException re) { |
6373 | recover(input,re); | ||
6374 | appendSkippedTokens(); | ||
6375 | } | ||
6376 | finally { | ||
6377 | } | ||
6378 | return current; | ||
6379 | } | ||
6380 | // $ANTLR end "entryRuleStringLiteral" | ||
4715 | 6381 | ||
4716 | 6382 | ||
4717 | } | 6383 | // $ANTLR start "ruleStringLiteral" |
6384 | // InternalSolverLanguageParser.g:2465:1: ruleStringLiteral returns [EObject current=null] : ( (lv_value_0_0= RULE_STRING ) ) ; | ||
6385 | public final EObject ruleStringLiteral() throws RecognitionException { | ||
6386 | EObject current = null; | ||
4718 | 6387 | ||
4719 | // InternalSolverLanguage.g:1597:4: (otherlv_2= '(' ( (lv_params_3_0= ruleLiteral ) )? (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* otherlv_6= ')' )? | 6388 | Token lv_value_0_0=null; |
4720 | int alt30=2; | ||
4721 | int LA30_0 = input.LA(1); | ||
4722 | 6389 | ||
4723 | if ( (LA30_0==17) ) { | ||
4724 | alt30=1; | ||
4725 | } | ||
4726 | switch (alt30) { | ||
4727 | case 1 : | ||
4728 | // InternalSolverLanguage.g:1598:5: otherlv_2= '(' ( (lv_params_3_0= ruleLiteral ) )? (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* otherlv_6= ')' | ||
4729 | { | ||
4730 | otherlv_2=(Token)match(input,17,FOLLOW_24); | ||
4731 | 6390 | ||
4732 | newLeafNode(otherlv_2, grammarAccess.getConstraintAccess().getLeftParenthesisKeyword_0_2_0()); | 6391 | enterRule(); |
4733 | |||
4734 | // InternalSolverLanguage.g:1602:5: ( (lv_params_3_0= ruleLiteral ) )? | ||
4735 | int alt28=2; | ||
4736 | int LA28_0 = input.LA(1); | ||
4737 | 6392 | ||
4738 | if ( ((LA28_0>=RULE_INT && LA28_0<=RULE_STRING)||LA28_0==11||(LA28_0>=13 && LA28_0<=14)||LA28_0==27) ) { | 6393 | try { |
4739 | alt28=1; | 6394 | // InternalSolverLanguageParser.g:2471:2: ( ( (lv_value_0_0= RULE_STRING ) ) ) |
4740 | } | 6395 | // InternalSolverLanguageParser.g:2472:2: ( (lv_value_0_0= RULE_STRING ) ) |
4741 | switch (alt28) { | 6396 | { |
4742 | case 1 : | 6397 | // InternalSolverLanguageParser.g:2472:2: ( (lv_value_0_0= RULE_STRING ) ) |
4743 | // InternalSolverLanguage.g:1603:6: (lv_params_3_0= ruleLiteral ) | 6398 | // InternalSolverLanguageParser.g:2473:3: (lv_value_0_0= RULE_STRING ) |
4744 | { | 6399 | { |
4745 | // InternalSolverLanguage.g:1603:6: (lv_params_3_0= ruleLiteral ) | 6400 | // InternalSolverLanguageParser.g:2473:3: (lv_value_0_0= RULE_STRING ) |
4746 | // InternalSolverLanguage.g:1604:7: lv_params_3_0= ruleLiteral | 6401 | // InternalSolverLanguageParser.g:2474:4: lv_value_0_0= RULE_STRING |
4747 | { | 6402 | { |
6403 | lv_value_0_0=(Token)match(input,RULE_STRING,FOLLOW_2); | ||
6404 | |||
6405 | newLeafNode(lv_value_0_0, grammarAccess.getStringLiteralAccess().getValueSTRINGTerminalRuleCall_0()); | ||
6406 | |||
4748 | 6407 | ||
4749 | newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_0_2_1_0()); | 6408 | if (current==null) { |
4750 | 6409 | current = createModelElement(grammarAccess.getStringLiteralRule()); | |
4751 | pushFollow(FOLLOW_8); | 6410 | } |
4752 | lv_params_3_0=ruleLiteral(); | 6411 | setWithLastConsumed( |
6412 | current, | ||
6413 | "value", | ||
6414 | lv_value_0_0, | ||
6415 | "org.eclipse.viatra.solver.language.SolverLanguage.STRING"); | ||
6416 | |||
4753 | 6417 | ||
4754 | state._fsp--; | 6418 | } |
4755 | 6419 | ||
4756 | 6420 | ||
4757 | if (current==null) { | 6421 | } |
4758 | current = createModelElementForParent(grammarAccess.getConstraintRule()); | ||
4759 | } | ||
4760 | add( | ||
4761 | current, | ||
4762 | "params", | ||
4763 | lv_params_3_0, | ||
4764 | "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); | ||
4765 | afterParserOrEnumRuleCall(); | ||
4766 | |||
4767 | 6422 | ||
4768 | } | ||
4769 | 6423 | ||
6424 | } | ||
4770 | 6425 | ||
4771 | } | ||
4772 | break; | ||
4773 | 6426 | ||
4774 | } | 6427 | leaveRule(); |
4775 | 6428 | ||
4776 | // InternalSolverLanguage.g:1621:5: (otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) )* | 6429 | } |
4777 | loop29: | ||
4778 | do { | ||
4779 | int alt29=2; | ||
4780 | int LA29_0 = input.LA(1); | ||
4781 | 6430 | ||
4782 | if ( (LA29_0==18) ) { | 6431 | catch (RecognitionException re) { |
4783 | alt29=1; | 6432 | recover(input,re); |
4784 | } | 6433 | appendSkippedTokens(); |
6434 | } | ||
6435 | finally { | ||
6436 | } | ||
6437 | return current; | ||
6438 | } | ||
6439 | // $ANTLR end "ruleStringLiteral" | ||
4785 | 6440 | ||
4786 | 6441 | ||
4787 | switch (alt29) { | 6442 | // $ANTLR start "entryRuleClassDefinition" |
4788 | case 1 : | 6443 | // InternalSolverLanguageParser.g:2493:1: entryRuleClassDefinition returns [EObject current=null] : iv_ruleClassDefinition= ruleClassDefinition EOF ; |
4789 | // InternalSolverLanguage.g:1622:6: otherlv_4= ',' ( (lv_params_5_0= ruleLiteral ) ) | 6444 | public final EObject entryRuleClassDefinition() throws RecognitionException { |
4790 | { | 6445 | EObject current = null; |
4791 | otherlv_4=(Token)match(input,18,FOLLOW_25); | ||
4792 | 6446 | ||
4793 | newLeafNode(otherlv_4, grammarAccess.getConstraintAccess().getCommaKeyword_0_2_2_0()); | 6447 | EObject iv_ruleClassDefinition = null; |
4794 | |||
4795 | // InternalSolverLanguage.g:1626:6: ( (lv_params_5_0= ruleLiteral ) ) | ||
4796 | // InternalSolverLanguage.g:1627:7: (lv_params_5_0= ruleLiteral ) | ||
4797 | { | ||
4798 | // InternalSolverLanguage.g:1627:7: (lv_params_5_0= ruleLiteral ) | ||
4799 | // InternalSolverLanguage.g:1628:8: lv_params_5_0= ruleLiteral | ||
4800 | { | ||
4801 | 6448 | ||
4802 | newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_0_2_2_1_0()); | ||
4803 | |||
4804 | pushFollow(FOLLOW_8); | ||
4805 | lv_params_5_0=ruleLiteral(); | ||
4806 | 6449 | ||
4807 | state._fsp--; | 6450 | try { |
6451 | // InternalSolverLanguageParser.g:2493:56: (iv_ruleClassDefinition= ruleClassDefinition EOF ) | ||
6452 | // InternalSolverLanguageParser.g:2494:2: iv_ruleClassDefinition= ruleClassDefinition EOF | ||
6453 | { | ||
6454 | newCompositeNode(grammarAccess.getClassDefinitionRule()); | ||
6455 | pushFollow(FOLLOW_1); | ||
6456 | iv_ruleClassDefinition=ruleClassDefinition(); | ||
4808 | 6457 | ||
6458 | state._fsp--; | ||
4809 | 6459 | ||
4810 | if (current==null) { | 6460 | current =iv_ruleClassDefinition; |
4811 | current = createModelElementForParent(grammarAccess.getConstraintRule()); | 6461 | match(input,EOF,FOLLOW_2); |
4812 | } | ||
4813 | add( | ||
4814 | current, | ||
4815 | "params", | ||
4816 | lv_params_5_0, | ||
4817 | "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); | ||
4818 | afterParserOrEnumRuleCall(); | ||
4819 | |||
4820 | 6462 | ||
4821 | } | 6463 | } |
4822 | 6464 | ||
6465 | } | ||
4823 | 6466 | ||
4824 | } | 6467 | catch (RecognitionException re) { |
6468 | recover(input,re); | ||
6469 | appendSkippedTokens(); | ||
6470 | } | ||
6471 | finally { | ||
6472 | } | ||
6473 | return current; | ||
6474 | } | ||
6475 | // $ANTLR end "entryRuleClassDefinition" | ||
4825 | 6476 | ||
4826 | 6477 | ||
4827 | } | 6478 | // $ANTLR start "ruleClassDefinition" |
4828 | break; | 6479 | // InternalSolverLanguageParser.g:2500:1: ruleClassDefinition returns [EObject current=null] : ( ( (lv_abstract_0_0= Abstract ) )? otherlv_1= Class ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= Extends ( ( ruleQualifiedName ) ) (otherlv_5= Comma ( ( ruleQualifiedName ) ) )* )? otherlv_7= LeftCurlyBracket ( (lv_members_8_0= ruleMemberDefinition ) )* otherlv_9= RightCurlyBracket ) ; |
6480 | public final EObject ruleClassDefinition() throws RecognitionException { | ||
6481 | EObject current = null; | ||
4829 | 6482 | ||
4830 | default : | 6483 | Token lv_abstract_0_0=null; |
4831 | break loop29; | 6484 | Token otherlv_1=null; |
4832 | } | 6485 | Token lv_name_2_0=null; |
4833 | } while (true); | 6486 | Token otherlv_3=null; |
6487 | Token otherlv_5=null; | ||
6488 | Token otherlv_7=null; | ||
6489 | Token otherlv_9=null; | ||
6490 | EObject lv_members_8_0 = null; | ||
4834 | 6491 | ||
4835 | otherlv_6=(Token)match(input,19,FOLLOW_2); | ||
4836 | 6492 | ||
4837 | newLeafNode(otherlv_6, grammarAccess.getConstraintAccess().getRightParenthesisKeyword_0_2_3()); | ||
4838 | |||
4839 | 6493 | ||
4840 | } | 6494 | enterRule(); |
4841 | break; | ||
4842 | 6495 | ||
4843 | } | 6496 | try { |
6497 | // InternalSolverLanguageParser.g:2506:2: ( ( ( (lv_abstract_0_0= Abstract ) )? otherlv_1= Class ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= Extends ( ( ruleQualifiedName ) ) (otherlv_5= Comma ( ( ruleQualifiedName ) ) )* )? otherlv_7= LeftCurlyBracket ( (lv_members_8_0= ruleMemberDefinition ) )* otherlv_9= RightCurlyBracket ) ) | ||
6498 | // InternalSolverLanguageParser.g:2507:2: ( ( (lv_abstract_0_0= Abstract ) )? otherlv_1= Class ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= Extends ( ( ruleQualifiedName ) ) (otherlv_5= Comma ( ( ruleQualifiedName ) ) )* )? otherlv_7= LeftCurlyBracket ( (lv_members_8_0= ruleMemberDefinition ) )* otherlv_9= RightCurlyBracket ) | ||
6499 | { | ||
6500 | // InternalSolverLanguageParser.g:2507:2: ( ( (lv_abstract_0_0= Abstract ) )? otherlv_1= Class ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= Extends ( ( ruleQualifiedName ) ) (otherlv_5= Comma ( ( ruleQualifiedName ) ) )* )? otherlv_7= LeftCurlyBracket ( (lv_members_8_0= ruleMemberDefinition ) )* otherlv_9= RightCurlyBracket ) | ||
6501 | // InternalSolverLanguageParser.g:2508:3: ( (lv_abstract_0_0= Abstract ) )? otherlv_1= Class ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= Extends ( ( ruleQualifiedName ) ) (otherlv_5= Comma ( ( ruleQualifiedName ) ) )* )? otherlv_7= LeftCurlyBracket ( (lv_members_8_0= ruleMemberDefinition ) )* otherlv_9= RightCurlyBracket | ||
6502 | { | ||
6503 | // InternalSolverLanguageParser.g:2508:3: ( (lv_abstract_0_0= Abstract ) )? | ||
6504 | int alt26=2; | ||
6505 | int LA26_0 = input.LA(1); | ||
4844 | 6506 | ||
6507 | if ( (LA26_0==Abstract) ) { | ||
6508 | alt26=1; | ||
6509 | } | ||
6510 | switch (alt26) { | ||
6511 | case 1 : | ||
6512 | // InternalSolverLanguageParser.g:2509:4: (lv_abstract_0_0= Abstract ) | ||
6513 | { | ||
6514 | // InternalSolverLanguageParser.g:2509:4: (lv_abstract_0_0= Abstract ) | ||
6515 | // InternalSolverLanguageParser.g:2510:5: lv_abstract_0_0= Abstract | ||
6516 | { | ||
6517 | lv_abstract_0_0=(Token)match(input,Abstract,FOLLOW_37); | ||
6518 | |||
6519 | newLeafNode(lv_abstract_0_0, grammarAccess.getClassDefinitionAccess().getAbstractAbstractKeyword_0_0()); | ||
6520 | |||
6521 | |||
6522 | if (current==null) { | ||
6523 | current = createModelElement(grammarAccess.getClassDefinitionRule()); | ||
6524 | } | ||
6525 | setWithLastConsumed(current, "abstract", true, "abstract"); | ||
6526 | |||
4845 | 6527 | ||
4846 | } | 6528 | } |
4847 | 6529 | ||
4848 | 6530 | ||
4849 | } | 6531 | } |
4850 | break; | 6532 | break; |
4851 | case 2 : | ||
4852 | // InternalSolverLanguage.g:1653:3: ( ( (lv_closureType_7_0= ruleClosureType ) ) otherlv_8= '(' ( (lv_params_9_0= ruleLiteral ) )? (otherlv_10= ',' ( (lv_params_11_0= ruleLiteral ) ) )* otherlv_12= ')' ) | ||
4853 | { | ||
4854 | // InternalSolverLanguage.g:1653:3: ( ( (lv_closureType_7_0= ruleClosureType ) ) otherlv_8= '(' ( (lv_params_9_0= ruleLiteral ) )? (otherlv_10= ',' ( (lv_params_11_0= ruleLiteral ) ) )* otherlv_12= ')' ) | ||
4855 | // InternalSolverLanguage.g:1654:4: ( (lv_closureType_7_0= ruleClosureType ) ) otherlv_8= '(' ( (lv_params_9_0= ruleLiteral ) )? (otherlv_10= ',' ( (lv_params_11_0= ruleLiteral ) ) )* otherlv_12= ')' | ||
4856 | { | ||
4857 | // InternalSolverLanguage.g:1654:4: ( (lv_closureType_7_0= ruleClosureType ) ) | ||
4858 | // InternalSolverLanguage.g:1655:5: (lv_closureType_7_0= ruleClosureType ) | ||
4859 | { | ||
4860 | // InternalSolverLanguage.g:1655:5: (lv_closureType_7_0= ruleClosureType ) | ||
4861 | // InternalSolverLanguage.g:1656:6: lv_closureType_7_0= ruleClosureType | ||
4862 | { | ||
4863 | 6533 | ||
4864 | newCompositeNode(grammarAccess.getConstraintAccess().getClosureTypeClosureTypeParserRuleCall_1_0_0()); | 6534 | } |
4865 | |||
4866 | pushFollow(FOLLOW_26); | ||
4867 | lv_closureType_7_0=ruleClosureType(); | ||
4868 | 6535 | ||
4869 | state._fsp--; | 6536 | otherlv_1=(Token)match(input,Class,FOLLOW_38); |
4870 | 6537 | ||
6538 | newLeafNode(otherlv_1, grammarAccess.getClassDefinitionAccess().getClassKeyword_1()); | ||
6539 | |||
6540 | // InternalSolverLanguageParser.g:2526:3: ( (lv_name_2_0= RULE_ID ) ) | ||
6541 | // InternalSolverLanguageParser.g:2527:4: (lv_name_2_0= RULE_ID ) | ||
6542 | { | ||
6543 | // InternalSolverLanguageParser.g:2527:4: (lv_name_2_0= RULE_ID ) | ||
6544 | // InternalSolverLanguageParser.g:2528:5: lv_name_2_0= RULE_ID | ||
6545 | { | ||
6546 | lv_name_2_0=(Token)match(input,RULE_ID,FOLLOW_39); | ||
4871 | 6547 | ||
4872 | if (current==null) { | 6548 | newLeafNode(lv_name_2_0, grammarAccess.getClassDefinitionAccess().getNameIDTerminalRuleCall_2_0()); |
4873 | current = createModelElementForParent(grammarAccess.getConstraintRule()); | 6549 | |
4874 | } | ||
4875 | set( | ||
4876 | current, | ||
4877 | "closureType", | ||
4878 | lv_closureType_7_0, | ||
4879 | "org.eclipse.viatra.solver.language.SolverLanguage.ClosureType"); | ||
4880 | afterParserOrEnumRuleCall(); | ||
4881 | |||
4882 | 6550 | ||
4883 | } | 6551 | if (current==null) { |
6552 | current = createModelElement(grammarAccess.getClassDefinitionRule()); | ||
6553 | } | ||
6554 | setWithLastConsumed( | ||
6555 | current, | ||
6556 | "name", | ||
6557 | lv_name_2_0, | ||
6558 | "org.eclipse.xtext.common.Terminals.ID"); | ||
6559 | |||
4884 | 6560 | ||
6561 | } | ||
4885 | 6562 | ||
4886 | } | ||
4887 | 6563 | ||
4888 | otherlv_8=(Token)match(input,17,FOLLOW_24); | 6564 | } |
4889 | 6565 | ||
4890 | newLeafNode(otherlv_8, grammarAccess.getConstraintAccess().getLeftParenthesisKeyword_1_1()); | 6566 | // InternalSolverLanguageParser.g:2544:3: (otherlv_3= Extends ( ( ruleQualifiedName ) ) (otherlv_5= Comma ( ( ruleQualifiedName ) ) )* )? |
4891 | 6567 | int alt28=2; | |
4892 | // InternalSolverLanguage.g:1677:4: ( (lv_params_9_0= ruleLiteral ) )? | 6568 | int LA28_0 = input.LA(1); |
4893 | int alt31=2; | ||
4894 | int LA31_0 = input.LA(1); | ||
4895 | 6569 | ||
4896 | if ( ((LA31_0>=RULE_INT && LA31_0<=RULE_STRING)||LA31_0==11||(LA31_0>=13 && LA31_0<=14)||LA31_0==27) ) { | 6570 | if ( (LA28_0==Extends) ) { |
4897 | alt31=1; | 6571 | alt28=1; |
4898 | } | 6572 | } |
4899 | switch (alt31) { | 6573 | switch (alt28) { |
4900 | case 1 : | 6574 | case 1 : |
4901 | // InternalSolverLanguage.g:1678:5: (lv_params_9_0= ruleLiteral ) | 6575 | // InternalSolverLanguageParser.g:2545:4: otherlv_3= Extends ( ( ruleQualifiedName ) ) (otherlv_5= Comma ( ( ruleQualifiedName ) ) )* |
4902 | { | 6576 | { |
4903 | // InternalSolverLanguage.g:1678:5: (lv_params_9_0= ruleLiteral ) | 6577 | otherlv_3=(Token)match(input,Extends,FOLLOW_8); |
4904 | // InternalSolverLanguage.g:1679:6: lv_params_9_0= ruleLiteral | ||
4905 | { | ||
4906 | 6578 | ||
4907 | newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_1_2_0()); | 6579 | newLeafNode(otherlv_3, grammarAccess.getClassDefinitionAccess().getExtendsKeyword_3_0()); |
4908 | 6580 | ||
4909 | pushFollow(FOLLOW_8); | 6581 | // InternalSolverLanguageParser.g:2549:4: ( ( ruleQualifiedName ) ) |
4910 | lv_params_9_0=ruleLiteral(); | 6582 | // InternalSolverLanguageParser.g:2550:5: ( ruleQualifiedName ) |
6583 | { | ||
6584 | // InternalSolverLanguageParser.g:2550:5: ( ruleQualifiedName ) | ||
6585 | // InternalSolverLanguageParser.g:2551:6: ruleQualifiedName | ||
6586 | { | ||
4911 | 6587 | ||
4912 | state._fsp--; | 6588 | if (current==null) { |
6589 | current = createModelElement(grammarAccess.getClassDefinitionRule()); | ||
6590 | } | ||
6591 | |||
4913 | 6592 | ||
6593 | newCompositeNode(grammarAccess.getClassDefinitionAccess().getSuperclassesNamedElementCrossReference_3_1_0()); | ||
6594 | |||
6595 | pushFollow(FOLLOW_40); | ||
6596 | ruleQualifiedName(); | ||
4914 | 6597 | ||
4915 | if (current==null) { | 6598 | state._fsp--; |
4916 | current = createModelElementForParent(grammarAccess.getConstraintRule()); | ||
4917 | } | ||
4918 | add( | ||
4919 | current, | ||
4920 | "params", | ||
4921 | lv_params_9_0, | ||
4922 | "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); | ||
4923 | afterParserOrEnumRuleCall(); | ||
4924 | |||
4925 | 6599 | ||
4926 | } | ||
4927 | 6600 | ||
6601 | afterParserOrEnumRuleCall(); | ||
6602 | |||
6603 | |||
6604 | } | ||
4928 | 6605 | ||
4929 | } | ||
4930 | break; | ||
4931 | 6606 | ||
4932 | } | 6607 | } |
4933 | 6608 | ||
4934 | // InternalSolverLanguage.g:1696:4: (otherlv_10= ',' ( (lv_params_11_0= ruleLiteral ) ) )* | 6609 | // InternalSolverLanguageParser.g:2565:4: (otherlv_5= Comma ( ( ruleQualifiedName ) ) )* |
4935 | loop32: | 6610 | loop27: |
4936 | do { | 6611 | do { |
4937 | int alt32=2; | 6612 | int alt27=2; |
4938 | int LA32_0 = input.LA(1); | 6613 | int LA27_0 = input.LA(1); |
4939 | 6614 | ||
4940 | if ( (LA32_0==18) ) { | 6615 | if ( (LA27_0==Comma) ) { |
4941 | alt32=1; | 6616 | alt27=1; |
4942 | } | 6617 | } |
4943 | 6618 | ||
4944 | 6619 | ||
4945 | switch (alt32) { | 6620 | switch (alt27) { |
4946 | case 1 : | 6621 | case 1 : |
4947 | // InternalSolverLanguage.g:1697:5: otherlv_10= ',' ( (lv_params_11_0= ruleLiteral ) ) | 6622 | // InternalSolverLanguageParser.g:2566:5: otherlv_5= Comma ( ( ruleQualifiedName ) ) |
4948 | { | 6623 | { |
4949 | otherlv_10=(Token)match(input,18,FOLLOW_25); | 6624 | otherlv_5=(Token)match(input,Comma,FOLLOW_8); |
4950 | 6625 | ||
4951 | newLeafNode(otherlv_10, grammarAccess.getConstraintAccess().getCommaKeyword_1_3_0()); | 6626 | newLeafNode(otherlv_5, grammarAccess.getClassDefinitionAccess().getCommaKeyword_3_2_0()); |
4952 | 6627 | ||
4953 | // InternalSolverLanguage.g:1701:5: ( (lv_params_11_0= ruleLiteral ) ) | 6628 | // InternalSolverLanguageParser.g:2570:5: ( ( ruleQualifiedName ) ) |
4954 | // InternalSolverLanguage.g:1702:6: (lv_params_11_0= ruleLiteral ) | 6629 | // InternalSolverLanguageParser.g:2571:6: ( ruleQualifiedName ) |
4955 | { | 6630 | { |
4956 | // InternalSolverLanguage.g:1702:6: (lv_params_11_0= ruleLiteral ) | 6631 | // InternalSolverLanguageParser.g:2571:6: ( ruleQualifiedName ) |
4957 | // InternalSolverLanguage.g:1703:7: lv_params_11_0= ruleLiteral | 6632 | // InternalSolverLanguageParser.g:2572:7: ruleQualifiedName |
4958 | { | 6633 | { |
4959 | 6634 | ||
4960 | newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_1_3_1_0()); | 6635 | if (current==null) { |
6636 | current = createModelElement(grammarAccess.getClassDefinitionRule()); | ||
6637 | } | ||
6638 | |||
6639 | |||
6640 | newCompositeNode(grammarAccess.getClassDefinitionAccess().getSuperclassesNamedElementCrossReference_3_2_1_0()); | ||
4961 | 6641 | ||
4962 | pushFollow(FOLLOW_8); | 6642 | pushFollow(FOLLOW_40); |
4963 | lv_params_11_0=ruleLiteral(); | 6643 | ruleQualifiedName(); |
4964 | 6644 | ||
4965 | state._fsp--; | 6645 | state._fsp--; |
4966 | 6646 | ||
4967 | 6647 | ||
4968 | if (current==null) { | ||
4969 | current = createModelElementForParent(grammarAccess.getConstraintRule()); | ||
4970 | } | ||
4971 | add( | ||
4972 | current, | ||
4973 | "params", | ||
4974 | lv_params_11_0, | ||
4975 | "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); | ||
4976 | afterParserOrEnumRuleCall(); | 6648 | afterParserOrEnumRuleCall(); |
4977 | 6649 | ||
4978 | 6650 | ||
@@ -4986,20 +6658,73 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
4986 | break; | 6658 | break; |
4987 | 6659 | ||
4988 | default : | 6660 | default : |
4989 | break loop32; | 6661 | break loop27; |
4990 | } | 6662 | } |
4991 | } while (true); | 6663 | } while (true); |
4992 | 6664 | ||
4993 | otherlv_12=(Token)match(input,19,FOLLOW_2); | ||
4994 | |||
4995 | newLeafNode(otherlv_12, grammarAccess.getConstraintAccess().getRightParenthesisKeyword_1_4()); | ||
4996 | |||
4997 | 6665 | ||
4998 | } | 6666 | } |
6667 | break; | ||
4999 | 6668 | ||
6669 | } | ||
6670 | |||
6671 | otherlv_7=(Token)match(input,LeftCurlyBracket,FOLLOW_41); | ||
6672 | |||
6673 | newLeafNode(otherlv_7, grammarAccess.getClassDefinitionAccess().getLeftCurlyBracketKeyword_4()); | ||
6674 | |||
6675 | // InternalSolverLanguageParser.g:2592:3: ( (lv_members_8_0= ruleMemberDefinition ) )* | ||
6676 | loop29: | ||
6677 | do { | ||
6678 | int alt29=2; | ||
6679 | int LA29_0 = input.LA(1); | ||
6680 | |||
6681 | if ( (LA29_0==Contains||LA29_0==RULE_QUOTED_ID||LA29_0==RULE_ID) ) { | ||
6682 | alt29=1; | ||
6683 | } | ||
6684 | |||
6685 | |||
6686 | switch (alt29) { | ||
6687 | case 1 : | ||
6688 | // InternalSolverLanguageParser.g:2593:4: (lv_members_8_0= ruleMemberDefinition ) | ||
6689 | { | ||
6690 | // InternalSolverLanguageParser.g:2593:4: (lv_members_8_0= ruleMemberDefinition ) | ||
6691 | // InternalSolverLanguageParser.g:2594:5: lv_members_8_0= ruleMemberDefinition | ||
6692 | { | ||
6693 | |||
6694 | newCompositeNode(grammarAccess.getClassDefinitionAccess().getMembersMemberDefinitionParserRuleCall_5_0()); | ||
6695 | |||
6696 | pushFollow(FOLLOW_41); | ||
6697 | lv_members_8_0=ruleMemberDefinition(); | ||
6698 | |||
6699 | state._fsp--; | ||
6700 | |||
6701 | |||
6702 | if (current==null) { | ||
6703 | current = createModelElementForParent(grammarAccess.getClassDefinitionRule()); | ||
6704 | } | ||
6705 | add( | ||
6706 | current, | ||
6707 | "members", | ||
6708 | lv_members_8_0, | ||
6709 | "org.eclipse.viatra.solver.language.SolverLanguage.MemberDefinition"); | ||
6710 | afterParserOrEnumRuleCall(); | ||
6711 | |||
6712 | |||
6713 | } | ||
5000 | 6714 | ||
5001 | } | 6715 | |
5002 | break; | 6716 | } |
6717 | break; | ||
6718 | |||
6719 | default : | ||
6720 | break loop29; | ||
6721 | } | ||
6722 | } while (true); | ||
6723 | |||
6724 | otherlv_9=(Token)match(input,RightCurlyBracket,FOLLOW_2); | ||
6725 | |||
6726 | newLeafNode(otherlv_9, grammarAccess.getClassDefinitionAccess().getRightCurlyBracketKeyword_6()); | ||
6727 | |||
5003 | 6728 | ||
5004 | } | 6729 | } |
5005 | 6730 | ||
@@ -5019,28 +6744,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5019 | } | 6744 | } |
5020 | return current; | 6745 | return current; |
5021 | } | 6746 | } |
5022 | // $ANTLR end "ruleConstraint" | 6747 | // $ANTLR end "ruleClassDefinition" |
5023 | 6748 | ||
5024 | 6749 | ||
5025 | // $ANTLR start "entryRuleClosureType" | 6750 | // $ANTLR start "entryRuleMemberDefinition" |
5026 | // InternalSolverLanguage.g:1730:1: entryRuleClosureType returns [EObject current=null] : iv_ruleClosureType= ruleClosureType EOF ; | 6751 | // InternalSolverLanguageParser.g:2619:1: entryRuleMemberDefinition returns [EObject current=null] : iv_ruleMemberDefinition= ruleMemberDefinition EOF ; |
5027 | public final EObject entryRuleClosureType() throws RecognitionException { | 6752 | public final EObject entryRuleMemberDefinition() throws RecognitionException { |
5028 | EObject current = null; | 6753 | EObject current = null; |
5029 | 6754 | ||
5030 | EObject iv_ruleClosureType = null; | 6755 | EObject iv_ruleMemberDefinition = null; |
5031 | 6756 | ||
5032 | 6757 | ||
5033 | try { | 6758 | try { |
5034 | // InternalSolverLanguage.g:1730:52: (iv_ruleClosureType= ruleClosureType EOF ) | 6759 | // InternalSolverLanguageParser.g:2619:57: (iv_ruleMemberDefinition= ruleMemberDefinition EOF ) |
5035 | // InternalSolverLanguage.g:1731:2: iv_ruleClosureType= ruleClosureType EOF | 6760 | // InternalSolverLanguageParser.g:2620:2: iv_ruleMemberDefinition= ruleMemberDefinition EOF |
5036 | { | 6761 | { |
5037 | newCompositeNode(grammarAccess.getClosureTypeRule()); | 6762 | newCompositeNode(grammarAccess.getMemberDefinitionRule()); |
5038 | pushFollow(FOLLOW_1); | 6763 | pushFollow(FOLLOW_1); |
5039 | iv_ruleClosureType=ruleClosureType(); | 6764 | iv_ruleMemberDefinition=ruleMemberDefinition(); |
5040 | 6765 | ||
5041 | state._fsp--; | 6766 | state._fsp--; |
5042 | 6767 | ||
5043 | current =iv_ruleClosureType; | 6768 | current =iv_ruleMemberDefinition; |
5044 | match(input,EOF,FOLLOW_2); | 6769 | match(input,EOF,FOLLOW_2); |
5045 | 6770 | ||
5046 | } | 6771 | } |
@@ -5055,92 +6780,224 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5055 | } | 6780 | } |
5056 | return current; | 6781 | return current; |
5057 | } | 6782 | } |
5058 | // $ANTLR end "entryRuleClosureType" | 6783 | // $ANTLR end "entryRuleMemberDefinition" |
5059 | 6784 | ||
5060 | 6785 | ||
5061 | // $ANTLR start "ruleClosureType" | 6786 | // $ANTLR start "ruleMemberDefinition" |
5062 | // InternalSolverLanguage.g:1737:1: ruleClosureType returns [EObject current=null] : ( ( () otherlv_1= '*' ) | ( () otherlv_3= '+' ) ) ; | 6787 | // InternalSolverLanguageParser.g:2626:1: ruleMemberDefinition returns [EObject current=null] : ( ( (lv_containment_0_0= Contains ) )? ( ( ruleQualifiedName ) ) ( (lv_multiplicity_2_0= ruleMultiplicity ) )? ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= Opposite ( ( ruleQualifiedName ) ) )? (otherlv_6= Semicolon )? ) ; |
5063 | public final EObject ruleClosureType() throws RecognitionException { | 6788 | public final EObject ruleMemberDefinition() throws RecognitionException { |
5064 | EObject current = null; | 6789 | EObject current = null; |
5065 | 6790 | ||
5066 | Token otherlv_1=null; | 6791 | Token lv_containment_0_0=null; |
5067 | Token otherlv_3=null; | 6792 | Token lv_name_3_0=null; |
6793 | Token otherlv_4=null; | ||
6794 | Token otherlv_6=null; | ||
6795 | EObject lv_multiplicity_2_0 = null; | ||
6796 | |||
5068 | 6797 | ||
5069 | 6798 | ||
5070 | enterRule(); | 6799 | enterRule(); |
5071 | 6800 | ||
5072 | try { | 6801 | try { |
5073 | // InternalSolverLanguage.g:1743:2: ( ( ( () otherlv_1= '*' ) | ( () otherlv_3= '+' ) ) ) | 6802 | // InternalSolverLanguageParser.g:2632:2: ( ( ( (lv_containment_0_0= Contains ) )? ( ( ruleQualifiedName ) ) ( (lv_multiplicity_2_0= ruleMultiplicity ) )? ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= Opposite ( ( ruleQualifiedName ) ) )? (otherlv_6= Semicolon )? ) ) |
5074 | // InternalSolverLanguage.g:1744:2: ( ( () otherlv_1= '*' ) | ( () otherlv_3= '+' ) ) | 6803 | // InternalSolverLanguageParser.g:2633:2: ( ( (lv_containment_0_0= Contains ) )? ( ( ruleQualifiedName ) ) ( (lv_multiplicity_2_0= ruleMultiplicity ) )? ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= Opposite ( ( ruleQualifiedName ) ) )? (otherlv_6= Semicolon )? ) |
5075 | { | 6804 | { |
5076 | // InternalSolverLanguage.g:1744:2: ( ( () otherlv_1= '*' ) | ( () otherlv_3= '+' ) ) | 6805 | // InternalSolverLanguageParser.g:2633:2: ( ( (lv_containment_0_0= Contains ) )? ( ( ruleQualifiedName ) ) ( (lv_multiplicity_2_0= ruleMultiplicity ) )? ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= Opposite ( ( ruleQualifiedName ) ) )? (otherlv_6= Semicolon )? ) |
5077 | int alt34=2; | 6806 | // InternalSolverLanguageParser.g:2634:3: ( (lv_containment_0_0= Contains ) )? ( ( ruleQualifiedName ) ) ( (lv_multiplicity_2_0= ruleMultiplicity ) )? ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= Opposite ( ( ruleQualifiedName ) ) )? (otherlv_6= Semicolon )? |
5078 | int LA34_0 = input.LA(1); | 6807 | { |
6808 | // InternalSolverLanguageParser.g:2634:3: ( (lv_containment_0_0= Contains ) )? | ||
6809 | int alt30=2; | ||
6810 | int LA30_0 = input.LA(1); | ||
6811 | |||
6812 | if ( (LA30_0==Contains) ) { | ||
6813 | alt30=1; | ||
6814 | } | ||
6815 | switch (alt30) { | ||
6816 | case 1 : | ||
6817 | // InternalSolverLanguageParser.g:2635:4: (lv_containment_0_0= Contains ) | ||
6818 | { | ||
6819 | // InternalSolverLanguageParser.g:2635:4: (lv_containment_0_0= Contains ) | ||
6820 | // InternalSolverLanguageParser.g:2636:5: lv_containment_0_0= Contains | ||
6821 | { | ||
6822 | lv_containment_0_0=(Token)match(input,Contains,FOLLOW_8); | ||
6823 | |||
6824 | newLeafNode(lv_containment_0_0, grammarAccess.getMemberDefinitionAccess().getContainmentContainsKeyword_0_0()); | ||
6825 | |||
6826 | |||
6827 | if (current==null) { | ||
6828 | current = createModelElement(grammarAccess.getMemberDefinitionRule()); | ||
6829 | } | ||
6830 | setWithLastConsumed(current, "containment", true, "contains"); | ||
6831 | |||
6832 | |||
6833 | } | ||
6834 | |||
6835 | |||
6836 | } | ||
6837 | break; | ||
6838 | |||
6839 | } | ||
6840 | |||
6841 | // InternalSolverLanguageParser.g:2648:3: ( ( ruleQualifiedName ) ) | ||
6842 | // InternalSolverLanguageParser.g:2649:4: ( ruleQualifiedName ) | ||
6843 | { | ||
6844 | // InternalSolverLanguageParser.g:2649:4: ( ruleQualifiedName ) | ||
6845 | // InternalSolverLanguageParser.g:2650:5: ruleQualifiedName | ||
6846 | { | ||
6847 | |||
6848 | if (current==null) { | ||
6849 | current = createModelElement(grammarAccess.getMemberDefinitionRule()); | ||
6850 | } | ||
6851 | |||
6852 | |||
6853 | newCompositeNode(grammarAccess.getMemberDefinitionAccess().getTypeNamedElementCrossReference_1_0()); | ||
6854 | |||
6855 | pushFollow(FOLLOW_42); | ||
6856 | ruleQualifiedName(); | ||
6857 | |||
6858 | state._fsp--; | ||
6859 | |||
6860 | |||
6861 | afterParserOrEnumRuleCall(); | ||
6862 | |||
5079 | 6863 | ||
5080 | if ( (LA34_0==31) ) { | ||
5081 | alt34=1; | ||
5082 | } | 6864 | } |
5083 | else if ( (LA34_0==30) ) { | 6865 | |
5084 | alt34=2; | 6866 | |
5085 | } | 6867 | } |
5086 | else { | ||
5087 | NoViableAltException nvae = | ||
5088 | new NoViableAltException("", 34, 0, input); | ||
5089 | 6868 | ||
5090 | throw nvae; | 6869 | // InternalSolverLanguageParser.g:2664:3: ( (lv_multiplicity_2_0= ruleMultiplicity ) )? |
6870 | int alt31=2; | ||
6871 | int LA31_0 = input.LA(1); | ||
6872 | |||
6873 | if ( (LA31_0==LeftSquareBracket) ) { | ||
6874 | alt31=1; | ||
5091 | } | 6875 | } |
5092 | switch (alt34) { | 6876 | switch (alt31) { |
5093 | case 1 : | 6877 | case 1 : |
5094 | // InternalSolverLanguage.g:1745:3: ( () otherlv_1= '*' ) | 6878 | // InternalSolverLanguageParser.g:2665:4: (lv_multiplicity_2_0= ruleMultiplicity ) |
5095 | { | 6879 | { |
5096 | // InternalSolverLanguage.g:1745:3: ( () otherlv_1= '*' ) | 6880 | // InternalSolverLanguageParser.g:2665:4: (lv_multiplicity_2_0= ruleMultiplicity ) |
5097 | // InternalSolverLanguage.g:1746:4: () otherlv_1= '*' | 6881 | // InternalSolverLanguageParser.g:2666:5: lv_multiplicity_2_0= ruleMultiplicity |
5098 | { | ||
5099 | // InternalSolverLanguage.g:1746:4: () | ||
5100 | // InternalSolverLanguage.g:1747:5: | ||
5101 | { | 6882 | { |
5102 | 6883 | ||
5103 | current = forceCreateModelElement( | 6884 | newCompositeNode(grammarAccess.getMemberDefinitionAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); |
5104 | grammarAccess.getClosureTypeAccess().getReflexiveClosureAction_0_0(), | ||
5105 | current); | ||
5106 | 6885 | ||
6886 | pushFollow(FOLLOW_38); | ||
6887 | lv_multiplicity_2_0=ruleMultiplicity(); | ||
5107 | 6888 | ||
5108 | } | 6889 | state._fsp--; |
5109 | 6890 | ||
5110 | otherlv_1=(Token)match(input,31,FOLLOW_2); | ||
5111 | 6891 | ||
5112 | newLeafNode(otherlv_1, grammarAccess.getClosureTypeAccess().getAsteriskKeyword_0_1()); | 6892 | if (current==null) { |
5113 | 6893 | current = createModelElementForParent(grammarAccess.getMemberDefinitionRule()); | |
6894 | } | ||
6895 | set( | ||
6896 | current, | ||
6897 | "multiplicity", | ||
6898 | lv_multiplicity_2_0, | ||
6899 | "org.eclipse.viatra.solver.language.SolverLanguage.Multiplicity"); | ||
6900 | afterParserOrEnumRuleCall(); | ||
6901 | |||
5114 | 6902 | ||
5115 | } | 6903 | } |
5116 | 6904 | ||
5117 | 6905 | ||
5118 | } | 6906 | } |
5119 | break; | 6907 | break; |
5120 | case 2 : | 6908 | |
5121 | // InternalSolverLanguage.g:1759:3: ( () otherlv_3= '+' ) | 6909 | } |
6910 | |||
6911 | // InternalSolverLanguageParser.g:2683:3: ( (lv_name_3_0= RULE_ID ) ) | ||
6912 | // InternalSolverLanguageParser.g:2684:4: (lv_name_3_0= RULE_ID ) | ||
6913 | { | ||
6914 | // InternalSolverLanguageParser.g:2684:4: (lv_name_3_0= RULE_ID ) | ||
6915 | // InternalSolverLanguageParser.g:2685:5: lv_name_3_0= RULE_ID | ||
6916 | { | ||
6917 | lv_name_3_0=(Token)match(input,RULE_ID,FOLLOW_43); | ||
6918 | |||
6919 | newLeafNode(lv_name_3_0, grammarAccess.getMemberDefinitionAccess().getNameIDTerminalRuleCall_3_0()); | ||
6920 | |||
6921 | |||
6922 | if (current==null) { | ||
6923 | current = createModelElement(grammarAccess.getMemberDefinitionRule()); | ||
6924 | } | ||
6925 | setWithLastConsumed( | ||
6926 | current, | ||
6927 | "name", | ||
6928 | lv_name_3_0, | ||
6929 | "org.eclipse.xtext.common.Terminals.ID"); | ||
6930 | |||
6931 | |||
6932 | } | ||
6933 | |||
6934 | |||
6935 | } | ||
6936 | |||
6937 | // InternalSolverLanguageParser.g:2701:3: (otherlv_4= Opposite ( ( ruleQualifiedName ) ) )? | ||
6938 | int alt32=2; | ||
6939 | int LA32_0 = input.LA(1); | ||
6940 | |||
6941 | if ( (LA32_0==Opposite) ) { | ||
6942 | alt32=1; | ||
6943 | } | ||
6944 | switch (alt32) { | ||
6945 | case 1 : | ||
6946 | // InternalSolverLanguageParser.g:2702:4: otherlv_4= Opposite ( ( ruleQualifiedName ) ) | ||
5122 | { | 6947 | { |
5123 | // InternalSolverLanguage.g:1759:3: ( () otherlv_3= '+' ) | 6948 | otherlv_4=(Token)match(input,Opposite,FOLLOW_8); |
5124 | // InternalSolverLanguage.g:1760:4: () otherlv_3= '+' | 6949 | |
6950 | newLeafNode(otherlv_4, grammarAccess.getMemberDefinitionAccess().getOppositeKeyword_4_0()); | ||
6951 | |||
6952 | // InternalSolverLanguageParser.g:2706:4: ( ( ruleQualifiedName ) ) | ||
6953 | // InternalSolverLanguageParser.g:2707:5: ( ruleQualifiedName ) | ||
5125 | { | 6954 | { |
5126 | // InternalSolverLanguage.g:1760:4: () | 6955 | // InternalSolverLanguageParser.g:2707:5: ( ruleQualifiedName ) |
5127 | // InternalSolverLanguage.g:1761:5: | 6956 | // InternalSolverLanguageParser.g:2708:6: ruleQualifiedName |
5128 | { | 6957 | { |
5129 | 6958 | ||
5130 | current = forceCreateModelElement( | 6959 | if (current==null) { |
5131 | grammarAccess.getClosureTypeAccess().getIrreflexiveClosureAction_1_0(), | 6960 | current = createModelElement(grammarAccess.getMemberDefinitionRule()); |
5132 | current); | 6961 | } |
5133 | 6962 | ||
6963 | |||
6964 | newCompositeNode(grammarAccess.getMemberDefinitionAccess().getOppositeNamedElementCrossReference_4_1_0()); | ||
6965 | |||
6966 | pushFollow(FOLLOW_18); | ||
6967 | ruleQualifiedName(); | ||
6968 | |||
6969 | state._fsp--; | ||
6970 | |||
6971 | |||
6972 | afterParserOrEnumRuleCall(); | ||
6973 | |||
5134 | 6974 | ||
5135 | } | 6975 | } |
5136 | 6976 | ||
5137 | otherlv_3=(Token)match(input,30,FOLLOW_2); | ||
5138 | 6977 | ||
5139 | newLeafNode(otherlv_3, grammarAccess.getClosureTypeAccess().getPlusSignKeyword_1_1()); | 6978 | } |
5140 | 6979 | ||
5141 | 6980 | ||
5142 | } | 6981 | } |
6982 | break; | ||
5143 | 6983 | ||
6984 | } | ||
6985 | |||
6986 | // InternalSolverLanguageParser.g:2723:3: (otherlv_6= Semicolon )? | ||
6987 | int alt33=2; | ||
6988 | int LA33_0 = input.LA(1); | ||
6989 | |||
6990 | if ( (LA33_0==Semicolon) ) { | ||
6991 | alt33=1; | ||
6992 | } | ||
6993 | switch (alt33) { | ||
6994 | case 1 : | ||
6995 | // InternalSolverLanguageParser.g:2724:4: otherlv_6= Semicolon | ||
6996 | { | ||
6997 | otherlv_6=(Token)match(input,Semicolon,FOLLOW_2); | ||
6998 | |||
6999 | newLeafNode(otherlv_6, grammarAccess.getMemberDefinitionAccess().getSemicolonKeyword_5()); | ||
7000 | |||
5144 | 7001 | ||
5145 | } | 7002 | } |
5146 | break; | 7003 | break; |
@@ -5151,6 +7008,9 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5151 | } | 7008 | } |
5152 | 7009 | ||
5153 | 7010 | ||
7011 | } | ||
7012 | |||
7013 | |||
5154 | leaveRule(); | 7014 | leaveRule(); |
5155 | 7015 | ||
5156 | } | 7016 | } |
@@ -5163,28 +7023,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5163 | } | 7023 | } |
5164 | return current; | 7024 | return current; |
5165 | } | 7025 | } |
5166 | // $ANTLR end "ruleClosureType" | 7026 | // $ANTLR end "ruleMemberDefinition" |
5167 | 7027 | ||
5168 | 7028 | ||
5169 | // $ANTLR start "entryRuleLiteral" | 7029 | // $ANTLR start "entryRuleMultiplicity" |
5170 | // InternalSolverLanguage.g:1776:1: entryRuleLiteral returns [EObject current=null] : iv_ruleLiteral= ruleLiteral EOF ; | 7030 | // InternalSolverLanguageParser.g:2733:1: entryRuleMultiplicity returns [EObject current=null] : iv_ruleMultiplicity= ruleMultiplicity EOF ; |
5171 | public final EObject entryRuleLiteral() throws RecognitionException { | 7031 | public final EObject entryRuleMultiplicity() throws RecognitionException { |
5172 | EObject current = null; | 7032 | EObject current = null; |
5173 | 7033 | ||
5174 | EObject iv_ruleLiteral = null; | 7034 | EObject iv_ruleMultiplicity = null; |
5175 | 7035 | ||
5176 | 7036 | ||
5177 | try { | 7037 | try { |
5178 | // InternalSolverLanguage.g:1776:48: (iv_ruleLiteral= ruleLiteral EOF ) | 7038 | // InternalSolverLanguageParser.g:2733:53: (iv_ruleMultiplicity= ruleMultiplicity EOF ) |
5179 | // InternalSolverLanguage.g:1777:2: iv_ruleLiteral= ruleLiteral EOF | 7039 | // InternalSolverLanguageParser.g:2734:2: iv_ruleMultiplicity= ruleMultiplicity EOF |
5180 | { | 7040 | { |
5181 | newCompositeNode(grammarAccess.getLiteralRule()); | 7041 | newCompositeNode(grammarAccess.getMultiplicityRule()); |
5182 | pushFollow(FOLLOW_1); | 7042 | pushFollow(FOLLOW_1); |
5183 | iv_ruleLiteral=ruleLiteral(); | 7043 | iv_ruleMultiplicity=ruleMultiplicity(); |
5184 | 7044 | ||
5185 | state._fsp--; | 7045 | state._fsp--; |
5186 | 7046 | ||
5187 | current =iv_ruleLiteral; | 7047 | current =iv_ruleMultiplicity; |
5188 | match(input,EOF,FOLLOW_2); | 7048 | match(input,EOF,FOLLOW_2); |
5189 | 7049 | ||
5190 | } | 7050 | } |
@@ -5199,107 +7059,126 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5199 | } | 7059 | } |
5200 | return current; | 7060 | return current; |
5201 | } | 7061 | } |
5202 | // $ANTLR end "entryRuleLiteral" | 7062 | // $ANTLR end "entryRuleMultiplicity" |
5203 | 7063 | ||
5204 | 7064 | ||
5205 | // $ANTLR start "ruleLiteral" | 7065 | // $ANTLR start "ruleMultiplicity" |
5206 | // InternalSolverLanguage.g:1783:1: ruleLiteral returns [EObject current=null] : (this_Variable_0= ruleVariable | this_DataObject_1= ruleDataObject | this_NamedObject_2= ruleNamedObject ) ; | 7066 | // InternalSolverLanguageParser.g:2740:1: ruleMultiplicity returns [EObject current=null] : (this_ManyMultiplicity_0= ruleManyMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity | this_BoundedMultiplicity_2= ruleBoundedMultiplicity ) ; |
5207 | public final EObject ruleLiteral() throws RecognitionException { | 7067 | public final EObject ruleMultiplicity() throws RecognitionException { |
5208 | EObject current = null; | 7068 | EObject current = null; |
5209 | 7069 | ||
5210 | EObject this_Variable_0 = null; | 7070 | EObject this_ManyMultiplicity_0 = null; |
5211 | 7071 | ||
5212 | EObject this_DataObject_1 = null; | 7072 | EObject this_ExactMultiplicity_1 = null; |
5213 | 7073 | ||
5214 | EObject this_NamedObject_2 = null; | 7074 | EObject this_BoundedMultiplicity_2 = null; |
5215 | 7075 | ||
5216 | 7076 | ||
5217 | 7077 | ||
5218 | enterRule(); | 7078 | enterRule(); |
5219 | 7079 | ||
5220 | try { | 7080 | try { |
5221 | // InternalSolverLanguage.g:1789:2: ( (this_Variable_0= ruleVariable | this_DataObject_1= ruleDataObject | this_NamedObject_2= ruleNamedObject ) ) | 7081 | // InternalSolverLanguageParser.g:2746:2: ( (this_ManyMultiplicity_0= ruleManyMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity | this_BoundedMultiplicity_2= ruleBoundedMultiplicity ) ) |
5222 | // InternalSolverLanguage.g:1790:2: (this_Variable_0= ruleVariable | this_DataObject_1= ruleDataObject | this_NamedObject_2= ruleNamedObject ) | 7082 | // InternalSolverLanguageParser.g:2747:2: (this_ManyMultiplicity_0= ruleManyMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity | this_BoundedMultiplicity_2= ruleBoundedMultiplicity ) |
5223 | { | 7083 | { |
5224 | // InternalSolverLanguage.g:1790:2: (this_Variable_0= ruleVariable | this_DataObject_1= ruleDataObject | this_NamedObject_2= ruleNamedObject ) | 7084 | // InternalSolverLanguageParser.g:2747:2: (this_ManyMultiplicity_0= ruleManyMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity | this_BoundedMultiplicity_2= ruleBoundedMultiplicity ) |
5225 | int alt35=3; | 7085 | int alt34=3; |
5226 | switch ( input.LA(1) ) { | 7086 | int LA34_0 = input.LA(1); |
5227 | case RULE_ID: | 7087 | |
5228 | { | 7088 | if ( (LA34_0==LeftSquareBracket) ) { |
5229 | alt35=1; | 7089 | switch ( input.LA(2) ) { |
5230 | } | 7090 | case RULE_INT: |
5231 | break; | 7091 | { |
5232 | case RULE_INT: | 7092 | int LA34_2 = input.LA(3); |
5233 | case RULE_STRING: | 7093 | |
5234 | case 11: | 7094 | if ( (LA34_2==FullStopFullStop) ) { |
5235 | case 13: | 7095 | alt34=3; |
5236 | case 14: | 7096 | } |
5237 | { | 7097 | else if ( (LA34_2==RightSquareBracket) ) { |
5238 | alt35=2; | 7098 | alt34=2; |
5239 | } | 7099 | } |
5240 | break; | 7100 | else { |
5241 | case 27: | 7101 | NoViableAltException nvae = |
5242 | { | 7102 | new NoViableAltException("", 34, 2, input); |
5243 | alt35=3; | 7103 | |
7104 | throw nvae; | ||
7105 | } | ||
7106 | } | ||
7107 | break; | ||
7108 | case Asterisk: | ||
7109 | { | ||
7110 | alt34=2; | ||
7111 | } | ||
7112 | break; | ||
7113 | case RightSquareBracket: | ||
7114 | { | ||
7115 | alt34=1; | ||
7116 | } | ||
7117 | break; | ||
7118 | default: | ||
7119 | NoViableAltException nvae = | ||
7120 | new NoViableAltException("", 34, 1, input); | ||
7121 | |||
7122 | throw nvae; | ||
5244 | } | 7123 | } |
5245 | break; | 7124 | |
5246 | default: | 7125 | } |
7126 | else { | ||
5247 | NoViableAltException nvae = | 7127 | NoViableAltException nvae = |
5248 | new NoViableAltException("", 35, 0, input); | 7128 | new NoViableAltException("", 34, 0, input); |
5249 | 7129 | ||
5250 | throw nvae; | 7130 | throw nvae; |
5251 | } | 7131 | } |
5252 | 7132 | switch (alt34) { | |
5253 | switch (alt35) { | ||
5254 | case 1 : | 7133 | case 1 : |
5255 | // InternalSolverLanguage.g:1791:3: this_Variable_0= ruleVariable | 7134 | // InternalSolverLanguageParser.g:2748:3: this_ManyMultiplicity_0= ruleManyMultiplicity |
5256 | { | 7135 | { |
5257 | 7136 | ||
5258 | newCompositeNode(grammarAccess.getLiteralAccess().getVariableParserRuleCall_0()); | 7137 | newCompositeNode(grammarAccess.getMultiplicityAccess().getManyMultiplicityParserRuleCall_0()); |
5259 | 7138 | ||
5260 | pushFollow(FOLLOW_2); | 7139 | pushFollow(FOLLOW_2); |
5261 | this_Variable_0=ruleVariable(); | 7140 | this_ManyMultiplicity_0=ruleManyMultiplicity(); |
5262 | 7141 | ||
5263 | state._fsp--; | 7142 | state._fsp--; |
5264 | 7143 | ||
5265 | 7144 | ||
5266 | current = this_Variable_0; | 7145 | current = this_ManyMultiplicity_0; |
5267 | afterParserOrEnumRuleCall(); | 7146 | afterParserOrEnumRuleCall(); |
5268 | 7147 | ||
5269 | 7148 | ||
5270 | } | 7149 | } |
5271 | break; | 7150 | break; |
5272 | case 2 : | 7151 | case 2 : |
5273 | // InternalSolverLanguage.g:1800:3: this_DataObject_1= ruleDataObject | 7152 | // InternalSolverLanguageParser.g:2757:3: this_ExactMultiplicity_1= ruleExactMultiplicity |
5274 | { | 7153 | { |
5275 | 7154 | ||
5276 | newCompositeNode(grammarAccess.getLiteralAccess().getDataObjectParserRuleCall_1()); | 7155 | newCompositeNode(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); |
5277 | 7156 | ||
5278 | pushFollow(FOLLOW_2); | 7157 | pushFollow(FOLLOW_2); |
5279 | this_DataObject_1=ruleDataObject(); | 7158 | this_ExactMultiplicity_1=ruleExactMultiplicity(); |
5280 | 7159 | ||
5281 | state._fsp--; | 7160 | state._fsp--; |
5282 | 7161 | ||
5283 | 7162 | ||
5284 | current = this_DataObject_1; | 7163 | current = this_ExactMultiplicity_1; |
5285 | afterParserOrEnumRuleCall(); | 7164 | afterParserOrEnumRuleCall(); |
5286 | 7165 | ||
5287 | 7166 | ||
5288 | } | 7167 | } |
5289 | break; | 7168 | break; |
5290 | case 3 : | 7169 | case 3 : |
5291 | // InternalSolverLanguage.g:1809:3: this_NamedObject_2= ruleNamedObject | 7170 | // InternalSolverLanguageParser.g:2766:3: this_BoundedMultiplicity_2= ruleBoundedMultiplicity |
5292 | { | 7171 | { |
5293 | 7172 | ||
5294 | newCompositeNode(grammarAccess.getLiteralAccess().getNamedObjectParserRuleCall_2()); | 7173 | newCompositeNode(grammarAccess.getMultiplicityAccess().getBoundedMultiplicityParserRuleCall_2()); |
5295 | 7174 | ||
5296 | pushFollow(FOLLOW_2); | 7175 | pushFollow(FOLLOW_2); |
5297 | this_NamedObject_2=ruleNamedObject(); | 7176 | this_BoundedMultiplicity_2=ruleBoundedMultiplicity(); |
5298 | 7177 | ||
5299 | state._fsp--; | 7178 | state._fsp--; |
5300 | 7179 | ||
5301 | 7180 | ||
5302 | current = this_NamedObject_2; | 7181 | current = this_BoundedMultiplicity_2; |
5303 | afterParserOrEnumRuleCall(); | 7182 | afterParserOrEnumRuleCall(); |
5304 | 7183 | ||
5305 | 7184 | ||
@@ -5324,28 +7203,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5324 | } | 7203 | } |
5325 | return current; | 7204 | return current; |
5326 | } | 7205 | } |
5327 | // $ANTLR end "ruleLiteral" | 7206 | // $ANTLR end "ruleMultiplicity" |
5328 | 7207 | ||
5329 | 7208 | ||
5330 | // $ANTLR start "entryRuleVariable" | 7209 | // $ANTLR start "entryRuleManyMultiplicity" |
5331 | // InternalSolverLanguage.g:1821:1: entryRuleVariable returns [EObject current=null] : iv_ruleVariable= ruleVariable EOF ; | 7210 | // InternalSolverLanguageParser.g:2778:1: entryRuleManyMultiplicity returns [EObject current=null] : iv_ruleManyMultiplicity= ruleManyMultiplicity EOF ; |
5332 | public final EObject entryRuleVariable() throws RecognitionException { | 7211 | public final EObject entryRuleManyMultiplicity() throws RecognitionException { |
5333 | EObject current = null; | 7212 | EObject current = null; |
5334 | 7213 | ||
5335 | EObject iv_ruleVariable = null; | 7214 | EObject iv_ruleManyMultiplicity = null; |
5336 | 7215 | ||
5337 | 7216 | ||
5338 | try { | 7217 | try { |
5339 | // InternalSolverLanguage.g:1821:49: (iv_ruleVariable= ruleVariable EOF ) | 7218 | // InternalSolverLanguageParser.g:2778:57: (iv_ruleManyMultiplicity= ruleManyMultiplicity EOF ) |
5340 | // InternalSolverLanguage.g:1822:2: iv_ruleVariable= ruleVariable EOF | 7219 | // InternalSolverLanguageParser.g:2779:2: iv_ruleManyMultiplicity= ruleManyMultiplicity EOF |
5341 | { | 7220 | { |
5342 | newCompositeNode(grammarAccess.getVariableRule()); | 7221 | newCompositeNode(grammarAccess.getManyMultiplicityRule()); |
5343 | pushFollow(FOLLOW_1); | 7222 | pushFollow(FOLLOW_1); |
5344 | iv_ruleVariable=ruleVariable(); | 7223 | iv_ruleManyMultiplicity=ruleManyMultiplicity(); |
5345 | 7224 | ||
5346 | state._fsp--; | 7225 | state._fsp--; |
5347 | 7226 | ||
5348 | current =iv_ruleVariable; | 7227 | current =iv_ruleManyMultiplicity; |
5349 | match(input,EOF,FOLLOW_2); | 7228 | match(input,EOF,FOLLOW_2); |
5350 | 7229 | ||
5351 | } | 7230 | } |
@@ -5360,46 +7239,46 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5360 | } | 7239 | } |
5361 | return current; | 7240 | return current; |
5362 | } | 7241 | } |
5363 | // $ANTLR end "entryRuleVariable" | 7242 | // $ANTLR end "entryRuleManyMultiplicity" |
5364 | 7243 | ||
5365 | 7244 | ||
5366 | // $ANTLR start "ruleVariable" | 7245 | // $ANTLR start "ruleManyMultiplicity" |
5367 | // InternalSolverLanguage.g:1828:1: ruleVariable returns [EObject current=null] : ( (lv_name_0_0= RULE_ID ) ) ; | 7246 | // InternalSolverLanguageParser.g:2785:1: ruleManyMultiplicity returns [EObject current=null] : ( () otherlv_1= LeftSquareBracket otherlv_2= RightSquareBracket ) ; |
5368 | public final EObject ruleVariable() throws RecognitionException { | 7247 | public final EObject ruleManyMultiplicity() throws RecognitionException { |
5369 | EObject current = null; | 7248 | EObject current = null; |
5370 | 7249 | ||
5371 | Token lv_name_0_0=null; | 7250 | Token otherlv_1=null; |
7251 | Token otherlv_2=null; | ||
5372 | 7252 | ||
5373 | 7253 | ||
5374 | enterRule(); | 7254 | enterRule(); |
5375 | 7255 | ||
5376 | try { | 7256 | try { |
5377 | // InternalSolverLanguage.g:1834:2: ( ( (lv_name_0_0= RULE_ID ) ) ) | 7257 | // InternalSolverLanguageParser.g:2791:2: ( ( () otherlv_1= LeftSquareBracket otherlv_2= RightSquareBracket ) ) |
5378 | // InternalSolverLanguage.g:1835:2: ( (lv_name_0_0= RULE_ID ) ) | 7258 | // InternalSolverLanguageParser.g:2792:2: ( () otherlv_1= LeftSquareBracket otherlv_2= RightSquareBracket ) |
5379 | { | 7259 | { |
5380 | // InternalSolverLanguage.g:1835:2: ( (lv_name_0_0= RULE_ID ) ) | 7260 | // InternalSolverLanguageParser.g:2792:2: ( () otherlv_1= LeftSquareBracket otherlv_2= RightSquareBracket ) |
5381 | // InternalSolverLanguage.g:1836:3: (lv_name_0_0= RULE_ID ) | 7261 | // InternalSolverLanguageParser.g:2793:3: () otherlv_1= LeftSquareBracket otherlv_2= RightSquareBracket |
5382 | { | 7262 | { |
5383 | // InternalSolverLanguage.g:1836:3: (lv_name_0_0= RULE_ID ) | 7263 | // InternalSolverLanguageParser.g:2793:3: () |
5384 | // InternalSolverLanguage.g:1837:4: lv_name_0_0= RULE_ID | 7264 | // InternalSolverLanguageParser.g:2794:4: |
5385 | { | 7265 | { |
5386 | lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_2); | ||
5387 | |||
5388 | newLeafNode(lv_name_0_0, grammarAccess.getVariableAccess().getNameIDTerminalRuleCall_0()); | ||
5389 | |||
5390 | 7266 | ||
5391 | if (current==null) { | 7267 | current = forceCreateModelElement( |
5392 | current = createModelElement(grammarAccess.getVariableRule()); | 7268 | grammarAccess.getManyMultiplicityAccess().getManyMultiplicityAction_0(), |
5393 | } | 7269 | current); |
5394 | setWithLastConsumed( | ||
5395 | current, | ||
5396 | "name", | ||
5397 | lv_name_0_0, | ||
5398 | "org.eclipse.xtext.common.Terminals.ID"); | ||
5399 | 7270 | ||
5400 | 7271 | ||
5401 | } | 7272 | } |
5402 | 7273 | ||
7274 | otherlv_1=(Token)match(input,LeftSquareBracket,FOLLOW_36); | ||
7275 | |||
7276 | newLeafNode(otherlv_1, grammarAccess.getManyMultiplicityAccess().getLeftSquareBracketKeyword_1()); | ||
7277 | |||
7278 | otherlv_2=(Token)match(input,RightSquareBracket,FOLLOW_2); | ||
7279 | |||
7280 | newLeafNode(otherlv_2, grammarAccess.getManyMultiplicityAccess().getRightSquareBracketKeyword_2()); | ||
7281 | |||
5403 | 7282 | ||
5404 | } | 7283 | } |
5405 | 7284 | ||
@@ -5419,28 +7298,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5419 | } | 7298 | } |
5420 | return current; | 7299 | return current; |
5421 | } | 7300 | } |
5422 | // $ANTLR end "ruleVariable" | 7301 | // $ANTLR end "ruleManyMultiplicity" |
5423 | 7302 | ||
5424 | 7303 | ||
5425 | // $ANTLR start "entryRuleAllInstances" | 7304 | // $ANTLR start "entryRuleExactMultiplicity" |
5426 | // InternalSolverLanguage.g:1856:1: entryRuleAllInstances returns [EObject current=null] : iv_ruleAllInstances= ruleAllInstances EOF ; | 7305 | // InternalSolverLanguageParser.g:2812:1: entryRuleExactMultiplicity returns [EObject current=null] : iv_ruleExactMultiplicity= ruleExactMultiplicity EOF ; |
5427 | public final EObject entryRuleAllInstances() throws RecognitionException { | 7306 | public final EObject entryRuleExactMultiplicity() throws RecognitionException { |
5428 | EObject current = null; | 7307 | EObject current = null; |
5429 | 7308 | ||
5430 | EObject iv_ruleAllInstances = null; | 7309 | EObject iv_ruleExactMultiplicity = null; |
5431 | 7310 | ||
5432 | 7311 | ||
5433 | try { | 7312 | try { |
5434 | // InternalSolverLanguage.g:1856:53: (iv_ruleAllInstances= ruleAllInstances EOF ) | 7313 | // InternalSolverLanguageParser.g:2812:58: (iv_ruleExactMultiplicity= ruleExactMultiplicity EOF ) |
5435 | // InternalSolverLanguage.g:1857:2: iv_ruleAllInstances= ruleAllInstances EOF | 7314 | // InternalSolverLanguageParser.g:2813:2: iv_ruleExactMultiplicity= ruleExactMultiplicity EOF |
5436 | { | 7315 | { |
5437 | newCompositeNode(grammarAccess.getAllInstancesRule()); | 7316 | newCompositeNode(grammarAccess.getExactMultiplicityRule()); |
5438 | pushFollow(FOLLOW_1); | 7317 | pushFollow(FOLLOW_1); |
5439 | iv_ruleAllInstances=ruleAllInstances(); | 7318 | iv_ruleExactMultiplicity=ruleExactMultiplicity(); |
5440 | 7319 | ||
5441 | state._fsp--; | 7320 | state._fsp--; |
5442 | 7321 | ||
5443 | current =iv_ruleAllInstances; | 7322 | current =iv_ruleExactMultiplicity; |
5444 | match(input,EOF,FOLLOW_2); | 7323 | match(input,EOF,FOLLOW_2); |
5445 | 7324 | ||
5446 | } | 7325 | } |
@@ -5455,55 +7334,56 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5455 | } | 7334 | } |
5456 | return current; | 7335 | return current; |
5457 | } | 7336 | } |
5458 | // $ANTLR end "entryRuleAllInstances" | 7337 | // $ANTLR end "entryRuleExactMultiplicity" |
5459 | 7338 | ||
5460 | 7339 | ||
5461 | // $ANTLR start "ruleAllInstances" | 7340 | // $ANTLR start "ruleExactMultiplicity" |
5462 | // InternalSolverLanguage.g:1863:1: ruleAllInstances returns [EObject current=null] : (otherlv_0= ':' ( (lv_symbol_1_0= ruleSymbol ) ) ) ; | 7341 | // InternalSolverLanguageParser.g:2819:1: ruleExactMultiplicity returns [EObject current=null] : (otherlv_0= LeftSquareBracket ( (lv_multiplicity_1_0= ruleUpperMultiplicty ) ) otherlv_2= RightSquareBracket ) ; |
5463 | public final EObject ruleAllInstances() throws RecognitionException { | 7342 | public final EObject ruleExactMultiplicity() throws RecognitionException { |
5464 | EObject current = null; | 7343 | EObject current = null; |
5465 | 7344 | ||
5466 | Token otherlv_0=null; | 7345 | Token otherlv_0=null; |
5467 | EObject lv_symbol_1_0 = null; | 7346 | Token otherlv_2=null; |
7347 | AntlrDatatypeRuleToken lv_multiplicity_1_0 = null; | ||
5468 | 7348 | ||
5469 | 7349 | ||
5470 | 7350 | ||
5471 | enterRule(); | 7351 | enterRule(); |
5472 | 7352 | ||
5473 | try { | 7353 | try { |
5474 | // InternalSolverLanguage.g:1869:2: ( (otherlv_0= ':' ( (lv_symbol_1_0= ruleSymbol ) ) ) ) | 7354 | // InternalSolverLanguageParser.g:2825:2: ( (otherlv_0= LeftSquareBracket ( (lv_multiplicity_1_0= ruleUpperMultiplicty ) ) otherlv_2= RightSquareBracket ) ) |
5475 | // InternalSolverLanguage.g:1870:2: (otherlv_0= ':' ( (lv_symbol_1_0= ruleSymbol ) ) ) | 7355 | // InternalSolverLanguageParser.g:2826:2: (otherlv_0= LeftSquareBracket ( (lv_multiplicity_1_0= ruleUpperMultiplicty ) ) otherlv_2= RightSquareBracket ) |
5476 | { | 7356 | { |
5477 | // InternalSolverLanguage.g:1870:2: (otherlv_0= ':' ( (lv_symbol_1_0= ruleSymbol ) ) ) | 7357 | // InternalSolverLanguageParser.g:2826:2: (otherlv_0= LeftSquareBracket ( (lv_multiplicity_1_0= ruleUpperMultiplicty ) ) otherlv_2= RightSquareBracket ) |
5478 | // InternalSolverLanguage.g:1871:3: otherlv_0= ':' ( (lv_symbol_1_0= ruleSymbol ) ) | 7358 | // InternalSolverLanguageParser.g:2827:3: otherlv_0= LeftSquareBracket ( (lv_multiplicity_1_0= ruleUpperMultiplicty ) ) otherlv_2= RightSquareBracket |
5479 | { | 7359 | { |
5480 | otherlv_0=(Token)match(input,20,FOLLOW_21); | 7360 | otherlv_0=(Token)match(input,LeftSquareBracket,FOLLOW_44); |
5481 | 7361 | ||
5482 | newLeafNode(otherlv_0, grammarAccess.getAllInstancesAccess().getColonKeyword_0()); | 7362 | newLeafNode(otherlv_0, grammarAccess.getExactMultiplicityAccess().getLeftSquareBracketKeyword_0()); |
5483 | 7363 | ||
5484 | // InternalSolverLanguage.g:1875:3: ( (lv_symbol_1_0= ruleSymbol ) ) | 7364 | // InternalSolverLanguageParser.g:2831:3: ( (lv_multiplicity_1_0= ruleUpperMultiplicty ) ) |
5485 | // InternalSolverLanguage.g:1876:4: (lv_symbol_1_0= ruleSymbol ) | 7365 | // InternalSolverLanguageParser.g:2832:4: (lv_multiplicity_1_0= ruleUpperMultiplicty ) |
5486 | { | 7366 | { |
5487 | // InternalSolverLanguage.g:1876:4: (lv_symbol_1_0= ruleSymbol ) | 7367 | // InternalSolverLanguageParser.g:2832:4: (lv_multiplicity_1_0= ruleUpperMultiplicty ) |
5488 | // InternalSolverLanguage.g:1877:5: lv_symbol_1_0= ruleSymbol | 7368 | // InternalSolverLanguageParser.g:2833:5: lv_multiplicity_1_0= ruleUpperMultiplicty |
5489 | { | 7369 | { |
5490 | 7370 | ||
5491 | newCompositeNode(grammarAccess.getAllInstancesAccess().getSymbolSymbolParserRuleCall_1_0()); | 7371 | newCompositeNode(grammarAccess.getExactMultiplicityAccess().getMultiplicityUpperMultiplictyParserRuleCall_1_0()); |
5492 | 7372 | ||
5493 | pushFollow(FOLLOW_2); | 7373 | pushFollow(FOLLOW_36); |
5494 | lv_symbol_1_0=ruleSymbol(); | 7374 | lv_multiplicity_1_0=ruleUpperMultiplicty(); |
5495 | 7375 | ||
5496 | state._fsp--; | 7376 | state._fsp--; |
5497 | 7377 | ||
5498 | 7378 | ||
5499 | if (current==null) { | 7379 | if (current==null) { |
5500 | current = createModelElementForParent(grammarAccess.getAllInstancesRule()); | 7380 | current = createModelElementForParent(grammarAccess.getExactMultiplicityRule()); |
5501 | } | 7381 | } |
5502 | set( | 7382 | set( |
5503 | current, | 7383 | current, |
5504 | "symbol", | 7384 | "multiplicity", |
5505 | lv_symbol_1_0, | 7385 | lv_multiplicity_1_0, |
5506 | "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); | 7386 | "org.eclipse.viatra.solver.language.SolverLanguage.UpperMultiplicty"); |
5507 | afterParserOrEnumRuleCall(); | 7387 | afterParserOrEnumRuleCall(); |
5508 | 7388 | ||
5509 | 7389 | ||
@@ -5512,6 +7392,10 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5512 | 7392 | ||
5513 | } | 7393 | } |
5514 | 7394 | ||
7395 | otherlv_2=(Token)match(input,RightSquareBracket,FOLLOW_2); | ||
7396 | |||
7397 | newLeafNode(otherlv_2, grammarAccess.getExactMultiplicityAccess().getRightSquareBracketKeyword_2()); | ||
7398 | |||
5515 | 7399 | ||
5516 | } | 7400 | } |
5517 | 7401 | ||
@@ -5531,28 +7415,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5531 | } | 7415 | } |
5532 | return current; | 7416 | return current; |
5533 | } | 7417 | } |
5534 | // $ANTLR end "ruleAllInstances" | 7418 | // $ANTLR end "ruleExactMultiplicity" |
5535 | 7419 | ||
5536 | 7420 | ||
5537 | // $ANTLR start "entryRuleAllObjects" | 7421 | // $ANTLR start "entryRuleBoundedMultiplicity" |
5538 | // InternalSolverLanguage.g:1898:1: entryRuleAllObjects returns [EObject current=null] : iv_ruleAllObjects= ruleAllObjects EOF ; | 7422 | // InternalSolverLanguageParser.g:2858:1: entryRuleBoundedMultiplicity returns [EObject current=null] : iv_ruleBoundedMultiplicity= ruleBoundedMultiplicity EOF ; |
5539 | public final EObject entryRuleAllObjects() throws RecognitionException { | 7423 | public final EObject entryRuleBoundedMultiplicity() throws RecognitionException { |
5540 | EObject current = null; | 7424 | EObject current = null; |
5541 | 7425 | ||
5542 | EObject iv_ruleAllObjects = null; | 7426 | EObject iv_ruleBoundedMultiplicity = null; |
5543 | 7427 | ||
5544 | 7428 | ||
5545 | try { | 7429 | try { |
5546 | // InternalSolverLanguage.g:1898:51: (iv_ruleAllObjects= ruleAllObjects EOF ) | 7430 | // InternalSolverLanguageParser.g:2858:60: (iv_ruleBoundedMultiplicity= ruleBoundedMultiplicity EOF ) |
5547 | // InternalSolverLanguage.g:1899:2: iv_ruleAllObjects= ruleAllObjects EOF | 7431 | // InternalSolverLanguageParser.g:2859:2: iv_ruleBoundedMultiplicity= ruleBoundedMultiplicity EOF |
5548 | { | 7432 | { |
5549 | newCompositeNode(grammarAccess.getAllObjectsRule()); | 7433 | newCompositeNode(grammarAccess.getBoundedMultiplicityRule()); |
5550 | pushFollow(FOLLOW_1); | 7434 | pushFollow(FOLLOW_1); |
5551 | iv_ruleAllObjects=ruleAllObjects(); | 7435 | iv_ruleBoundedMultiplicity=ruleBoundedMultiplicity(); |
5552 | 7436 | ||
5553 | state._fsp--; | 7437 | state._fsp--; |
5554 | 7438 | ||
5555 | current =iv_ruleAllObjects; | 7439 | current =iv_ruleBoundedMultiplicity; |
5556 | match(input,EOF,FOLLOW_2); | 7440 | match(input,EOF,FOLLOW_2); |
5557 | 7441 | ||
5558 | } | 7442 | } |
@@ -5567,40 +7451,99 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5567 | } | 7451 | } |
5568 | return current; | 7452 | return current; |
5569 | } | 7453 | } |
5570 | // $ANTLR end "entryRuleAllObjects" | 7454 | // $ANTLR end "entryRuleBoundedMultiplicity" |
5571 | 7455 | ||
5572 | 7456 | ||
5573 | // $ANTLR start "ruleAllObjects" | 7457 | // $ANTLR start "ruleBoundedMultiplicity" |
5574 | // InternalSolverLanguage.g:1905:1: ruleAllObjects returns [EObject current=null] : ( () otherlv_1= '*' ) ; | 7458 | // InternalSolverLanguageParser.g:2865:1: ruleBoundedMultiplicity returns [EObject current=null] : (otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleUpperMultiplicty ) ) otherlv_4= RightSquareBracket ) ; |
5575 | public final EObject ruleAllObjects() throws RecognitionException { | 7459 | public final EObject ruleBoundedMultiplicity() throws RecognitionException { |
5576 | EObject current = null; | 7460 | EObject current = null; |
5577 | 7461 | ||
5578 | Token otherlv_1=null; | 7462 | Token otherlv_0=null; |
7463 | Token lv_lowerBound_1_0=null; | ||
7464 | Token otherlv_2=null; | ||
7465 | Token otherlv_4=null; | ||
7466 | AntlrDatatypeRuleToken lv_upperBound_3_0 = null; | ||
7467 | |||
5579 | 7468 | ||
5580 | 7469 | ||
5581 | enterRule(); | 7470 | enterRule(); |
5582 | 7471 | ||
5583 | try { | 7472 | try { |
5584 | // InternalSolverLanguage.g:1911:2: ( ( () otherlv_1= '*' ) ) | 7473 | // InternalSolverLanguageParser.g:2871:2: ( (otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleUpperMultiplicty ) ) otherlv_4= RightSquareBracket ) ) |
5585 | // InternalSolverLanguage.g:1912:2: ( () otherlv_1= '*' ) | 7474 | // InternalSolverLanguageParser.g:2872:2: (otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleUpperMultiplicty ) ) otherlv_4= RightSquareBracket ) |
5586 | { | 7475 | { |
5587 | // InternalSolverLanguage.g:1912:2: ( () otherlv_1= '*' ) | 7476 | // InternalSolverLanguageParser.g:2872:2: (otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleUpperMultiplicty ) ) otherlv_4= RightSquareBracket ) |
5588 | // InternalSolverLanguage.g:1913:3: () otherlv_1= '*' | 7477 | // InternalSolverLanguageParser.g:2873:3: otherlv_0= LeftSquareBracket ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= FullStopFullStop ( (lv_upperBound_3_0= ruleUpperMultiplicty ) ) otherlv_4= RightSquareBracket |
5589 | { | 7478 | { |
5590 | // InternalSolverLanguage.g:1913:3: () | 7479 | otherlv_0=(Token)match(input,LeftSquareBracket,FOLLOW_45); |
5591 | // InternalSolverLanguage.g:1914:4: | 7480 | |
7481 | newLeafNode(otherlv_0, grammarAccess.getBoundedMultiplicityAccess().getLeftSquareBracketKeyword_0()); | ||
7482 | |||
7483 | // InternalSolverLanguageParser.g:2877:3: ( (lv_lowerBound_1_0= RULE_INT ) ) | ||
7484 | // InternalSolverLanguageParser.g:2878:4: (lv_lowerBound_1_0= RULE_INT ) | ||
5592 | { | 7485 | { |
7486 | // InternalSolverLanguageParser.g:2878:4: (lv_lowerBound_1_0= RULE_INT ) | ||
7487 | // InternalSolverLanguageParser.g:2879:5: lv_lowerBound_1_0= RULE_INT | ||
7488 | { | ||
7489 | lv_lowerBound_1_0=(Token)match(input,RULE_INT,FOLLOW_35); | ||
7490 | |||
7491 | newLeafNode(lv_lowerBound_1_0, grammarAccess.getBoundedMultiplicityAccess().getLowerBoundINTTerminalRuleCall_1_0()); | ||
7492 | |||
7493 | |||
7494 | if (current==null) { | ||
7495 | current = createModelElement(grammarAccess.getBoundedMultiplicityRule()); | ||
7496 | } | ||
7497 | setWithLastConsumed( | ||
7498 | current, | ||
7499 | "lowerBound", | ||
7500 | lv_lowerBound_1_0, | ||
7501 | "org.eclipse.xtext.common.Terminals.INT"); | ||
7502 | |||
7503 | |||
7504 | } | ||
5593 | 7505 | ||
5594 | current = forceCreateModelElement( | ||
5595 | grammarAccess.getAllObjectsAccess().getAllObjectsAction_0(), | ||
5596 | current); | ||
5597 | |||
5598 | 7506 | ||
5599 | } | 7507 | } |
5600 | 7508 | ||
5601 | otherlv_1=(Token)match(input,31,FOLLOW_2); | 7509 | otherlv_2=(Token)match(input,FullStopFullStop,FOLLOW_44); |
5602 | 7510 | ||
5603 | newLeafNode(otherlv_1, grammarAccess.getAllObjectsAccess().getAsteriskKeyword_1()); | 7511 | newLeafNode(otherlv_2, grammarAccess.getBoundedMultiplicityAccess().getFullStopFullStopKeyword_2()); |
7512 | |||
7513 | // InternalSolverLanguageParser.g:2899:3: ( (lv_upperBound_3_0= ruleUpperMultiplicty ) ) | ||
7514 | // InternalSolverLanguageParser.g:2900:4: (lv_upperBound_3_0= ruleUpperMultiplicty ) | ||
7515 | { | ||
7516 | // InternalSolverLanguageParser.g:2900:4: (lv_upperBound_3_0= ruleUpperMultiplicty ) | ||
7517 | // InternalSolverLanguageParser.g:2901:5: lv_upperBound_3_0= ruleUpperMultiplicty | ||
7518 | { | ||
7519 | |||
7520 | newCompositeNode(grammarAccess.getBoundedMultiplicityAccess().getUpperBoundUpperMultiplictyParserRuleCall_3_0()); | ||
7521 | |||
7522 | pushFollow(FOLLOW_36); | ||
7523 | lv_upperBound_3_0=ruleUpperMultiplicty(); | ||
7524 | |||
7525 | state._fsp--; | ||
7526 | |||
7527 | |||
7528 | if (current==null) { | ||
7529 | current = createModelElementForParent(grammarAccess.getBoundedMultiplicityRule()); | ||
7530 | } | ||
7531 | set( | ||
7532 | current, | ||
7533 | "upperBound", | ||
7534 | lv_upperBound_3_0, | ||
7535 | "org.eclipse.viatra.solver.language.SolverLanguage.UpperMultiplicty"); | ||
7536 | afterParserOrEnumRuleCall(); | ||
7537 | |||
7538 | |||
7539 | } | ||
7540 | |||
7541 | |||
7542 | } | ||
7543 | |||
7544 | otherlv_4=(Token)match(input,RightSquareBracket,FOLLOW_2); | ||
7545 | |||
7546 | newLeafNode(otherlv_4, grammarAccess.getBoundedMultiplicityAccess().getRightSquareBracketKeyword_4()); | ||
5604 | 7547 | ||
5605 | 7548 | ||
5606 | } | 7549 | } |
@@ -5621,28 +7564,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5621 | } | 7564 | } |
5622 | return current; | 7565 | return current; |
5623 | } | 7566 | } |
5624 | // $ANTLR end "ruleAllObjects" | 7567 | // $ANTLR end "ruleBoundedMultiplicity" |
5625 | 7568 | ||
5626 | 7569 | ||
5627 | // $ANTLR start "entryRuleDefaultInterpretation" | 7570 | // $ANTLR start "entryRuleScopeDefinition" |
5628 | // InternalSolverLanguage.g:1928:1: entryRuleDefaultInterpretation returns [EObject current=null] : iv_ruleDefaultInterpretation= ruleDefaultInterpretation EOF ; | 7571 | // InternalSolverLanguageParser.g:2926:1: entryRuleScopeDefinition returns [EObject current=null] : iv_ruleScopeDefinition= ruleScopeDefinition EOF ; |
5629 | public final EObject entryRuleDefaultInterpretation() throws RecognitionException { | 7572 | public final EObject entryRuleScopeDefinition() throws RecognitionException { |
5630 | EObject current = null; | 7573 | EObject current = null; |
5631 | 7574 | ||
5632 | EObject iv_ruleDefaultInterpretation = null; | 7575 | EObject iv_ruleScopeDefinition = null; |
5633 | 7576 | ||
5634 | 7577 | ||
5635 | try { | 7578 | try { |
5636 | // InternalSolverLanguage.g:1928:62: (iv_ruleDefaultInterpretation= ruleDefaultInterpretation EOF ) | 7579 | // InternalSolverLanguageParser.g:2926:56: (iv_ruleScopeDefinition= ruleScopeDefinition EOF ) |
5637 | // InternalSolverLanguage.g:1929:2: iv_ruleDefaultInterpretation= ruleDefaultInterpretation EOF | 7580 | // InternalSolverLanguageParser.g:2927:2: iv_ruleScopeDefinition= ruleScopeDefinition EOF |
5638 | { | 7581 | { |
5639 | newCompositeNode(grammarAccess.getDefaultInterpretationRule()); | 7582 | newCompositeNode(grammarAccess.getScopeDefinitionRule()); |
5640 | pushFollow(FOLLOW_1); | 7583 | pushFollow(FOLLOW_1); |
5641 | iv_ruleDefaultInterpretation=ruleDefaultInterpretation(); | 7584 | iv_ruleScopeDefinition=ruleScopeDefinition(); |
5642 | 7585 | ||
5643 | state._fsp--; | 7586 | state._fsp--; |
5644 | 7587 | ||
5645 | current =iv_ruleDefaultInterpretation; | 7588 | current =iv_ruleScopeDefinition; |
5646 | match(input,EOF,FOLLOW_2); | 7589 | match(input,EOF,FOLLOW_2); |
5647 | 7590 | ||
5648 | } | 7591 | } |
@@ -5657,56 +7600,218 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5657 | } | 7600 | } |
5658 | return current; | 7601 | return current; |
5659 | } | 7602 | } |
5660 | // $ANTLR end "entryRuleDefaultInterpretation" | 7603 | // $ANTLR end "entryRuleScopeDefinition" |
5661 | 7604 | ||
5662 | 7605 | ||
5663 | // $ANTLR start "ruleDefaultInterpretation" | 7606 | // $ANTLR start "ruleScopeDefinition" |
5664 | // InternalSolverLanguage.g:1935:1: ruleDefaultInterpretation returns [EObject current=null] : (otherlv_0= 'default' ( (lv_interpretation_1_0= ruleBasicInterpretation ) ) ) ; | 7607 | // InternalSolverLanguageParser.g:2933:1: ruleScopeDefinition returns [EObject current=null] : (this_ExactScopeDefinition_0= ruleExactScopeDefinition | this_BoundedScopeDefinition_1= ruleBoundedScopeDefinition | this_LowerBoundedScopeDefinition_2= ruleLowerBoundedScopeDefinition ) ; |
5665 | public final EObject ruleDefaultInterpretation() throws RecognitionException { | 7608 | public final EObject ruleScopeDefinition() throws RecognitionException { |
5666 | EObject current = null; | 7609 | EObject current = null; |
5667 | 7610 | ||
5668 | Token otherlv_0=null; | 7611 | EObject this_ExactScopeDefinition_0 = null; |
5669 | EObject lv_interpretation_1_0 = null; | 7612 | |
7613 | EObject this_BoundedScopeDefinition_1 = null; | ||
7614 | |||
7615 | EObject this_LowerBoundedScopeDefinition_2 = null; | ||
5670 | 7616 | ||
5671 | 7617 | ||
5672 | 7618 | ||
5673 | enterRule(); | 7619 | enterRule(); |
5674 | 7620 | ||
5675 | try { | 7621 | try { |
5676 | // InternalSolverLanguage.g:1941:2: ( (otherlv_0= 'default' ( (lv_interpretation_1_0= ruleBasicInterpretation ) ) ) ) | 7622 | // InternalSolverLanguageParser.g:2939:2: ( (this_ExactScopeDefinition_0= ruleExactScopeDefinition | this_BoundedScopeDefinition_1= ruleBoundedScopeDefinition | this_LowerBoundedScopeDefinition_2= ruleLowerBoundedScopeDefinition ) ) |
5677 | // InternalSolverLanguage.g:1942:2: (otherlv_0= 'default' ( (lv_interpretation_1_0= ruleBasicInterpretation ) ) ) | 7623 | // InternalSolverLanguageParser.g:2940:2: (this_ExactScopeDefinition_0= ruleExactScopeDefinition | this_BoundedScopeDefinition_1= ruleBoundedScopeDefinition | this_LowerBoundedScopeDefinition_2= ruleLowerBoundedScopeDefinition ) |
5678 | { | 7624 | { |
5679 | // InternalSolverLanguage.g:1942:2: (otherlv_0= 'default' ( (lv_interpretation_1_0= ruleBasicInterpretation ) ) ) | 7625 | // InternalSolverLanguageParser.g:2940:2: (this_ExactScopeDefinition_0= ruleExactScopeDefinition | this_BoundedScopeDefinition_1= ruleBoundedScopeDefinition | this_LowerBoundedScopeDefinition_2= ruleLowerBoundedScopeDefinition ) |
5680 | // InternalSolverLanguage.g:1943:3: otherlv_0= 'default' ( (lv_interpretation_1_0= ruleBasicInterpretation ) ) | 7626 | int alt35=3; |
7627 | alt35 = dfa35.predict(input); | ||
7628 | switch (alt35) { | ||
7629 | case 1 : | ||
7630 | // InternalSolverLanguageParser.g:2941:3: this_ExactScopeDefinition_0= ruleExactScopeDefinition | ||
7631 | { | ||
7632 | |||
7633 | newCompositeNode(grammarAccess.getScopeDefinitionAccess().getExactScopeDefinitionParserRuleCall_0()); | ||
7634 | |||
7635 | pushFollow(FOLLOW_2); | ||
7636 | this_ExactScopeDefinition_0=ruleExactScopeDefinition(); | ||
7637 | |||
7638 | state._fsp--; | ||
7639 | |||
7640 | |||
7641 | current = this_ExactScopeDefinition_0; | ||
7642 | afterParserOrEnumRuleCall(); | ||
7643 | |||
7644 | |||
7645 | } | ||
7646 | break; | ||
7647 | case 2 : | ||
7648 | // InternalSolverLanguageParser.g:2950:3: this_BoundedScopeDefinition_1= ruleBoundedScopeDefinition | ||
7649 | { | ||
7650 | |||
7651 | newCompositeNode(grammarAccess.getScopeDefinitionAccess().getBoundedScopeDefinitionParserRuleCall_1()); | ||
7652 | |||
7653 | pushFollow(FOLLOW_2); | ||
7654 | this_BoundedScopeDefinition_1=ruleBoundedScopeDefinition(); | ||
7655 | |||
7656 | state._fsp--; | ||
7657 | |||
7658 | |||
7659 | current = this_BoundedScopeDefinition_1; | ||
7660 | afterParserOrEnumRuleCall(); | ||
7661 | |||
7662 | |||
7663 | } | ||
7664 | break; | ||
7665 | case 3 : | ||
7666 | // InternalSolverLanguageParser.g:2959:3: this_LowerBoundedScopeDefinition_2= ruleLowerBoundedScopeDefinition | ||
7667 | { | ||
7668 | |||
7669 | newCompositeNode(grammarAccess.getScopeDefinitionAccess().getLowerBoundedScopeDefinitionParserRuleCall_2()); | ||
7670 | |||
7671 | pushFollow(FOLLOW_2); | ||
7672 | this_LowerBoundedScopeDefinition_2=ruleLowerBoundedScopeDefinition(); | ||
7673 | |||
7674 | state._fsp--; | ||
7675 | |||
7676 | |||
7677 | current = this_LowerBoundedScopeDefinition_2; | ||
7678 | afterParserOrEnumRuleCall(); | ||
7679 | |||
7680 | |||
7681 | } | ||
7682 | break; | ||
7683 | |||
7684 | } | ||
7685 | |||
7686 | |||
7687 | } | ||
7688 | |||
7689 | |||
7690 | leaveRule(); | ||
7691 | |||
7692 | } | ||
7693 | |||
7694 | catch (RecognitionException re) { | ||
7695 | recover(input,re); | ||
7696 | appendSkippedTokens(); | ||
7697 | } | ||
7698 | finally { | ||
7699 | } | ||
7700 | return current; | ||
7701 | } | ||
7702 | // $ANTLR end "ruleScopeDefinition" | ||
7703 | |||
7704 | |||
7705 | // $ANTLR start "entryRuleExactScopeDefinition" | ||
7706 | // InternalSolverLanguageParser.g:2971:1: entryRuleExactScopeDefinition returns [EObject current=null] : iv_ruleExactScopeDefinition= ruleExactScopeDefinition EOF ; | ||
7707 | public final EObject entryRuleExactScopeDefinition() throws RecognitionException { | ||
7708 | EObject current = null; | ||
7709 | |||
7710 | EObject iv_ruleExactScopeDefinition = null; | ||
7711 | |||
7712 | |||
7713 | try { | ||
7714 | // InternalSolverLanguageParser.g:2971:61: (iv_ruleExactScopeDefinition= ruleExactScopeDefinition EOF ) | ||
7715 | // InternalSolverLanguageParser.g:2972:2: iv_ruleExactScopeDefinition= ruleExactScopeDefinition EOF | ||
5681 | { | 7716 | { |
5682 | otherlv_0=(Token)match(input,32,FOLLOW_21); | 7717 | newCompositeNode(grammarAccess.getExactScopeDefinitionRule()); |
7718 | pushFollow(FOLLOW_1); | ||
7719 | iv_ruleExactScopeDefinition=ruleExactScopeDefinition(); | ||
7720 | |||
7721 | state._fsp--; | ||
7722 | |||
7723 | current =iv_ruleExactScopeDefinition; | ||
7724 | match(input,EOF,FOLLOW_2); | ||
7725 | |||
7726 | } | ||
7727 | |||
7728 | } | ||
7729 | |||
7730 | catch (RecognitionException re) { | ||
7731 | recover(input,re); | ||
7732 | appendSkippedTokens(); | ||
7733 | } | ||
7734 | finally { | ||
7735 | } | ||
7736 | return current; | ||
7737 | } | ||
7738 | // $ANTLR end "entryRuleExactScopeDefinition" | ||
5683 | 7739 | ||
5684 | newLeafNode(otherlv_0, grammarAccess.getDefaultInterpretationAccess().getDefaultKeyword_0()); | 7740 | |
7741 | // $ANTLR start "ruleExactScopeDefinition" | ||
7742 | // InternalSolverLanguageParser.g:2978:1: ruleExactScopeDefinition returns [EObject current=null] : (otherlv_0= Scope ( ( ruleQualifiedName ) ) otherlv_2= EqualsSignEqualsSign ( (lv_exactScope_3_0= RULE_INT ) ) ) ; | ||
7743 | public final EObject ruleExactScopeDefinition() throws RecognitionException { | ||
7744 | EObject current = null; | ||
7745 | |||
7746 | Token otherlv_0=null; | ||
7747 | Token otherlv_2=null; | ||
7748 | Token lv_exactScope_3_0=null; | ||
7749 | |||
7750 | |||
7751 | enterRule(); | ||
7752 | |||
7753 | try { | ||
7754 | // InternalSolverLanguageParser.g:2984:2: ( (otherlv_0= Scope ( ( ruleQualifiedName ) ) otherlv_2= EqualsSignEqualsSign ( (lv_exactScope_3_0= RULE_INT ) ) ) ) | ||
7755 | // InternalSolverLanguageParser.g:2985:2: (otherlv_0= Scope ( ( ruleQualifiedName ) ) otherlv_2= EqualsSignEqualsSign ( (lv_exactScope_3_0= RULE_INT ) ) ) | ||
7756 | { | ||
7757 | // InternalSolverLanguageParser.g:2985:2: (otherlv_0= Scope ( ( ruleQualifiedName ) ) otherlv_2= EqualsSignEqualsSign ( (lv_exactScope_3_0= RULE_INT ) ) ) | ||
7758 | // InternalSolverLanguageParser.g:2986:3: otherlv_0= Scope ( ( ruleQualifiedName ) ) otherlv_2= EqualsSignEqualsSign ( (lv_exactScope_3_0= RULE_INT ) ) | ||
7759 | { | ||
7760 | otherlv_0=(Token)match(input,Scope,FOLLOW_8); | ||
7761 | |||
7762 | newLeafNode(otherlv_0, grammarAccess.getExactScopeDefinitionAccess().getScopeKeyword_0()); | ||
5685 | 7763 | ||
5686 | // InternalSolverLanguage.g:1947:3: ( (lv_interpretation_1_0= ruleBasicInterpretation ) ) | 7764 | // InternalSolverLanguageParser.g:2990:3: ( ( ruleQualifiedName ) ) |
5687 | // InternalSolverLanguage.g:1948:4: (lv_interpretation_1_0= ruleBasicInterpretation ) | 7765 | // InternalSolverLanguageParser.g:2991:4: ( ruleQualifiedName ) |
5688 | { | 7766 | { |
5689 | // InternalSolverLanguage.g:1948:4: (lv_interpretation_1_0= ruleBasicInterpretation ) | 7767 | // InternalSolverLanguageParser.g:2991:4: ( ruleQualifiedName ) |
5690 | // InternalSolverLanguage.g:1949:5: lv_interpretation_1_0= ruleBasicInterpretation | 7768 | // InternalSolverLanguageParser.g:2992:5: ruleQualifiedName |
5691 | { | 7769 | { |
5692 | 7770 | ||
5693 | newCompositeNode(grammarAccess.getDefaultInterpretationAccess().getInterpretationBasicInterpretationParserRuleCall_1_0()); | 7771 | if (current==null) { |
7772 | current = createModelElement(grammarAccess.getExactScopeDefinitionRule()); | ||
7773 | } | ||
5694 | 7774 | ||
5695 | pushFollow(FOLLOW_2); | 7775 | |
5696 | lv_interpretation_1_0=ruleBasicInterpretation(); | 7776 | newCompositeNode(grammarAccess.getExactScopeDefinitionAccess().getTypeNamedElementCrossReference_1_0()); |
7777 | |||
7778 | pushFollow(FOLLOW_46); | ||
7779 | ruleQualifiedName(); | ||
5697 | 7780 | ||
5698 | state._fsp--; | 7781 | state._fsp--; |
5699 | 7782 | ||
5700 | 7783 | ||
7784 | afterParserOrEnumRuleCall(); | ||
7785 | |||
7786 | |||
7787 | } | ||
7788 | |||
7789 | |||
7790 | } | ||
7791 | |||
7792 | otherlv_2=(Token)match(input,EqualsSignEqualsSign,FOLLOW_45); | ||
7793 | |||
7794 | newLeafNode(otherlv_2, grammarAccess.getExactScopeDefinitionAccess().getEqualsSignEqualsSignKeyword_2()); | ||
7795 | |||
7796 | // InternalSolverLanguageParser.g:3010:3: ( (lv_exactScope_3_0= RULE_INT ) ) | ||
7797 | // InternalSolverLanguageParser.g:3011:4: (lv_exactScope_3_0= RULE_INT ) | ||
7798 | { | ||
7799 | // InternalSolverLanguageParser.g:3011:4: (lv_exactScope_3_0= RULE_INT ) | ||
7800 | // InternalSolverLanguageParser.g:3012:5: lv_exactScope_3_0= RULE_INT | ||
7801 | { | ||
7802 | lv_exactScope_3_0=(Token)match(input,RULE_INT,FOLLOW_2); | ||
7803 | |||
7804 | newLeafNode(lv_exactScope_3_0, grammarAccess.getExactScopeDefinitionAccess().getExactScopeINTTerminalRuleCall_3_0()); | ||
7805 | |||
7806 | |||
5701 | if (current==null) { | 7807 | if (current==null) { |
5702 | current = createModelElementForParent(grammarAccess.getDefaultInterpretationRule()); | 7808 | current = createModelElement(grammarAccess.getExactScopeDefinitionRule()); |
5703 | } | 7809 | } |
5704 | set( | 7810 | setWithLastConsumed( |
5705 | current, | 7811 | current, |
5706 | "interpretation", | 7812 | "exactScope", |
5707 | lv_interpretation_1_0, | 7813 | lv_exactScope_3_0, |
5708 | "org.eclipse.viatra.solver.language.SolverLanguage.BasicInterpretation"); | 7814 | "org.eclipse.xtext.common.Terminals.INT"); |
5709 | afterParserOrEnumRuleCall(); | ||
5710 | 7815 | ||
5711 | 7816 | ||
5712 | } | 7817 | } |
@@ -5733,28 +7838,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5733 | } | 7838 | } |
5734 | return current; | 7839 | return current; |
5735 | } | 7840 | } |
5736 | // $ANTLR end "ruleDefaultInterpretation" | 7841 | // $ANTLR end "ruleExactScopeDefinition" |
5737 | 7842 | ||
5738 | 7843 | ||
5739 | // $ANTLR start "entryRuleCDInterpretation" | 7844 | // $ANTLR start "entryRuleBoundedScopeDefinition" |
5740 | // InternalSolverLanguage.g:1970:1: entryRuleCDInterpretation returns [EObject current=null] : iv_ruleCDInterpretation= ruleCDInterpretation EOF ; | 7845 | // InternalSolverLanguageParser.g:3032:1: entryRuleBoundedScopeDefinition returns [EObject current=null] : iv_ruleBoundedScopeDefinition= ruleBoundedScopeDefinition EOF ; |
5741 | public final EObject entryRuleCDInterpretation() throws RecognitionException { | 7846 | public final EObject entryRuleBoundedScopeDefinition() throws RecognitionException { |
5742 | EObject current = null; | 7847 | EObject current = null; |
5743 | 7848 | ||
5744 | EObject iv_ruleCDInterpretation = null; | 7849 | EObject iv_ruleBoundedScopeDefinition = null; |
5745 | 7850 | ||
5746 | 7851 | ||
5747 | try { | 7852 | try { |
5748 | // InternalSolverLanguage.g:1970:57: (iv_ruleCDInterpretation= ruleCDInterpretation EOF ) | 7853 | // InternalSolverLanguageParser.g:3032:63: (iv_ruleBoundedScopeDefinition= ruleBoundedScopeDefinition EOF ) |
5749 | // InternalSolverLanguage.g:1971:2: iv_ruleCDInterpretation= ruleCDInterpretation EOF | 7854 | // InternalSolverLanguageParser.g:3033:2: iv_ruleBoundedScopeDefinition= ruleBoundedScopeDefinition EOF |
5750 | { | 7855 | { |
5751 | newCompositeNode(grammarAccess.getCDInterpretationRule()); | 7856 | newCompositeNode(grammarAccess.getBoundedScopeDefinitionRule()); |
5752 | pushFollow(FOLLOW_1); | 7857 | pushFollow(FOLLOW_1); |
5753 | iv_ruleCDInterpretation=ruleCDInterpretation(); | 7858 | iv_ruleBoundedScopeDefinition=ruleBoundedScopeDefinition(); |
5754 | 7859 | ||
5755 | state._fsp--; | 7860 | state._fsp--; |
5756 | 7861 | ||
5757 | current =iv_ruleCDInterpretation; | 7862 | current =iv_ruleBoundedScopeDefinition; |
5758 | match(input,EOF,FOLLOW_2); | 7863 | match(input,EOF,FOLLOW_2); |
5759 | 7864 | ||
5760 | } | 7865 | } |
@@ -5769,107 +7874,299 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5769 | } | 7874 | } |
5770 | return current; | 7875 | return current; |
5771 | } | 7876 | } |
5772 | // $ANTLR end "entryRuleCDInterpretation" | 7877 | // $ANTLR end "entryRuleBoundedScopeDefinition" |
5773 | 7878 | ||
5774 | 7879 | ||
5775 | // $ANTLR start "ruleCDInterpretation" | 7880 | // $ANTLR start "ruleBoundedScopeDefinition" |
5776 | // InternalSolverLanguage.g:1977:1: ruleCDInterpretation returns [EObject current=null] : (this_ClassInterpretation_0= ruleClassInterpretation | this_EnumInterpretation_1= ruleEnumInterpretation | this_GlobalRelationInterpretation_2= ruleGlobalRelationInterpretation ) ; | 7881 | // InternalSolverLanguageParser.g:3039:1: ruleBoundedScopeDefinition returns [EObject current=null] : (otherlv_0= Scope ( ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? ( ( ruleQualifiedName ) ) otherlv_4= LessThanSignEqualsSign ( (lv_upperBound_5_0= RULE_INT ) ) ) | ( ( (lv_upperBound_6_0= RULE_INT ) ) otherlv_7= GreaterThanSignEqualsSign ( ( ruleQualifiedName ) ) (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? ) ) ) ; |
5777 | public final EObject ruleCDInterpretation() throws RecognitionException { | 7882 | public final EObject ruleBoundedScopeDefinition() throws RecognitionException { |
5778 | EObject current = null; | 7883 | EObject current = null; |
5779 | 7884 | ||
5780 | EObject this_ClassInterpretation_0 = null; | 7885 | Token otherlv_0=null; |
5781 | 7886 | Token lv_lowerBound_1_0=null; | |
5782 | EObject this_EnumInterpretation_1 = null; | 7887 | Token otherlv_2=null; |
5783 | 7888 | Token otherlv_4=null; | |
5784 | EObject this_GlobalRelationInterpretation_2 = null; | 7889 | Token lv_upperBound_5_0=null; |
5785 | 7890 | Token lv_upperBound_6_0=null; | |
7891 | Token otherlv_7=null; | ||
7892 | Token otherlv_9=null; | ||
7893 | Token lv_lowerBound_10_0=null; | ||
5786 | 7894 | ||
5787 | 7895 | ||
5788 | enterRule(); | 7896 | enterRule(); |
5789 | 7897 | ||
5790 | try { | 7898 | try { |
5791 | // InternalSolverLanguage.g:1983:2: ( (this_ClassInterpretation_0= ruleClassInterpretation | this_EnumInterpretation_1= ruleEnumInterpretation | this_GlobalRelationInterpretation_2= ruleGlobalRelationInterpretation ) ) | 7899 | // InternalSolverLanguageParser.g:3045:2: ( (otherlv_0= Scope ( ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? ( ( ruleQualifiedName ) ) otherlv_4= LessThanSignEqualsSign ( (lv_upperBound_5_0= RULE_INT ) ) ) | ( ( (lv_upperBound_6_0= RULE_INT ) ) otherlv_7= GreaterThanSignEqualsSign ( ( ruleQualifiedName ) ) (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? ) ) ) ) |
5792 | // InternalSolverLanguage.g:1984:2: (this_ClassInterpretation_0= ruleClassInterpretation | this_EnumInterpretation_1= ruleEnumInterpretation | this_GlobalRelationInterpretation_2= ruleGlobalRelationInterpretation ) | 7900 | // InternalSolverLanguageParser.g:3046:2: (otherlv_0= Scope ( ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? ( ( ruleQualifiedName ) ) otherlv_4= LessThanSignEqualsSign ( (lv_upperBound_5_0= RULE_INT ) ) ) | ( ( (lv_upperBound_6_0= RULE_INT ) ) otherlv_7= GreaterThanSignEqualsSign ( ( ruleQualifiedName ) ) (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? ) ) ) |
5793 | { | 7901 | { |
5794 | // InternalSolverLanguage.g:1984:2: (this_ClassInterpretation_0= ruleClassInterpretation | this_EnumInterpretation_1= ruleEnumInterpretation | this_GlobalRelationInterpretation_2= ruleGlobalRelationInterpretation ) | 7902 | // InternalSolverLanguageParser.g:3046:2: (otherlv_0= Scope ( ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? ( ( ruleQualifiedName ) ) otherlv_4= LessThanSignEqualsSign ( (lv_upperBound_5_0= RULE_INT ) ) ) | ( ( (lv_upperBound_6_0= RULE_INT ) ) otherlv_7= GreaterThanSignEqualsSign ( ( ruleQualifiedName ) ) (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? ) ) ) |
5795 | int alt36=3; | 7903 | // InternalSolverLanguageParser.g:3047:3: otherlv_0= Scope ( ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? ( ( ruleQualifiedName ) ) otherlv_4= LessThanSignEqualsSign ( (lv_upperBound_5_0= RULE_INT ) ) ) | ( ( (lv_upperBound_6_0= RULE_INT ) ) otherlv_7= GreaterThanSignEqualsSign ( ( ruleQualifiedName ) ) (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? ) ) |
5796 | switch ( input.LA(1) ) { | 7904 | { |
5797 | case 33: | 7905 | otherlv_0=(Token)match(input,Scope,FOLLOW_47); |
5798 | case 34: | 7906 | |
5799 | { | 7907 | newLeafNode(otherlv_0, grammarAccess.getBoundedScopeDefinitionAccess().getScopeKeyword_0()); |
5800 | alt36=1; | 7908 | |
7909 | // InternalSolverLanguageParser.g:3051:3: ( ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? ( ( ruleQualifiedName ) ) otherlv_4= LessThanSignEqualsSign ( (lv_upperBound_5_0= RULE_INT ) ) ) | ( ( (lv_upperBound_6_0= RULE_INT ) ) otherlv_7= GreaterThanSignEqualsSign ( ( ruleQualifiedName ) ) (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? ) ) | ||
7910 | int alt38=2; | ||
7911 | int LA38_0 = input.LA(1); | ||
7912 | |||
7913 | if ( (LA38_0==RULE_INT) ) { | ||
7914 | int LA38_1 = input.LA(2); | ||
7915 | |||
7916 | if ( (LA38_1==GreaterThanSignEqualsSign) ) { | ||
7917 | alt38=2; | ||
5801 | } | 7918 | } |
5802 | break; | 7919 | else if ( (LA38_1==LessThanSignEqualsSign) ) { |
5803 | case 38: | 7920 | alt38=1; |
5804 | { | ||
5805 | alt36=2; | ||
5806 | } | 7921 | } |
5807 | break; | 7922 | else { |
5808 | case 39: | 7923 | NoViableAltException nvae = |
5809 | case 40: | 7924 | new NoViableAltException("", 38, 1, input); |
5810 | { | 7925 | |
5811 | alt36=3; | 7926 | throw nvae; |
5812 | } | 7927 | } |
5813 | break; | 7928 | } |
5814 | default: | 7929 | else if ( (LA38_0==RULE_QUOTED_ID||LA38_0==RULE_ID) ) { |
7930 | alt38=1; | ||
7931 | } | ||
7932 | else { | ||
5815 | NoViableAltException nvae = | 7933 | NoViableAltException nvae = |
5816 | new NoViableAltException("", 36, 0, input); | 7934 | new NoViableAltException("", 38, 0, input); |
5817 | 7935 | ||
5818 | throw nvae; | 7936 | throw nvae; |
5819 | } | 7937 | } |
5820 | 7938 | switch (alt38) { | |
5821 | switch (alt36) { | ||
5822 | case 1 : | 7939 | case 1 : |
5823 | // InternalSolverLanguage.g:1985:3: this_ClassInterpretation_0= ruleClassInterpretation | 7940 | // InternalSolverLanguageParser.g:3052:4: ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? ( ( ruleQualifiedName ) ) otherlv_4= LessThanSignEqualsSign ( (lv_upperBound_5_0= RULE_INT ) ) ) |
5824 | { | 7941 | { |
7942 | // InternalSolverLanguageParser.g:3052:4: ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? ( ( ruleQualifiedName ) ) otherlv_4= LessThanSignEqualsSign ( (lv_upperBound_5_0= RULE_INT ) ) ) | ||
7943 | // InternalSolverLanguageParser.g:3053:5: ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? ( ( ruleQualifiedName ) ) otherlv_4= LessThanSignEqualsSign ( (lv_upperBound_5_0= RULE_INT ) ) | ||
7944 | { | ||
7945 | // InternalSolverLanguageParser.g:3053:5: ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign )? | ||
7946 | int alt36=2; | ||
7947 | int LA36_0 = input.LA(1); | ||
5825 | 7948 | ||
5826 | newCompositeNode(grammarAccess.getCDInterpretationAccess().getClassInterpretationParserRuleCall_0()); | 7949 | if ( (LA36_0==RULE_INT) ) { |
5827 | 7950 | alt36=1; | |
5828 | pushFollow(FOLLOW_2); | 7951 | } |
5829 | this_ClassInterpretation_0=ruleClassInterpretation(); | 7952 | switch (alt36) { |
7953 | case 1 : | ||
7954 | // InternalSolverLanguageParser.g:3054:6: ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign | ||
7955 | { | ||
7956 | // InternalSolverLanguageParser.g:3054:6: ( (lv_lowerBound_1_0= RULE_INT ) ) | ||
7957 | // InternalSolverLanguageParser.g:3055:7: (lv_lowerBound_1_0= RULE_INT ) | ||
7958 | { | ||
7959 | // InternalSolverLanguageParser.g:3055:7: (lv_lowerBound_1_0= RULE_INT ) | ||
7960 | // InternalSolverLanguageParser.g:3056:8: lv_lowerBound_1_0= RULE_INT | ||
7961 | { | ||
7962 | lv_lowerBound_1_0=(Token)match(input,RULE_INT,FOLLOW_48); | ||
7963 | |||
7964 | newLeafNode(lv_lowerBound_1_0, grammarAccess.getBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_0_0_0_0()); | ||
7965 | |||
7966 | |||
7967 | if (current==null) { | ||
7968 | current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); | ||
7969 | } | ||
7970 | setWithLastConsumed( | ||
7971 | current, | ||
7972 | "lowerBound", | ||
7973 | lv_lowerBound_1_0, | ||
7974 | "org.eclipse.xtext.common.Terminals.INT"); | ||
7975 | |||
7976 | |||
7977 | } | ||
7978 | |||
7979 | |||
7980 | } | ||
7981 | |||
7982 | otherlv_2=(Token)match(input,LessThanSignEqualsSign,FOLLOW_8); | ||
7983 | |||
7984 | newLeafNode(otherlv_2, grammarAccess.getBoundedScopeDefinitionAccess().getLessThanSignEqualsSignKeyword_1_0_0_1()); | ||
7985 | |||
7986 | |||
7987 | } | ||
7988 | break; | ||
7989 | |||
7990 | } | ||
7991 | |||
7992 | // InternalSolverLanguageParser.g:3077:5: ( ( ruleQualifiedName ) ) | ||
7993 | // InternalSolverLanguageParser.g:3078:6: ( ruleQualifiedName ) | ||
7994 | { | ||
7995 | // InternalSolverLanguageParser.g:3078:6: ( ruleQualifiedName ) | ||
7996 | // InternalSolverLanguageParser.g:3079:7: ruleQualifiedName | ||
7997 | { | ||
7998 | |||
7999 | if (current==null) { | ||
8000 | current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); | ||
8001 | } | ||
8002 | |||
8003 | |||
8004 | newCompositeNode(grammarAccess.getBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_0_1_0()); | ||
8005 | |||
8006 | pushFollow(FOLLOW_48); | ||
8007 | ruleQualifiedName(); | ||
5830 | 8008 | ||
5831 | state._fsp--; | 8009 | state._fsp--; |
5832 | 8010 | ||
5833 | 8011 | ||
5834 | current = this_ClassInterpretation_0; | 8012 | afterParserOrEnumRuleCall(); |
5835 | afterParserOrEnumRuleCall(); | 8013 | |
5836 | 8014 | ||
8015 | } | ||
8016 | |||
8017 | |||
8018 | } | ||
8019 | |||
8020 | otherlv_4=(Token)match(input,LessThanSignEqualsSign,FOLLOW_45); | ||
8021 | |||
8022 | newLeafNode(otherlv_4, grammarAccess.getBoundedScopeDefinitionAccess().getLessThanSignEqualsSignKeyword_1_0_2()); | ||
8023 | |||
8024 | // InternalSolverLanguageParser.g:3097:5: ( (lv_upperBound_5_0= RULE_INT ) ) | ||
8025 | // InternalSolverLanguageParser.g:3098:6: (lv_upperBound_5_0= RULE_INT ) | ||
8026 | { | ||
8027 | // InternalSolverLanguageParser.g:3098:6: (lv_upperBound_5_0= RULE_INT ) | ||
8028 | // InternalSolverLanguageParser.g:3099:7: lv_upperBound_5_0= RULE_INT | ||
8029 | { | ||
8030 | lv_upperBound_5_0=(Token)match(input,RULE_INT,FOLLOW_2); | ||
8031 | |||
8032 | newLeafNode(lv_upperBound_5_0, grammarAccess.getBoundedScopeDefinitionAccess().getUpperBoundINTTerminalRuleCall_1_0_3_0()); | ||
8033 | |||
8034 | |||
8035 | if (current==null) { | ||
8036 | current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); | ||
8037 | } | ||
8038 | setWithLastConsumed( | ||
8039 | current, | ||
8040 | "upperBound", | ||
8041 | lv_upperBound_5_0, | ||
8042 | "org.eclipse.xtext.common.Terminals.INT"); | ||
8043 | |||
8044 | |||
8045 | } | ||
8046 | |||
8047 | |||
8048 | } | ||
8049 | |||
8050 | |||
8051 | } | ||
8052 | |||
5837 | 8053 | ||
5838 | } | 8054 | } |
5839 | break; | 8055 | break; |
5840 | case 2 : | 8056 | case 2 : |
5841 | // InternalSolverLanguage.g:1994:3: this_EnumInterpretation_1= ruleEnumInterpretation | 8057 | // InternalSolverLanguageParser.g:3117:4: ( ( (lv_upperBound_6_0= RULE_INT ) ) otherlv_7= GreaterThanSignEqualsSign ( ( ruleQualifiedName ) ) (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? ) |
5842 | { | 8058 | { |
8059 | // InternalSolverLanguageParser.g:3117:4: ( ( (lv_upperBound_6_0= RULE_INT ) ) otherlv_7= GreaterThanSignEqualsSign ( ( ruleQualifiedName ) ) (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? ) | ||
8060 | // InternalSolverLanguageParser.g:3118:5: ( (lv_upperBound_6_0= RULE_INT ) ) otherlv_7= GreaterThanSignEqualsSign ( ( ruleQualifiedName ) ) (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? | ||
8061 | { | ||
8062 | // InternalSolverLanguageParser.g:3118:5: ( (lv_upperBound_6_0= RULE_INT ) ) | ||
8063 | // InternalSolverLanguageParser.g:3119:6: (lv_upperBound_6_0= RULE_INT ) | ||
8064 | { | ||
8065 | // InternalSolverLanguageParser.g:3119:6: (lv_upperBound_6_0= RULE_INT ) | ||
8066 | // InternalSolverLanguageParser.g:3120:7: lv_upperBound_6_0= RULE_INT | ||
8067 | { | ||
8068 | lv_upperBound_6_0=(Token)match(input,RULE_INT,FOLLOW_49); | ||
5843 | 8069 | ||
5844 | newCompositeNode(grammarAccess.getCDInterpretationAccess().getEnumInterpretationParserRuleCall_1()); | 8070 | newLeafNode(lv_upperBound_6_0, grammarAccess.getBoundedScopeDefinitionAccess().getUpperBoundINTTerminalRuleCall_1_1_0_0()); |
5845 | 8071 | ||
5846 | pushFollow(FOLLOW_2); | ||
5847 | this_EnumInterpretation_1=ruleEnumInterpretation(); | ||
5848 | 8072 | ||
5849 | state._fsp--; | 8073 | if (current==null) { |
8074 | current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); | ||
8075 | } | ||
8076 | setWithLastConsumed( | ||
8077 | current, | ||
8078 | "upperBound", | ||
8079 | lv_upperBound_6_0, | ||
8080 | "org.eclipse.xtext.common.Terminals.INT"); | ||
8081 | |||
5850 | 8082 | ||
8083 | } | ||
5851 | 8084 | ||
5852 | current = this_EnumInterpretation_1; | ||
5853 | afterParserOrEnumRuleCall(); | ||
5854 | |||
5855 | 8085 | ||
5856 | } | 8086 | } |
5857 | break; | 8087 | |
5858 | case 3 : | 8088 | otherlv_7=(Token)match(input,GreaterThanSignEqualsSign,FOLLOW_8); |
5859 | // InternalSolverLanguage.g:2003:3: this_GlobalRelationInterpretation_2= ruleGlobalRelationInterpretation | 8089 | |
8090 | newLeafNode(otherlv_7, grammarAccess.getBoundedScopeDefinitionAccess().getGreaterThanSignEqualsSignKeyword_1_1_1()); | ||
8091 | |||
8092 | // InternalSolverLanguageParser.g:3140:5: ( ( ruleQualifiedName ) ) | ||
8093 | // InternalSolverLanguageParser.g:3141:6: ( ruleQualifiedName ) | ||
8094 | { | ||
8095 | // InternalSolverLanguageParser.g:3141:6: ( ruleQualifiedName ) | ||
8096 | // InternalSolverLanguageParser.g:3142:7: ruleQualifiedName | ||
5860 | { | 8097 | { |
5861 | 8098 | ||
5862 | newCompositeNode(grammarAccess.getCDInterpretationAccess().getGlobalRelationInterpretationParserRuleCall_2()); | 8099 | if (current==null) { |
5863 | 8100 | current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); | |
5864 | pushFollow(FOLLOW_2); | 8101 | } |
5865 | this_GlobalRelationInterpretation_2=ruleGlobalRelationInterpretation(); | 8102 | |
8103 | |||
8104 | newCompositeNode(grammarAccess.getBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_1_2_0()); | ||
8105 | |||
8106 | pushFollow(FOLLOW_50); | ||
8107 | ruleQualifiedName(); | ||
5866 | 8108 | ||
5867 | state._fsp--; | 8109 | state._fsp--; |
5868 | 8110 | ||
5869 | 8111 | ||
5870 | current = this_GlobalRelationInterpretation_2; | 8112 | afterParserOrEnumRuleCall(); |
5871 | afterParserOrEnumRuleCall(); | 8113 | |
5872 | 8114 | ||
8115 | } | ||
8116 | |||
8117 | |||
8118 | } | ||
8119 | |||
8120 | // InternalSolverLanguageParser.g:3156:5: (otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) )? | ||
8121 | int alt37=2; | ||
8122 | int LA37_0 = input.LA(1); | ||
8123 | |||
8124 | if ( (LA37_0==GreaterThanSignEqualsSign) ) { | ||
8125 | alt37=1; | ||
8126 | } | ||
8127 | switch (alt37) { | ||
8128 | case 1 : | ||
8129 | // InternalSolverLanguageParser.g:3157:6: otherlv_9= GreaterThanSignEqualsSign ( (lv_lowerBound_10_0= RULE_INT ) ) | ||
8130 | { | ||
8131 | otherlv_9=(Token)match(input,GreaterThanSignEqualsSign,FOLLOW_45); | ||
8132 | |||
8133 | newLeafNode(otherlv_9, grammarAccess.getBoundedScopeDefinitionAccess().getGreaterThanSignEqualsSignKeyword_1_1_3_0()); | ||
8134 | |||
8135 | // InternalSolverLanguageParser.g:3161:6: ( (lv_lowerBound_10_0= RULE_INT ) ) | ||
8136 | // InternalSolverLanguageParser.g:3162:7: (lv_lowerBound_10_0= RULE_INT ) | ||
8137 | { | ||
8138 | // InternalSolverLanguageParser.g:3162:7: (lv_lowerBound_10_0= RULE_INT ) | ||
8139 | // InternalSolverLanguageParser.g:3163:8: lv_lowerBound_10_0= RULE_INT | ||
8140 | { | ||
8141 | lv_lowerBound_10_0=(Token)match(input,RULE_INT,FOLLOW_2); | ||
8142 | |||
8143 | newLeafNode(lv_lowerBound_10_0, grammarAccess.getBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_1_3_1_0()); | ||
8144 | |||
8145 | |||
8146 | if (current==null) { | ||
8147 | current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); | ||
8148 | } | ||
8149 | setWithLastConsumed( | ||
8150 | current, | ||
8151 | "lowerBound", | ||
8152 | lv_lowerBound_10_0, | ||
8153 | "org.eclipse.xtext.common.Terminals.INT"); | ||
8154 | |||
8155 | |||
8156 | } | ||
8157 | |||
8158 | |||
8159 | } | ||
8160 | |||
8161 | |||
8162 | } | ||
8163 | break; | ||
8164 | |||
8165 | } | ||
8166 | |||
8167 | |||
8168 | } | ||
8169 | |||
5873 | 8170 | ||
5874 | } | 8171 | } |
5875 | break; | 8172 | break; |
@@ -5880,6 +8177,9 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5880 | } | 8177 | } |
5881 | 8178 | ||
5882 | 8179 | ||
8180 | } | ||
8181 | |||
8182 | |||
5883 | leaveRule(); | 8183 | leaveRule(); |
5884 | 8184 | ||
5885 | } | 8185 | } |
@@ -5892,28 +8192,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5892 | } | 8192 | } |
5893 | return current; | 8193 | return current; |
5894 | } | 8194 | } |
5895 | // $ANTLR end "ruleCDInterpretation" | 8195 | // $ANTLR end "ruleBoundedScopeDefinition" |
5896 | 8196 | ||
5897 | 8197 | ||
5898 | // $ANTLR start "entryRuleClassInterpretation" | 8198 | // $ANTLR start "entryRuleLowerBoundedScopeDefinition" |
5899 | // InternalSolverLanguage.g:2015:1: entryRuleClassInterpretation returns [EObject current=null] : iv_ruleClassInterpretation= ruleClassInterpretation EOF ; | 8199 | // InternalSolverLanguageParser.g:3186:1: entryRuleLowerBoundedScopeDefinition returns [EObject current=null] : iv_ruleLowerBoundedScopeDefinition= ruleLowerBoundedScopeDefinition EOF ; |
5900 | public final EObject entryRuleClassInterpretation() throws RecognitionException { | 8200 | public final EObject entryRuleLowerBoundedScopeDefinition() throws RecognitionException { |
5901 | EObject current = null; | 8201 | EObject current = null; |
5902 | 8202 | ||
5903 | EObject iv_ruleClassInterpretation = null; | 8203 | EObject iv_ruleLowerBoundedScopeDefinition = null; |
5904 | 8204 | ||
5905 | 8205 | ||
5906 | try { | 8206 | try { |
5907 | // InternalSolverLanguage.g:2015:60: (iv_ruleClassInterpretation= ruleClassInterpretation EOF ) | 8207 | // InternalSolverLanguageParser.g:3186:68: (iv_ruleLowerBoundedScopeDefinition= ruleLowerBoundedScopeDefinition EOF ) |
5908 | // InternalSolverLanguage.g:2016:2: iv_ruleClassInterpretation= ruleClassInterpretation EOF | 8208 | // InternalSolverLanguageParser.g:3187:2: iv_ruleLowerBoundedScopeDefinition= ruleLowerBoundedScopeDefinition EOF |
5909 | { | 8209 | { |
5910 | newCompositeNode(grammarAccess.getClassInterpretationRule()); | 8210 | newCompositeNode(grammarAccess.getLowerBoundedScopeDefinitionRule()); |
5911 | pushFollow(FOLLOW_1); | 8211 | pushFollow(FOLLOW_1); |
5912 | iv_ruleClassInterpretation=ruleClassInterpretation(); | 8212 | iv_ruleLowerBoundedScopeDefinition=ruleLowerBoundedScopeDefinition(); |
5913 | 8213 | ||
5914 | state._fsp--; | 8214 | state._fsp--; |
5915 | 8215 | ||
5916 | current =iv_ruleClassInterpretation; | 8216 | current =iv_ruleLowerBoundedScopeDefinition; |
5917 | match(input,EOF,FOLLOW_2); | 8217 | match(input,EOF,FOLLOW_2); |
5918 | 8218 | ||
5919 | } | 8219 | } |
@@ -5928,236 +8228,194 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
5928 | } | 8228 | } |
5929 | return current; | 8229 | return current; |
5930 | } | 8230 | } |
5931 | // $ANTLR end "entryRuleClassInterpretation" | 8231 | // $ANTLR end "entryRuleLowerBoundedScopeDefinition" |
5932 | 8232 | ||
5933 | 8233 | ||
5934 | // $ANTLR start "ruleClassInterpretation" | 8234 | // $ANTLR start "ruleLowerBoundedScopeDefinition" |
5935 | // InternalSolverLanguage.g:2022:1: ruleClassInterpretation returns [EObject current=null] : ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_symbol_2_0= ruleModelSymbol ) ) (otherlv_3= 'extends' ( (lv_supertypes_4_0= ruleModelSymbol ) )+ )? otherlv_5= '{' ( (lv_fielt_6_0= ruleFieldRelationInterpretation ) )* otherlv_7= '}' ) ; | 8235 | // InternalSolverLanguageParser.g:3193:1: ruleLowerBoundedScopeDefinition returns [EObject current=null] : (otherlv_0= Scope ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign ( ( ruleQualifiedName ) ) ) | ( ( ( ruleQualifiedName ) ) otherlv_5= GreaterThanSignEqualsSign ( (lv_lowerBound_6_0= RULE_INT ) ) ) ) ) ; |
5936 | public final EObject ruleClassInterpretation() throws RecognitionException { | 8236 | public final EObject ruleLowerBoundedScopeDefinition() throws RecognitionException { |
5937 | EObject current = null; | 8237 | EObject current = null; |
5938 | 8238 | ||
5939 | Token lv_abstract_0_0=null; | 8239 | Token otherlv_0=null; |
5940 | Token otherlv_1=null; | 8240 | Token lv_lowerBound_1_0=null; |
5941 | Token otherlv_3=null; | 8241 | Token otherlv_2=null; |
5942 | Token otherlv_5=null; | 8242 | Token otherlv_5=null; |
5943 | Token otherlv_7=null; | 8243 | Token lv_lowerBound_6_0=null; |
5944 | EObject lv_symbol_2_0 = null; | ||
5945 | |||
5946 | EObject lv_supertypes_4_0 = null; | ||
5947 | |||
5948 | EObject lv_fielt_6_0 = null; | ||
5949 | |||
5950 | 8244 | ||
5951 | 8245 | ||
5952 | enterRule(); | 8246 | enterRule(); |
5953 | 8247 | ||
5954 | try { | 8248 | try { |
5955 | // InternalSolverLanguage.g:2028:2: ( ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_symbol_2_0= ruleModelSymbol ) ) (otherlv_3= 'extends' ( (lv_supertypes_4_0= ruleModelSymbol ) )+ )? otherlv_5= '{' ( (lv_fielt_6_0= ruleFieldRelationInterpretation ) )* otherlv_7= '}' ) ) | 8249 | // InternalSolverLanguageParser.g:3199:2: ( (otherlv_0= Scope ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign ( ( ruleQualifiedName ) ) ) | ( ( ( ruleQualifiedName ) ) otherlv_5= GreaterThanSignEqualsSign ( (lv_lowerBound_6_0= RULE_INT ) ) ) ) ) ) |
5956 | // InternalSolverLanguage.g:2029:2: ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_symbol_2_0= ruleModelSymbol ) ) (otherlv_3= 'extends' ( (lv_supertypes_4_0= ruleModelSymbol ) )+ )? otherlv_5= '{' ( (lv_fielt_6_0= ruleFieldRelationInterpretation ) )* otherlv_7= '}' ) | 8250 | // InternalSolverLanguageParser.g:3200:2: (otherlv_0= Scope ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign ( ( ruleQualifiedName ) ) ) | ( ( ( ruleQualifiedName ) ) otherlv_5= GreaterThanSignEqualsSign ( (lv_lowerBound_6_0= RULE_INT ) ) ) ) ) |
5957 | { | 8251 | { |
5958 | // InternalSolverLanguage.g:2029:2: ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_symbol_2_0= ruleModelSymbol ) ) (otherlv_3= 'extends' ( (lv_supertypes_4_0= ruleModelSymbol ) )+ )? otherlv_5= '{' ( (lv_fielt_6_0= ruleFieldRelationInterpretation ) )* otherlv_7= '}' ) | 8252 | // InternalSolverLanguageParser.g:3200:2: (otherlv_0= Scope ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign ( ( ruleQualifiedName ) ) ) | ( ( ( ruleQualifiedName ) ) otherlv_5= GreaterThanSignEqualsSign ( (lv_lowerBound_6_0= RULE_INT ) ) ) ) ) |
5959 | // InternalSolverLanguage.g:2030:3: ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_symbol_2_0= ruleModelSymbol ) ) (otherlv_3= 'extends' ( (lv_supertypes_4_0= ruleModelSymbol ) )+ )? otherlv_5= '{' ( (lv_fielt_6_0= ruleFieldRelationInterpretation ) )* otherlv_7= '}' | 8253 | // InternalSolverLanguageParser.g:3201:3: otherlv_0= Scope ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign ( ( ruleQualifiedName ) ) ) | ( ( ( ruleQualifiedName ) ) otherlv_5= GreaterThanSignEqualsSign ( (lv_lowerBound_6_0= RULE_INT ) ) ) ) |
5960 | { | 8254 | { |
5961 | // InternalSolverLanguage.g:2030:3: ( (lv_abstract_0_0= 'abstract' ) )? | 8255 | otherlv_0=(Token)match(input,Scope,FOLLOW_47); |
5962 | int alt37=2; | 8256 | |
5963 | int LA37_0 = input.LA(1); | 8257 | newLeafNode(otherlv_0, grammarAccess.getLowerBoundedScopeDefinitionAccess().getScopeKeyword_0()); |
8258 | |||
8259 | // InternalSolverLanguageParser.g:3205:3: ( ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign ( ( ruleQualifiedName ) ) ) | ( ( ( ruleQualifiedName ) ) otherlv_5= GreaterThanSignEqualsSign ( (lv_lowerBound_6_0= RULE_INT ) ) ) ) | ||
8260 | int alt39=2; | ||
8261 | int LA39_0 = input.LA(1); | ||
5964 | 8262 | ||
5965 | if ( (LA37_0==33) ) { | 8263 | if ( (LA39_0==RULE_INT) ) { |
5966 | alt37=1; | 8264 | alt39=1; |
8265 | } | ||
8266 | else if ( (LA39_0==RULE_QUOTED_ID||LA39_0==RULE_ID) ) { | ||
8267 | alt39=2; | ||
5967 | } | 8268 | } |
5968 | switch (alt37) { | 8269 | else { |
8270 | NoViableAltException nvae = | ||
8271 | new NoViableAltException("", 39, 0, input); | ||
8272 | |||
8273 | throw nvae; | ||
8274 | } | ||
8275 | switch (alt39) { | ||
5969 | case 1 : | 8276 | case 1 : |
5970 | // InternalSolverLanguage.g:2031:4: (lv_abstract_0_0= 'abstract' ) | 8277 | // InternalSolverLanguageParser.g:3206:4: ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign ( ( ruleQualifiedName ) ) ) |
8278 | { | ||
8279 | // InternalSolverLanguageParser.g:3206:4: ( ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign ( ( ruleQualifiedName ) ) ) | ||
8280 | // InternalSolverLanguageParser.g:3207:5: ( (lv_lowerBound_1_0= RULE_INT ) ) otherlv_2= LessThanSignEqualsSign ( ( ruleQualifiedName ) ) | ||
8281 | { | ||
8282 | // InternalSolverLanguageParser.g:3207:5: ( (lv_lowerBound_1_0= RULE_INT ) ) | ||
8283 | // InternalSolverLanguageParser.g:3208:6: (lv_lowerBound_1_0= RULE_INT ) | ||
5971 | { | 8284 | { |
5972 | // InternalSolverLanguage.g:2031:4: (lv_abstract_0_0= 'abstract' ) | 8285 | // InternalSolverLanguageParser.g:3208:6: (lv_lowerBound_1_0= RULE_INT ) |
5973 | // InternalSolverLanguage.g:2032:5: lv_abstract_0_0= 'abstract' | 8286 | // InternalSolverLanguageParser.g:3209:7: lv_lowerBound_1_0= RULE_INT |
5974 | { | 8287 | { |
5975 | lv_abstract_0_0=(Token)match(input,33,FOLLOW_27); | 8288 | lv_lowerBound_1_0=(Token)match(input,RULE_INT,FOLLOW_48); |
5976 | 8289 | ||
5977 | newLeafNode(lv_abstract_0_0, grammarAccess.getClassInterpretationAccess().getAbstractAbstractKeyword_0_0()); | 8290 | newLeafNode(lv_lowerBound_1_0, grammarAccess.getLowerBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_0_0_0()); |
5978 | 8291 | ||
5979 | 8292 | ||
5980 | if (current==null) { | 8293 | if (current==null) { |
5981 | current = createModelElement(grammarAccess.getClassInterpretationRule()); | 8294 | current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule()); |
5982 | } | 8295 | } |
5983 | setWithLastConsumed(current, "abstract", true, "abstract"); | 8296 | setWithLastConsumed( |
5984 | 8297 | current, | |
8298 | "lowerBound", | ||
8299 | lv_lowerBound_1_0, | ||
8300 | "org.eclipse.xtext.common.Terminals.INT"); | ||
8301 | |||
5985 | 8302 | ||
5986 | } | 8303 | } |
5987 | 8304 | ||
5988 | 8305 | ||
5989 | } | 8306 | } |
5990 | break; | ||
5991 | |||
5992 | } | ||
5993 | |||
5994 | otherlv_1=(Token)match(input,34,FOLLOW_12); | ||
5995 | |||
5996 | newLeafNode(otherlv_1, grammarAccess.getClassInterpretationAccess().getClassKeyword_1()); | ||
5997 | |||
5998 | // InternalSolverLanguage.g:2048:3: ( (lv_symbol_2_0= ruleModelSymbol ) ) | ||
5999 | // InternalSolverLanguage.g:2049:4: (lv_symbol_2_0= ruleModelSymbol ) | ||
6000 | { | ||
6001 | // InternalSolverLanguage.g:2049:4: (lv_symbol_2_0= ruleModelSymbol ) | ||
6002 | // InternalSolverLanguage.g:2050:5: lv_symbol_2_0= ruleModelSymbol | ||
6003 | { | ||
6004 | |||
6005 | newCompositeNode(grammarAccess.getClassInterpretationAccess().getSymbolModelSymbolParserRuleCall_2_0()); | ||
6006 | |||
6007 | pushFollow(FOLLOW_28); | ||
6008 | lv_symbol_2_0=ruleModelSymbol(); | ||
6009 | 8307 | ||
6010 | state._fsp--; | 8308 | otherlv_2=(Token)match(input,LessThanSignEqualsSign,FOLLOW_8); |
6011 | |||
6012 | |||
6013 | if (current==null) { | ||
6014 | current = createModelElementForParent(grammarAccess.getClassInterpretationRule()); | ||
6015 | } | ||
6016 | set( | ||
6017 | current, | ||
6018 | "symbol", | ||
6019 | lv_symbol_2_0, | ||
6020 | "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); | ||
6021 | afterParserOrEnumRuleCall(); | ||
6022 | |||
6023 | 8309 | ||
6024 | } | 8310 | newLeafNode(otherlv_2, grammarAccess.getLowerBoundedScopeDefinitionAccess().getLessThanSignEqualsSignKeyword_1_0_1()); |
8311 | |||
8312 | // InternalSolverLanguageParser.g:3229:5: ( ( ruleQualifiedName ) ) | ||
8313 | // InternalSolverLanguageParser.g:3230:6: ( ruleQualifiedName ) | ||
8314 | { | ||
8315 | // InternalSolverLanguageParser.g:3230:6: ( ruleQualifiedName ) | ||
8316 | // InternalSolverLanguageParser.g:3231:7: ruleQualifiedName | ||
8317 | { | ||
6025 | 8318 | ||
8319 | if (current==null) { | ||
8320 | current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule()); | ||
8321 | } | ||
8322 | |||
6026 | 8323 | ||
6027 | } | 8324 | newCompositeNode(grammarAccess.getLowerBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_0_2_0()); |
8325 | |||
8326 | pushFollow(FOLLOW_2); | ||
8327 | ruleQualifiedName(); | ||
6028 | 8328 | ||
6029 | // InternalSolverLanguage.g:2067:3: (otherlv_3= 'extends' ( (lv_supertypes_4_0= ruleModelSymbol ) )+ )? | 8329 | state._fsp--; |
6030 | int alt39=2; | ||
6031 | int LA39_0 = input.LA(1); | ||
6032 | 8330 | ||
6033 | if ( (LA39_0==35) ) { | ||
6034 | alt39=1; | ||
6035 | } | ||
6036 | switch (alt39) { | ||
6037 | case 1 : | ||
6038 | // InternalSolverLanguage.g:2068:4: otherlv_3= 'extends' ( (lv_supertypes_4_0= ruleModelSymbol ) )+ | ||
6039 | { | ||
6040 | otherlv_3=(Token)match(input,35,FOLLOW_12); | ||
6041 | 8331 | ||
6042 | newLeafNode(otherlv_3, grammarAccess.getClassInterpretationAccess().getExtendsKeyword_3_0()); | 8332 | afterParserOrEnumRuleCall(); |
6043 | 8333 | ||
6044 | // InternalSolverLanguage.g:2072:4: ( (lv_supertypes_4_0= ruleModelSymbol ) )+ | ||
6045 | int cnt38=0; | ||
6046 | loop38: | ||
6047 | do { | ||
6048 | int alt38=2; | ||
6049 | int LA38_0 = input.LA(1); | ||
6050 | 8334 | ||
6051 | if ( (LA38_0==RULE_ID) ) { | 8335 | } |
6052 | alt38=1; | ||
6053 | } | ||
6054 | 8336 | ||
6055 | 8337 | ||
6056 | switch (alt38) { | 8338 | } |
6057 | case 1 : | ||
6058 | // InternalSolverLanguage.g:2073:5: (lv_supertypes_4_0= ruleModelSymbol ) | ||
6059 | { | ||
6060 | // InternalSolverLanguage.g:2073:5: (lv_supertypes_4_0= ruleModelSymbol ) | ||
6061 | // InternalSolverLanguage.g:2074:6: lv_supertypes_4_0= ruleModelSymbol | ||
6062 | { | ||
6063 | 8339 | ||
6064 | newCompositeNode(grammarAccess.getClassInterpretationAccess().getSupertypesModelSymbolParserRuleCall_3_1_0()); | ||
6065 | |||
6066 | pushFollow(FOLLOW_29); | ||
6067 | lv_supertypes_4_0=ruleModelSymbol(); | ||
6068 | 8340 | ||
6069 | state._fsp--; | 8341 | } |
6070 | 8342 | ||
6071 | 8343 | ||
6072 | if (current==null) { | 8344 | } |
6073 | current = createModelElementForParent(grammarAccess.getClassInterpretationRule()); | 8345 | break; |
6074 | } | 8346 | case 2 : |
6075 | add( | 8347 | // InternalSolverLanguageParser.g:3247:4: ( ( ( ruleQualifiedName ) ) otherlv_5= GreaterThanSignEqualsSign ( (lv_lowerBound_6_0= RULE_INT ) ) ) |
6076 | current, | 8348 | { |
6077 | "supertypes", | 8349 | // InternalSolverLanguageParser.g:3247:4: ( ( ( ruleQualifiedName ) ) otherlv_5= GreaterThanSignEqualsSign ( (lv_lowerBound_6_0= RULE_INT ) ) ) |
6078 | lv_supertypes_4_0, | 8350 | // InternalSolverLanguageParser.g:3248:5: ( ( ruleQualifiedName ) ) otherlv_5= GreaterThanSignEqualsSign ( (lv_lowerBound_6_0= RULE_INT ) ) |
6079 | "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); | 8351 | { |
6080 | afterParserOrEnumRuleCall(); | 8352 | // InternalSolverLanguageParser.g:3248:5: ( ( ruleQualifiedName ) ) |
6081 | 8353 | // InternalSolverLanguageParser.g:3249:6: ( ruleQualifiedName ) | |
8354 | { | ||
8355 | // InternalSolverLanguageParser.g:3249:6: ( ruleQualifiedName ) | ||
8356 | // InternalSolverLanguageParser.g:3250:7: ruleQualifiedName | ||
8357 | { | ||
6082 | 8358 | ||
6083 | } | 8359 | if (current==null) { |
8360 | current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule()); | ||
8361 | } | ||
8362 | |||
6084 | 8363 | ||
8364 | newCompositeNode(grammarAccess.getLowerBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_1_0_0()); | ||
8365 | |||
8366 | pushFollow(FOLLOW_49); | ||
8367 | ruleQualifiedName(); | ||
6085 | 8368 | ||
6086 | } | 8369 | state._fsp--; |
6087 | break; | ||
6088 | 8370 | ||
6089 | default : | ||
6090 | if ( cnt38 >= 1 ) break loop38; | ||
6091 | EarlyExitException eee = | ||
6092 | new EarlyExitException(38, input); | ||
6093 | throw eee; | ||
6094 | } | ||
6095 | cnt38++; | ||
6096 | } while (true); | ||
6097 | 8371 | ||
8372 | afterParserOrEnumRuleCall(); | ||
8373 | |||
6098 | 8374 | ||
6099 | } | 8375 | } |
6100 | break; | ||
6101 | 8376 | ||
6102 | } | ||
6103 | |||
6104 | otherlv_5=(Token)match(input,36,FOLLOW_30); | ||
6105 | 8377 | ||
6106 | newLeafNode(otherlv_5, grammarAccess.getClassInterpretationAccess().getLeftCurlyBracketKeyword_4()); | 8378 | } |
6107 | |||
6108 | // InternalSolverLanguage.g:2096:3: ( (lv_fielt_6_0= ruleFieldRelationInterpretation ) )* | ||
6109 | loop40: | ||
6110 | do { | ||
6111 | int alt40=2; | ||
6112 | int LA40_0 = input.LA(1); | ||
6113 | 8379 | ||
6114 | if ( (LA40_0==RULE_ID||LA40_0==39) ) { | 8380 | otherlv_5=(Token)match(input,GreaterThanSignEqualsSign,FOLLOW_45); |
6115 | alt40=1; | ||
6116 | } | ||
6117 | 8381 | ||
8382 | newLeafNode(otherlv_5, grammarAccess.getLowerBoundedScopeDefinitionAccess().getGreaterThanSignEqualsSignKeyword_1_1_1()); | ||
8383 | |||
8384 | // InternalSolverLanguageParser.g:3268:5: ( (lv_lowerBound_6_0= RULE_INT ) ) | ||
8385 | // InternalSolverLanguageParser.g:3269:6: (lv_lowerBound_6_0= RULE_INT ) | ||
8386 | { | ||
8387 | // InternalSolverLanguageParser.g:3269:6: (lv_lowerBound_6_0= RULE_INT ) | ||
8388 | // InternalSolverLanguageParser.g:3270:7: lv_lowerBound_6_0= RULE_INT | ||
8389 | { | ||
8390 | lv_lowerBound_6_0=(Token)match(input,RULE_INT,FOLLOW_2); | ||
6118 | 8391 | ||
6119 | switch (alt40) { | 8392 | newLeafNode(lv_lowerBound_6_0, grammarAccess.getLowerBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_1_2_0()); |
6120 | case 1 : | 8393 | |
6121 | // InternalSolverLanguage.g:2097:4: (lv_fielt_6_0= ruleFieldRelationInterpretation ) | ||
6122 | { | ||
6123 | // InternalSolverLanguage.g:2097:4: (lv_fielt_6_0= ruleFieldRelationInterpretation ) | ||
6124 | // InternalSolverLanguage.g:2098:5: lv_fielt_6_0= ruleFieldRelationInterpretation | ||
6125 | { | ||
6126 | 8394 | ||
6127 | newCompositeNode(grammarAccess.getClassInterpretationAccess().getFieltFieldRelationInterpretationParserRuleCall_5_0()); | 8395 | if (current==null) { |
6128 | 8396 | current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule()); | |
6129 | pushFollow(FOLLOW_30); | 8397 | } |
6130 | lv_fielt_6_0=ruleFieldRelationInterpretation(); | 8398 | setWithLastConsumed( |
8399 | current, | ||
8400 | "lowerBound", | ||
8401 | lv_lowerBound_6_0, | ||
8402 | "org.eclipse.xtext.common.Terminals.INT"); | ||
8403 | |||
6131 | 8404 | ||
6132 | state._fsp--; | 8405 | } |
6133 | 8406 | ||
6134 | 8407 | ||
6135 | if (current==null) { | 8408 | } |
6136 | current = createModelElementForParent(grammarAccess.getClassInterpretationRule()); | ||
6137 | } | ||
6138 | add( | ||
6139 | current, | ||
6140 | "fielt", | ||
6141 | lv_fielt_6_0, | ||
6142 | "org.eclipse.viatra.solver.language.SolverLanguage.FieldRelationInterpretation"); | ||
6143 | afterParserOrEnumRuleCall(); | ||
6144 | |||
6145 | 8409 | ||
6146 | } | ||
6147 | 8410 | ||
8411 | } | ||
6148 | 8412 | ||
6149 | } | ||
6150 | break; | ||
6151 | 8413 | ||
6152 | default : | 8414 | } |
6153 | break loop40; | 8415 | break; |
6154 | } | ||
6155 | } while (true); | ||
6156 | 8416 | ||
6157 | otherlv_7=(Token)match(input,37,FOLLOW_2); | 8417 | } |
6158 | 8418 | ||
6159 | newLeafNode(otherlv_7, grammarAccess.getClassInterpretationAccess().getRightCurlyBracketKeyword_6()); | ||
6160 | |||
6161 | 8419 | ||
6162 | } | 8420 | } |
6163 | 8421 | ||
@@ -6177,28 +8435,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6177 | } | 8435 | } |
6178 | return current; | 8436 | return current; |
6179 | } | 8437 | } |
6180 | // $ANTLR end "ruleClassInterpretation" | 8438 | // $ANTLR end "ruleLowerBoundedScopeDefinition" |
6181 | 8439 | ||
6182 | 8440 | ||
6183 | // $ANTLR start "entryRuleEnumInterpretation" | 8441 | // $ANTLR start "entryRuleObjectiveDefinition" |
6184 | // InternalSolverLanguage.g:2123:1: entryRuleEnumInterpretation returns [EObject current=null] : iv_ruleEnumInterpretation= ruleEnumInterpretation EOF ; | 8442 | // InternalSolverLanguageParser.g:3292:1: entryRuleObjectiveDefinition returns [EObject current=null] : iv_ruleObjectiveDefinition= ruleObjectiveDefinition EOF ; |
6185 | public final EObject entryRuleEnumInterpretation() throws RecognitionException { | 8443 | public final EObject entryRuleObjectiveDefinition() throws RecognitionException { |
6186 | EObject current = null; | 8444 | EObject current = null; |
6187 | 8445 | ||
6188 | EObject iv_ruleEnumInterpretation = null; | 8446 | EObject iv_ruleObjectiveDefinition = null; |
6189 | 8447 | ||
6190 | 8448 | ||
6191 | try { | 8449 | try { |
6192 | // InternalSolverLanguage.g:2123:59: (iv_ruleEnumInterpretation= ruleEnumInterpretation EOF ) | 8450 | // InternalSolverLanguageParser.g:3292:60: (iv_ruleObjectiveDefinition= ruleObjectiveDefinition EOF ) |
6193 | // InternalSolverLanguage.g:2124:2: iv_ruleEnumInterpretation= ruleEnumInterpretation EOF | 8451 | // InternalSolverLanguageParser.g:3293:2: iv_ruleObjectiveDefinition= ruleObjectiveDefinition EOF |
6194 | { | 8452 | { |
6195 | newCompositeNode(grammarAccess.getEnumInterpretationRule()); | 8453 | newCompositeNode(grammarAccess.getObjectiveDefinitionRule()); |
6196 | pushFollow(FOLLOW_1); | 8454 | pushFollow(FOLLOW_1); |
6197 | iv_ruleEnumInterpretation=ruleEnumInterpretation(); | 8455 | iv_ruleObjectiveDefinition=ruleObjectiveDefinition(); |
6198 | 8456 | ||
6199 | state._fsp--; | 8457 | state._fsp--; |
6200 | 8458 | ||
6201 | current =iv_ruleEnumInterpretation; | 8459 | current =iv_ruleObjectiveDefinition; |
6202 | match(input,EOF,FOLLOW_2); | 8460 | match(input,EOF,FOLLOW_2); |
6203 | 8461 | ||
6204 | } | 8462 | } |
@@ -6213,59 +8471,52 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6213 | } | 8471 | } |
6214 | return current; | 8472 | return current; |
6215 | } | 8473 | } |
6216 | // $ANTLR end "entryRuleEnumInterpretation" | 8474 | // $ANTLR end "entryRuleObjectiveDefinition" |
6217 | 8475 | ||
6218 | 8476 | ||
6219 | // $ANTLR start "ruleEnumInterpretation" | 8477 | // $ANTLR start "ruleObjectiveDefinition" |
6220 | // InternalSolverLanguage.g:2130:1: ruleEnumInterpretation returns [EObject current=null] : (otherlv_0= 'enum' ( (lv_Symbol_1_0= ruleModelSymbol ) ) otherlv_2= '{' ( (lv_objects_3_0= ruleNamedObject ) )+ otherlv_4= '}' ) ; | 8478 | // InternalSolverLanguageParser.g:3299:1: ruleObjectiveDefinition returns [EObject current=null] : ( ( (lv_kind_0_0= ruleObjectiveKind ) ) ( (lv_objective_1_0= ruleExpression ) ) ) ; |
6221 | public final EObject ruleEnumInterpretation() throws RecognitionException { | 8479 | public final EObject ruleObjectiveDefinition() throws RecognitionException { |
6222 | EObject current = null; | 8480 | EObject current = null; |
6223 | 8481 | ||
6224 | Token otherlv_0=null; | 8482 | Enumerator lv_kind_0_0 = null; |
6225 | Token otherlv_2=null; | ||
6226 | Token otherlv_4=null; | ||
6227 | EObject lv_Symbol_1_0 = null; | ||
6228 | 8483 | ||
6229 | EObject lv_objects_3_0 = null; | 8484 | EObject lv_objective_1_0 = null; |
6230 | 8485 | ||
6231 | 8486 | ||
6232 | 8487 | ||
6233 | enterRule(); | 8488 | enterRule(); |
6234 | 8489 | ||
6235 | try { | 8490 | try { |
6236 | // InternalSolverLanguage.g:2136:2: ( (otherlv_0= 'enum' ( (lv_Symbol_1_0= ruleModelSymbol ) ) otherlv_2= '{' ( (lv_objects_3_0= ruleNamedObject ) )+ otherlv_4= '}' ) ) | 8491 | // InternalSolverLanguageParser.g:3305:2: ( ( ( (lv_kind_0_0= ruleObjectiveKind ) ) ( (lv_objective_1_0= ruleExpression ) ) ) ) |
6237 | // InternalSolverLanguage.g:2137:2: (otherlv_0= 'enum' ( (lv_Symbol_1_0= ruleModelSymbol ) ) otherlv_2= '{' ( (lv_objects_3_0= ruleNamedObject ) )+ otherlv_4= '}' ) | 8492 | // InternalSolverLanguageParser.g:3306:2: ( ( (lv_kind_0_0= ruleObjectiveKind ) ) ( (lv_objective_1_0= ruleExpression ) ) ) |
6238 | { | 8493 | { |
6239 | // InternalSolverLanguage.g:2137:2: (otherlv_0= 'enum' ( (lv_Symbol_1_0= ruleModelSymbol ) ) otherlv_2= '{' ( (lv_objects_3_0= ruleNamedObject ) )+ otherlv_4= '}' ) | 8494 | // InternalSolverLanguageParser.g:3306:2: ( ( (lv_kind_0_0= ruleObjectiveKind ) ) ( (lv_objective_1_0= ruleExpression ) ) ) |
6240 | // InternalSolverLanguage.g:2138:3: otherlv_0= 'enum' ( (lv_Symbol_1_0= ruleModelSymbol ) ) otherlv_2= '{' ( (lv_objects_3_0= ruleNamedObject ) )+ otherlv_4= '}' | 8495 | // InternalSolverLanguageParser.g:3307:3: ( (lv_kind_0_0= ruleObjectiveKind ) ) ( (lv_objective_1_0= ruleExpression ) ) |
6241 | { | 8496 | { |
6242 | otherlv_0=(Token)match(input,38,FOLLOW_12); | 8497 | // InternalSolverLanguageParser.g:3307:3: ( (lv_kind_0_0= ruleObjectiveKind ) ) |
6243 | 8498 | // InternalSolverLanguageParser.g:3308:4: (lv_kind_0_0= ruleObjectiveKind ) | |
6244 | newLeafNode(otherlv_0, grammarAccess.getEnumInterpretationAccess().getEnumKeyword_0()); | ||
6245 | |||
6246 | // InternalSolverLanguage.g:2142:3: ( (lv_Symbol_1_0= ruleModelSymbol ) ) | ||
6247 | // InternalSolverLanguage.g:2143:4: (lv_Symbol_1_0= ruleModelSymbol ) | ||
6248 | { | 8499 | { |
6249 | // InternalSolverLanguage.g:2143:4: (lv_Symbol_1_0= ruleModelSymbol ) | 8500 | // InternalSolverLanguageParser.g:3308:4: (lv_kind_0_0= ruleObjectiveKind ) |
6250 | // InternalSolverLanguage.g:2144:5: lv_Symbol_1_0= ruleModelSymbol | 8501 | // InternalSolverLanguageParser.g:3309:5: lv_kind_0_0= ruleObjectiveKind |
6251 | { | 8502 | { |
6252 | 8503 | ||
6253 | newCompositeNode(grammarAccess.getEnumInterpretationAccess().getSymbolModelSymbolParserRuleCall_1_0()); | 8504 | newCompositeNode(grammarAccess.getObjectiveDefinitionAccess().getKindObjectiveKindEnumRuleCall_0_0()); |
6254 | 8505 | ||
6255 | pushFollow(FOLLOW_31); | 8506 | pushFollow(FOLLOW_6); |
6256 | lv_Symbol_1_0=ruleModelSymbol(); | 8507 | lv_kind_0_0=ruleObjectiveKind(); |
6257 | 8508 | ||
6258 | state._fsp--; | 8509 | state._fsp--; |
6259 | 8510 | ||
6260 | 8511 | ||
6261 | if (current==null) { | 8512 | if (current==null) { |
6262 | current = createModelElementForParent(grammarAccess.getEnumInterpretationRule()); | 8513 | current = createModelElementForParent(grammarAccess.getObjectiveDefinitionRule()); |
6263 | } | 8514 | } |
6264 | set( | 8515 | set( |
6265 | current, | 8516 | current, |
6266 | "Symbol", | 8517 | "kind", |
6267 | lv_Symbol_1_0, | 8518 | lv_kind_0_0, |
6268 | "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); | 8519 | "org.eclipse.viatra.solver.language.SolverLanguage.ObjectiveKind"); |
6269 | afterParserOrEnumRuleCall(); | 8520 | afterParserOrEnumRuleCall(); |
6270 | 8521 | ||
6271 | 8522 | ||
@@ -6274,68 +8525,37 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6274 | 8525 | ||
6275 | } | 8526 | } |
6276 | 8527 | ||
6277 | otherlv_2=(Token)match(input,36,FOLLOW_13); | 8528 | // InternalSolverLanguageParser.g:3326:3: ( (lv_objective_1_0= ruleExpression ) ) |
6278 | 8529 | // InternalSolverLanguageParser.g:3327:4: (lv_objective_1_0= ruleExpression ) | |
6279 | newLeafNode(otherlv_2, grammarAccess.getEnumInterpretationAccess().getLeftCurlyBracketKeyword_2()); | 8530 | { |
6280 | 8531 | // InternalSolverLanguageParser.g:3327:4: (lv_objective_1_0= ruleExpression ) | |
6281 | // InternalSolverLanguage.g:2165:3: ( (lv_objects_3_0= ruleNamedObject ) )+ | 8532 | // InternalSolverLanguageParser.g:3328:5: lv_objective_1_0= ruleExpression |
6282 | int cnt41=0; | 8533 | { |
6283 | loop41: | ||
6284 | do { | ||
6285 | int alt41=2; | ||
6286 | int LA41_0 = input.LA(1); | ||
6287 | |||
6288 | if ( (LA41_0==27) ) { | ||
6289 | alt41=1; | ||
6290 | } | ||
6291 | |||
6292 | |||
6293 | switch (alt41) { | ||
6294 | case 1 : | ||
6295 | // InternalSolverLanguage.g:2166:4: (lv_objects_3_0= ruleNamedObject ) | ||
6296 | { | ||
6297 | // InternalSolverLanguage.g:2166:4: (lv_objects_3_0= ruleNamedObject ) | ||
6298 | // InternalSolverLanguage.g:2167:5: lv_objects_3_0= ruleNamedObject | ||
6299 | { | ||
6300 | |||
6301 | newCompositeNode(grammarAccess.getEnumInterpretationAccess().getObjectsNamedObjectParserRuleCall_3_0()); | ||
6302 | |||
6303 | pushFollow(FOLLOW_32); | ||
6304 | lv_objects_3_0=ruleNamedObject(); | ||
6305 | |||
6306 | state._fsp--; | ||
6307 | 8534 | ||
8535 | newCompositeNode(grammarAccess.getObjectiveDefinitionAccess().getObjectiveExpressionParserRuleCall_1_0()); | ||
8536 | |||
8537 | pushFollow(FOLLOW_2); | ||
8538 | lv_objective_1_0=ruleExpression(); | ||
6308 | 8539 | ||
6309 | if (current==null) { | 8540 | state._fsp--; |
6310 | current = createModelElementForParent(grammarAccess.getEnumInterpretationRule()); | ||
6311 | } | ||
6312 | add( | ||
6313 | current, | ||
6314 | "objects", | ||
6315 | lv_objects_3_0, | ||
6316 | "org.eclipse.viatra.solver.language.SolverLanguage.NamedObject"); | ||
6317 | afterParserOrEnumRuleCall(); | ||
6318 | |||
6319 | 8541 | ||
6320 | } | ||
6321 | 8542 | ||
8543 | if (current==null) { | ||
8544 | current = createModelElementForParent(grammarAccess.getObjectiveDefinitionRule()); | ||
8545 | } | ||
8546 | set( | ||
8547 | current, | ||
8548 | "objective", | ||
8549 | lv_objective_1_0, | ||
8550 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
8551 | afterParserOrEnumRuleCall(); | ||
8552 | |||
6322 | 8553 | ||
6323 | } | 8554 | } |
6324 | break; | ||
6325 | 8555 | ||
6326 | default : | ||
6327 | if ( cnt41 >= 1 ) break loop41; | ||
6328 | EarlyExitException eee = | ||
6329 | new EarlyExitException(41, input); | ||
6330 | throw eee; | ||
6331 | } | ||
6332 | cnt41++; | ||
6333 | } while (true); | ||
6334 | 8556 | ||
6335 | otherlv_4=(Token)match(input,37,FOLLOW_2); | 8557 | } |
6336 | 8558 | ||
6337 | newLeafNode(otherlv_4, grammarAccess.getEnumInterpretationAccess().getRightCurlyBracketKeyword_4()); | ||
6338 | |||
6339 | 8559 | ||
6340 | } | 8560 | } |
6341 | 8561 | ||
@@ -6355,28 +8575,28 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6355 | } | 8575 | } |
6356 | return current; | 8576 | return current; |
6357 | } | 8577 | } |
6358 | // $ANTLR end "ruleEnumInterpretation" | 8578 | // $ANTLR end "ruleObjectiveDefinition" |
6359 | 8579 | ||
6360 | 8580 | ||
6361 | // $ANTLR start "entryRuleFieldRelationInterpretation" | 8581 | // $ANTLR start "entryRuleUpperMultiplicty" |
6362 | // InternalSolverLanguage.g:2192:1: entryRuleFieldRelationInterpretation returns [EObject current=null] : iv_ruleFieldRelationInterpretation= ruleFieldRelationInterpretation EOF ; | 8582 | // InternalSolverLanguageParser.g:3349:1: entryRuleUpperMultiplicty returns [String current=null] : iv_ruleUpperMultiplicty= ruleUpperMultiplicty EOF ; |
6363 | public final EObject entryRuleFieldRelationInterpretation() throws RecognitionException { | 8583 | public final String entryRuleUpperMultiplicty() throws RecognitionException { |
6364 | EObject current = null; | 8584 | String current = null; |
6365 | 8585 | ||
6366 | EObject iv_ruleFieldRelationInterpretation = null; | 8586 | AntlrDatatypeRuleToken iv_ruleUpperMultiplicty = null; |
6367 | 8587 | ||
6368 | 8588 | ||
6369 | try { | 8589 | try { |
6370 | // InternalSolverLanguage.g:2192:68: (iv_ruleFieldRelationInterpretation= ruleFieldRelationInterpretation EOF ) | 8590 | // InternalSolverLanguageParser.g:3349:56: (iv_ruleUpperMultiplicty= ruleUpperMultiplicty EOF ) |
6371 | // InternalSolverLanguage.g:2193:2: iv_ruleFieldRelationInterpretation= ruleFieldRelationInterpretation EOF | 8591 | // InternalSolverLanguageParser.g:3350:2: iv_ruleUpperMultiplicty= ruleUpperMultiplicty EOF |
6372 | { | 8592 | { |
6373 | newCompositeNode(grammarAccess.getFieldRelationInterpretationRule()); | 8593 | newCompositeNode(grammarAccess.getUpperMultiplictyRule()); |
6374 | pushFollow(FOLLOW_1); | 8594 | pushFollow(FOLLOW_1); |
6375 | iv_ruleFieldRelationInterpretation=ruleFieldRelationInterpretation(); | 8595 | iv_ruleUpperMultiplicty=ruleUpperMultiplicty(); |
6376 | 8596 | ||
6377 | state._fsp--; | 8597 | state._fsp--; |
6378 | 8598 | ||
6379 | current =iv_ruleFieldRelationInterpretation; | 8599 | current =iv_ruleUpperMultiplicty.getText(); |
6380 | match(input,EOF,FOLLOW_2); | 8600 | match(input,EOF,FOLLOW_2); |
6381 | 8601 | ||
6382 | } | 8602 | } |
@@ -6391,171 +8611,182 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6391 | } | 8611 | } |
6392 | return current; | 8612 | return current; |
6393 | } | 8613 | } |
6394 | // $ANTLR end "entryRuleFieldRelationInterpretation" | 8614 | // $ANTLR end "entryRuleUpperMultiplicty" |
6395 | |||
6396 | |||
6397 | // $ANTLR start "ruleFieldRelationInterpretation" | ||
6398 | // InternalSolverLanguage.g:2199:1: ruleFieldRelationInterpretation returns [EObject current=null] : ( ( (lv_containment_0_0= 'containment' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) otherlv_2= ':' ( (lv_multiplicity_3_0= ruleMultiplicityDefinition ) )? ( (lv_target_4_0= ruleSymbol ) ) ) ; | ||
6399 | public final EObject ruleFieldRelationInterpretation() throws RecognitionException { | ||
6400 | EObject current = null; | ||
6401 | 8615 | ||
6402 | Token lv_containment_0_0=null; | ||
6403 | Token otherlv_2=null; | ||
6404 | EObject lv_symbol_1_0 = null; | ||
6405 | |||
6406 | EObject lv_multiplicity_3_0 = null; | ||
6407 | 8616 | ||
6408 | EObject lv_target_4_0 = null; | 8617 | // $ANTLR start "ruleUpperMultiplicty" |
8618 | // InternalSolverLanguageParser.g:3356:1: ruleUpperMultiplicty returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_INT_0= RULE_INT | kw= Asterisk ) ; | ||
8619 | public final AntlrDatatypeRuleToken ruleUpperMultiplicty() throws RecognitionException { | ||
8620 | AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); | ||
6409 | 8621 | ||
8622 | Token this_INT_0=null; | ||
8623 | Token kw=null; | ||
6410 | 8624 | ||
6411 | 8625 | ||
6412 | enterRule(); | 8626 | enterRule(); |
6413 | 8627 | ||
6414 | try { | 8628 | try { |
6415 | // InternalSolverLanguage.g:2205:2: ( ( ( (lv_containment_0_0= 'containment' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) otherlv_2= ':' ( (lv_multiplicity_3_0= ruleMultiplicityDefinition ) )? ( (lv_target_4_0= ruleSymbol ) ) ) ) | 8629 | // InternalSolverLanguageParser.g:3362:2: ( (this_INT_0= RULE_INT | kw= Asterisk ) ) |
6416 | // InternalSolverLanguage.g:2206:2: ( ( (lv_containment_0_0= 'containment' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) otherlv_2= ':' ( (lv_multiplicity_3_0= ruleMultiplicityDefinition ) )? ( (lv_target_4_0= ruleSymbol ) ) ) | 8630 | // InternalSolverLanguageParser.g:3363:2: (this_INT_0= RULE_INT | kw= Asterisk ) |
6417 | { | 8631 | { |
6418 | // InternalSolverLanguage.g:2206:2: ( ( (lv_containment_0_0= 'containment' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) otherlv_2= ':' ( (lv_multiplicity_3_0= ruleMultiplicityDefinition ) )? ( (lv_target_4_0= ruleSymbol ) ) ) | 8632 | // InternalSolverLanguageParser.g:3363:2: (this_INT_0= RULE_INT | kw= Asterisk ) |
6419 | // InternalSolverLanguage.g:2207:3: ( (lv_containment_0_0= 'containment' ) )? ( (lv_symbol_1_0= ruleModelSymbol ) ) otherlv_2= ':' ( (lv_multiplicity_3_0= ruleMultiplicityDefinition ) )? ( (lv_target_4_0= ruleSymbol ) ) | 8633 | int alt40=2; |
6420 | { | 8634 | int LA40_0 = input.LA(1); |
6421 | // InternalSolverLanguage.g:2207:3: ( (lv_containment_0_0= 'containment' ) )? | ||
6422 | int alt42=2; | ||
6423 | int LA42_0 = input.LA(1); | ||
6424 | 8635 | ||
6425 | if ( (LA42_0==39) ) { | 8636 | if ( (LA40_0==RULE_INT) ) { |
6426 | alt42=1; | 8637 | alt40=1; |
8638 | } | ||
8639 | else if ( (LA40_0==Asterisk) ) { | ||
8640 | alt40=2; | ||
6427 | } | 8641 | } |
6428 | switch (alt42) { | 8642 | else { |
8643 | NoViableAltException nvae = | ||
8644 | new NoViableAltException("", 40, 0, input); | ||
8645 | |||
8646 | throw nvae; | ||
8647 | } | ||
8648 | switch (alt40) { | ||
6429 | case 1 : | 8649 | case 1 : |
6430 | // InternalSolverLanguage.g:2208:4: (lv_containment_0_0= 'containment' ) | 8650 | // InternalSolverLanguageParser.g:3364:3: this_INT_0= RULE_INT |
6431 | { | ||
6432 | // InternalSolverLanguage.g:2208:4: (lv_containment_0_0= 'containment' ) | ||
6433 | // InternalSolverLanguage.g:2209:5: lv_containment_0_0= 'containment' | ||
6434 | { | 8651 | { |
6435 | lv_containment_0_0=(Token)match(input,39,FOLLOW_12); | 8652 | this_INT_0=(Token)match(input,RULE_INT,FOLLOW_2); |
6436 | 8653 | ||
6437 | newLeafNode(lv_containment_0_0, grammarAccess.getFieldRelationInterpretationAccess().getContainmentContainmentKeyword_0_0()); | 8654 | current.merge(this_INT_0); |
6438 | 8655 | ||
6439 | 8656 | ||
6440 | if (current==null) { | 8657 | newLeafNode(this_INT_0, grammarAccess.getUpperMultiplictyAccess().getINTTerminalRuleCall_0()); |
6441 | current = createModelElement(grammarAccess.getFieldRelationInterpretationRule()); | 8658 | |
6442 | } | ||
6443 | setWithLastConsumed(current, "containment", true, "containment"); | ||
6444 | |||
6445 | 8659 | ||
6446 | } | 8660 | } |
8661 | break; | ||
8662 | case 2 : | ||
8663 | // InternalSolverLanguageParser.g:3372:3: kw= Asterisk | ||
8664 | { | ||
8665 | kw=(Token)match(input,Asterisk,FOLLOW_2); | ||
6447 | 8666 | ||
8667 | current.merge(kw); | ||
8668 | newLeafNode(kw, grammarAccess.getUpperMultiplictyAccess().getAsteriskKeyword_1()); | ||
8669 | |||
6448 | 8670 | ||
6449 | } | 8671 | } |
6450 | break; | 8672 | break; |
6451 | 8673 | ||
6452 | } | 8674 | } |
6453 | 8675 | ||
6454 | // InternalSolverLanguage.g:2221:3: ( (lv_symbol_1_0= ruleModelSymbol ) ) | ||
6455 | // InternalSolverLanguage.g:2222:4: (lv_symbol_1_0= ruleModelSymbol ) | ||
6456 | { | ||
6457 | // InternalSolverLanguage.g:2222:4: (lv_symbol_1_0= ruleModelSymbol ) | ||
6458 | // InternalSolverLanguage.g:2223:5: lv_symbol_1_0= ruleModelSymbol | ||
6459 | { | ||
6460 | 8676 | ||
6461 | newCompositeNode(grammarAccess.getFieldRelationInterpretationAccess().getSymbolModelSymbolParserRuleCall_1_0()); | 8677 | } |
6462 | |||
6463 | pushFollow(FOLLOW_10); | ||
6464 | lv_symbol_1_0=ruleModelSymbol(); | ||
6465 | 8678 | ||
6466 | state._fsp--; | ||
6467 | 8679 | ||
8680 | leaveRule(); | ||
6468 | 8681 | ||
6469 | if (current==null) { | 8682 | } |
6470 | current = createModelElementForParent(grammarAccess.getFieldRelationInterpretationRule()); | ||
6471 | } | ||
6472 | set( | ||
6473 | current, | ||
6474 | "symbol", | ||
6475 | lv_symbol_1_0, | ||
6476 | "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); | ||
6477 | afterParserOrEnumRuleCall(); | ||
6478 | |||
6479 | 8683 | ||
8684 | catch (RecognitionException re) { | ||
8685 | recover(input,re); | ||
8686 | appendSkippedTokens(); | ||
6480 | } | 8687 | } |
8688 | finally { | ||
8689 | } | ||
8690 | return current; | ||
8691 | } | ||
8692 | // $ANTLR end "ruleUpperMultiplicty" | ||
6481 | 8693 | ||
6482 | 8694 | ||
6483 | } | 8695 | // $ANTLR start "entryRuleReal" |
8696 | // InternalSolverLanguageParser.g:3381:1: entryRuleReal returns [String current=null] : iv_ruleReal= ruleReal EOF ; | ||
8697 | public final String entryRuleReal() throws RecognitionException { | ||
8698 | String current = null; | ||
6484 | 8699 | ||
6485 | otherlv_2=(Token)match(input,20,FOLLOW_33); | 8700 | AntlrDatatypeRuleToken iv_ruleReal = null; |
6486 | 8701 | ||
6487 | newLeafNode(otherlv_2, grammarAccess.getFieldRelationInterpretationAccess().getColonKeyword_2()); | ||
6488 | |||
6489 | // InternalSolverLanguage.g:2244:3: ( (lv_multiplicity_3_0= ruleMultiplicityDefinition ) )? | ||
6490 | int alt43=2; | ||
6491 | int LA43_0 = input.LA(1); | ||
6492 | 8702 | ||
6493 | if ( (LA43_0==RULE_INT) ) { | 8703 | |
6494 | alt43=1; | 8704 | HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); |
8705 | |||
8706 | try { | ||
8707 | // InternalSolverLanguageParser.g:3383:2: (iv_ruleReal= ruleReal EOF ) | ||
8708 | // InternalSolverLanguageParser.g:3384:2: iv_ruleReal= ruleReal EOF | ||
8709 | { | ||
8710 | newCompositeNode(grammarAccess.getRealRule()); | ||
8711 | pushFollow(FOLLOW_1); | ||
8712 | iv_ruleReal=ruleReal(); | ||
8713 | |||
8714 | state._fsp--; | ||
8715 | |||
8716 | current =iv_ruleReal.getText(); | ||
8717 | match(input,EOF,FOLLOW_2); | ||
8718 | |||
6495 | } | 8719 | } |
6496 | switch (alt43) { | ||
6497 | case 1 : | ||
6498 | // InternalSolverLanguage.g:2245:4: (lv_multiplicity_3_0= ruleMultiplicityDefinition ) | ||
6499 | { | ||
6500 | // InternalSolverLanguage.g:2245:4: (lv_multiplicity_3_0= ruleMultiplicityDefinition ) | ||
6501 | // InternalSolverLanguage.g:2246:5: lv_multiplicity_3_0= ruleMultiplicityDefinition | ||
6502 | { | ||
6503 | 8720 | ||
6504 | newCompositeNode(grammarAccess.getFieldRelationInterpretationAccess().getMultiplicityMultiplicityDefinitionParserRuleCall_3_0()); | 8721 | } |
6505 | |||
6506 | pushFollow(FOLLOW_21); | ||
6507 | lv_multiplicity_3_0=ruleMultiplicityDefinition(); | ||
6508 | 8722 | ||
6509 | state._fsp--; | 8723 | catch (RecognitionException re) { |
8724 | recover(input,re); | ||
8725 | appendSkippedTokens(); | ||
8726 | } | ||
8727 | finally { | ||
6510 | 8728 | ||
8729 | myHiddenTokenState.restore(); | ||
6511 | 8730 | ||
6512 | if (current==null) { | 8731 | } |
6513 | current = createModelElementForParent(grammarAccess.getFieldRelationInterpretationRule()); | 8732 | return current; |
6514 | } | 8733 | } |
6515 | set( | 8734 | // $ANTLR end "entryRuleReal" |
6516 | current, | ||
6517 | "multiplicity", | ||
6518 | lv_multiplicity_3_0, | ||
6519 | "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicityDefinition"); | ||
6520 | afterParserOrEnumRuleCall(); | ||
6521 | |||
6522 | 8735 | ||
6523 | } | ||
6524 | 8736 | ||
8737 | // $ANTLR start "ruleReal" | ||
8738 | // InternalSolverLanguageParser.g:3393:1: ruleReal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_INT_0= RULE_INT (kw= FullStop this_INT_2= RULE_INT )? ) ; | ||
8739 | public final AntlrDatatypeRuleToken ruleReal() throws RecognitionException { | ||
8740 | AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); | ||
8741 | |||
8742 | Token this_INT_0=null; | ||
8743 | Token kw=null; | ||
8744 | Token this_INT_2=null; | ||
6525 | 8745 | ||
6526 | } | ||
6527 | break; | ||
6528 | 8746 | ||
6529 | } | 8747 | enterRule(); |
8748 | HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); | ||
6530 | 8749 | ||
6531 | // InternalSolverLanguage.g:2263:3: ( (lv_target_4_0= ruleSymbol ) ) | 8750 | try { |
6532 | // InternalSolverLanguage.g:2264:4: (lv_target_4_0= ruleSymbol ) | 8751 | // InternalSolverLanguageParser.g:3400:2: ( (this_INT_0= RULE_INT (kw= FullStop this_INT_2= RULE_INT )? ) ) |
8752 | // InternalSolverLanguageParser.g:3401:2: (this_INT_0= RULE_INT (kw= FullStop this_INT_2= RULE_INT )? ) | ||
6533 | { | 8753 | { |
6534 | // InternalSolverLanguage.g:2264:4: (lv_target_4_0= ruleSymbol ) | 8754 | // InternalSolverLanguageParser.g:3401:2: (this_INT_0= RULE_INT (kw= FullStop this_INT_2= RULE_INT )? ) |
6535 | // InternalSolverLanguage.g:2265:5: lv_target_4_0= ruleSymbol | 8755 | // InternalSolverLanguageParser.g:3402:3: this_INT_0= RULE_INT (kw= FullStop this_INT_2= RULE_INT )? |
6536 | { | 8756 | { |
8757 | this_INT_0=(Token)match(input,RULE_INT,FOLLOW_51); | ||
6537 | 8758 | ||
6538 | newCompositeNode(grammarAccess.getFieldRelationInterpretationAccess().getTargetSymbolParserRuleCall_4_0()); | 8759 | current.merge(this_INT_0); |
6539 | 8760 | ||
6540 | pushFollow(FOLLOW_2); | ||
6541 | lv_target_4_0=ruleSymbol(); | ||
6542 | 8761 | ||
6543 | state._fsp--; | 8762 | newLeafNode(this_INT_0, grammarAccess.getRealAccess().getINTTerminalRuleCall_0()); |
8763 | |||
8764 | // InternalSolverLanguageParser.g:3409:3: (kw= FullStop this_INT_2= RULE_INT )? | ||
8765 | int alt41=2; | ||
8766 | int LA41_0 = input.LA(1); | ||
6544 | 8767 | ||
8768 | if ( (LA41_0==FullStop) ) { | ||
8769 | alt41=1; | ||
8770 | } | ||
8771 | switch (alt41) { | ||
8772 | case 1 : | ||
8773 | // InternalSolverLanguageParser.g:3410:4: kw= FullStop this_INT_2= RULE_INT | ||
8774 | { | ||
8775 | kw=(Token)match(input,FullStop,FOLLOW_45); | ||
6545 | 8776 | ||
6546 | if (current==null) { | 8777 | current.merge(kw); |
6547 | current = createModelElementForParent(grammarAccess.getFieldRelationInterpretationRule()); | 8778 | newLeafNode(kw, grammarAccess.getRealAccess().getFullStopKeyword_1_0()); |
6548 | } | 8779 | |
6549 | set( | 8780 | this_INT_2=(Token)match(input,RULE_INT,FOLLOW_2); |
6550 | current, | ||
6551 | "target", | ||
6552 | lv_target_4_0, | ||
6553 | "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); | ||
6554 | afterParserOrEnumRuleCall(); | ||
6555 | |||
6556 | 8781 | ||
6557 | } | 8782 | current.merge(this_INT_2); |
8783 | |||
6558 | 8784 | ||
8785 | newLeafNode(this_INT_2, grammarAccess.getRealAccess().getINTTerminalRuleCall_1_1()); | ||
8786 | |||
8787 | |||
8788 | } | ||
8789 | break; | ||
6559 | 8790 | ||
6560 | } | 8791 | } |
6561 | 8792 | ||
@@ -6575,31 +8806,37 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6575 | appendSkippedTokens(); | 8806 | appendSkippedTokens(); |
6576 | } | 8807 | } |
6577 | finally { | 8808 | finally { |
8809 | |||
8810 | myHiddenTokenState.restore(); | ||
8811 | |||
6578 | } | 8812 | } |
6579 | return current; | 8813 | return current; |
6580 | } | 8814 | } |
6581 | // $ANTLR end "ruleFieldRelationInterpretation" | 8815 | // $ANTLR end "ruleReal" |
6582 | 8816 | ||
6583 | 8817 | ||
6584 | // $ANTLR start "entryRuleGlobalRelationInterpretation" | 8818 | // $ANTLR start "entryRuleQualifiedName" |
6585 | // InternalSolverLanguage.g:2286:1: entryRuleGlobalRelationInterpretation returns [EObject current=null] : iv_ruleGlobalRelationInterpretation= ruleGlobalRelationInterpretation EOF ; | 8819 | // InternalSolverLanguageParser.g:3430:1: entryRuleQualifiedName returns [String current=null] : iv_ruleQualifiedName= ruleQualifiedName EOF ; |
6586 | public final EObject entryRuleGlobalRelationInterpretation() throws RecognitionException { | 8820 | public final String entryRuleQualifiedName() throws RecognitionException { |
6587 | EObject current = null; | 8821 | String current = null; |
8822 | |||
8823 | AntlrDatatypeRuleToken iv_ruleQualifiedName = null; | ||
6588 | 8824 | ||
6589 | EObject iv_ruleGlobalRelationInterpretation = null; | ||
6590 | 8825 | ||
6591 | 8826 | ||
8827 | HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); | ||
8828 | |||
6592 | try { | 8829 | try { |
6593 | // InternalSolverLanguage.g:2286:69: (iv_ruleGlobalRelationInterpretation= ruleGlobalRelationInterpretation EOF ) | 8830 | // InternalSolverLanguageParser.g:3432:2: (iv_ruleQualifiedName= ruleQualifiedName EOF ) |
6594 | // InternalSolverLanguage.g:2287:2: iv_ruleGlobalRelationInterpretation= ruleGlobalRelationInterpretation EOF | 8831 | // InternalSolverLanguageParser.g:3433:2: iv_ruleQualifiedName= ruleQualifiedName EOF |
6595 | { | 8832 | { |
6596 | newCompositeNode(grammarAccess.getGlobalRelationInterpretationRule()); | 8833 | newCompositeNode(grammarAccess.getQualifiedNameRule()); |
6597 | pushFollow(FOLLOW_1); | 8834 | pushFollow(FOLLOW_1); |
6598 | iv_ruleGlobalRelationInterpretation=ruleGlobalRelationInterpretation(); | 8835 | iv_ruleQualifiedName=ruleQualifiedName(); |
6599 | 8836 | ||
6600 | state._fsp--; | 8837 | state._fsp--; |
6601 | 8838 | ||
6602 | current =iv_ruleGlobalRelationInterpretation; | 8839 | current =iv_ruleQualifiedName.getText(); |
6603 | match(input,EOF,FOLLOW_2); | 8840 | match(input,EOF,FOLLOW_2); |
6604 | 8841 | ||
6605 | } | 8842 | } |
@@ -6611,65 +8848,203 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6611 | appendSkippedTokens(); | 8848 | appendSkippedTokens(); |
6612 | } | 8849 | } |
6613 | finally { | 8850 | finally { |
8851 | |||
8852 | myHiddenTokenState.restore(); | ||
8853 | |||
6614 | } | 8854 | } |
6615 | return current; | 8855 | return current; |
6616 | } | 8856 | } |
6617 | // $ANTLR end "entryRuleGlobalRelationInterpretation" | 8857 | // $ANTLR end "entryRuleQualifiedName" |
6618 | 8858 | ||
6619 | 8859 | ||
6620 | // $ANTLR start "ruleGlobalRelationInterpretation" | 8860 | // $ANTLR start "ruleQualifiedName" |
6621 | // InternalSolverLanguage.g:2293:1: ruleGlobalRelationInterpretation returns [EObject current=null] : ( ( (lv_containment_0_0= 'containment' ) )? otherlv_1= 'relation' ( (lv_symbol_2_0= ruleModelSymbol ) ) otherlv_3= ':' ( (lv_sourceMultiplicity_4_0= ruleMultiplicityDefinition ) )? ( (lv_source_5_0= ruleSymbol ) ) ( (lv_targetMultiplicity_6_0= ruleMultiplicityDefinition ) )? ( (lv_target_7_0= ruleSymbol ) ) ) ; | 8861 | // InternalSolverLanguageParser.g:3442:1: ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (this_ID_0= RULE_ID (kw= FullStop this_ID_2= RULE_ID )* ) | this_QUOTED_ID_3= RULE_QUOTED_ID ) ; |
6622 | public final EObject ruleGlobalRelationInterpretation() throws RecognitionException { | 8862 | public final AntlrDatatypeRuleToken ruleQualifiedName() throws RecognitionException { |
6623 | EObject current = null; | 8863 | AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); |
6624 | 8864 | ||
6625 | Token lv_containment_0_0=null; | 8865 | Token this_ID_0=null; |
6626 | Token otherlv_1=null; | 8866 | Token kw=null; |
6627 | Token otherlv_3=null; | 8867 | Token this_ID_2=null; |
6628 | EObject lv_symbol_2_0 = null; | 8868 | Token this_QUOTED_ID_3=null; |
8869 | |||
8870 | |||
8871 | enterRule(); | ||
8872 | HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); | ||
8873 | |||
8874 | try { | ||
8875 | // InternalSolverLanguageParser.g:3449:2: ( ( (this_ID_0= RULE_ID (kw= FullStop this_ID_2= RULE_ID )* ) | this_QUOTED_ID_3= RULE_QUOTED_ID ) ) | ||
8876 | // InternalSolverLanguageParser.g:3450:2: ( (this_ID_0= RULE_ID (kw= FullStop this_ID_2= RULE_ID )* ) | this_QUOTED_ID_3= RULE_QUOTED_ID ) | ||
8877 | { | ||
8878 | // InternalSolverLanguageParser.g:3450:2: ( (this_ID_0= RULE_ID (kw= FullStop this_ID_2= RULE_ID )* ) | this_QUOTED_ID_3= RULE_QUOTED_ID ) | ||
8879 | int alt43=2; | ||
8880 | int LA43_0 = input.LA(1); | ||
8881 | |||
8882 | if ( (LA43_0==RULE_ID) ) { | ||
8883 | alt43=1; | ||
8884 | } | ||
8885 | else if ( (LA43_0==RULE_QUOTED_ID) ) { | ||
8886 | alt43=2; | ||
8887 | } | ||
8888 | else { | ||
8889 | NoViableAltException nvae = | ||
8890 | new NoViableAltException("", 43, 0, input); | ||
8891 | |||
8892 | throw nvae; | ||
8893 | } | ||
8894 | switch (alt43) { | ||
8895 | case 1 : | ||
8896 | // InternalSolverLanguageParser.g:3451:3: (this_ID_0= RULE_ID (kw= FullStop this_ID_2= RULE_ID )* ) | ||
8897 | { | ||
8898 | // InternalSolverLanguageParser.g:3451:3: (this_ID_0= RULE_ID (kw= FullStop this_ID_2= RULE_ID )* ) | ||
8899 | // InternalSolverLanguageParser.g:3452:4: this_ID_0= RULE_ID (kw= FullStop this_ID_2= RULE_ID )* | ||
8900 | { | ||
8901 | this_ID_0=(Token)match(input,RULE_ID,FOLLOW_51); | ||
8902 | |||
8903 | current.merge(this_ID_0); | ||
8904 | |||
8905 | |||
8906 | newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0_0()); | ||
8907 | |||
8908 | // InternalSolverLanguageParser.g:3459:4: (kw= FullStop this_ID_2= RULE_ID )* | ||
8909 | loop42: | ||
8910 | do { | ||
8911 | int alt42=2; | ||
8912 | int LA42_0 = input.LA(1); | ||
8913 | |||
8914 | if ( (LA42_0==FullStop) ) { | ||
8915 | alt42=1; | ||
8916 | } | ||
8917 | |||
8918 | |||
8919 | switch (alt42) { | ||
8920 | case 1 : | ||
8921 | // InternalSolverLanguageParser.g:3460:5: kw= FullStop this_ID_2= RULE_ID | ||
8922 | { | ||
8923 | kw=(Token)match(input,FullStop,FOLLOW_38); | ||
8924 | |||
8925 | current.merge(kw); | ||
8926 | newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getFullStopKeyword_0_1_0()); | ||
8927 | |||
8928 | this_ID_2=(Token)match(input,RULE_ID,FOLLOW_51); | ||
8929 | |||
8930 | current.merge(this_ID_2); | ||
8931 | |||
8932 | |||
8933 | newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0_1_1()); | ||
8934 | |||
8935 | |||
8936 | } | ||
8937 | break; | ||
8938 | |||
8939 | default : | ||
8940 | break loop42; | ||
8941 | } | ||
8942 | } while (true); | ||
8943 | |||
8944 | |||
8945 | } | ||
8946 | |||
8947 | |||
8948 | } | ||
8949 | break; | ||
8950 | case 2 : | ||
8951 | // InternalSolverLanguageParser.g:3475:3: this_QUOTED_ID_3= RULE_QUOTED_ID | ||
8952 | { | ||
8953 | this_QUOTED_ID_3=(Token)match(input,RULE_QUOTED_ID,FOLLOW_2); | ||
8954 | |||
8955 | current.merge(this_QUOTED_ID_3); | ||
8956 | |||
8957 | |||
8958 | newLeafNode(this_QUOTED_ID_3, grammarAccess.getQualifiedNameAccess().getQUOTED_IDTerminalRuleCall_1()); | ||
8959 | |||
6629 | 8960 | ||
6630 | EObject lv_sourceMultiplicity_4_0 = null; | 8961 | } |
8962 | break; | ||
8963 | |||
8964 | } | ||
8965 | |||
8966 | |||
8967 | } | ||
8968 | |||
8969 | |||
8970 | leaveRule(); | ||
8971 | |||
8972 | } | ||
8973 | |||
8974 | catch (RecognitionException re) { | ||
8975 | recover(input,re); | ||
8976 | appendSkippedTokens(); | ||
8977 | } | ||
8978 | finally { | ||
8979 | |||
8980 | myHiddenTokenState.restore(); | ||
6631 | 8981 | ||
6632 | EObject lv_source_5_0 = null; | 8982 | } |
8983 | return current; | ||
8984 | } | ||
8985 | // $ANTLR end "ruleQualifiedName" | ||
6633 | 8986 | ||
6634 | EObject lv_targetMultiplicity_6_0 = null; | ||
6635 | 8987 | ||
6636 | EObject lv_target_7_0 = null; | 8988 | // $ANTLR start "ruleMetricType" |
8989 | // InternalSolverLanguageParser.g:3489:1: ruleMetricType returns [Enumerator current=null] : ( (enumLiteral_0= Int ) | (enumLiteral_1= Real ) ) ; | ||
8990 | public final Enumerator ruleMetricType() throws RecognitionException { | ||
8991 | Enumerator current = null; | ||
6637 | 8992 | ||
8993 | Token enumLiteral_0=null; | ||
8994 | Token enumLiteral_1=null; | ||
6638 | 8995 | ||
6639 | 8996 | ||
6640 | enterRule(); | 8997 | enterRule(); |
6641 | 8998 | ||
6642 | try { | 8999 | try { |
6643 | // InternalSolverLanguage.g:2299:2: ( ( ( (lv_containment_0_0= 'containment' ) )? otherlv_1= 'relation' ( (lv_symbol_2_0= ruleModelSymbol ) ) otherlv_3= ':' ( (lv_sourceMultiplicity_4_0= ruleMultiplicityDefinition ) )? ( (lv_source_5_0= ruleSymbol ) ) ( (lv_targetMultiplicity_6_0= ruleMultiplicityDefinition ) )? ( (lv_target_7_0= ruleSymbol ) ) ) ) | 9000 | // InternalSolverLanguageParser.g:3495:2: ( ( (enumLiteral_0= Int ) | (enumLiteral_1= Real ) ) ) |
6644 | // InternalSolverLanguage.g:2300:2: ( ( (lv_containment_0_0= 'containment' ) )? otherlv_1= 'relation' ( (lv_symbol_2_0= ruleModelSymbol ) ) otherlv_3= ':' ( (lv_sourceMultiplicity_4_0= ruleMultiplicityDefinition ) )? ( (lv_source_5_0= ruleSymbol ) ) ( (lv_targetMultiplicity_6_0= ruleMultiplicityDefinition ) )? ( (lv_target_7_0= ruleSymbol ) ) ) | 9001 | // InternalSolverLanguageParser.g:3496:2: ( (enumLiteral_0= Int ) | (enumLiteral_1= Real ) ) |
6645 | { | 9002 | { |
6646 | // InternalSolverLanguage.g:2300:2: ( ( (lv_containment_0_0= 'containment' ) )? otherlv_1= 'relation' ( (lv_symbol_2_0= ruleModelSymbol ) ) otherlv_3= ':' ( (lv_sourceMultiplicity_4_0= ruleMultiplicityDefinition ) )? ( (lv_source_5_0= ruleSymbol ) ) ( (lv_targetMultiplicity_6_0= ruleMultiplicityDefinition ) )? ( (lv_target_7_0= ruleSymbol ) ) ) | 9003 | // InternalSolverLanguageParser.g:3496:2: ( (enumLiteral_0= Int ) | (enumLiteral_1= Real ) ) |
6647 | // InternalSolverLanguage.g:2301:3: ( (lv_containment_0_0= 'containment' ) )? otherlv_1= 'relation' ( (lv_symbol_2_0= ruleModelSymbol ) ) otherlv_3= ':' ( (lv_sourceMultiplicity_4_0= ruleMultiplicityDefinition ) )? ( (lv_source_5_0= ruleSymbol ) ) ( (lv_targetMultiplicity_6_0= ruleMultiplicityDefinition ) )? ( (lv_target_7_0= ruleSymbol ) ) | ||
6648 | { | ||
6649 | // InternalSolverLanguage.g:2301:3: ( (lv_containment_0_0= 'containment' ) )? | ||
6650 | int alt44=2; | 9004 | int alt44=2; |
6651 | int LA44_0 = input.LA(1); | 9005 | int LA44_0 = input.LA(1); |
6652 | 9006 | ||
6653 | if ( (LA44_0==39) ) { | 9007 | if ( (LA44_0==Int) ) { |
6654 | alt44=1; | 9008 | alt44=1; |
6655 | } | 9009 | } |
9010 | else if ( (LA44_0==Real) ) { | ||
9011 | alt44=2; | ||
9012 | } | ||
9013 | else { | ||
9014 | NoViableAltException nvae = | ||
9015 | new NoViableAltException("", 44, 0, input); | ||
9016 | |||
9017 | throw nvae; | ||
9018 | } | ||
6656 | switch (alt44) { | 9019 | switch (alt44) { |
6657 | case 1 : | 9020 | case 1 : |
6658 | // InternalSolverLanguage.g:2302:4: (lv_containment_0_0= 'containment' ) | 9021 | // InternalSolverLanguageParser.g:3497:3: (enumLiteral_0= Int ) |
6659 | { | 9022 | { |
6660 | // InternalSolverLanguage.g:2302:4: (lv_containment_0_0= 'containment' ) | 9023 | // InternalSolverLanguageParser.g:3497:3: (enumLiteral_0= Int ) |
6661 | // InternalSolverLanguage.g:2303:5: lv_containment_0_0= 'containment' | 9024 | // InternalSolverLanguageParser.g:3498:4: enumLiteral_0= Int |
6662 | { | 9025 | { |
6663 | lv_containment_0_0=(Token)match(input,39,FOLLOW_34); | 9026 | enumLiteral_0=(Token)match(input,Int,FOLLOW_2); |
6664 | 9027 | ||
6665 | newLeafNode(lv_containment_0_0, grammarAccess.getGlobalRelationInterpretationAccess().getContainmentContainmentKeyword_0_0()); | 9028 | current = grammarAccess.getMetricTypeAccess().getINTEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); |
6666 | 9029 | newLeafNode(enumLiteral_0, grammarAccess.getMetricTypeAccess().getINTEnumLiteralDeclaration_0()); | |
9030 | |||
9031 | |||
9032 | } | ||
6667 | 9033 | ||
6668 | if (current==null) { | 9034 | |
6669 | current = createModelElement(grammarAccess.getGlobalRelationInterpretationRule()); | 9035 | } |
6670 | } | 9036 | break; |
6671 | setWithLastConsumed(current, "containment", true, "containment"); | 9037 | case 2 : |
6672 | 9038 | // InternalSolverLanguageParser.g:3505:3: (enumLiteral_1= Real ) | |
9039 | { | ||
9040 | // InternalSolverLanguageParser.g:3505:3: (enumLiteral_1= Real ) | ||
9041 | // InternalSolverLanguageParser.g:3506:4: enumLiteral_1= Real | ||
9042 | { | ||
9043 | enumLiteral_1=(Token)match(input,Real,FOLLOW_2); | ||
9044 | |||
9045 | current = grammarAccess.getMetricTypeAccess().getREALEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
9046 | newLeafNode(enumLiteral_1, grammarAccess.getMetricTypeAccess().getREALEnumLiteralDeclaration_1()); | ||
9047 | |||
6673 | 9048 | ||
6674 | } | 9049 | } |
6675 | 9050 | ||
@@ -6679,151 +9054,292 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6679 | 9054 | ||
6680 | } | 9055 | } |
6681 | 9056 | ||
6682 | otherlv_1=(Token)match(input,40,FOLLOW_12); | ||
6683 | |||
6684 | newLeafNode(otherlv_1, grammarAccess.getGlobalRelationInterpretationAccess().getRelationKeyword_1()); | ||
6685 | |||
6686 | // InternalSolverLanguage.g:2319:3: ( (lv_symbol_2_0= ruleModelSymbol ) ) | ||
6687 | // InternalSolverLanguage.g:2320:4: (lv_symbol_2_0= ruleModelSymbol ) | ||
6688 | { | ||
6689 | // InternalSolverLanguage.g:2320:4: (lv_symbol_2_0= ruleModelSymbol ) | ||
6690 | // InternalSolverLanguage.g:2321:5: lv_symbol_2_0= ruleModelSymbol | ||
6691 | { | ||
6692 | 9057 | ||
6693 | newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getSymbolModelSymbolParserRuleCall_2_0()); | 9058 | } |
6694 | |||
6695 | pushFollow(FOLLOW_10); | ||
6696 | lv_symbol_2_0=ruleModelSymbol(); | ||
6697 | 9059 | ||
6698 | state._fsp--; | ||
6699 | 9060 | ||
9061 | leaveRule(); | ||
6700 | 9062 | ||
6701 | if (current==null) { | 9063 | } |
6702 | current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); | ||
6703 | } | ||
6704 | set( | ||
6705 | current, | ||
6706 | "symbol", | ||
6707 | lv_symbol_2_0, | ||
6708 | "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); | ||
6709 | afterParserOrEnumRuleCall(); | ||
6710 | |||
6711 | 9064 | ||
9065 | catch (RecognitionException re) { | ||
9066 | recover(input,re); | ||
9067 | appendSkippedTokens(); | ||
6712 | } | 9068 | } |
9069 | finally { | ||
9070 | } | ||
9071 | return current; | ||
9072 | } | ||
9073 | // $ANTLR end "ruleMetricType" | ||
6713 | 9074 | ||
6714 | 9075 | ||
6715 | } | 9076 | // $ANTLR start "ruleComparisonOperator" |
9077 | // InternalSolverLanguageParser.g:3516:1: ruleComparisonOperator returns [Enumerator current=null] : ( (enumLiteral_0= EqualsSignEqualsSign ) | (enumLiteral_1= ExclamationMarkEqualsSign ) | (enumLiteral_2= LessThanSign ) | (enumLiteral_3= LessThanSignEqualsSign ) | (enumLiteral_4= GreaterThanSign ) | (enumLiteral_5= GreaterThanSignEqualsSign ) | (enumLiteral_6= In ) ) ; | ||
9078 | public final Enumerator ruleComparisonOperator() throws RecognitionException { | ||
9079 | Enumerator current = null; | ||
6716 | 9080 | ||
6717 | otherlv_3=(Token)match(input,20,FOLLOW_33); | 9081 | Token enumLiteral_0=null; |
9082 | Token enumLiteral_1=null; | ||
9083 | Token enumLiteral_2=null; | ||
9084 | Token enumLiteral_3=null; | ||
9085 | Token enumLiteral_4=null; | ||
9086 | Token enumLiteral_5=null; | ||
9087 | Token enumLiteral_6=null; | ||
6718 | 9088 | ||
6719 | newLeafNode(otherlv_3, grammarAccess.getGlobalRelationInterpretationAccess().getColonKeyword_3()); | ||
6720 | |||
6721 | // InternalSolverLanguage.g:2342:3: ( (lv_sourceMultiplicity_4_0= ruleMultiplicityDefinition ) )? | ||
6722 | int alt45=2; | ||
6723 | int LA45_0 = input.LA(1); | ||
6724 | 9089 | ||
6725 | if ( (LA45_0==RULE_INT) ) { | 9090 | enterRule(); |
9091 | |||
9092 | try { | ||
9093 | // InternalSolverLanguageParser.g:3522:2: ( ( (enumLiteral_0= EqualsSignEqualsSign ) | (enumLiteral_1= ExclamationMarkEqualsSign ) | (enumLiteral_2= LessThanSign ) | (enumLiteral_3= LessThanSignEqualsSign ) | (enumLiteral_4= GreaterThanSign ) | (enumLiteral_5= GreaterThanSignEqualsSign ) | (enumLiteral_6= In ) ) ) | ||
9094 | // InternalSolverLanguageParser.g:3523:2: ( (enumLiteral_0= EqualsSignEqualsSign ) | (enumLiteral_1= ExclamationMarkEqualsSign ) | (enumLiteral_2= LessThanSign ) | (enumLiteral_3= LessThanSignEqualsSign ) | (enumLiteral_4= GreaterThanSign ) | (enumLiteral_5= GreaterThanSignEqualsSign ) | (enumLiteral_6= In ) ) | ||
9095 | { | ||
9096 | // InternalSolverLanguageParser.g:3523:2: ( (enumLiteral_0= EqualsSignEqualsSign ) | (enumLiteral_1= ExclamationMarkEqualsSign ) | (enumLiteral_2= LessThanSign ) | (enumLiteral_3= LessThanSignEqualsSign ) | (enumLiteral_4= GreaterThanSign ) | (enumLiteral_5= GreaterThanSignEqualsSign ) | (enumLiteral_6= In ) ) | ||
9097 | int alt45=7; | ||
9098 | switch ( input.LA(1) ) { | ||
9099 | case EqualsSignEqualsSign: | ||
9100 | { | ||
6726 | alt45=1; | 9101 | alt45=1; |
9102 | } | ||
9103 | break; | ||
9104 | case ExclamationMarkEqualsSign: | ||
9105 | { | ||
9106 | alt45=2; | ||
9107 | } | ||
9108 | break; | ||
9109 | case LessThanSign: | ||
9110 | { | ||
9111 | alt45=3; | ||
9112 | } | ||
9113 | break; | ||
9114 | case LessThanSignEqualsSign: | ||
9115 | { | ||
9116 | alt45=4; | ||
9117 | } | ||
9118 | break; | ||
9119 | case GreaterThanSign: | ||
9120 | { | ||
9121 | alt45=5; | ||
9122 | } | ||
9123 | break; | ||
9124 | case GreaterThanSignEqualsSign: | ||
9125 | { | ||
9126 | alt45=6; | ||
9127 | } | ||
9128 | break; | ||
9129 | case In: | ||
9130 | { | ||
9131 | alt45=7; | ||
9132 | } | ||
9133 | break; | ||
9134 | default: | ||
9135 | NoViableAltException nvae = | ||
9136 | new NoViableAltException("", 45, 0, input); | ||
9137 | |||
9138 | throw nvae; | ||
6727 | } | 9139 | } |
9140 | |||
6728 | switch (alt45) { | 9141 | switch (alt45) { |
6729 | case 1 : | 9142 | case 1 : |
6730 | // InternalSolverLanguage.g:2343:4: (lv_sourceMultiplicity_4_0= ruleMultiplicityDefinition ) | 9143 | // InternalSolverLanguageParser.g:3524:3: (enumLiteral_0= EqualsSignEqualsSign ) |
6731 | { | 9144 | { |
6732 | // InternalSolverLanguage.g:2343:4: (lv_sourceMultiplicity_4_0= ruleMultiplicityDefinition ) | 9145 | // InternalSolverLanguageParser.g:3524:3: (enumLiteral_0= EqualsSignEqualsSign ) |
6733 | // InternalSolverLanguage.g:2344:5: lv_sourceMultiplicity_4_0= ruleMultiplicityDefinition | 9146 | // InternalSolverLanguageParser.g:3525:4: enumLiteral_0= EqualsSignEqualsSign |
6734 | { | 9147 | { |
9148 | enumLiteral_0=(Token)match(input,EqualsSignEqualsSign,FOLLOW_2); | ||
6735 | 9149 | ||
6736 | newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getSourceMultiplicityMultiplicityDefinitionParserRuleCall_4_0()); | 9150 | current = grammarAccess.getComparisonOperatorAccess().getEQEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); |
6737 | 9151 | newLeafNode(enumLiteral_0, grammarAccess.getComparisonOperatorAccess().getEQEnumLiteralDeclaration_0()); | |
6738 | pushFollow(FOLLOW_21); | 9152 | |
6739 | lv_sourceMultiplicity_4_0=ruleMultiplicityDefinition(); | ||
6740 | 9153 | ||
6741 | state._fsp--; | 9154 | } |
6742 | 9155 | ||
6743 | 9156 | ||
6744 | if (current==null) { | 9157 | } |
6745 | current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); | 9158 | break; |
6746 | } | 9159 | case 2 : |
6747 | set( | 9160 | // InternalSolverLanguageParser.g:3532:3: (enumLiteral_1= ExclamationMarkEqualsSign ) |
6748 | current, | 9161 | { |
6749 | "sourceMultiplicity", | 9162 | // InternalSolverLanguageParser.g:3532:3: (enumLiteral_1= ExclamationMarkEqualsSign ) |
6750 | lv_sourceMultiplicity_4_0, | 9163 | // InternalSolverLanguageParser.g:3533:4: enumLiteral_1= ExclamationMarkEqualsSign |
6751 | "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicityDefinition"); | 9164 | { |
6752 | afterParserOrEnumRuleCall(); | 9165 | enumLiteral_1=(Token)match(input,ExclamationMarkEqualsSign,FOLLOW_2); |
6753 | 9166 | ||
9167 | current = grammarAccess.getComparisonOperatorAccess().getNOT_EQEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
9168 | newLeafNode(enumLiteral_1, grammarAccess.getComparisonOperatorAccess().getNOT_EQEnumLiteralDeclaration_1()); | ||
9169 | |||
6754 | 9170 | ||
6755 | } | 9171 | } |
6756 | 9172 | ||
6757 | 9173 | ||
6758 | } | 9174 | } |
6759 | break; | 9175 | break; |
9176 | case 3 : | ||
9177 | // InternalSolverLanguageParser.g:3540:3: (enumLiteral_2= LessThanSign ) | ||
9178 | { | ||
9179 | // InternalSolverLanguageParser.g:3540:3: (enumLiteral_2= LessThanSign ) | ||
9180 | // InternalSolverLanguageParser.g:3541:4: enumLiteral_2= LessThanSign | ||
9181 | { | ||
9182 | enumLiteral_2=(Token)match(input,LessThanSign,FOLLOW_2); | ||
6760 | 9183 | ||
6761 | } | 9184 | current = grammarAccess.getComparisonOperatorAccess().getLESSEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); |
9185 | newLeafNode(enumLiteral_2, grammarAccess.getComparisonOperatorAccess().getLESSEnumLiteralDeclaration_2()); | ||
9186 | |||
6762 | 9187 | ||
6763 | // InternalSolverLanguage.g:2361:3: ( (lv_source_5_0= ruleSymbol ) ) | 9188 | } |
6764 | // InternalSolverLanguage.g:2362:4: (lv_source_5_0= ruleSymbol ) | ||
6765 | { | ||
6766 | // InternalSolverLanguage.g:2362:4: (lv_source_5_0= ruleSymbol ) | ||
6767 | // InternalSolverLanguage.g:2363:5: lv_source_5_0= ruleSymbol | ||
6768 | { | ||
6769 | 9189 | ||
6770 | newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getSourceSymbolParserRuleCall_5_0()); | ||
6771 | |||
6772 | pushFollow(FOLLOW_33); | ||
6773 | lv_source_5_0=ruleSymbol(); | ||
6774 | 9190 | ||
6775 | state._fsp--; | 9191 | } |
9192 | break; | ||
9193 | case 4 : | ||
9194 | // InternalSolverLanguageParser.g:3548:3: (enumLiteral_3= LessThanSignEqualsSign ) | ||
9195 | { | ||
9196 | // InternalSolverLanguageParser.g:3548:3: (enumLiteral_3= LessThanSignEqualsSign ) | ||
9197 | // InternalSolverLanguageParser.g:3549:4: enumLiteral_3= LessThanSignEqualsSign | ||
9198 | { | ||
9199 | enumLiteral_3=(Token)match(input,LessThanSignEqualsSign,FOLLOW_2); | ||
6776 | 9200 | ||
9201 | current = grammarAccess.getComparisonOperatorAccess().getLESS_EQEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); | ||
9202 | newLeafNode(enumLiteral_3, grammarAccess.getComparisonOperatorAccess().getLESS_EQEnumLiteralDeclaration_3()); | ||
9203 | |||
6777 | 9204 | ||
6778 | if (current==null) { | 9205 | } |
6779 | current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); | 9206 | |
6780 | } | 9207 | |
6781 | set( | 9208 | } |
6782 | current, | 9209 | break; |
6783 | "source", | 9210 | case 5 : |
6784 | lv_source_5_0, | 9211 | // InternalSolverLanguageParser.g:3556:3: (enumLiteral_4= GreaterThanSign ) |
6785 | "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); | 9212 | { |
6786 | afterParserOrEnumRuleCall(); | 9213 | // InternalSolverLanguageParser.g:3556:3: (enumLiteral_4= GreaterThanSign ) |
6787 | 9214 | // InternalSolverLanguageParser.g:3557:4: enumLiteral_4= GreaterThanSign | |
9215 | { | ||
9216 | enumLiteral_4=(Token)match(input,GreaterThanSign,FOLLOW_2); | ||
9217 | |||
9218 | current = grammarAccess.getComparisonOperatorAccess().getGREATEREnumLiteralDeclaration_4().getEnumLiteral().getInstance(); | ||
9219 | newLeafNode(enumLiteral_4, grammarAccess.getComparisonOperatorAccess().getGREATEREnumLiteralDeclaration_4()); | ||
9220 | |||
9221 | |||
9222 | } | ||
9223 | |||
9224 | |||
9225 | } | ||
9226 | break; | ||
9227 | case 6 : | ||
9228 | // InternalSolverLanguageParser.g:3564:3: (enumLiteral_5= GreaterThanSignEqualsSign ) | ||
9229 | { | ||
9230 | // InternalSolverLanguageParser.g:3564:3: (enumLiteral_5= GreaterThanSignEqualsSign ) | ||
9231 | // InternalSolverLanguageParser.g:3565:4: enumLiteral_5= GreaterThanSignEqualsSign | ||
9232 | { | ||
9233 | enumLiteral_5=(Token)match(input,GreaterThanSignEqualsSign,FOLLOW_2); | ||
9234 | |||
9235 | current = grammarAccess.getComparisonOperatorAccess().getGREATER_EQEnumLiteralDeclaration_5().getEnumLiteral().getInstance(); | ||
9236 | newLeafNode(enumLiteral_5, grammarAccess.getComparisonOperatorAccess().getGREATER_EQEnumLiteralDeclaration_5()); | ||
9237 | |||
9238 | |||
9239 | } | ||
9240 | |||
9241 | |||
9242 | } | ||
9243 | break; | ||
9244 | case 7 : | ||
9245 | // InternalSolverLanguageParser.g:3572:3: (enumLiteral_6= In ) | ||
9246 | { | ||
9247 | // InternalSolverLanguageParser.g:3572:3: (enumLiteral_6= In ) | ||
9248 | // InternalSolverLanguageParser.g:3573:4: enumLiteral_6= In | ||
9249 | { | ||
9250 | enumLiteral_6=(Token)match(input,In,FOLLOW_2); | ||
9251 | |||
9252 | current = grammarAccess.getComparisonOperatorAccess().getINEnumLiteralDeclaration_6().getEnumLiteral().getInstance(); | ||
9253 | newLeafNode(enumLiteral_6, grammarAccess.getComparisonOperatorAccess().getINEnumLiteralDeclaration_6()); | ||
9254 | |||
9255 | |||
9256 | } | ||
9257 | |||
9258 | |||
9259 | } | ||
9260 | break; | ||
6788 | 9261 | ||
6789 | } | 9262 | } |
6790 | 9263 | ||
6791 | 9264 | ||
6792 | } | 9265 | } |
6793 | 9266 | ||
6794 | // InternalSolverLanguage.g:2380:3: ( (lv_targetMultiplicity_6_0= ruleMultiplicityDefinition ) )? | 9267 | |
9268 | leaveRule(); | ||
9269 | |||
9270 | } | ||
9271 | |||
9272 | catch (RecognitionException re) { | ||
9273 | recover(input,re); | ||
9274 | appendSkippedTokens(); | ||
9275 | } | ||
9276 | finally { | ||
9277 | } | ||
9278 | return current; | ||
9279 | } | ||
9280 | // $ANTLR end "ruleComparisonOperator" | ||
9281 | |||
9282 | |||
9283 | // $ANTLR start "ruleAdditiveBinaryOperator" | ||
9284 | // InternalSolverLanguageParser.g:3583:1: ruleAdditiveBinaryOperator returns [Enumerator current=null] : ( (enumLiteral_0= PlusSign ) | (enumLiteral_1= HyphenMinus ) ) ; | ||
9285 | public final Enumerator ruleAdditiveBinaryOperator() throws RecognitionException { | ||
9286 | Enumerator current = null; | ||
9287 | |||
9288 | Token enumLiteral_0=null; | ||
9289 | Token enumLiteral_1=null; | ||
9290 | |||
9291 | |||
9292 | enterRule(); | ||
9293 | |||
9294 | try { | ||
9295 | // InternalSolverLanguageParser.g:3589:2: ( ( (enumLiteral_0= PlusSign ) | (enumLiteral_1= HyphenMinus ) ) ) | ||
9296 | // InternalSolverLanguageParser.g:3590:2: ( (enumLiteral_0= PlusSign ) | (enumLiteral_1= HyphenMinus ) ) | ||
9297 | { | ||
9298 | // InternalSolverLanguageParser.g:3590:2: ( (enumLiteral_0= PlusSign ) | (enumLiteral_1= HyphenMinus ) ) | ||
6795 | int alt46=2; | 9299 | int alt46=2; |
6796 | int LA46_0 = input.LA(1); | 9300 | int LA46_0 = input.LA(1); |
6797 | 9301 | ||
6798 | if ( (LA46_0==RULE_INT) ) { | 9302 | if ( (LA46_0==PlusSign) ) { |
6799 | alt46=1; | 9303 | alt46=1; |
6800 | } | 9304 | } |
9305 | else if ( (LA46_0==HyphenMinus) ) { | ||
9306 | alt46=2; | ||
9307 | } | ||
9308 | else { | ||
9309 | NoViableAltException nvae = | ||
9310 | new NoViableAltException("", 46, 0, input); | ||
9311 | |||
9312 | throw nvae; | ||
9313 | } | ||
6801 | switch (alt46) { | 9314 | switch (alt46) { |
6802 | case 1 : | 9315 | case 1 : |
6803 | // InternalSolverLanguage.g:2381:4: (lv_targetMultiplicity_6_0= ruleMultiplicityDefinition ) | 9316 | // InternalSolverLanguageParser.g:3591:3: (enumLiteral_0= PlusSign ) |
6804 | { | 9317 | { |
6805 | // InternalSolverLanguage.g:2381:4: (lv_targetMultiplicity_6_0= ruleMultiplicityDefinition ) | 9318 | // InternalSolverLanguageParser.g:3591:3: (enumLiteral_0= PlusSign ) |
6806 | // InternalSolverLanguage.g:2382:5: lv_targetMultiplicity_6_0= ruleMultiplicityDefinition | 9319 | // InternalSolverLanguageParser.g:3592:4: enumLiteral_0= PlusSign |
6807 | { | 9320 | { |
9321 | enumLiteral_0=(Token)match(input,PlusSign,FOLLOW_2); | ||
6808 | 9322 | ||
6809 | newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getTargetMultiplicityMultiplicityDefinitionParserRuleCall_6_0()); | 9323 | current = grammarAccess.getAdditiveBinaryOperatorAccess().getADDEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); |
6810 | 9324 | newLeafNode(enumLiteral_0, grammarAccess.getAdditiveBinaryOperatorAccess().getADDEnumLiteralDeclaration_0()); | |
6811 | pushFollow(FOLLOW_21); | 9325 | |
6812 | lv_targetMultiplicity_6_0=ruleMultiplicityDefinition(); | ||
6813 | 9326 | ||
6814 | state._fsp--; | 9327 | } |
6815 | 9328 | ||
6816 | 9329 | ||
6817 | if (current==null) { | 9330 | } |
6818 | current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); | 9331 | break; |
6819 | } | 9332 | case 2 : |
6820 | set( | 9333 | // InternalSolverLanguageParser.g:3599:3: (enumLiteral_1= HyphenMinus ) |
6821 | current, | 9334 | { |
6822 | "targetMultiplicity", | 9335 | // InternalSolverLanguageParser.g:3599:3: (enumLiteral_1= HyphenMinus ) |
6823 | lv_targetMultiplicity_6_0, | 9336 | // InternalSolverLanguageParser.g:3600:4: enumLiteral_1= HyphenMinus |
6824 | "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicityDefinition"); | 9337 | { |
6825 | afterParserOrEnumRuleCall(); | 9338 | enumLiteral_1=(Token)match(input,HyphenMinus,FOLLOW_2); |
6826 | 9339 | ||
9340 | current = grammarAccess.getAdditiveBinaryOperatorAccess().getSUBEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
9341 | newLeafNode(enumLiteral_1, grammarAccess.getAdditiveBinaryOperatorAccess().getSUBEnumLiteralDeclaration_1()); | ||
9342 | |||
6827 | 9343 | ||
6828 | } | 9344 | } |
6829 | 9345 | ||
@@ -6833,38 +9349,92 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6833 | 9349 | ||
6834 | } | 9350 | } |
6835 | 9351 | ||
6836 | // InternalSolverLanguage.g:2399:3: ( (lv_target_7_0= ruleSymbol ) ) | ||
6837 | // InternalSolverLanguage.g:2400:4: (lv_target_7_0= ruleSymbol ) | ||
6838 | { | ||
6839 | // InternalSolverLanguage.g:2400:4: (lv_target_7_0= ruleSymbol ) | ||
6840 | // InternalSolverLanguage.g:2401:5: lv_target_7_0= ruleSymbol | ||
6841 | { | ||
6842 | 9352 | ||
6843 | newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getTargetSymbolParserRuleCall_7_0()); | 9353 | } |
6844 | |||
6845 | pushFollow(FOLLOW_2); | ||
6846 | lv_target_7_0=ruleSymbol(); | ||
6847 | 9354 | ||
6848 | state._fsp--; | ||
6849 | 9355 | ||
9356 | leaveRule(); | ||
6850 | 9357 | ||
6851 | if (current==null) { | 9358 | } |
6852 | current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); | ||
6853 | } | ||
6854 | set( | ||
6855 | current, | ||
6856 | "target", | ||
6857 | lv_target_7_0, | ||
6858 | "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); | ||
6859 | afterParserOrEnumRuleCall(); | ||
6860 | |||
6861 | 9359 | ||
9360 | catch (RecognitionException re) { | ||
9361 | recover(input,re); | ||
9362 | appendSkippedTokens(); | ||
6862 | } | 9363 | } |
9364 | finally { | ||
9365 | } | ||
9366 | return current; | ||
9367 | } | ||
9368 | // $ANTLR end "ruleAdditiveBinaryOperator" | ||
9369 | |||
9370 | |||
9371 | // $ANTLR start "ruleMultiplicativeBinaryOperator" | ||
9372 | // InternalSolverLanguageParser.g:3610:1: ruleMultiplicativeBinaryOperator returns [Enumerator current=null] : ( (enumLiteral_0= Asterisk ) | (enumLiteral_1= Solidus ) ) ; | ||
9373 | public final Enumerator ruleMultiplicativeBinaryOperator() throws RecognitionException { | ||
9374 | Enumerator current = null; | ||
9375 | |||
9376 | Token enumLiteral_0=null; | ||
9377 | Token enumLiteral_1=null; | ||
9378 | |||
9379 | |||
9380 | enterRule(); | ||
6863 | 9381 | ||
9382 | try { | ||
9383 | // InternalSolverLanguageParser.g:3616:2: ( ( (enumLiteral_0= Asterisk ) | (enumLiteral_1= Solidus ) ) ) | ||
9384 | // InternalSolverLanguageParser.g:3617:2: ( (enumLiteral_0= Asterisk ) | (enumLiteral_1= Solidus ) ) | ||
9385 | { | ||
9386 | // InternalSolverLanguageParser.g:3617:2: ( (enumLiteral_0= Asterisk ) | (enumLiteral_1= Solidus ) ) | ||
9387 | int alt47=2; | ||
9388 | int LA47_0 = input.LA(1); | ||
9389 | |||
9390 | if ( (LA47_0==Asterisk) ) { | ||
9391 | alt47=1; | ||
9392 | } | ||
9393 | else if ( (LA47_0==Solidus) ) { | ||
9394 | alt47=2; | ||
9395 | } | ||
9396 | else { | ||
9397 | NoViableAltException nvae = | ||
9398 | new NoViableAltException("", 47, 0, input); | ||
6864 | 9399 | ||
9400 | throw nvae; | ||
6865 | } | 9401 | } |
9402 | switch (alt47) { | ||
9403 | case 1 : | ||
9404 | // InternalSolverLanguageParser.g:3618:3: (enumLiteral_0= Asterisk ) | ||
9405 | { | ||
9406 | // InternalSolverLanguageParser.g:3618:3: (enumLiteral_0= Asterisk ) | ||
9407 | // InternalSolverLanguageParser.g:3619:4: enumLiteral_0= Asterisk | ||
9408 | { | ||
9409 | enumLiteral_0=(Token)match(input,Asterisk,FOLLOW_2); | ||
9410 | |||
9411 | current = grammarAccess.getMultiplicativeBinaryOperatorAccess().getMULEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
9412 | newLeafNode(enumLiteral_0, grammarAccess.getMultiplicativeBinaryOperatorAccess().getMULEnumLiteralDeclaration_0()); | ||
9413 | |||
9414 | |||
9415 | } | ||
6866 | 9416 | ||
6867 | 9417 | ||
9418 | } | ||
9419 | break; | ||
9420 | case 2 : | ||
9421 | // InternalSolverLanguageParser.g:3626:3: (enumLiteral_1= Solidus ) | ||
9422 | { | ||
9423 | // InternalSolverLanguageParser.g:3626:3: (enumLiteral_1= Solidus ) | ||
9424 | // InternalSolverLanguageParser.g:3627:4: enumLiteral_1= Solidus | ||
9425 | { | ||
9426 | enumLiteral_1=(Token)match(input,Solidus,FOLLOW_2); | ||
9427 | |||
9428 | current = grammarAccess.getMultiplicativeBinaryOperatorAccess().getDIVEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
9429 | newLeafNode(enumLiteral_1, grammarAccess.getMultiplicativeBinaryOperatorAccess().getDIVEnumLiteralDeclaration_1()); | ||
9430 | |||
9431 | |||
9432 | } | ||
9433 | |||
9434 | |||
9435 | } | ||
9436 | break; | ||
9437 | |||
6868 | } | 9438 | } |
6869 | 9439 | ||
6870 | 9440 | ||
@@ -6883,32 +9453,40 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6883 | } | 9453 | } |
6884 | return current; | 9454 | return current; |
6885 | } | 9455 | } |
6886 | // $ANTLR end "ruleGlobalRelationInterpretation" | 9456 | // $ANTLR end "ruleMultiplicativeBinaryOperator" |
6887 | 9457 | ||
6888 | 9458 | ||
6889 | // $ANTLR start "entryRuleMultiplicityDefinition" | 9459 | // $ANTLR start "ruleExponentialOp" |
6890 | // InternalSolverLanguage.g:2422:1: entryRuleMultiplicityDefinition returns [EObject current=null] : iv_ruleMultiplicityDefinition= ruleMultiplicityDefinition EOF ; | 9460 | // InternalSolverLanguageParser.g:3637:1: ruleExponentialOp returns [Enumerator current=null] : (enumLiteral_0= CircumflexAccent ) ; |
6891 | public final EObject entryRuleMultiplicityDefinition() throws RecognitionException { | 9461 | public final Enumerator ruleExponentialOp() throws RecognitionException { |
6892 | EObject current = null; | 9462 | Enumerator current = null; |
6893 | 9463 | ||
6894 | EObject iv_ruleMultiplicityDefinition = null; | 9464 | Token enumLiteral_0=null; |
6895 | 9465 | ||
6896 | 9466 | ||
9467 | enterRule(); | ||
9468 | |||
6897 | try { | 9469 | try { |
6898 | // InternalSolverLanguage.g:2422:63: (iv_ruleMultiplicityDefinition= ruleMultiplicityDefinition EOF ) | 9470 | // InternalSolverLanguageParser.g:3643:2: ( (enumLiteral_0= CircumflexAccent ) ) |
6899 | // InternalSolverLanguage.g:2423:2: iv_ruleMultiplicityDefinition= ruleMultiplicityDefinition EOF | 9471 | // InternalSolverLanguageParser.g:3644:2: (enumLiteral_0= CircumflexAccent ) |
6900 | { | 9472 | { |
6901 | newCompositeNode(grammarAccess.getMultiplicityDefinitionRule()); | 9473 | // InternalSolverLanguageParser.g:3644:2: (enumLiteral_0= CircumflexAccent ) |
6902 | pushFollow(FOLLOW_1); | 9474 | // InternalSolverLanguageParser.g:3645:3: enumLiteral_0= CircumflexAccent |
6903 | iv_ruleMultiplicityDefinition=ruleMultiplicityDefinition(); | 9475 | { |
9476 | enumLiteral_0=(Token)match(input,CircumflexAccent,FOLLOW_2); | ||
6904 | 9477 | ||
6905 | state._fsp--; | 9478 | current = grammarAccess.getExponentialOpAccess().getPOWEnumLiteralDeclaration().getEnumLiteral().getInstance(); |
9479 | newLeafNode(enumLiteral_0, grammarAccess.getExponentialOpAccess().getPOWEnumLiteralDeclaration()); | ||
9480 | |||
9481 | |||
9482 | } | ||
6906 | 9483 | ||
6907 | current =iv_ruleMultiplicityDefinition; | ||
6908 | match(input,EOF,FOLLOW_2); | ||
6909 | 9484 | ||
6910 | } | 9485 | } |
6911 | 9486 | ||
9487 | |||
9488 | leaveRule(); | ||
9489 | |||
6912 | } | 9490 | } |
6913 | 9491 | ||
6914 | catch (RecognitionException re) { | 9492 | catch (RecognitionException re) { |
@@ -6919,102 +9497,436 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
6919 | } | 9497 | } |
6920 | return current; | 9498 | return current; |
6921 | } | 9499 | } |
6922 | // $ANTLR end "entryRuleMultiplicityDefinition" | 9500 | // $ANTLR end "ruleExponentialOp" |
6923 | 9501 | ||
6924 | 9502 | ||
6925 | // $ANTLR start "ruleMultiplicityDefinition" | 9503 | // $ANTLR start "ruleUnaryOp" |
6926 | // InternalSolverLanguage.g:2429:1: ruleMultiplicityDefinition returns [EObject current=null] : ( ( (lv_lower_0_0= RULE_INT ) ) otherlv_1= '..' ( ( (lv_upper_2_0= RULE_INT ) ) | ( (lv_unlimitedUpper_3_0= '*' ) ) ) ) ; | 9504 | // InternalSolverLanguageParser.g:3654:1: ruleUnaryOp returns [Enumerator current=null] : ( (enumLiteral_0= ExclamationMark ) | (enumLiteral_1= PlusSign ) | (enumLiteral_2= HyphenMinus ) | (enumLiteral_3= May ) | (enumLiteral_4= Must ) | (enumLiteral_5= Current ) ) ; |
6927 | public final EObject ruleMultiplicityDefinition() throws RecognitionException { | 9505 | public final Enumerator ruleUnaryOp() throws RecognitionException { |
6928 | EObject current = null; | 9506 | Enumerator current = null; |
6929 | 9507 | ||
6930 | Token lv_lower_0_0=null; | 9508 | Token enumLiteral_0=null; |
6931 | Token otherlv_1=null; | 9509 | Token enumLiteral_1=null; |
6932 | Token lv_upper_2_0=null; | 9510 | Token enumLiteral_2=null; |
6933 | Token lv_unlimitedUpper_3_0=null; | 9511 | Token enumLiteral_3=null; |
9512 | Token enumLiteral_4=null; | ||
9513 | Token enumLiteral_5=null; | ||
6934 | 9514 | ||
6935 | 9515 | ||
6936 | enterRule(); | 9516 | enterRule(); |
6937 | 9517 | ||
6938 | try { | 9518 | try { |
6939 | // InternalSolverLanguage.g:2435:2: ( ( ( (lv_lower_0_0= RULE_INT ) ) otherlv_1= '..' ( ( (lv_upper_2_0= RULE_INT ) ) | ( (lv_unlimitedUpper_3_0= '*' ) ) ) ) ) | 9519 | // InternalSolverLanguageParser.g:3660:2: ( ( (enumLiteral_0= ExclamationMark ) | (enumLiteral_1= PlusSign ) | (enumLiteral_2= HyphenMinus ) | (enumLiteral_3= May ) | (enumLiteral_4= Must ) | (enumLiteral_5= Current ) ) ) |
6940 | // InternalSolverLanguage.g:2436:2: ( ( (lv_lower_0_0= RULE_INT ) ) otherlv_1= '..' ( ( (lv_upper_2_0= RULE_INT ) ) | ( (lv_unlimitedUpper_3_0= '*' ) ) ) ) | 9520 | // InternalSolverLanguageParser.g:3661:2: ( (enumLiteral_0= ExclamationMark ) | (enumLiteral_1= PlusSign ) | (enumLiteral_2= HyphenMinus ) | (enumLiteral_3= May ) | (enumLiteral_4= Must ) | (enumLiteral_5= Current ) ) |
6941 | { | ||
6942 | // InternalSolverLanguage.g:2436:2: ( ( (lv_lower_0_0= RULE_INT ) ) otherlv_1= '..' ( ( (lv_upper_2_0= RULE_INT ) ) | ( (lv_unlimitedUpper_3_0= '*' ) ) ) ) | ||
6943 | // InternalSolverLanguage.g:2437:3: ( (lv_lower_0_0= RULE_INT ) ) otherlv_1= '..' ( ( (lv_upper_2_0= RULE_INT ) ) | ( (lv_unlimitedUpper_3_0= '*' ) ) ) | ||
6944 | { | 9521 | { |
6945 | // InternalSolverLanguage.g:2437:3: ( (lv_lower_0_0= RULE_INT ) ) | 9522 | // InternalSolverLanguageParser.g:3661:2: ( (enumLiteral_0= ExclamationMark ) | (enumLiteral_1= PlusSign ) | (enumLiteral_2= HyphenMinus ) | (enumLiteral_3= May ) | (enumLiteral_4= Must ) | (enumLiteral_5= Current ) ) |
6946 | // InternalSolverLanguage.g:2438:4: (lv_lower_0_0= RULE_INT ) | 9523 | int alt48=6; |
6947 | { | 9524 | switch ( input.LA(1) ) { |
6948 | // InternalSolverLanguage.g:2438:4: (lv_lower_0_0= RULE_INT ) | 9525 | case ExclamationMark: |
6949 | // InternalSolverLanguage.g:2439:5: lv_lower_0_0= RULE_INT | 9526 | { |
6950 | { | 9527 | alt48=1; |
6951 | lv_lower_0_0=(Token)match(input,RULE_INT,FOLLOW_35); | 9528 | } |
9529 | break; | ||
9530 | case PlusSign: | ||
9531 | { | ||
9532 | alt48=2; | ||
9533 | } | ||
9534 | break; | ||
9535 | case HyphenMinus: | ||
9536 | { | ||
9537 | alt48=3; | ||
9538 | } | ||
9539 | break; | ||
9540 | case May: | ||
9541 | { | ||
9542 | alt48=4; | ||
9543 | } | ||
9544 | break; | ||
9545 | case Must: | ||
9546 | { | ||
9547 | alt48=5; | ||
9548 | } | ||
9549 | break; | ||
9550 | case Current: | ||
9551 | { | ||
9552 | alt48=6; | ||
9553 | } | ||
9554 | break; | ||
9555 | default: | ||
9556 | NoViableAltException nvae = | ||
9557 | new NoViableAltException("", 48, 0, input); | ||
6952 | 9558 | ||
6953 | newLeafNode(lv_lower_0_0, grammarAccess.getMultiplicityDefinitionAccess().getLowerINTTerminalRuleCall_0_0()); | 9559 | throw nvae; |
6954 | 9560 | } | |
9561 | |||
9562 | switch (alt48) { | ||
9563 | case 1 : | ||
9564 | // InternalSolverLanguageParser.g:3662:3: (enumLiteral_0= ExclamationMark ) | ||
9565 | { | ||
9566 | // InternalSolverLanguageParser.g:3662:3: (enumLiteral_0= ExclamationMark ) | ||
9567 | // InternalSolverLanguageParser.g:3663:4: enumLiteral_0= ExclamationMark | ||
9568 | { | ||
9569 | enumLiteral_0=(Token)match(input,ExclamationMark,FOLLOW_2); | ||
9570 | |||
9571 | current = grammarAccess.getUnaryOpAccess().getNEGEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
9572 | newLeafNode(enumLiteral_0, grammarAccess.getUnaryOpAccess().getNEGEnumLiteralDeclaration_0()); | ||
9573 | |||
9574 | |||
9575 | } | ||
6955 | 9576 | ||
6956 | if (current==null) { | 9577 | |
6957 | current = createModelElement(grammarAccess.getMultiplicityDefinitionRule()); | 9578 | } |
6958 | } | 9579 | break; |
6959 | setWithLastConsumed( | 9580 | case 2 : |
6960 | current, | 9581 | // InternalSolverLanguageParser.g:3670:3: (enumLiteral_1= PlusSign ) |
6961 | "lower", | 9582 | { |
6962 | lv_lower_0_0, | 9583 | // InternalSolverLanguageParser.g:3670:3: (enumLiteral_1= PlusSign ) |
6963 | "org.eclipse.xtext.common.Terminals.INT"); | 9584 | // InternalSolverLanguageParser.g:3671:4: enumLiteral_1= PlusSign |
6964 | 9585 | { | |
9586 | enumLiteral_1=(Token)match(input,PlusSign,FOLLOW_2); | ||
9587 | |||
9588 | current = grammarAccess.getUnaryOpAccess().getPLUSEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
9589 | newLeafNode(enumLiteral_1, grammarAccess.getUnaryOpAccess().getPLUSEnumLiteralDeclaration_1()); | ||
9590 | |||
9591 | |||
9592 | } | ||
9593 | |||
9594 | |||
9595 | } | ||
9596 | break; | ||
9597 | case 3 : | ||
9598 | // InternalSolverLanguageParser.g:3678:3: (enumLiteral_2= HyphenMinus ) | ||
9599 | { | ||
9600 | // InternalSolverLanguageParser.g:3678:3: (enumLiteral_2= HyphenMinus ) | ||
9601 | // InternalSolverLanguageParser.g:3679:4: enumLiteral_2= HyphenMinus | ||
9602 | { | ||
9603 | enumLiteral_2=(Token)match(input,HyphenMinus,FOLLOW_2); | ||
9604 | |||
9605 | current = grammarAccess.getUnaryOpAccess().getMINUSEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); | ||
9606 | newLeafNode(enumLiteral_2, grammarAccess.getUnaryOpAccess().getMINUSEnumLiteralDeclaration_2()); | ||
9607 | |||
9608 | |||
9609 | } | ||
9610 | |||
9611 | |||
9612 | } | ||
9613 | break; | ||
9614 | case 4 : | ||
9615 | // InternalSolverLanguageParser.g:3686:3: (enumLiteral_3= May ) | ||
9616 | { | ||
9617 | // InternalSolverLanguageParser.g:3686:3: (enumLiteral_3= May ) | ||
9618 | // InternalSolverLanguageParser.g:3687:4: enumLiteral_3= May | ||
9619 | { | ||
9620 | enumLiteral_3=(Token)match(input,May,FOLLOW_2); | ||
9621 | |||
9622 | current = grammarAccess.getUnaryOpAccess().getMAYEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); | ||
9623 | newLeafNode(enumLiteral_3, grammarAccess.getUnaryOpAccess().getMAYEnumLiteralDeclaration_3()); | ||
9624 | |||
9625 | |||
9626 | } | ||
9627 | |||
9628 | |||
9629 | } | ||
9630 | break; | ||
9631 | case 5 : | ||
9632 | // InternalSolverLanguageParser.g:3694:3: (enumLiteral_4= Must ) | ||
9633 | { | ||
9634 | // InternalSolverLanguageParser.g:3694:3: (enumLiteral_4= Must ) | ||
9635 | // InternalSolverLanguageParser.g:3695:4: enumLiteral_4= Must | ||
9636 | { | ||
9637 | enumLiteral_4=(Token)match(input,Must,FOLLOW_2); | ||
9638 | |||
9639 | current = grammarAccess.getUnaryOpAccess().getMUSTEnumLiteralDeclaration_4().getEnumLiteral().getInstance(); | ||
9640 | newLeafNode(enumLiteral_4, grammarAccess.getUnaryOpAccess().getMUSTEnumLiteralDeclaration_4()); | ||
9641 | |||
9642 | |||
9643 | } | ||
9644 | |||
9645 | |||
9646 | } | ||
9647 | break; | ||
9648 | case 6 : | ||
9649 | // InternalSolverLanguageParser.g:3702:3: (enumLiteral_5= Current ) | ||
9650 | { | ||
9651 | // InternalSolverLanguageParser.g:3702:3: (enumLiteral_5= Current ) | ||
9652 | // InternalSolverLanguageParser.g:3703:4: enumLiteral_5= Current | ||
9653 | { | ||
9654 | enumLiteral_5=(Token)match(input,Current,FOLLOW_2); | ||
9655 | |||
9656 | current = grammarAccess.getUnaryOpAccess().getCURRENTEnumLiteralDeclaration_5().getEnumLiteral().getInstance(); | ||
9657 | newLeafNode(enumLiteral_5, grammarAccess.getUnaryOpAccess().getCURRENTEnumLiteralDeclaration_5()); | ||
9658 | |||
9659 | |||
9660 | } | ||
9661 | |||
9662 | |||
9663 | } | ||
9664 | break; | ||
6965 | 9665 | ||
6966 | } | 9666 | } |
6967 | 9667 | ||
6968 | 9668 | ||
6969 | } | 9669 | } |
6970 | 9670 | ||
6971 | otherlv_1=(Token)match(input,41,FOLLOW_36); | ||
6972 | 9671 | ||
6973 | newLeafNode(otherlv_1, grammarAccess.getMultiplicityDefinitionAccess().getFullStopFullStopKeyword_1()); | 9672 | leaveRule(); |
6974 | |||
6975 | // InternalSolverLanguage.g:2459:3: ( ( (lv_upper_2_0= RULE_INT ) ) | ( (lv_unlimitedUpper_3_0= '*' ) ) ) | ||
6976 | int alt47=2; | ||
6977 | int LA47_0 = input.LA(1); | ||
6978 | 9673 | ||
6979 | if ( (LA47_0==RULE_INT) ) { | 9674 | } |
6980 | alt47=1; | 9675 | |
6981 | } | 9676 | catch (RecognitionException re) { |
6982 | else if ( (LA47_0==31) ) { | 9677 | recover(input,re); |
6983 | alt47=2; | 9678 | appendSkippedTokens(); |
6984 | } | 9679 | } |
6985 | else { | 9680 | finally { |
9681 | } | ||
9682 | return current; | ||
9683 | } | ||
9684 | // $ANTLR end "ruleUnaryOp" | ||
9685 | |||
9686 | |||
9687 | // $ANTLR start "ruleAggregationOp" | ||
9688 | // InternalSolverLanguageParser.g:3713:1: ruleAggregationOp returns [Enumerator current=null] : ( (enumLiteral_0= Only ) | (enumLiteral_1= Sum ) | (enumLiteral_2= Prod ) | (enumLiteral_3= Avg ) | (enumLiteral_4= Min ) | (enumLiteral_5= Max ) ) ; | ||
9689 | public final Enumerator ruleAggregationOp() throws RecognitionException { | ||
9690 | Enumerator current = null; | ||
9691 | |||
9692 | Token enumLiteral_0=null; | ||
9693 | Token enumLiteral_1=null; | ||
9694 | Token enumLiteral_2=null; | ||
9695 | Token enumLiteral_3=null; | ||
9696 | Token enumLiteral_4=null; | ||
9697 | Token enumLiteral_5=null; | ||
9698 | |||
9699 | |||
9700 | enterRule(); | ||
9701 | |||
9702 | try { | ||
9703 | // InternalSolverLanguageParser.g:3719:2: ( ( (enumLiteral_0= Only ) | (enumLiteral_1= Sum ) | (enumLiteral_2= Prod ) | (enumLiteral_3= Avg ) | (enumLiteral_4= Min ) | (enumLiteral_5= Max ) ) ) | ||
9704 | // InternalSolverLanguageParser.g:3720:2: ( (enumLiteral_0= Only ) | (enumLiteral_1= Sum ) | (enumLiteral_2= Prod ) | (enumLiteral_3= Avg ) | (enumLiteral_4= Min ) | (enumLiteral_5= Max ) ) | ||
9705 | { | ||
9706 | // InternalSolverLanguageParser.g:3720:2: ( (enumLiteral_0= Only ) | (enumLiteral_1= Sum ) | (enumLiteral_2= Prod ) | (enumLiteral_3= Avg ) | (enumLiteral_4= Min ) | (enumLiteral_5= Max ) ) | ||
9707 | int alt49=6; | ||
9708 | switch ( input.LA(1) ) { | ||
9709 | case Only: | ||
9710 | { | ||
9711 | alt49=1; | ||
9712 | } | ||
9713 | break; | ||
9714 | case Sum: | ||
9715 | { | ||
9716 | alt49=2; | ||
9717 | } | ||
9718 | break; | ||
9719 | case Prod: | ||
9720 | { | ||
9721 | alt49=3; | ||
9722 | } | ||
9723 | break; | ||
9724 | case Avg: | ||
9725 | { | ||
9726 | alt49=4; | ||
9727 | } | ||
9728 | break; | ||
9729 | case Min: | ||
9730 | { | ||
9731 | alt49=5; | ||
9732 | } | ||
9733 | break; | ||
9734 | case Max: | ||
9735 | { | ||
9736 | alt49=6; | ||
9737 | } | ||
9738 | break; | ||
9739 | default: | ||
6986 | NoViableAltException nvae = | 9740 | NoViableAltException nvae = |
6987 | new NoViableAltException("", 47, 0, input); | 9741 | new NoViableAltException("", 49, 0, input); |
6988 | 9742 | ||
6989 | throw nvae; | 9743 | throw nvae; |
6990 | } | 9744 | } |
6991 | switch (alt47) { | 9745 | |
9746 | switch (alt49) { | ||
6992 | case 1 : | 9747 | case 1 : |
6993 | // InternalSolverLanguage.g:2460:4: ( (lv_upper_2_0= RULE_INT ) ) | 9748 | // InternalSolverLanguageParser.g:3721:3: (enumLiteral_0= Only ) |
6994 | { | 9749 | { |
6995 | // InternalSolverLanguage.g:2460:4: ( (lv_upper_2_0= RULE_INT ) ) | 9750 | // InternalSolverLanguageParser.g:3721:3: (enumLiteral_0= Only ) |
6996 | // InternalSolverLanguage.g:2461:5: (lv_upper_2_0= RULE_INT ) | 9751 | // InternalSolverLanguageParser.g:3722:4: enumLiteral_0= Only |
6997 | { | 9752 | { |
6998 | // InternalSolverLanguage.g:2461:5: (lv_upper_2_0= RULE_INT ) | 9753 | enumLiteral_0=(Token)match(input,Only,FOLLOW_2); |
6999 | // InternalSolverLanguage.g:2462:6: lv_upper_2_0= RULE_INT | 9754 | |
9755 | current = grammarAccess.getAggregationOpAccess().getONLYEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
9756 | newLeafNode(enumLiteral_0, grammarAccess.getAggregationOpAccess().getONLYEnumLiteralDeclaration_0()); | ||
9757 | |||
9758 | |||
9759 | } | ||
9760 | |||
9761 | |||
9762 | } | ||
9763 | break; | ||
9764 | case 2 : | ||
9765 | // InternalSolverLanguageParser.g:3729:3: (enumLiteral_1= Sum ) | ||
7000 | { | 9766 | { |
7001 | lv_upper_2_0=(Token)match(input,RULE_INT,FOLLOW_2); | 9767 | // InternalSolverLanguageParser.g:3729:3: (enumLiteral_1= Sum ) |
9768 | // InternalSolverLanguageParser.g:3730:4: enumLiteral_1= Sum | ||
9769 | { | ||
9770 | enumLiteral_1=(Token)match(input,Sum,FOLLOW_2); | ||
7002 | 9771 | ||
7003 | newLeafNode(lv_upper_2_0, grammarAccess.getMultiplicityDefinitionAccess().getUpperINTTerminalRuleCall_2_0_0()); | 9772 | current = grammarAccess.getAggregationOpAccess().getSUMEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); |
7004 | 9773 | newLeafNode(enumLiteral_1, grammarAccess.getAggregationOpAccess().getSUMEnumLiteralDeclaration_1()); | |
9774 | |||
9775 | |||
9776 | } | ||
7005 | 9777 | ||
7006 | if (current==null) { | ||
7007 | current = createModelElement(grammarAccess.getMultiplicityDefinitionRule()); | ||
7008 | } | ||
7009 | setWithLastConsumed( | ||
7010 | current, | ||
7011 | "upper", | ||
7012 | lv_upper_2_0, | ||
7013 | "org.eclipse.xtext.common.Terminals.INT"); | ||
7014 | |||
7015 | 9778 | ||
7016 | } | 9779 | } |
9780 | break; | ||
9781 | case 3 : | ||
9782 | // InternalSolverLanguageParser.g:3737:3: (enumLiteral_2= Prod ) | ||
9783 | { | ||
9784 | // InternalSolverLanguageParser.g:3737:3: (enumLiteral_2= Prod ) | ||
9785 | // InternalSolverLanguageParser.g:3738:4: enumLiteral_2= Prod | ||
9786 | { | ||
9787 | enumLiteral_2=(Token)match(input,Prod,FOLLOW_2); | ||
9788 | |||
9789 | current = grammarAccess.getAggregationOpAccess().getPRODEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); | ||
9790 | newLeafNode(enumLiteral_2, grammarAccess.getAggregationOpAccess().getPRODEnumLiteralDeclaration_2()); | ||
9791 | |||
9792 | |||
9793 | } | ||
9794 | |||
9795 | |||
9796 | } | ||
9797 | break; | ||
9798 | case 4 : | ||
9799 | // InternalSolverLanguageParser.g:3745:3: (enumLiteral_3= Avg ) | ||
9800 | { | ||
9801 | // InternalSolverLanguageParser.g:3745:3: (enumLiteral_3= Avg ) | ||
9802 | // InternalSolverLanguageParser.g:3746:4: enumLiteral_3= Avg | ||
9803 | { | ||
9804 | enumLiteral_3=(Token)match(input,Avg,FOLLOW_2); | ||
9805 | |||
9806 | current = grammarAccess.getAggregationOpAccess().getAVGEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); | ||
9807 | newLeafNode(enumLiteral_3, grammarAccess.getAggregationOpAccess().getAVGEnumLiteralDeclaration_3()); | ||
9808 | |||
9809 | |||
9810 | } | ||
9811 | |||
9812 | |||
9813 | } | ||
9814 | break; | ||
9815 | case 5 : | ||
9816 | // InternalSolverLanguageParser.g:3753:3: (enumLiteral_4= Min ) | ||
9817 | { | ||
9818 | // InternalSolverLanguageParser.g:3753:3: (enumLiteral_4= Min ) | ||
9819 | // InternalSolverLanguageParser.g:3754:4: enumLiteral_4= Min | ||
9820 | { | ||
9821 | enumLiteral_4=(Token)match(input,Min,FOLLOW_2); | ||
9822 | |||
9823 | current = grammarAccess.getAggregationOpAccess().getMINEnumLiteralDeclaration_4().getEnumLiteral().getInstance(); | ||
9824 | newLeafNode(enumLiteral_4, grammarAccess.getAggregationOpAccess().getMINEnumLiteralDeclaration_4()); | ||
9825 | |||
9826 | |||
9827 | } | ||
9828 | |||
9829 | |||
9830 | } | ||
9831 | break; | ||
9832 | case 6 : | ||
9833 | // InternalSolverLanguageParser.g:3761:3: (enumLiteral_5= Max ) | ||
9834 | { | ||
9835 | // InternalSolverLanguageParser.g:3761:3: (enumLiteral_5= Max ) | ||
9836 | // InternalSolverLanguageParser.g:3762:4: enumLiteral_5= Max | ||
9837 | { | ||
9838 | enumLiteral_5=(Token)match(input,Max,FOLLOW_2); | ||
9839 | |||
9840 | current = grammarAccess.getAggregationOpAccess().getMAXEnumLiteralDeclaration_5().getEnumLiteral().getInstance(); | ||
9841 | newLeafNode(enumLiteral_5, grammarAccess.getAggregationOpAccess().getMAXEnumLiteralDeclaration_5()); | ||
9842 | |||
9843 | |||
9844 | } | ||
9845 | |||
9846 | |||
9847 | } | ||
9848 | break; | ||
9849 | |||
9850 | } | ||
9851 | |||
9852 | |||
9853 | } | ||
9854 | |||
9855 | |||
9856 | leaveRule(); | ||
9857 | |||
9858 | } | ||
9859 | |||
9860 | catch (RecognitionException re) { | ||
9861 | recover(input,re); | ||
9862 | appendSkippedTokens(); | ||
9863 | } | ||
9864 | finally { | ||
9865 | } | ||
9866 | return current; | ||
9867 | } | ||
9868 | // $ANTLR end "ruleAggregationOp" | ||
9869 | |||
9870 | |||
9871 | // $ANTLR start "ruleLogicValue" | ||
9872 | // InternalSolverLanguageParser.g:3772:1: ruleLogicValue returns [Enumerator current=null] : ( (enumLiteral_0= True ) | (enumLiteral_1= False ) | (enumLiteral_2= Unknown ) | (enumLiteral_3= Error ) ) ; | ||
9873 | public final Enumerator ruleLogicValue() throws RecognitionException { | ||
9874 | Enumerator current = null; | ||
9875 | |||
9876 | Token enumLiteral_0=null; | ||
9877 | Token enumLiteral_1=null; | ||
9878 | Token enumLiteral_2=null; | ||
9879 | Token enumLiteral_3=null; | ||
9880 | |||
9881 | |||
9882 | enterRule(); | ||
9883 | |||
9884 | try { | ||
9885 | // InternalSolverLanguageParser.g:3778:2: ( ( (enumLiteral_0= True ) | (enumLiteral_1= False ) | (enumLiteral_2= Unknown ) | (enumLiteral_3= Error ) ) ) | ||
9886 | // InternalSolverLanguageParser.g:3779:2: ( (enumLiteral_0= True ) | (enumLiteral_1= False ) | (enumLiteral_2= Unknown ) | (enumLiteral_3= Error ) ) | ||
9887 | { | ||
9888 | // InternalSolverLanguageParser.g:3779:2: ( (enumLiteral_0= True ) | (enumLiteral_1= False ) | (enumLiteral_2= Unknown ) | (enumLiteral_3= Error ) ) | ||
9889 | int alt50=4; | ||
9890 | switch ( input.LA(1) ) { | ||
9891 | case True: | ||
9892 | { | ||
9893 | alt50=1; | ||
9894 | } | ||
9895 | break; | ||
9896 | case False: | ||
9897 | { | ||
9898 | alt50=2; | ||
9899 | } | ||
9900 | break; | ||
9901 | case Unknown: | ||
9902 | { | ||
9903 | alt50=3; | ||
9904 | } | ||
9905 | break; | ||
9906 | case Error: | ||
9907 | { | ||
9908 | alt50=4; | ||
9909 | } | ||
9910 | break; | ||
9911 | default: | ||
9912 | NoViableAltException nvae = | ||
9913 | new NoViableAltException("", 50, 0, input); | ||
7017 | 9914 | ||
9915 | throw nvae; | ||
9916 | } | ||
9917 | |||
9918 | switch (alt50) { | ||
9919 | case 1 : | ||
9920 | // InternalSolverLanguageParser.g:3780:3: (enumLiteral_0= True ) | ||
9921 | { | ||
9922 | // InternalSolverLanguageParser.g:3780:3: (enumLiteral_0= True ) | ||
9923 | // InternalSolverLanguageParser.g:3781:4: enumLiteral_0= True | ||
9924 | { | ||
9925 | enumLiteral_0=(Token)match(input,True,FOLLOW_2); | ||
9926 | |||
9927 | current = grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
9928 | newLeafNode(enumLiteral_0, grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); | ||
9929 | |||
7018 | 9930 | ||
7019 | } | 9931 | } |
7020 | 9932 | ||
@@ -7022,27 +9934,50 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
7022 | } | 9934 | } |
7023 | break; | 9935 | break; |
7024 | case 2 : | 9936 | case 2 : |
7025 | // InternalSolverLanguage.g:2479:4: ( (lv_unlimitedUpper_3_0= '*' ) ) | 9937 | // InternalSolverLanguageParser.g:3788:3: (enumLiteral_1= False ) |
9938 | { | ||
9939 | // InternalSolverLanguageParser.g:3788:3: (enumLiteral_1= False ) | ||
9940 | // InternalSolverLanguageParser.g:3789:4: enumLiteral_1= False | ||
7026 | { | 9941 | { |
7027 | // InternalSolverLanguage.g:2479:4: ( (lv_unlimitedUpper_3_0= '*' ) ) | 9942 | enumLiteral_1=(Token)match(input,False,FOLLOW_2); |
7028 | // InternalSolverLanguage.g:2480:5: (lv_unlimitedUpper_3_0= '*' ) | 9943 | |
9944 | current = grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
9945 | newLeafNode(enumLiteral_1, grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); | ||
9946 | |||
9947 | |||
9948 | } | ||
9949 | |||
9950 | |||
9951 | } | ||
9952 | break; | ||
9953 | case 3 : | ||
9954 | // InternalSolverLanguageParser.g:3796:3: (enumLiteral_2= Unknown ) | ||
7029 | { | 9955 | { |
7030 | // InternalSolverLanguage.g:2480:5: (lv_unlimitedUpper_3_0= '*' ) | 9956 | // InternalSolverLanguageParser.g:3796:3: (enumLiteral_2= Unknown ) |
7031 | // InternalSolverLanguage.g:2481:6: lv_unlimitedUpper_3_0= '*' | 9957 | // InternalSolverLanguageParser.g:3797:4: enumLiteral_2= Unknown |
7032 | { | 9958 | { |
7033 | lv_unlimitedUpper_3_0=(Token)match(input,31,FOLLOW_2); | 9959 | enumLiteral_2=(Token)match(input,Unknown,FOLLOW_2); |
7034 | 9960 | ||
7035 | newLeafNode(lv_unlimitedUpper_3_0, grammarAccess.getMultiplicityDefinitionAccess().getUnlimitedUpperAsteriskKeyword_2_1_0()); | 9961 | current = grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); |
7036 | 9962 | newLeafNode(enumLiteral_2, grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); | |
9963 | |||
9964 | |||
9965 | } | ||
7037 | 9966 | ||
7038 | if (current==null) { | ||
7039 | current = createModelElement(grammarAccess.getMultiplicityDefinitionRule()); | ||
7040 | } | ||
7041 | setWithLastConsumed(current, "unlimitedUpper", true, "*"); | ||
7042 | |||
7043 | 9967 | ||
7044 | } | 9968 | } |
9969 | break; | ||
9970 | case 4 : | ||
9971 | // InternalSolverLanguageParser.g:3804:3: (enumLiteral_3= Error ) | ||
9972 | { | ||
9973 | // InternalSolverLanguageParser.g:3804:3: (enumLiteral_3= Error ) | ||
9974 | // InternalSolverLanguageParser.g:3805:4: enumLiteral_3= Error | ||
9975 | { | ||
9976 | enumLiteral_3=(Token)match(input,Error,FOLLOW_2); | ||
7045 | 9977 | ||
9978 | current = grammarAccess.getLogicValueAccess().getERROREnumLiteralDeclaration_3().getEnumLiteral().getInstance(); | ||
9979 | newLeafNode(enumLiteral_3, grammarAccess.getLogicValueAccess().getERROREnumLiteralDeclaration_3()); | ||
9980 | |||
7046 | 9981 | ||
7047 | } | 9982 | } |
7048 | 9983 | ||
@@ -7056,6 +9991,91 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
7056 | } | 9991 | } |
7057 | 9992 | ||
7058 | 9993 | ||
9994 | leaveRule(); | ||
9995 | |||
9996 | } | ||
9997 | |||
9998 | catch (RecognitionException re) { | ||
9999 | recover(input,re); | ||
10000 | appendSkippedTokens(); | ||
10001 | } | ||
10002 | finally { | ||
10003 | } | ||
10004 | return current; | ||
10005 | } | ||
10006 | // $ANTLR end "ruleLogicValue" | ||
10007 | |||
10008 | |||
10009 | // $ANTLR start "ruleObjectiveKind" | ||
10010 | // InternalSolverLanguageParser.g:3815:1: ruleObjectiveKind returns [Enumerator current=null] : ( (enumLiteral_0= Minimize ) | (enumLiteral_1= Maximize ) ) ; | ||
10011 | public final Enumerator ruleObjectiveKind() throws RecognitionException { | ||
10012 | Enumerator current = null; | ||
10013 | |||
10014 | Token enumLiteral_0=null; | ||
10015 | Token enumLiteral_1=null; | ||
10016 | |||
10017 | |||
10018 | enterRule(); | ||
10019 | |||
10020 | try { | ||
10021 | // InternalSolverLanguageParser.g:3821:2: ( ( (enumLiteral_0= Minimize ) | (enumLiteral_1= Maximize ) ) ) | ||
10022 | // InternalSolverLanguageParser.g:3822:2: ( (enumLiteral_0= Minimize ) | (enumLiteral_1= Maximize ) ) | ||
10023 | { | ||
10024 | // InternalSolverLanguageParser.g:3822:2: ( (enumLiteral_0= Minimize ) | (enumLiteral_1= Maximize ) ) | ||
10025 | int alt51=2; | ||
10026 | int LA51_0 = input.LA(1); | ||
10027 | |||
10028 | if ( (LA51_0==Minimize) ) { | ||
10029 | alt51=1; | ||
10030 | } | ||
10031 | else if ( (LA51_0==Maximize) ) { | ||
10032 | alt51=2; | ||
10033 | } | ||
10034 | else { | ||
10035 | NoViableAltException nvae = | ||
10036 | new NoViableAltException("", 51, 0, input); | ||
10037 | |||
10038 | throw nvae; | ||
10039 | } | ||
10040 | switch (alt51) { | ||
10041 | case 1 : | ||
10042 | // InternalSolverLanguageParser.g:3823:3: (enumLiteral_0= Minimize ) | ||
10043 | { | ||
10044 | // InternalSolverLanguageParser.g:3823:3: (enumLiteral_0= Minimize ) | ||
10045 | // InternalSolverLanguageParser.g:3824:4: enumLiteral_0= Minimize | ||
10046 | { | ||
10047 | enumLiteral_0=(Token)match(input,Minimize,FOLLOW_2); | ||
10048 | |||
10049 | current = grammarAccess.getObjectiveKindAccess().getMINIMIZEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
10050 | newLeafNode(enumLiteral_0, grammarAccess.getObjectiveKindAccess().getMINIMIZEEnumLiteralDeclaration_0()); | ||
10051 | |||
10052 | |||
10053 | } | ||
10054 | |||
10055 | |||
10056 | } | ||
10057 | break; | ||
10058 | case 2 : | ||
10059 | // InternalSolverLanguageParser.g:3831:3: (enumLiteral_1= Maximize ) | ||
10060 | { | ||
10061 | // InternalSolverLanguageParser.g:3831:3: (enumLiteral_1= Maximize ) | ||
10062 | // InternalSolverLanguageParser.g:3832:4: enumLiteral_1= Maximize | ||
10063 | { | ||
10064 | enumLiteral_1=(Token)match(input,Maximize,FOLLOW_2); | ||
10065 | |||
10066 | current = grammarAccess.getObjectiveKindAccess().getMAXIMIZEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
10067 | newLeafNode(enumLiteral_1, grammarAccess.getObjectiveKindAccess().getMAXIMIZEEnumLiteralDeclaration_1()); | ||
10068 | |||
10069 | |||
10070 | } | ||
10071 | |||
10072 | |||
10073 | } | ||
10074 | break; | ||
10075 | |||
10076 | } | ||
10077 | |||
10078 | |||
7059 | } | 10079 | } |
7060 | 10080 | ||
7061 | 10081 | ||
@@ -7071,27 +10091,34 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
7071 | } | 10091 | } |
7072 | return current; | 10092 | return current; |
7073 | } | 10093 | } |
7074 | // $ANTLR end "ruleMultiplicityDefinition" | 10094 | // $ANTLR end "ruleObjectiveKind" |
7075 | 10095 | ||
7076 | // Delegated rules | 10096 | // Delegated rules |
7077 | 10097 | ||
7078 | 10098 | ||
7079 | protected DFA2 dfa2 = new DFA2(this); | 10099 | protected DFA2 dfa2 = new DFA2(this); |
7080 | static final String dfa_1s = "\11\uffff"; | 10100 | protected DFA20 dfa20 = new DFA20(this); |
7081 | static final String dfa_2s = "\1\5\1\21\2\uffff\1\4\1\22\1\24\1\4\1\22"; | 10101 | protected DFA24 dfa24 = new DFA24(this); |
7082 | static final String dfa_3s = "\1\50\1\34\2\uffff\1\37\1\24\1\34\1\37\1\24"; | 10102 | protected DFA35 dfa35 = new DFA35(this); |
7083 | static final String dfa_4s = "\2\uffff\1\1\1\2\5\uffff"; | 10103 | static final String dfa_1s = "\15\uffff"; |
7084 | static final String dfa_5s = "\11\uffff}>"; | 10104 | static final String dfa_2s = "\1\5\1\uffff\1\5\2\uffff\1\36\7\uffff"; |
10105 | static final String dfa_3s = "\1\123\1\uffff\1\122\2\uffff\1\122\7\uffff"; | ||
10106 | static final String dfa_4s = "\1\uffff\1\1\1\uffff\1\2\1\4\1\uffff\1\6\1\10\1\11\1\12\1\3\1\5\1\7"; | ||
10107 | static final String dfa_5s = "\15\uffff}>"; | ||
7085 | static final String[] dfa_6s = { | 10108 | static final String[] dfa_6s = { |
7086 | "\1\1\12\uffff\1\3\4\uffff\6\2\5\uffff\3\2\3\uffff\3\2", | 10109 | "\1\3\1\7\1\uffff\2\11\3\uffff\1\1\1\4\1\uffff\1\1\1\uffff\1\5\1\7\2\1\1\2\1\1\1\10\2\uffff\3\1\1\6\1\uffff\1\1\5\uffff\2\1\1\6\4\1\11\uffff\1\1\1\uffff\2\1\2\uffff\1\1\1\uffff\1\1\7\uffff\1\1\5\uffff\2\1\4\uffff\2\1", |
7087 | "\1\4\2\uffff\1\2\7\uffff\1\3", | 10110 | "", |
10111 | "\1\3\47\uffff\2\1\1\uffff\4\1\3\uffff\1\1\1\uffff\1\12\1\uffff\4\1\1\uffff\6\1\2\uffff\1\1\4\uffff\1\3\3\uffff\1\1\1\3", | ||
10112 | "", | ||
10113 | "", | ||
10114 | "\1\14\11\uffff\1\14\44\uffff\1\13\4\uffff\1\13", | ||
7088 | "", | 10115 | "", |
7089 | "", | 10116 | "", |
7090 | "\1\2\1\5\1\2\4\uffff\1\2\1\uffff\2\2\4\uffff\1\6\1\2\6\uffff\1\2\3\uffff\1\2", | 10117 | "", |
7091 | "\1\7\1\6\1\3", | 10118 | "", |
7092 | "\1\2\7\uffff\1\3", | 10119 | "", |
7093 | "\1\2\1\10\1\2\4\uffff\1\2\1\uffff\2\2\5\uffff\1\2\6\uffff\1\2\3\uffff\1\2", | 10120 | "", |
7094 | "\1\7\1\6\1\3" | 10121 | "" |
7095 | }; | 10122 | }; |
7096 | 10123 | ||
7097 | static final short[] dfa_1 = DFA.unpackEncodedString(dfa_1s); | 10124 | static final short[] dfa_1 = DFA.unpackEncodedString(dfa_1s); |
@@ -7115,46 +10142,193 @@ public class InternalSolverLanguageParser extends AbstractInternalAntlrParser { | |||
7115 | this.transition = dfa_6; | 10142 | this.transition = dfa_6; |
7116 | } | 10143 | } |
7117 | public String getDescription() { | 10144 | public String getDescription() { |
7118 | return "114:2: (this_Interpretation_0= ruleInterpretation | this_Predicate_1= rulePredicate )"; | 10145 | return "109:3: (this_AssertionOrDefinition_0= ruleAssertionOrDefinition | this_PredicateDefinition_1= rulePredicateDefinition | this_UnnamedErrorPrediateDefinition_2= ruleUnnamedErrorPrediateDefinition | this_DefaultDefinition_3= ruleDefaultDefinition | this_ExternPredicateDefinition_4= ruleExternPredicateDefinition | this_MetricDefinition_5= ruleMetricDefinition | this_ExternMetricDefinition_6= ruleExternMetricDefinition | this_ClassDefinition_7= ruleClassDefinition | this_ScopeDefinition_8= ruleScopeDefinition | this_ObjectiveDefinition_9= ruleObjectiveDefinition )"; |
10146 | } | ||
10147 | } | ||
10148 | static final String dfa_7s = "\12\uffff"; | ||
10149 | static final String dfa_8s = "\1\uffff\2\10\6\uffff\1\10"; | ||
10150 | static final String dfa_9s = "\1\20\2\32\3\uffff\1\122\2\uffff\1\32"; | ||
10151 | static final String dfa_10s = "\1\123\2\121\3\uffff\1\122\2\uffff\1\121"; | ||
10152 | static final String dfa_11s = "\3\uffff\1\3\1\4\1\5\1\uffff\1\2\1\1\1\uffff"; | ||
10153 | static final String dfa_12s = "\12\uffff}>"; | ||
10154 | static final String[] dfa_13s = { | ||
10155 | "\1\4\4\uffff\3\4\10\uffff\1\4\6\uffff\1\4\21\uffff\1\5\14\uffff\1\3\5\uffff\1\4\1\2\4\uffff\1\1\1\4", | ||
10156 | "\1\10\4\uffff\1\10\15\uffff\7\10\3\uffff\1\10\1\uffff\1\7\5\10\1\6\6\10\1\uffff\2\10\1\uffff\2\10\3\uffff\2\7\1\10", | ||
10157 | "\1\10\4\uffff\1\10\15\uffff\7\10\3\uffff\1\10\1\uffff\1\7\5\10\1\uffff\6\10\1\uffff\2\10\1\uffff\2\10\3\uffff\2\7\1\10", | ||
10158 | "", | ||
10159 | "", | ||
10160 | "", | ||
10161 | "\1\11", | ||
10162 | "", | ||
10163 | "", | ||
10164 | "\1\10\4\uffff\1\10\15\uffff\7\10\3\uffff\1\10\1\uffff\1\7\5\10\1\6\6\10\1\uffff\2\10\1\uffff\2\10\3\uffff\2\7\1\10" | ||
10165 | }; | ||
10166 | |||
10167 | static final short[] dfa_7 = DFA.unpackEncodedString(dfa_7s); | ||
10168 | static final short[] dfa_8 = DFA.unpackEncodedString(dfa_8s); | ||
10169 | static final char[] dfa_9 = DFA.unpackEncodedStringToUnsignedChars(dfa_9s); | ||
10170 | static final char[] dfa_10 = DFA.unpackEncodedStringToUnsignedChars(dfa_10s); | ||
10171 | static final short[] dfa_11 = DFA.unpackEncodedString(dfa_11s); | ||
10172 | static final short[] dfa_12 = DFA.unpackEncodedString(dfa_12s); | ||
10173 | static final short[][] dfa_13 = unpackEncodedStringArray(dfa_13s); | ||
10174 | |||
10175 | class DFA20 extends DFA { | ||
10176 | |||
10177 | public DFA20(BaseRecognizer recognizer) { | ||
10178 | this.recognizer = recognizer; | ||
10179 | this.decisionNumber = 20; | ||
10180 | this.eot = dfa_7; | ||
10181 | this.eof = dfa_8; | ||
10182 | this.min = dfa_9; | ||
10183 | this.max = dfa_10; | ||
10184 | this.accept = dfa_11; | ||
10185 | this.special = dfa_12; | ||
10186 | this.transition = dfa_13; | ||
10187 | } | ||
10188 | public String getDescription() { | ||
10189 | return "1716:2: (this_Reference_0= ruleReference | this_Call_1= ruleCall | this_Interval_2= ruleInterval | this_Literal_3= ruleLiteral | (otherlv_4= LeftParenthesis this_Expression_5= ruleExpression otherlv_6= RightParenthesis ) )"; | ||
10190 | } | ||
10191 | } | ||
10192 | static final String dfa_14s = "\1\uffff\2\3\3\uffff\1\11\1\uffff\1\3\1\uffff"; | ||
10193 | static final String dfa_15s = "\1\15\2\55\2\uffff\1\122\1\15\1\uffff\1\55\1\uffff"; | ||
10194 | static final String dfa_16s = "\1\123\2\122\2\uffff\1\122\1\123\1\uffff\1\122\1\uffff"; | ||
10195 | static final String dfa_17s = "\3\uffff\1\1\1\2\2\uffff\1\3\1\uffff\1\4"; | ||
10196 | static final String[] dfa_18s = { | ||
10197 | "\1\3\2\uffff\1\3\3\uffff\4\3\3\uffff\3\3\2\uffff\1\3\5\uffff\2\3\1\uffff\4\3\13\uffff\2\3\1\uffff\1\4\1\3\1\uffff\1\3\7\uffff\1\3\5\uffff\1\3\1\2\4\uffff\1\1\1\3", | ||
10198 | "\1\3\3\uffff\3\3\3\uffff\1\3\1\uffff\2\3\1\6\3\3\1\5\1\3\2\uffff\1\3\1\uffff\1\3\2\uffff\1\3\4\uffff\1\7\1\uffff\2\3\1\uffff\1\7", | ||
10199 | "\1\3\3\uffff\3\3\3\uffff\1\3\1\uffff\2\3\1\6\3\3\1\uffff\1\3\2\uffff\1\3\1\uffff\1\3\2\uffff\1\3\4\uffff\1\7\1\uffff\2\3\1\uffff\1\7", | ||
10200 | "", | ||
10201 | "", | ||
10202 | "\1\10", | ||
10203 | "\1\3\2\uffff\1\3\3\uffff\4\3\3\uffff\3\3\2\uffff\1\3\5\uffff\2\3\1\uffff\4\3\13\uffff\2\3\1\11\1\uffff\1\3\1\11\1\3\7\uffff\1\3\5\uffff\2\3\4\uffff\2\3", | ||
10204 | "", | ||
10205 | "\1\3\3\uffff\3\3\3\uffff\1\3\1\uffff\2\3\1\6\3\3\1\5\1\3\2\uffff\1\3\1\uffff\1\3\2\uffff\1\3\4\uffff\1\7\1\uffff\2\3\1\uffff\1\7", | ||
10206 | "" | ||
10207 | }; | ||
10208 | static final short[] dfa_14 = DFA.unpackEncodedString(dfa_14s); | ||
10209 | static final char[] dfa_15 = DFA.unpackEncodedStringToUnsignedChars(dfa_15s); | ||
10210 | static final char[] dfa_16 = DFA.unpackEncodedStringToUnsignedChars(dfa_16s); | ||
10211 | static final short[] dfa_17 = DFA.unpackEncodedString(dfa_17s); | ||
10212 | static final short[][] dfa_18 = unpackEncodedStringArray(dfa_18s); | ||
10213 | |||
10214 | class DFA24 extends DFA { | ||
10215 | |||
10216 | public DFA24(BaseRecognizer recognizer) { | ||
10217 | this.recognizer = recognizer; | ||
10218 | this.decisionNumber = 24; | ||
10219 | this.eot = dfa_7; | ||
10220 | this.eof = dfa_14; | ||
10221 | this.min = dfa_15; | ||
10222 | this.max = dfa_16; | ||
10223 | this.accept = dfa_17; | ||
10224 | this.special = dfa_12; | ||
10225 | this.transition = dfa_18; | ||
10226 | } | ||
10227 | public String getDescription() { | ||
10228 | return "1965:2: (this_ExpressionArgument_0= ruleExpressionArgument | this_StarArgument_1= ruleStarArgument | this_TypedArgument_2= ruleTypedArgument | this_TypedStarArgument_3= ruleTypedStarArgument )"; | ||
10229 | } | ||
10230 | } | ||
10231 | static final String dfa_19s = "\17\uffff"; | ||
10232 | static final String dfa_20s = "\12\uffff\2\10\2\uffff\1\10"; | ||
10233 | static final String dfa_21s = "\1\30\1\115\3\61\1\115\1\uffff\1\122\2\uffff\3\61\1\122\1\61"; | ||
10234 | static final String dfa_22s = "\1\30\1\123\1\63\1\77\1\63\1\122\1\uffff\1\122\2\uffff\2\121\1\77\1\122\1\121"; | ||
10235 | static final String dfa_23s = "\6\uffff\1\2\1\uffff\1\3\1\1\5\uffff"; | ||
10236 | static final String dfa_24s = "\17\uffff}>"; | ||
10237 | static final String[] dfa_25s = { | ||
10238 | "\1\1", | ||
10239 | "\1\4\4\uffff\1\3\1\2", | ||
10240 | "\1\5\1\uffff\1\6", | ||
10241 | "\1\6\1\11\1\10\13\uffff\1\7", | ||
10242 | "\1\6\1\11\1\10", | ||
10243 | "\1\13\4\uffff\1\12", | ||
10244 | "", | ||
10245 | "\1\14", | ||
10246 | "", | ||
10247 | "", | ||
10248 | "\1\6\15\uffff\1\15\21\uffff\1\10", | ||
10249 | "\1\6\37\uffff\1\10", | ||
10250 | "\1\6\1\11\1\10\13\uffff\1\7", | ||
10251 | "\1\16", | ||
10252 | "\1\6\15\uffff\1\15\21\uffff\1\10" | ||
10253 | }; | ||
10254 | |||
10255 | static final short[] dfa_19 = DFA.unpackEncodedString(dfa_19s); | ||
10256 | static final short[] dfa_20 = DFA.unpackEncodedString(dfa_20s); | ||
10257 | static final char[] dfa_21 = DFA.unpackEncodedStringToUnsignedChars(dfa_21s); | ||
10258 | static final char[] dfa_22 = DFA.unpackEncodedStringToUnsignedChars(dfa_22s); | ||
10259 | static final short[] dfa_23 = DFA.unpackEncodedString(dfa_23s); | ||
10260 | static final short[] dfa_24 = DFA.unpackEncodedString(dfa_24s); | ||
10261 | static final short[][] dfa_25 = unpackEncodedStringArray(dfa_25s); | ||
10262 | |||
10263 | class DFA35 extends DFA { | ||
10264 | |||
10265 | public DFA35(BaseRecognizer recognizer) { | ||
10266 | this.recognizer = recognizer; | ||
10267 | this.decisionNumber = 35; | ||
10268 | this.eot = dfa_19; | ||
10269 | this.eof = dfa_20; | ||
10270 | this.min = dfa_21; | ||
10271 | this.max = dfa_22; | ||
10272 | this.accept = dfa_23; | ||
10273 | this.special = dfa_24; | ||
10274 | this.transition = dfa_25; | ||
10275 | } | ||
10276 | public String getDescription() { | ||
10277 | return "2940:2: (this_ExactScopeDefinition_0= ruleExactScopeDefinition | this_BoundedScopeDefinition_1= ruleBoundedScopeDefinition | this_LowerBoundedScopeDefinition_2= ruleLowerBoundedScopeDefinition )"; | ||
7119 | } | 10278 | } |
7120 | } | 10279 | } |
7121 | 10280 | ||
7122 | 10281 | ||
7123 | public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); | 10282 | public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); |
7124 | public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); | 10283 | public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); |
7125 | public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x000001C707E10022L}); | 10284 | public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x53401FC179FD6362L,0x00000000000C3040L}); |
7126 | public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000000010L}); | 10285 | public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000000000L,0x0000000000020000L}); |
7127 | public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000001000L}); | 10286 | public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0001000000000002L,0x0000000000000012L}); |
7128 | public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000120000L}); | 10287 | public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x53401EC138F12000L,0x00000000000C3040L}); |
7129 | public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000088186870L}); | 10288 | public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000400000L,0x0000000000042000L}); |
7130 | public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x00000000000C0000L}); | 10289 | public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000000000L,0x0000000000042000L}); |
7131 | public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000088106870L}); | 10290 | public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000000020L,0x0000000000042000L}); |
7132 | public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000100000L}); | 10291 | public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0001000000000000L}); |
7133 | public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x000000000001E000L}); | 10292 | public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0200000000000000L}); |
7134 | public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000000020L}); | 10293 | public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000002L}); |
7135 | public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000008000000L}); | 10294 | public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L}); |
7136 | public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000010020000L}); | 10295 | public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000010040000000L}); |
7137 | public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000000080020L}); | 10296 | public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000080000000L}); |
7138 | public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000010000000L}); | 10297 | public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000004000000L}); |
7139 | public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x00000000E0007820L}); | 10298 | public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000400000000002L,0x0000000000000004L}); |
7140 | public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000020001000L}); | 10299 | public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000004L}); |
7141 | public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x00000000E0003820L}); | 10300 | public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000400000000000L}); |
7142 | public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000000100002L}); | 10301 | public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x2000000000000002L}); |
7143 | public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000007E00020L}); | 10302 | public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x008E200000000002L,0x0000000000000028L}); |
7144 | public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x00000000C0000822L}); | 10303 | public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x5000000000000002L}); |
7145 | public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000000000020002L}); | 10304 | public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0800000000000002L,0x0000000000000001L}); |
7146 | public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x00000000080C6870L}); | 10305 | public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000100L}); |
7147 | public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x0000000008006870L}); | 10306 | public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x02001AC130F10000L,0x00000000000C3040L}); |
7148 | public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000000000020000L}); | 10307 | public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L}); |
7149 | public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x0000000400000000L}); | 10308 | public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000800L}); |
7150 | public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0000001800000000L}); | 10309 | public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L}); |
7151 | public static final BitSet FOLLOW_29 = new BitSet(new long[]{0x0000001000000020L}); | 10310 | public static final BitSet FOLLOW_29 = new BitSet(new long[]{0x0400000000000000L}); |
7152 | public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x000000A000000020L}); | 10311 | public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x0200000000000000L,0x0000000000018000L}); |
7153 | public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000001000000000L}); | 10312 | public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x5F401EC138F12000L,0x00000000000C3040L}); |
7154 | public static final BitSet FOLLOW_32 = new BitSet(new long[]{0x0000002008000000L}); | 10313 | public static final BitSet FOLLOW_32 = new BitSet(new long[]{0x2400000000000000L}); |
7155 | public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x0000000007E00030L}); | 10314 | public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x5B401EC138F12000L,0x00000000000C3040L}); |
7156 | public static final BitSet FOLLOW_34 = new BitSet(new long[]{0x0000010000000000L}); | 10315 | public static final BitSet FOLLOW_34 = new BitSet(new long[]{0x0800000000000000L}); |
7157 | public static final BitSet FOLLOW_35 = new BitSet(new long[]{0x0000020000000000L}); | 10316 | public static final BitSet FOLLOW_35 = new BitSet(new long[]{0x0000800000000000L}); |
7158 | public static final BitSet FOLLOW_36 = new BitSet(new long[]{0x0000000080000010L}); | 10317 | public static final BitSet FOLLOW_36 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L}); |
10318 | public static final BitSet FOLLOW_37 = new BitSet(new long[]{0x0000000000080000L}); | ||
10319 | public static final BitSet FOLLOW_38 = new BitSet(new long[]{0x0000000000000000L,0x0000000000040000L}); | ||
10320 | public static final BitSet FOLLOW_39 = new BitSet(new long[]{0x0000000000008000L,0x0000000000000200L}); | ||
10321 | public static final BitSet FOLLOW_40 = new BitSet(new long[]{0x2000000000000000L,0x0000000000000200L}); | ||
10322 | public static final BitSet FOLLOW_41 = new BitSet(new long[]{0x0000000000000080L,0x0000000000042800L}); | ||
10323 | public static final BitSet FOLLOW_42 = new BitSet(new long[]{0x0000000000000000L,0x0000000000040040L}); | ||
10324 | public static final BitSet FOLLOW_43 = new BitSet(new long[]{0x0000000000000402L,0x0000000000000004L}); | ||
10325 | public static final BitSet FOLLOW_44 = new BitSet(new long[]{0x0800000000000000L,0x0000000000080000L}); | ||
10326 | public static final BitSet FOLLOW_45 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L}); | ||
10327 | public static final BitSet FOLLOW_46 = new BitSet(new long[]{0x0004000000000000L}); | ||
10328 | public static final BitSet FOLLOW_47 = new BitSet(new long[]{0x0000000000000000L,0x00000000000C2000L}); | ||
10329 | public static final BitSet FOLLOW_48 = new BitSet(new long[]{0x0002000000000000L}); | ||
10330 | public static final BitSet FOLLOW_49 = new BitSet(new long[]{0x0008000000000000L}); | ||
10331 | public static final BitSet FOLLOW_50 = new BitSet(new long[]{0x0008000000000002L}); | ||
10332 | public static final BitSet FOLLOW_51 = new BitSet(new long[]{0x8000000000000002L}); | ||
7159 | 10333 | ||
7160 | } \ No newline at end of file | 10334 | } \ No newline at end of file |