diff options
author | 2020-05-19 21:18:06 +0200 | |
---|---|---|
committer | 2020-05-19 21:18:06 +0200 | |
commit | b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b (patch) | |
tree | ad3222182065b8fac7d9b3d528c4efabf2aa0dd2 /Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.g | |
parent | Merge branch 'master' of github.com:viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.gz VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.zst VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.zip |
Config language WIP
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.g')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.g | 1071 |
1 files changed, 868 insertions, 203 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.g b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.g index 6cd0341f..8ec69aaa 100644 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.g +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguageParser.g | |||
@@ -144,20 +144,20 @@ ruleStatement returns [EObject current=null] | |||
144 | } | 144 | } |
145 | | | 145 | | |
146 | { | 146 | { |
147 | newCompositeNode(grammarAccess.getStatementAccess().getExternPredicateDefinitionParserRuleCall_0_4()); | 147 | newCompositeNode(grammarAccess.getStatementAccess().getMetricDefinitionParserRuleCall_0_4()); |
148 | } | 148 | } |
149 | this_ExternPredicateDefinition_4=ruleExternPredicateDefinition | 149 | this_MetricDefinition_4=ruleMetricDefinition |
150 | { | 150 | { |
151 | $current = $this_ExternPredicateDefinition_4.current; | 151 | $current = $this_MetricDefinition_4.current; |
152 | afterParserOrEnumRuleCall(); | 152 | afterParserOrEnumRuleCall(); |
153 | } | 153 | } |
154 | | | 154 | | |
155 | { | 155 | { |
156 | newCompositeNode(grammarAccess.getStatementAccess().getMetricDefinitionParserRuleCall_0_5()); | 156 | newCompositeNode(grammarAccess.getStatementAccess().getExternPredicateDefinitionParserRuleCall_0_5()); |
157 | } | 157 | } |
158 | this_MetricDefinition_5=ruleMetricDefinition | 158 | this_ExternPredicateDefinition_5=ruleExternPredicateDefinition |
159 | { | 159 | { |
160 | $current = $this_MetricDefinition_5.current; | 160 | $current = $this_ExternPredicateDefinition_5.current; |
161 | afterParserOrEnumRuleCall(); | 161 | afterParserOrEnumRuleCall(); |
162 | } | 162 | } |
163 | | | 163 | | |
@@ -171,35 +171,53 @@ ruleStatement returns [EObject current=null] | |||
171 | } | 171 | } |
172 | | | 172 | | |
173 | { | 173 | { |
174 | newCompositeNode(grammarAccess.getStatementAccess().getClassDefinitionParserRuleCall_0_7()); | 174 | newCompositeNode(grammarAccess.getStatementAccess().getExternAggregatorDefinitionParserRuleCall_0_7()); |
175 | } | 175 | } |
176 | this_ClassDefinition_7=ruleClassDefinition | 176 | this_ExternAggregatorDefinition_7=ruleExternAggregatorDefinition |
177 | { | 177 | { |
178 | $current = $this_ClassDefinition_7.current; | 178 | $current = $this_ExternAggregatorDefinition_7.current; |
179 | afterParserOrEnumRuleCall(); | 179 | afterParserOrEnumRuleCall(); |
180 | } | 180 | } |
181 | | | 181 | | |
182 | { | 182 | { |
183 | newCompositeNode(grammarAccess.getStatementAccess().getScopeDefinitionParserRuleCall_0_8()); | 183 | newCompositeNode(grammarAccess.getStatementAccess().getExternDatatypeDefinitionParserRuleCall_0_8()); |
184 | } | 184 | } |
185 | this_ScopeDefinition_8=ruleScopeDefinition | 185 | this_ExternDatatypeDefinition_8=ruleExternDatatypeDefinition |
186 | { | 186 | { |
187 | $current = $this_ScopeDefinition_8.current; | 187 | $current = $this_ExternDatatypeDefinition_8.current; |
188 | afterParserOrEnumRuleCall(); | 188 | afterParserOrEnumRuleCall(); |
189 | } | 189 | } |
190 | | | 190 | | |
191 | { | 191 | { |
192 | newCompositeNode(grammarAccess.getStatementAccess().getObjectiveDefinitionParserRuleCall_0_9()); | 192 | newCompositeNode(grammarAccess.getStatementAccess().getClassDefinitionParserRuleCall_0_9()); |
193 | } | 193 | } |
194 | this_ObjectiveDefinition_9=ruleObjectiveDefinition | 194 | this_ClassDefinition_9=ruleClassDefinition |
195 | { | 195 | { |
196 | $current = $this_ObjectiveDefinition_9.current; | 196 | $current = $this_ClassDefinition_9.current; |
197 | afterParserOrEnumRuleCall(); | ||
198 | } | ||
199 | | | ||
200 | { | ||
201 | newCompositeNode(grammarAccess.getStatementAccess().getScopeDefinitionParserRuleCall_0_10()); | ||
202 | } | ||
203 | this_ScopeDefinition_10=ruleScopeDefinition | ||
204 | { | ||
205 | $current = $this_ScopeDefinition_10.current; | ||
206 | afterParserOrEnumRuleCall(); | ||
207 | } | ||
208 | | | ||
209 | { | ||
210 | newCompositeNode(grammarAccess.getStatementAccess().getObjectiveDefinitionParserRuleCall_0_11()); | ||
211 | } | ||
212 | this_ObjectiveDefinition_11=ruleObjectiveDefinition | ||
213 | { | ||
214 | $current = $this_ObjectiveDefinition_11.current; | ||
197 | afterParserOrEnumRuleCall(); | 215 | afterParserOrEnumRuleCall(); |
198 | } | 216 | } |
199 | ) | 217 | ) |
200 | this_FULL_STOP_10=RULE_FULL_STOP | 218 | this_FULL_STOP_12=RULE_FULL_STOP |
201 | { | 219 | { |
202 | newLeafNode(this_FULL_STOP_10, grammarAccess.getStatementAccess().getFULL_STOPTerminalRuleCall_1()); | 220 | newLeafNode(this_FULL_STOP_12, grammarAccess.getStatementAccess().getFULL_STOPTerminalRuleCall_1()); |
203 | } | 221 | } |
204 | ) | 222 | ) |
205 | ; | 223 | ; |
@@ -233,35 +251,33 @@ ruleAssertionOrDefinition returns [EObject current=null] | |||
233 | ( | 251 | ( |
234 | { | 252 | { |
235 | $current = forceCreateModelElementAndSet( | 253 | $current = forceCreateModelElementAndSet( |
236 | grammarAccess.getAssertionOrDefinitionAccess().getAssertionBodyAction_1_0_0(), | 254 | grammarAccess.getAssertionOrDefinitionAccess().getInterpretationBodyAction_1_0_0(), |
237 | $current); | 255 | $current); |
238 | } | 256 | } |
239 | ) | 257 | ) |
258 | otherlv_2=Colon | ||
259 | { | ||
260 | newLeafNode(otherlv_2, grammarAccess.getAssertionOrDefinitionAccess().getColonKeyword_1_0_1()); | ||
261 | } | ||
240 | ( | 262 | ( |
241 | otherlv_2=Colon | ||
242 | { | ||
243 | newLeafNode(otherlv_2, grammarAccess.getAssertionOrDefinitionAccess().getColonKeyword_1_0_1_0()); | ||
244 | } | ||
245 | ( | 263 | ( |
246 | ( | 264 | { |
247 | { | 265 | newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getRangeExpressionParserRuleCall_1_0_2_0()); |
248 | newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getRangeExpressionParserRuleCall_1_0_1_1_0()); | 266 | } |
249 | } | 267 | lv_range_3_0=ruleExpression |
250 | lv_range_3_0=ruleExpression | 268 | { |
251 | { | 269 | if ($current==null) { |
252 | if ($current==null) { | 270 | $current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule()); |
253 | $current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule()); | ||
254 | } | ||
255 | set( | ||
256 | $current, | ||
257 | "range", | ||
258 | lv_range_3_0, | ||
259 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
260 | afterParserOrEnumRuleCall(); | ||
261 | } | 271 | } |
262 | ) | 272 | set( |
273 | $current, | ||
274 | "range", | ||
275 | lv_range_3_0, | ||
276 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
277 | afterParserOrEnumRuleCall(); | ||
278 | } | ||
263 | ) | 279 | ) |
264 | )? | 280 | ) |
265 | ) | 281 | ) |
266 | | | 282 | | |
267 | ( | 283 | ( |
@@ -329,7 +345,7 @@ ruleAssertionOrDefinition returns [EObject current=null] | |||
329 | ) | 345 | ) |
330 | ) | 346 | ) |
331 | ) | 347 | ) |
332 | ) | 348 | )? |
333 | ) | 349 | ) |
334 | ; | 350 | ; |
335 | 351 | ||
@@ -587,6 +603,83 @@ ruleDefaultDefinition returns [EObject current=null] | |||
587 | ) | 603 | ) |
588 | ; | 604 | ; |
589 | 605 | ||
606 | // Entry rule entryRuleMetricDefinition | ||
607 | entryRuleMetricDefinition returns [EObject current=null]: | ||
608 | { newCompositeNode(grammarAccess.getMetricDefinitionRule()); } | ||
609 | iv_ruleMetricDefinition=ruleMetricDefinition | ||
610 | { $current=$iv_ruleMetricDefinition.current; } | ||
611 | EOF; | ||
612 | |||
613 | // Rule MetricDefinition | ||
614 | ruleMetricDefinition returns [EObject current=null] | ||
615 | @init { | ||
616 | enterRule(); | ||
617 | } | ||
618 | @after { | ||
619 | leaveRule(); | ||
620 | }: | ||
621 | ( | ||
622 | ( | ||
623 | ( | ||
624 | { | ||
625 | if ($current==null) { | ||
626 | $current = createModelElement(grammarAccess.getMetricDefinitionRule()); | ||
627 | } | ||
628 | } | ||
629 | { | ||
630 | newCompositeNode(grammarAccess.getMetricDefinitionAccess().getTypeNamedElementCrossReference_0_0()); | ||
631 | } | ||
632 | ruleQualifiedName | ||
633 | { | ||
634 | afterParserOrEnumRuleCall(); | ||
635 | } | ||
636 | ) | ||
637 | ) | ||
638 | ( | ||
639 | ( | ||
640 | { | ||
641 | newCompositeNode(grammarAccess.getMetricDefinitionAccess().getHeadCallParserRuleCall_1_0()); | ||
642 | } | ||
643 | lv_head_1_0=ruleCall | ||
644 | { | ||
645 | if ($current==null) { | ||
646 | $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); | ||
647 | } | ||
648 | set( | ||
649 | $current, | ||
650 | "head", | ||
651 | lv_head_1_0, | ||
652 | "org.eclipse.viatra.solver.language.SolverLanguage.Call"); | ||
653 | afterParserOrEnumRuleCall(); | ||
654 | } | ||
655 | ) | ||
656 | ) | ||
657 | otherlv_2=EqualsSign | ||
658 | { | ||
659 | newLeafNode(otherlv_2, grammarAccess.getMetricDefinitionAccess().getEqualsSignKeyword_2()); | ||
660 | } | ||
661 | ( | ||
662 | ( | ||
663 | { | ||
664 | newCompositeNode(grammarAccess.getMetricDefinitionAccess().getBodyExpressionParserRuleCall_3_0()); | ||
665 | } | ||
666 | lv_body_3_0=ruleExpression | ||
667 | { | ||
668 | if ($current==null) { | ||
669 | $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); | ||
670 | } | ||
671 | set( | ||
672 | $current, | ||
673 | "body", | ||
674 | lv_body_3_0, | ||
675 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
676 | afterParserOrEnumRuleCall(); | ||
677 | } | ||
678 | ) | ||
679 | ) | ||
680 | ) | ||
681 | ; | ||
682 | |||
590 | // Entry rule entryRuleExternPredicateDefinition | 683 | // Entry rule entryRuleExternPredicateDefinition |
591 | entryRuleExternPredicateDefinition returns [EObject current=null]: | 684 | entryRuleExternPredicateDefinition returns [EObject current=null]: |
592 | { newCompositeNode(grammarAccess.getExternPredicateDefinitionRule()); } | 685 | { newCompositeNode(grammarAccess.getExternPredicateDefinitionRule()); } |
@@ -610,18 +703,37 @@ ruleExternPredicateDefinition returns [EObject current=null] | |||
610 | ( | 703 | ( |
611 | ( | 704 | ( |
612 | { | 705 | { |
613 | newCompositeNode(grammarAccess.getExternPredicateDefinitionAccess().getHeadCallParserRuleCall_1_0()); | 706 | newCompositeNode(grammarAccess.getExternPredicateDefinitionAccess().getNameQualifiedNameParserRuleCall_1_0()); |
614 | } | 707 | } |
615 | lv_head_1_0=ruleCall | 708 | lv_name_1_0=ruleQualifiedName |
616 | { | 709 | { |
617 | if ($current==null) { | 710 | if ($current==null) { |
618 | $current = createModelElementForParent(grammarAccess.getExternPredicateDefinitionRule()); | 711 | $current = createModelElementForParent(grammarAccess.getExternPredicateDefinitionRule()); |
619 | } | 712 | } |
620 | set( | 713 | set( |
621 | $current, | 714 | $current, |
622 | "head", | 715 | "name", |
623 | lv_head_1_0, | 716 | lv_name_1_0, |
624 | "org.eclipse.viatra.solver.language.SolverLanguage.Call"); | 717 | "org.eclipse.viatra.solver.language.SolverLanguage.QualifiedName"); |
718 | afterParserOrEnumRuleCall(); | ||
719 | } | ||
720 | ) | ||
721 | ) | ||
722 | ( | ||
723 | ( | ||
724 | { | ||
725 | newCompositeNode(grammarAccess.getExternPredicateDefinitionAccess().getArgumentListArgumentListParserRuleCall_2_0()); | ||
726 | } | ||
727 | lv_argumentList_2_0=ruleArgumentList | ||
728 | { | ||
729 | if ($current==null) { | ||
730 | $current = createModelElementForParent(grammarAccess.getExternPredicateDefinitionRule()); | ||
731 | } | ||
732 | set( | ||
733 | $current, | ||
734 | "argumentList", | ||
735 | lv_argumentList_2_0, | ||
736 | "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList"); | ||
625 | afterParserOrEnumRuleCall(); | 737 | afterParserOrEnumRuleCall(); |
626 | } | 738 | } |
627 | ) | 739 | ) |
@@ -629,15 +741,15 @@ ruleExternPredicateDefinition returns [EObject current=null] | |||
629 | ) | 741 | ) |
630 | ; | 742 | ; |
631 | 743 | ||
632 | // Entry rule entryRuleMetricDefinition | 744 | // Entry rule entryRuleExternMetricDefinition |
633 | entryRuleMetricDefinition returns [EObject current=null]: | 745 | entryRuleExternMetricDefinition returns [EObject current=null]: |
634 | { newCompositeNode(grammarAccess.getMetricDefinitionRule()); } | 746 | { newCompositeNode(grammarAccess.getExternMetricDefinitionRule()); } |
635 | iv_ruleMetricDefinition=ruleMetricDefinition | 747 | iv_ruleExternMetricDefinition=ruleExternMetricDefinition |
636 | { $current=$iv_ruleMetricDefinition.current; } | 748 | { $current=$iv_ruleExternMetricDefinition.current; } |
637 | EOF; | 749 | EOF; |
638 | 750 | ||
639 | // Rule MetricDefinition | 751 | // Rule ExternMetricDefinition |
640 | ruleMetricDefinition returns [EObject current=null] | 752 | ruleExternMetricDefinition returns [EObject current=null] |
641 | @init { | 753 | @init { |
642 | enterRule(); | 754 | enterRule(); |
643 | } | 755 | } |
@@ -645,21 +757,41 @@ ruleMetricDefinition returns [EObject current=null] | |||
645 | leaveRule(); | 757 | leaveRule(); |
646 | }: | 758 | }: |
647 | ( | 759 | ( |
760 | otherlv_0=Extern | ||
761 | { | ||
762 | newLeafNode(otherlv_0, grammarAccess.getExternMetricDefinitionAccess().getExternKeyword_0()); | ||
763 | } | ||
648 | ( | 764 | ( |
649 | ( | 765 | ( |
650 | { | 766 | { |
651 | newCompositeNode(grammarAccess.getMetricDefinitionAccess().getTypeMetricTypeEnumRuleCall_0_0()); | 767 | if ($current==null) { |
768 | $current = createModelElement(grammarAccess.getExternMetricDefinitionRule()); | ||
769 | } | ||
652 | } | 770 | } |
653 | lv_type_0_0=ruleMetricType | 771 | { |
772 | newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getTypeNamedElementCrossReference_1_0()); | ||
773 | } | ||
774 | ruleQualifiedName | ||
775 | { | ||
776 | afterParserOrEnumRuleCall(); | ||
777 | } | ||
778 | ) | ||
779 | ) | ||
780 | ( | ||
781 | ( | ||
782 | { | ||
783 | newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getNameQualifiedNameParserRuleCall_2_0()); | ||
784 | } | ||
785 | lv_name_2_0=ruleQualifiedName | ||
654 | { | 786 | { |
655 | if ($current==null) { | 787 | if ($current==null) { |
656 | $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); | 788 | $current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule()); |
657 | } | 789 | } |
658 | set( | 790 | set( |
659 | $current, | 791 | $current, |
660 | "type", | 792 | "name", |
661 | lv_type_0_0, | 793 | lv_name_2_0, |
662 | "org.eclipse.viatra.solver.language.SolverLanguage.MetricType"); | 794 | "org.eclipse.viatra.solver.language.SolverLanguage.QualifiedName"); |
663 | afterParserOrEnumRuleCall(); | 795 | afterParserOrEnumRuleCall(); |
664 | } | 796 | } |
665 | ) | 797 | ) |
@@ -667,57 +799,120 @@ ruleMetricDefinition returns [EObject current=null] | |||
667 | ( | 799 | ( |
668 | ( | 800 | ( |
669 | { | 801 | { |
670 | newCompositeNode(grammarAccess.getMetricDefinitionAccess().getHeadExpressionParserRuleCall_1_0()); | 802 | newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getArgumentListArgumentListParserRuleCall_3_0()); |
671 | } | 803 | } |
672 | lv_head_1_0=ruleExpression | 804 | lv_argumentList_3_0=ruleArgumentList |
673 | { | 805 | { |
674 | if ($current==null) { | 806 | if ($current==null) { |
675 | $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); | 807 | $current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule()); |
676 | } | 808 | } |
677 | set( | 809 | set( |
678 | $current, | 810 | $current, |
679 | "head", | 811 | "argumentList", |
680 | lv_head_1_0, | 812 | lv_argumentList_3_0, |
681 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | 813 | "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList"); |
682 | afterParserOrEnumRuleCall(); | 814 | afterParserOrEnumRuleCall(); |
683 | } | 815 | } |
684 | ) | 816 | ) |
685 | ) | 817 | ) |
686 | otherlv_2=EqualsSign | 818 | ) |
819 | ; | ||
820 | |||
821 | // Entry rule entryRuleExternAggregatorDefinition | ||
822 | entryRuleExternAggregatorDefinition returns [EObject current=null]: | ||
823 | { newCompositeNode(grammarAccess.getExternAggregatorDefinitionRule()); } | ||
824 | iv_ruleExternAggregatorDefinition=ruleExternAggregatorDefinition | ||
825 | { $current=$iv_ruleExternAggregatorDefinition.current; } | ||
826 | EOF; | ||
827 | |||
828 | // Rule ExternAggregatorDefinition | ||
829 | ruleExternAggregatorDefinition returns [EObject current=null] | ||
830 | @init { | ||
831 | enterRule(); | ||
832 | } | ||
833 | @after { | ||
834 | leaveRule(); | ||
835 | }: | ||
836 | ( | ||
837 | otherlv_0=Extern | ||
687 | { | 838 | { |
688 | newLeafNode(otherlv_2, grammarAccess.getMetricDefinitionAccess().getEqualsSignKeyword_2()); | 839 | newLeafNode(otherlv_0, grammarAccess.getExternAggregatorDefinitionAccess().getExternKeyword_0()); |
689 | } | 840 | } |
690 | ( | 841 | ( |
691 | ( | 842 | ( |
692 | { | 843 | { |
693 | newCompositeNode(grammarAccess.getMetricDefinitionAccess().getBodyExpressionParserRuleCall_3_0()); | 844 | if ($current==null) { |
845 | $current = createModelElement(grammarAccess.getExternAggregatorDefinitionRule()); | ||
846 | } | ||
694 | } | 847 | } |
695 | lv_body_3_0=ruleExpression | 848 | { |
849 | newCompositeNode(grammarAccess.getExternAggregatorDefinitionAccess().getTypeNamedElementCrossReference_1_0()); | ||
850 | } | ||
851 | ruleQualifiedName | ||
852 | { | ||
853 | afterParserOrEnumRuleCall(); | ||
854 | } | ||
855 | ) | ||
856 | ) | ||
857 | ( | ||
858 | ( | ||
859 | { | ||
860 | newCompositeNode(grammarAccess.getExternAggregatorDefinitionAccess().getNameQualifiedNameParserRuleCall_2_0()); | ||
861 | } | ||
862 | lv_name_2_0=ruleQualifiedName | ||
696 | { | 863 | { |
697 | if ($current==null) { | 864 | if ($current==null) { |
698 | $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); | 865 | $current = createModelElementForParent(grammarAccess.getExternAggregatorDefinitionRule()); |
699 | } | 866 | } |
700 | set( | 867 | set( |
701 | $current, | 868 | $current, |
702 | "body", | 869 | "name", |
703 | lv_body_3_0, | 870 | lv_name_2_0, |
704 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | 871 | "org.eclipse.viatra.solver.language.SolverLanguage.QualifiedName"); |
705 | afterParserOrEnumRuleCall(); | 872 | afterParserOrEnumRuleCall(); |
706 | } | 873 | } |
707 | ) | 874 | ) |
708 | ) | 875 | ) |
876 | otherlv_3=LeftCurlyBracket | ||
877 | { | ||
878 | newLeafNode(otherlv_3, grammarAccess.getExternAggregatorDefinitionAccess().getLeftCurlyBracketKeyword_3()); | ||
879 | } | ||
880 | ( | ||
881 | ( | ||
882 | { | ||
883 | if ($current==null) { | ||
884 | $current = createModelElement(grammarAccess.getExternAggregatorDefinitionRule()); | ||
885 | } | ||
886 | } | ||
887 | { | ||
888 | newCompositeNode(grammarAccess.getExternAggregatorDefinitionAccess().getInputTypeNamedElementCrossReference_4_0()); | ||
889 | } | ||
890 | ruleQualifiedName | ||
891 | { | ||
892 | afterParserOrEnumRuleCall(); | ||
893 | } | ||
894 | ) | ||
895 | ) | ||
896 | otherlv_5=FullStopFullStopFullStop | ||
897 | { | ||
898 | newLeafNode(otherlv_5, grammarAccess.getExternAggregatorDefinitionAccess().getFullStopFullStopFullStopKeyword_5()); | ||
899 | } | ||
900 | otherlv_6=RightCurlyBracket | ||
901 | { | ||
902 | newLeafNode(otherlv_6, grammarAccess.getExternAggregatorDefinitionAccess().getRightCurlyBracketKeyword_6()); | ||
903 | } | ||
709 | ) | 904 | ) |
710 | ; | 905 | ; |
711 | 906 | ||
712 | // Entry rule entryRuleExternMetricDefinition | 907 | // Entry rule entryRuleExternDatatypeDefinition |
713 | entryRuleExternMetricDefinition returns [EObject current=null]: | 908 | entryRuleExternDatatypeDefinition returns [EObject current=null]: |
714 | { newCompositeNode(grammarAccess.getExternMetricDefinitionRule()); } | 909 | { newCompositeNode(grammarAccess.getExternDatatypeDefinitionRule()); } |
715 | iv_ruleExternMetricDefinition=ruleExternMetricDefinition | 910 | iv_ruleExternDatatypeDefinition=ruleExternDatatypeDefinition |
716 | { $current=$iv_ruleExternMetricDefinition.current; } | 911 | { $current=$iv_ruleExternDatatypeDefinition.current; } |
717 | EOF; | 912 | EOF; |
718 | 913 | ||
719 | // Rule ExternMetricDefinition | 914 | // Rule ExternDatatypeDefinition |
720 | ruleExternMetricDefinition returns [EObject current=null] | 915 | ruleExternDatatypeDefinition returns [EObject current=null] |
721 | @init { | 916 | @init { |
722 | enterRule(); | 917 | enterRule(); |
723 | } | 918 | } |
@@ -727,43 +922,125 @@ ruleExternMetricDefinition returns [EObject current=null] | |||
727 | ( | 922 | ( |
728 | otherlv_0=Extern | 923 | otherlv_0=Extern |
729 | { | 924 | { |
730 | newLeafNode(otherlv_0, grammarAccess.getExternMetricDefinitionAccess().getExternKeyword_0()); | 925 | newLeafNode(otherlv_0, grammarAccess.getExternDatatypeDefinitionAccess().getExternKeyword_0()); |
926 | } | ||
927 | otherlv_1=Datatype | ||
928 | { | ||
929 | newLeafNode(otherlv_1, grammarAccess.getExternDatatypeDefinitionAccess().getDatatypeKeyword_1()); | ||
731 | } | 930 | } |
732 | ( | 931 | ( |
733 | ( | 932 | ( |
734 | { | 933 | { |
735 | newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getTypeMetricTypeEnumRuleCall_1_0()); | 934 | newCompositeNode(grammarAccess.getExternDatatypeDefinitionAccess().getNameQualifiedNameParserRuleCall_2_0()); |
736 | } | 935 | } |
737 | lv_type_1_0=ruleMetricType | 936 | lv_name_2_0=ruleQualifiedName |
738 | { | 937 | { |
739 | if ($current==null) { | 938 | if ($current==null) { |
740 | $current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule()); | 939 | $current = createModelElementForParent(grammarAccess.getExternDatatypeDefinitionRule()); |
741 | } | 940 | } |
742 | set( | 941 | set( |
743 | $current, | 942 | $current, |
744 | "type", | 943 | "name", |
745 | lv_type_1_0, | 944 | lv_name_2_0, |
746 | "org.eclipse.viatra.solver.language.SolverLanguage.MetricType"); | 945 | "org.eclipse.viatra.solver.language.SolverLanguage.QualifiedName"); |
747 | afterParserOrEnumRuleCall(); | 946 | afterParserOrEnumRuleCall(); |
748 | } | 947 | } |
749 | ) | 948 | ) |
750 | ) | 949 | ) |
751 | ( | 950 | ( |
951 | otherlv_3=Extends | ||
952 | { | ||
953 | newLeafNode(otherlv_3, grammarAccess.getExternDatatypeDefinitionAccess().getExtendsKeyword_3_0()); | ||
954 | } | ||
955 | ( | ||
956 | ( | ||
957 | { | ||
958 | if ($current==null) { | ||
959 | $current = createModelElement(grammarAccess.getExternDatatypeDefinitionRule()); | ||
960 | } | ||
961 | } | ||
962 | { | ||
963 | newCompositeNode(grammarAccess.getExternDatatypeDefinitionAccess().getSupertypesNamedElementCrossReference_3_1_0()); | ||
964 | } | ||
965 | ruleQualifiedName | ||
966 | { | ||
967 | afterParserOrEnumRuleCall(); | ||
968 | } | ||
969 | ) | ||
970 | ) | ||
971 | ( | ||
972 | otherlv_5=Comma | ||
973 | { | ||
974 | newLeafNode(otherlv_5, grammarAccess.getExternDatatypeDefinitionAccess().getCommaKeyword_3_2_0()); | ||
975 | } | ||
976 | ( | ||
977 | ( | ||
978 | { | ||
979 | if ($current==null) { | ||
980 | $current = createModelElement(grammarAccess.getExternDatatypeDefinitionRule()); | ||
981 | } | ||
982 | } | ||
983 | { | ||
984 | newCompositeNode(grammarAccess.getExternDatatypeDefinitionAccess().getSupertypesNamedElementCrossReference_3_2_1_0()); | ||
985 | } | ||
986 | ruleQualifiedName | ||
987 | { | ||
988 | afterParserOrEnumRuleCall(); | ||
989 | } | ||
990 | ) | ||
991 | ) | ||
992 | )* | ||
993 | ) | ||
994 | ) | ||
995 | ; | ||
996 | |||
997 | // Entry rule entryRuleVariable | ||
998 | entryRuleVariable returns [EObject current=null]: | ||
999 | { newCompositeNode(grammarAccess.getVariableRule()); } | ||
1000 | iv_ruleVariable=ruleVariable | ||
1001 | { $current=$iv_ruleVariable.current; } | ||
1002 | EOF; | ||
1003 | |||
1004 | // Rule Variable | ||
1005 | ruleVariable returns [EObject current=null] | ||
1006 | @init { | ||
1007 | enterRule(); | ||
1008 | } | ||
1009 | @after { | ||
1010 | leaveRule(); | ||
1011 | }: | ||
1012 | ( | ||
1013 | ( | ||
752 | ( | 1014 | ( |
753 | { | 1015 | { |
754 | newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getHeadCallParserRuleCall_2_0()); | 1016 | if ($current==null) { |
1017 | $current = createModelElement(grammarAccess.getVariableRule()); | ||
1018 | } | ||
1019 | } | ||
1020 | { | ||
1021 | newCompositeNode(grammarAccess.getVariableAccess().getTypeNamedElementCrossReference_0_0()); | ||
1022 | } | ||
1023 | ruleQualifiedName | ||
1024 | { | ||
1025 | afterParserOrEnumRuleCall(); | ||
1026 | } | ||
1027 | ) | ||
1028 | )? | ||
1029 | ( | ||
1030 | ( | ||
1031 | lv_name_1_0=RULE_ID | ||
1032 | { | ||
1033 | newLeafNode(lv_name_1_0, grammarAccess.getVariableAccess().getNameIDTerminalRuleCall_1_0()); | ||
755 | } | 1034 | } |
756 | lv_head_2_0=ruleCall | ||
757 | { | 1035 | { |
758 | if ($current==null) { | 1036 | if ($current==null) { |
759 | $current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule()); | 1037 | $current = createModelElement(grammarAccess.getVariableRule()); |
760 | } | 1038 | } |
761 | set( | 1039 | setWithLastConsumed( |
762 | $current, | 1040 | $current, |
763 | "head", | 1041 | "name", |
764 | lv_head_2_0, | 1042 | lv_name_1_0, |
765 | "org.eclipse.viatra.solver.language.SolverLanguage.Call"); | 1043 | "org.eclipse.xtext.common.Terminals.ID"); |
766 | afterParserOrEnumRuleCall(); | ||
767 | } | 1044 | } |
768 | ) | 1045 | ) |
769 | ) | 1046 | ) |
@@ -796,11 +1073,20 @@ ruleExpression returns [EObject current=null] | |||
796 | } | 1073 | } |
797 | | | 1074 | | |
798 | { | 1075 | { |
799 | newCompositeNode(grammarAccess.getExpressionAccess().getDisjunctiveExpressionParserRuleCall_1()); | 1076 | newCompositeNode(grammarAccess.getExpressionAccess().getLetParserRuleCall_1()); |
800 | } | 1077 | } |
801 | this_DisjunctiveExpression_1=ruleDisjunctiveExpression | 1078 | this_Let_1=ruleLet |
802 | { | 1079 | { |
803 | $current = $this_DisjunctiveExpression_1.current; | 1080 | $current = $this_Let_1.current; |
1081 | afterParserOrEnumRuleCall(); | ||
1082 | } | ||
1083 | | | ||
1084 | { | ||
1085 | newCompositeNode(grammarAccess.getExpressionAccess().getImplicationExpressionParserRuleCall_2()); | ||
1086 | } | ||
1087 | this_ImplicationExpression_2=ruleImplicationExpression | ||
1088 | { | ||
1089 | $current = $this_ImplicationExpression_2.current; | ||
804 | afterParserOrEnumRuleCall(); | 1090 | afterParserOrEnumRuleCall(); |
805 | } | 1091 | } |
806 | ) | 1092 | ) |
@@ -894,6 +1180,231 @@ ruleIfElse returns [EObject current=null] | |||
894 | ) | 1180 | ) |
895 | ; | 1181 | ; |
896 | 1182 | ||
1183 | // Entry rule entryRuleLet | ||
1184 | entryRuleLet returns [EObject current=null]: | ||
1185 | { newCompositeNode(grammarAccess.getLetRule()); } | ||
1186 | iv_ruleLet=ruleLet | ||
1187 | { $current=$iv_ruleLet.current; } | ||
1188 | EOF; | ||
1189 | |||
1190 | // Rule Let | ||
1191 | ruleLet returns [EObject current=null] | ||
1192 | @init { | ||
1193 | enterRule(); | ||
1194 | } | ||
1195 | @after { | ||
1196 | leaveRule(); | ||
1197 | }: | ||
1198 | ( | ||
1199 | otherlv_0=Let | ||
1200 | { | ||
1201 | newLeafNode(otherlv_0, grammarAccess.getLetAccess().getLetKeyword_0()); | ||
1202 | } | ||
1203 | ( | ||
1204 | ( | ||
1205 | { | ||
1206 | newCompositeNode(grammarAccess.getLetAccess().getBindingsLetBindingParserRuleCall_1_0()); | ||
1207 | } | ||
1208 | lv_bindings_1_0=ruleLetBinding | ||
1209 | { | ||
1210 | if ($current==null) { | ||
1211 | $current = createModelElementForParent(grammarAccess.getLetRule()); | ||
1212 | } | ||
1213 | add( | ||
1214 | $current, | ||
1215 | "bindings", | ||
1216 | lv_bindings_1_0, | ||
1217 | "org.eclipse.viatra.solver.language.SolverLanguage.LetBinding"); | ||
1218 | afterParserOrEnumRuleCall(); | ||
1219 | } | ||
1220 | ) | ||
1221 | ) | ||
1222 | ( | ||
1223 | otherlv_2=Comma | ||
1224 | { | ||
1225 | newLeafNode(otherlv_2, grammarAccess.getLetAccess().getCommaKeyword_2_0()); | ||
1226 | } | ||
1227 | ( | ||
1228 | ( | ||
1229 | { | ||
1230 | newCompositeNode(grammarAccess.getLetAccess().getBindingsLetBindingParserRuleCall_2_1_0()); | ||
1231 | } | ||
1232 | lv_bindings_3_0=ruleLetBinding | ||
1233 | { | ||
1234 | if ($current==null) { | ||
1235 | $current = createModelElementForParent(grammarAccess.getLetRule()); | ||
1236 | } | ||
1237 | add( | ||
1238 | $current, | ||
1239 | "bindings", | ||
1240 | lv_bindings_3_0, | ||
1241 | "org.eclipse.viatra.solver.language.SolverLanguage.LetBinding"); | ||
1242 | afterParserOrEnumRuleCall(); | ||
1243 | } | ||
1244 | ) | ||
1245 | ) | ||
1246 | )* | ||
1247 | otherlv_4=In | ||
1248 | { | ||
1249 | newLeafNode(otherlv_4, grammarAccess.getLetAccess().getInKeyword_3()); | ||
1250 | } | ||
1251 | ( | ||
1252 | ( | ||
1253 | { | ||
1254 | newCompositeNode(grammarAccess.getLetAccess().getBodyExpressionParserRuleCall_4_0()); | ||
1255 | } | ||
1256 | lv_body_5_0=ruleExpression | ||
1257 | { | ||
1258 | if ($current==null) { | ||
1259 | $current = createModelElementForParent(grammarAccess.getLetRule()); | ||
1260 | } | ||
1261 | set( | ||
1262 | $current, | ||
1263 | "body", | ||
1264 | lv_body_5_0, | ||
1265 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
1266 | afterParserOrEnumRuleCall(); | ||
1267 | } | ||
1268 | ) | ||
1269 | ) | ||
1270 | ) | ||
1271 | ; | ||
1272 | |||
1273 | // Entry rule entryRuleLetBinding | ||
1274 | entryRuleLetBinding returns [EObject current=null]: | ||
1275 | { newCompositeNode(grammarAccess.getLetBindingRule()); } | ||
1276 | iv_ruleLetBinding=ruleLetBinding | ||
1277 | { $current=$iv_ruleLetBinding.current; } | ||
1278 | EOF; | ||
1279 | |||
1280 | // Rule LetBinding | ||
1281 | ruleLetBinding returns [EObject current=null] | ||
1282 | @init { | ||
1283 | enterRule(); | ||
1284 | } | ||
1285 | @after { | ||
1286 | leaveRule(); | ||
1287 | }: | ||
1288 | ( | ||
1289 | ( | ||
1290 | ( | ||
1291 | { | ||
1292 | newCompositeNode(grammarAccess.getLetBindingAccess().getVariableVariableParserRuleCall_0_0()); | ||
1293 | } | ||
1294 | lv_variable_0_0=ruleVariable | ||
1295 | { | ||
1296 | if ($current==null) { | ||
1297 | $current = createModelElementForParent(grammarAccess.getLetBindingRule()); | ||
1298 | } | ||
1299 | set( | ||
1300 | $current, | ||
1301 | "variable", | ||
1302 | lv_variable_0_0, | ||
1303 | "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); | ||
1304 | afterParserOrEnumRuleCall(); | ||
1305 | } | ||
1306 | ) | ||
1307 | ) | ||
1308 | otherlv_1=EqualsSign | ||
1309 | { | ||
1310 | newLeafNode(otherlv_1, grammarAccess.getLetBindingAccess().getEqualsSignKeyword_1()); | ||
1311 | } | ||
1312 | ( | ||
1313 | ( | ||
1314 | { | ||
1315 | newCompositeNode(grammarAccess.getLetBindingAccess().getValueAdditiveExpressionParserRuleCall_2_0()); | ||
1316 | } | ||
1317 | lv_value_2_0=ruleAdditiveExpression | ||
1318 | { | ||
1319 | if ($current==null) { | ||
1320 | $current = createModelElementForParent(grammarAccess.getLetBindingRule()); | ||
1321 | } | ||
1322 | set( | ||
1323 | $current, | ||
1324 | "value", | ||
1325 | lv_value_2_0, | ||
1326 | "org.eclipse.viatra.solver.language.SolverLanguage.AdditiveExpression"); | ||
1327 | afterParserOrEnumRuleCall(); | ||
1328 | } | ||
1329 | ) | ||
1330 | ) | ||
1331 | ) | ||
1332 | ; | ||
1333 | |||
1334 | // Entry rule entryRuleImplicationExpression | ||
1335 | entryRuleImplicationExpression returns [EObject current=null]: | ||
1336 | { newCompositeNode(grammarAccess.getImplicationExpressionRule()); } | ||
1337 | iv_ruleImplicationExpression=ruleImplicationExpression | ||
1338 | { $current=$iv_ruleImplicationExpression.current; } | ||
1339 | EOF; | ||
1340 | |||
1341 | // Rule ImplicationExpression | ||
1342 | ruleImplicationExpression returns [EObject current=null] | ||
1343 | @init { | ||
1344 | enterRule(); | ||
1345 | } | ||
1346 | @after { | ||
1347 | leaveRule(); | ||
1348 | }: | ||
1349 | ( | ||
1350 | { | ||
1351 | newCompositeNode(grammarAccess.getImplicationExpressionAccess().getDisjunctiveExpressionParserRuleCall_0()); | ||
1352 | } | ||
1353 | this_DisjunctiveExpression_0=ruleDisjunctiveExpression | ||
1354 | { | ||
1355 | $current = $this_DisjunctiveExpression_0.current; | ||
1356 | afterParserOrEnumRuleCall(); | ||
1357 | } | ||
1358 | ( | ||
1359 | ( | ||
1360 | { | ||
1361 | $current = forceCreateModelElementAndSet( | ||
1362 | grammarAccess.getImplicationExpressionAccess().getBinaryExpressionLeftAction_1_0(), | ||
1363 | $current); | ||
1364 | } | ||
1365 | ) | ||
1366 | ( | ||
1367 | ( | ||
1368 | { | ||
1369 | newCompositeNode(grammarAccess.getImplicationExpressionAccess().getOpImplicationOperatorEnumRuleCall_1_1_0()); | ||
1370 | } | ||
1371 | lv_op_2_0=ruleImplicationOperator | ||
1372 | { | ||
1373 | if ($current==null) { | ||
1374 | $current = createModelElementForParent(grammarAccess.getImplicationExpressionRule()); | ||
1375 | } | ||
1376 | set( | ||
1377 | $current, | ||
1378 | "op", | ||
1379 | lv_op_2_0, | ||
1380 | "org.eclipse.viatra.solver.language.SolverLanguage.ImplicationOperator"); | ||
1381 | afterParserOrEnumRuleCall(); | ||
1382 | } | ||
1383 | ) | ||
1384 | ) | ||
1385 | ( | ||
1386 | ( | ||
1387 | { | ||
1388 | newCompositeNode(grammarAccess.getImplicationExpressionAccess().getRightImplicationExpressionParserRuleCall_1_2_0()); | ||
1389 | } | ||
1390 | lv_right_3_0=ruleImplicationExpression | ||
1391 | { | ||
1392 | if ($current==null) { | ||
1393 | $current = createModelElementForParent(grammarAccess.getImplicationExpressionRule()); | ||
1394 | } | ||
1395 | set( | ||
1396 | $current, | ||
1397 | "right", | ||
1398 | lv_right_3_0, | ||
1399 | "org.eclipse.viatra.solver.language.SolverLanguage.ImplicationExpression"); | ||
1400 | afterParserOrEnumRuleCall(); | ||
1401 | } | ||
1402 | ) | ||
1403 | ) | ||
1404 | )? | ||
1405 | ) | ||
1406 | ; | ||
1407 | |||
897 | // Entry rule entryRuleDisjunctiveExpression | 1408 | // Entry rule entryRuleDisjunctiveExpression |
898 | entryRuleDisjunctiveExpression returns [EObject current=null]: | 1409 | entryRuleDisjunctiveExpression returns [EObject current=null]: |
899 | { newCompositeNode(grammarAccess.getDisjunctiveExpressionRule()); } | 1410 | { newCompositeNode(grammarAccess.getDisjunctiveExpressionRule()); } |
@@ -1383,11 +1894,11 @@ ruleExponentialExpression returns [EObject current=null] | |||
1383 | }: | 1894 | }: |
1384 | ( | 1895 | ( |
1385 | { | 1896 | { |
1386 | newCompositeNode(grammarAccess.getExponentialExpressionAccess().getUnaryExpressionParserRuleCall_0()); | 1897 | newCompositeNode(grammarAccess.getExponentialExpressionAccess().getCastExpressionParserRuleCall_0()); |
1387 | } | 1898 | } |
1388 | this_UnaryExpression_0=ruleUnaryExpression | 1899 | this_CastExpression_0=ruleCastExpression |
1389 | { | 1900 | { |
1390 | $current = $this_UnaryExpression_0.current; | 1901 | $current = $this_CastExpression_0.current; |
1391 | afterParserOrEnumRuleCall(); | 1902 | afterParserOrEnumRuleCall(); |
1392 | } | 1903 | } |
1393 | ( | 1904 | ( |
@@ -1420,9 +1931,9 @@ ruleExponentialExpression returns [EObject current=null] | |||
1420 | ( | 1931 | ( |
1421 | ( | 1932 | ( |
1422 | { | 1933 | { |
1423 | newCompositeNode(grammarAccess.getExponentialExpressionAccess().getRightExponentialExpressionParserRuleCall_1_2_0()); | 1934 | newCompositeNode(grammarAccess.getExponentialExpressionAccess().getRightCastExpressionParserRuleCall_1_2_0()); |
1424 | } | 1935 | } |
1425 | lv_right_3_0=ruleExponentialExpression | 1936 | lv_right_3_0=ruleCastExpression |
1426 | { | 1937 | { |
1427 | if ($current==null) { | 1938 | if ($current==null) { |
1428 | $current = createModelElementForParent(grammarAccess.getExponentialExpressionRule()); | 1939 | $current = createModelElementForParent(grammarAccess.getExponentialExpressionRule()); |
@@ -1431,7 +1942,63 @@ ruleExponentialExpression returns [EObject current=null] | |||
1431 | $current, | 1942 | $current, |
1432 | "right", | 1943 | "right", |
1433 | lv_right_3_0, | 1944 | lv_right_3_0, |
1434 | "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialExpression"); | 1945 | "org.eclipse.viatra.solver.language.SolverLanguage.CastExpression"); |
1946 | afterParserOrEnumRuleCall(); | ||
1947 | } | ||
1948 | ) | ||
1949 | ) | ||
1950 | )? | ||
1951 | ) | ||
1952 | ; | ||
1953 | |||
1954 | // Entry rule entryRuleCastExpression | ||
1955 | entryRuleCastExpression returns [EObject current=null]: | ||
1956 | { newCompositeNode(grammarAccess.getCastExpressionRule()); } | ||
1957 | iv_ruleCastExpression=ruleCastExpression | ||
1958 | { $current=$iv_ruleCastExpression.current; } | ||
1959 | EOF; | ||
1960 | |||
1961 | // Rule CastExpression | ||
1962 | ruleCastExpression returns [EObject current=null] | ||
1963 | @init { | ||
1964 | enterRule(); | ||
1965 | } | ||
1966 | @after { | ||
1967 | leaveRule(); | ||
1968 | }: | ||
1969 | ( | ||
1970 | { | ||
1971 | newCompositeNode(grammarAccess.getCastExpressionAccess().getUnaryExpressionParserRuleCall_0()); | ||
1972 | } | ||
1973 | this_UnaryExpression_0=ruleUnaryExpression | ||
1974 | { | ||
1975 | $current = $this_UnaryExpression_0.current; | ||
1976 | afterParserOrEnumRuleCall(); | ||
1977 | } | ||
1978 | ( | ||
1979 | ( | ||
1980 | { | ||
1981 | $current = forceCreateModelElementAndSet( | ||
1982 | grammarAccess.getCastExpressionAccess().getCastExpressionBodyAction_1_0(), | ||
1983 | $current); | ||
1984 | } | ||
1985 | ) | ||
1986 | otherlv_2=As | ||
1987 | { | ||
1988 | newLeafNode(otherlv_2, grammarAccess.getCastExpressionAccess().getAsKeyword_1_1()); | ||
1989 | } | ||
1990 | ( | ||
1991 | ( | ||
1992 | { | ||
1993 | if ($current==null) { | ||
1994 | $current = createModelElement(grammarAccess.getCastExpressionRule()); | ||
1995 | } | ||
1996 | } | ||
1997 | { | ||
1998 | newCompositeNode(grammarAccess.getCastExpressionAccess().getTypeNamedElementCrossReference_1_2_0()); | ||
1999 | } | ||
2000 | ruleQualifiedName | ||
2001 | { | ||
1435 | afterParserOrEnumRuleCall(); | 2002 | afterParserOrEnumRuleCall(); |
1436 | } | 2003 | } |
1437 | ) | 2004 | ) |
@@ -1541,11 +2108,11 @@ ruleAggregationExpression returns [EObject current=null] | |||
1541 | } | 2108 | } |
1542 | | | 2109 | | |
1543 | { | 2110 | { |
1544 | newCompositeNode(grammarAccess.getAggregationExpressionAccess().getCountParserRuleCall_1()); | 2111 | newCompositeNode(grammarAccess.getAggregationExpressionAccess().getQuantifiedExpressionParserRuleCall_1()); |
1545 | } | 2112 | } |
1546 | this_Count_1=ruleCount | 2113 | this_QuantifiedExpression_1=ruleQuantifiedExpression |
1547 | { | 2114 | { |
1548 | $current = $this_Count_1.current; | 2115 | $current = $this_QuantifiedExpression_1.current; |
1549 | afterParserOrEnumRuleCall(); | 2116 | afterParserOrEnumRuleCall(); |
1550 | } | 2117 | } |
1551 | | | 2118 | | |
@@ -1560,15 +2127,15 @@ ruleAggregationExpression returns [EObject current=null] | |||
1560 | ) | 2127 | ) |
1561 | ; | 2128 | ; |
1562 | 2129 | ||
1563 | // Entry rule entryRuleCount | 2130 | // Entry rule entryRuleLocalVariables |
1564 | entryRuleCount returns [EObject current=null]: | 2131 | entryRuleLocalVariables returns [EObject current=null]: |
1565 | { newCompositeNode(grammarAccess.getCountRule()); } | 2132 | { newCompositeNode(grammarAccess.getLocalVariablesRule()); } |
1566 | iv_ruleCount=ruleCount | 2133 | iv_ruleLocalVariables=ruleLocalVariables |
1567 | { $current=$iv_ruleCount.current; } | 2134 | { $current=$iv_ruleLocalVariables.current; } |
1568 | EOF; | 2135 | EOF; |
1569 | 2136 | ||
1570 | // Rule Count | 2137 | // Rule LocalVariables |
1571 | ruleCount returns [EObject current=null] | 2138 | ruleLocalVariables returns [EObject current=null] |
1572 | @init { | 2139 | @init { |
1573 | enterRule(); | 2140 | enterRule(); |
1574 | } | 2141 | } |
@@ -1576,36 +2143,150 @@ ruleCount returns [EObject current=null] | |||
1576 | leaveRule(); | 2143 | leaveRule(); |
1577 | }: | 2144 | }: |
1578 | ( | 2145 | ( |
1579 | otherlv_0=Count | 2146 | ( |
2147 | { | ||
2148 | $current = forceCreateModelElement( | ||
2149 | grammarAccess.getLocalVariablesAccess().getLocalVariablesAction_0(), | ||
2150 | $current); | ||
2151 | } | ||
2152 | ) | ||
2153 | otherlv_1=LeftSquareBracket | ||
1580 | { | 2154 | { |
1581 | newLeafNode(otherlv_0, grammarAccess.getCountAccess().getCountKeyword_0()); | 2155 | newLeafNode(otherlv_1, grammarAccess.getLocalVariablesAccess().getLeftSquareBracketKeyword_1()); |
1582 | } | 2156 | } |
1583 | otherlv_1=LeftCurlyBracket | 2157 | ( |
2158 | ( | ||
2159 | ( | ||
2160 | { | ||
2161 | newCompositeNode(grammarAccess.getLocalVariablesAccess().getVariablesVariableParserRuleCall_2_0_0()); | ||
2162 | } | ||
2163 | lv_variables_2_0=ruleVariable | ||
2164 | { | ||
2165 | if ($current==null) { | ||
2166 | $current = createModelElementForParent(grammarAccess.getLocalVariablesRule()); | ||
2167 | } | ||
2168 | add( | ||
2169 | $current, | ||
2170 | "variables", | ||
2171 | lv_variables_2_0, | ||
2172 | "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); | ||
2173 | afterParserOrEnumRuleCall(); | ||
2174 | } | ||
2175 | ) | ||
2176 | ) | ||
2177 | ( | ||
2178 | otherlv_3=Comma | ||
2179 | { | ||
2180 | newLeafNode(otherlv_3, grammarAccess.getLocalVariablesAccess().getCommaKeyword_2_1_0()); | ||
2181 | } | ||
2182 | ( | ||
2183 | ( | ||
2184 | { | ||
2185 | newCompositeNode(grammarAccess.getLocalVariablesAccess().getVariablesVariableParserRuleCall_2_1_1_0()); | ||
2186 | } | ||
2187 | lv_variables_4_0=ruleVariable | ||
2188 | { | ||
2189 | if ($current==null) { | ||
2190 | $current = createModelElementForParent(grammarAccess.getLocalVariablesRule()); | ||
2191 | } | ||
2192 | add( | ||
2193 | $current, | ||
2194 | "variables", | ||
2195 | lv_variables_4_0, | ||
2196 | "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); | ||
2197 | afterParserOrEnumRuleCall(); | ||
2198 | } | ||
2199 | ) | ||
2200 | ) | ||
2201 | )* | ||
2202 | )? | ||
2203 | otherlv_5=RightSquareBracket | ||
1584 | { | 2204 | { |
1585 | newLeafNode(otherlv_1, grammarAccess.getCountAccess().getLeftCurlyBracketKeyword_1()); | 2205 | newLeafNode(otherlv_5, grammarAccess.getLocalVariablesAccess().getRightSquareBracketKeyword_3()); |
1586 | } | 2206 | } |
2207 | ) | ||
2208 | ; | ||
2209 | |||
2210 | // Entry rule entryRuleQuantifiedExpression | ||
2211 | entryRuleQuantifiedExpression returns [EObject current=null]: | ||
2212 | { newCompositeNode(grammarAccess.getQuantifiedExpressionRule()); } | ||
2213 | iv_ruleQuantifiedExpression=ruleQuantifiedExpression | ||
2214 | { $current=$iv_ruleQuantifiedExpression.current; } | ||
2215 | EOF; | ||
2216 | |||
2217 | // Rule QuantifiedExpression | ||
2218 | ruleQuantifiedExpression returns [EObject current=null] | ||
2219 | @init { | ||
2220 | enterRule(); | ||
2221 | } | ||
2222 | @after { | ||
2223 | leaveRule(); | ||
2224 | }: | ||
2225 | ( | ||
1587 | ( | 2226 | ( |
1588 | ( | 2227 | ( |
1589 | { | 2228 | { |
1590 | newCompositeNode(grammarAccess.getCountAccess().getBodyExpressionParserRuleCall_2_0()); | 2229 | newCompositeNode(grammarAccess.getQuantifiedExpressionAccess().getQuantifierQuantifierEnumRuleCall_0_0()); |
1591 | } | 2230 | } |
1592 | lv_body_2_0=ruleExpression | 2231 | lv_quantifier_0_0=ruleQuantifier |
1593 | { | 2232 | { |
1594 | if ($current==null) { | 2233 | if ($current==null) { |
1595 | $current = createModelElementForParent(grammarAccess.getCountRule()); | 2234 | $current = createModelElementForParent(grammarAccess.getQuantifiedExpressionRule()); |
2235 | } | ||
2236 | set( | ||
2237 | $current, | ||
2238 | "quantifier", | ||
2239 | lv_quantifier_0_0, | ||
2240 | "org.eclipse.viatra.solver.language.SolverLanguage.Quantifier"); | ||
2241 | afterParserOrEnumRuleCall(); | ||
2242 | } | ||
2243 | ) | ||
2244 | ) | ||
2245 | ( | ||
2246 | ( | ||
2247 | { | ||
2248 | newCompositeNode(grammarAccess.getQuantifiedExpressionAccess().getLocalVariablesLocalVariablesParserRuleCall_1_0()); | ||
2249 | } | ||
2250 | lv_localVariables_1_0=ruleLocalVariables | ||
2251 | { | ||
2252 | if ($current==null) { | ||
2253 | $current = createModelElementForParent(grammarAccess.getQuantifiedExpressionRule()); | ||
2254 | } | ||
2255 | set( | ||
2256 | $current, | ||
2257 | "localVariables", | ||
2258 | lv_localVariables_1_0, | ||
2259 | "org.eclipse.viatra.solver.language.SolverLanguage.LocalVariables"); | ||
2260 | afterParserOrEnumRuleCall(); | ||
2261 | } | ||
2262 | ) | ||
2263 | )? | ||
2264 | otherlv_2=LeftCurlyBracket | ||
2265 | { | ||
2266 | newLeafNode(otherlv_2, grammarAccess.getQuantifiedExpressionAccess().getLeftCurlyBracketKeyword_2()); | ||
2267 | } | ||
2268 | ( | ||
2269 | ( | ||
2270 | { | ||
2271 | newCompositeNode(grammarAccess.getQuantifiedExpressionAccess().getBodyExpressionParserRuleCall_3_0()); | ||
2272 | } | ||
2273 | lv_body_3_0=ruleExpression | ||
2274 | { | ||
2275 | if ($current==null) { | ||
2276 | $current = createModelElementForParent(grammarAccess.getQuantifiedExpressionRule()); | ||
1596 | } | 2277 | } |
1597 | set( | 2278 | set( |
1598 | $current, | 2279 | $current, |
1599 | "body", | 2280 | "body", |
1600 | lv_body_2_0, | 2281 | lv_body_3_0, |
1601 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | 2282 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); |
1602 | afterParserOrEnumRuleCall(); | 2283 | afterParserOrEnumRuleCall(); |
1603 | } | 2284 | } |
1604 | ) | 2285 | ) |
1605 | ) | 2286 | ) |
1606 | otherlv_3=RightCurlyBracket | 2287 | otherlv_4=RightCurlyBracket |
1607 | { | 2288 | { |
1608 | newLeafNode(otherlv_3, grammarAccess.getCountAccess().getRightCurlyBracketKeyword_3()); | 2289 | newLeafNode(otherlv_4, grammarAccess.getQuantifiedExpressionAccess().getRightCurlyBracketKeyword_4()); |
1609 | } | 2290 | } |
1610 | ) | 2291 | ) |
1611 | ; | 2292 | ; |
@@ -1629,71 +2310,89 @@ ruleAggregation returns [EObject current=null] | |||
1629 | ( | 2310 | ( |
1630 | ( | 2311 | ( |
1631 | { | 2312 | { |
1632 | newCompositeNode(grammarAccess.getAggregationAccess().getOpAggregationOpEnumRuleCall_0_0()); | ||
1633 | } | ||
1634 | lv_op_0_0=ruleAggregationOp | ||
1635 | { | ||
1636 | if ($current==null) { | 2313 | if ($current==null) { |
1637 | $current = createModelElementForParent(grammarAccess.getAggregationRule()); | 2314 | $current = createModelElement(grammarAccess.getAggregationRule()); |
1638 | } | 2315 | } |
1639 | set( | 2316 | } |
1640 | $current, | 2317 | { |
1641 | "op", | 2318 | newCompositeNode(grammarAccess.getAggregationAccess().getOpNamedElementCrossReference_0_0()); |
1642 | lv_op_0_0, | 2319 | } |
1643 | "org.eclipse.viatra.solver.language.SolverLanguage.AggregationOp"); | 2320 | ruleQualifiedName |
2321 | { | ||
1644 | afterParserOrEnumRuleCall(); | 2322 | afterParserOrEnumRuleCall(); |
1645 | } | 2323 | } |
1646 | ) | 2324 | ) |
1647 | ) | 2325 | ) |
1648 | otherlv_1=LeftCurlyBracket | ||
1649 | { | ||
1650 | newLeafNode(otherlv_1, grammarAccess.getAggregationAccess().getLeftCurlyBracketKeyword_1()); | ||
1651 | } | ||
1652 | ( | 2326 | ( |
1653 | ( | 2327 | ( |
1654 | { | 2328 | { |
1655 | newCompositeNode(grammarAccess.getAggregationAccess().getBodyExpressionParserRuleCall_2_0()); | 2329 | newCompositeNode(grammarAccess.getAggregationAccess().getLocalVariablesLocalVariablesParserRuleCall_1_0()); |
1656 | } | 2330 | } |
1657 | lv_body_2_0=ruleExpression | 2331 | lv_localVariables_1_0=ruleLocalVariables |
1658 | { | 2332 | { |
1659 | if ($current==null) { | 2333 | if ($current==null) { |
1660 | $current = createModelElementForParent(grammarAccess.getAggregationRule()); | 2334 | $current = createModelElementForParent(grammarAccess.getAggregationRule()); |
1661 | } | 2335 | } |
1662 | set( | 2336 | set( |
1663 | $current, | 2337 | $current, |
1664 | "body", | 2338 | "localVariables", |
1665 | lv_body_2_0, | 2339 | lv_localVariables_1_0, |
1666 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | 2340 | "org.eclipse.viatra.solver.language.SolverLanguage.LocalVariables"); |
1667 | afterParserOrEnumRuleCall(); | 2341 | afterParserOrEnumRuleCall(); |
1668 | } | 2342 | } |
1669 | ) | 2343 | ) |
1670 | ) | 2344 | )? |
1671 | otherlv_3=VerticalLine | 2345 | otherlv_2=LeftCurlyBracket |
1672 | { | 2346 | { |
1673 | newLeafNode(otherlv_3, grammarAccess.getAggregationAccess().getVerticalLineKeyword_3()); | 2347 | newLeafNode(otherlv_2, grammarAccess.getAggregationAccess().getLeftCurlyBracketKeyword_2()); |
1674 | } | 2348 | } |
1675 | ( | 2349 | ( |
1676 | ( | 2350 | ( |
1677 | { | 2351 | { |
1678 | newCompositeNode(grammarAccess.getAggregationAccess().getConditionExpressionParserRuleCall_4_0()); | 2352 | newCompositeNode(grammarAccess.getAggregationAccess().getBodyExpressionParserRuleCall_3_0()); |
1679 | } | 2353 | } |
1680 | lv_condition_4_0=ruleExpression | 2354 | lv_body_3_0=ruleExpression |
1681 | { | 2355 | { |
1682 | if ($current==null) { | 2356 | if ($current==null) { |
1683 | $current = createModelElementForParent(grammarAccess.getAggregationRule()); | 2357 | $current = createModelElementForParent(grammarAccess.getAggregationRule()); |
1684 | } | 2358 | } |
1685 | set( | 2359 | set( |
1686 | $current, | 2360 | $current, |
1687 | "condition", | 2361 | "body", |
1688 | lv_condition_4_0, | 2362 | lv_body_3_0, |
1689 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | 2363 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); |
1690 | afterParserOrEnumRuleCall(); | 2364 | afterParserOrEnumRuleCall(); |
1691 | } | 2365 | } |
1692 | ) | 2366 | ) |
1693 | ) | 2367 | ) |
1694 | otherlv_5=RightCurlyBracket | 2368 | ( |
2369 | otherlv_4=VerticalLine | ||
2370 | { | ||
2371 | newLeafNode(otherlv_4, grammarAccess.getAggregationAccess().getVerticalLineKeyword_4_0()); | ||
2372 | } | ||
2373 | ( | ||
2374 | ( | ||
2375 | { | ||
2376 | newCompositeNode(grammarAccess.getAggregationAccess().getConditionExpressionParserRuleCall_4_1_0()); | ||
2377 | } | ||
2378 | lv_condition_5_0=ruleExpression | ||
2379 | { | ||
2380 | if ($current==null) { | ||
2381 | $current = createModelElementForParent(grammarAccess.getAggregationRule()); | ||
2382 | } | ||
2383 | set( | ||
2384 | $current, | ||
2385 | "condition", | ||
2386 | lv_condition_5_0, | ||
2387 | "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | ||
2388 | afterParserOrEnumRuleCall(); | ||
2389 | } | ||
2390 | ) | ||
2391 | ) | ||
2392 | )? | ||
2393 | otherlv_6=RightCurlyBracket | ||
1695 | { | 2394 | { |
1696 | newLeafNode(otherlv_5, grammarAccess.getAggregationAccess().getRightCurlyBracketKeyword_5()); | 2395 | newLeafNode(otherlv_6, grammarAccess.getAggregationAccess().getRightCurlyBracketKeyword_5()); |
1697 | } | 2396 | } |
1698 | ) | 2397 | ) |
1699 | ; | 2398 | ; |
@@ -3485,8 +4184,8 @@ finally { | |||
3485 | myHiddenTokenState.restore(); | 4184 | myHiddenTokenState.restore(); |
3486 | } | 4185 | } |
3487 | 4186 | ||
3488 | // Rule MetricType | 4187 | // Rule ImplicationOperator |
3489 | ruleMetricType returns [Enumerator current=null] | 4188 | ruleImplicationOperator returns [Enumerator current=null] |
3490 | @init { | 4189 | @init { |
3491 | enterRule(); | 4190 | enterRule(); |
3492 | } | 4191 | } |
@@ -3494,21 +4193,11 @@ ruleMetricType returns [Enumerator current=null] | |||
3494 | leaveRule(); | 4193 | leaveRule(); |
3495 | }: | 4194 | }: |
3496 | ( | 4195 | ( |
3497 | ( | 4196 | enumLiteral_0=EqualsSignGreaterThanSign |
3498 | enumLiteral_0=Int | 4197 | { |
3499 | { | 4198 | $current = grammarAccess.getImplicationOperatorAccess().getIMPLIESEnumLiteralDeclaration().getEnumLiteral().getInstance(); |
3500 | $current = grammarAccess.getMetricTypeAccess().getINTEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | 4199 | newLeafNode(enumLiteral_0, grammarAccess.getImplicationOperatorAccess().getIMPLIESEnumLiteralDeclaration()); |
3501 | newLeafNode(enumLiteral_0, grammarAccess.getMetricTypeAccess().getINTEnumLiteralDeclaration_0()); | 4200 | } |
3502 | } | ||
3503 | ) | ||
3504 | | | ||
3505 | ( | ||
3506 | enumLiteral_1=Real | ||
3507 | { | ||
3508 | $current = grammarAccess.getMetricTypeAccess().getREALEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
3509 | newLeafNode(enumLiteral_1, grammarAccess.getMetricTypeAccess().getREALEnumLiteralDeclaration_1()); | ||
3510 | } | ||
3511 | ) | ||
3512 | ) | 4201 | ) |
3513 | ; | 4202 | ; |
3514 | 4203 | ||
@@ -3709,8 +4398,8 @@ ruleUnaryOp returns [Enumerator current=null] | |||
3709 | ) | 4398 | ) |
3710 | ; | 4399 | ; |
3711 | 4400 | ||
3712 | // Rule AggregationOp | 4401 | // Rule Quantifier |
3713 | ruleAggregationOp returns [Enumerator current=null] | 4402 | ruleQuantifier returns [Enumerator current=null] |
3714 | @init { | 4403 | @init { |
3715 | enterRule(); | 4404 | enterRule(); |
3716 | } | 4405 | } |
@@ -3719,50 +4408,26 @@ ruleAggregationOp returns [Enumerator current=null] | |||
3719 | }: | 4408 | }: |
3720 | ( | 4409 | ( |
3721 | ( | 4410 | ( |
3722 | enumLiteral_0=Only | 4411 | enumLiteral_0=Exists |
3723 | { | ||
3724 | $current = grammarAccess.getAggregationOpAccess().getONLYEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
3725 | newLeafNode(enumLiteral_0, grammarAccess.getAggregationOpAccess().getONLYEnumLiteralDeclaration_0()); | ||
3726 | } | ||
3727 | ) | ||
3728 | | | ||
3729 | ( | ||
3730 | enumLiteral_1=Sum | ||
3731 | { | ||
3732 | $current = grammarAccess.getAggregationOpAccess().getSUMEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
3733 | newLeafNode(enumLiteral_1, grammarAccess.getAggregationOpAccess().getSUMEnumLiteralDeclaration_1()); | ||
3734 | } | ||
3735 | ) | ||
3736 | | | ||
3737 | ( | ||
3738 | enumLiteral_2=Prod | ||
3739 | { | ||
3740 | $current = grammarAccess.getAggregationOpAccess().getPRODEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); | ||
3741 | newLeafNode(enumLiteral_2, grammarAccess.getAggregationOpAccess().getPRODEnumLiteralDeclaration_2()); | ||
3742 | } | ||
3743 | ) | ||
3744 | | | ||
3745 | ( | ||
3746 | enumLiteral_3=Avg | ||
3747 | { | 4412 | { |
3748 | $current = grammarAccess.getAggregationOpAccess().getAVGEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); | 4413 | $current = grammarAccess.getQuantifierAccess().getEXISTSEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); |
3749 | newLeafNode(enumLiteral_3, grammarAccess.getAggregationOpAccess().getAVGEnumLiteralDeclaration_3()); | 4414 | newLeafNode(enumLiteral_0, grammarAccess.getQuantifierAccess().getEXISTSEnumLiteralDeclaration_0()); |
3750 | } | 4415 | } |
3751 | ) | 4416 | ) |
3752 | | | 4417 | | |
3753 | ( | 4418 | ( |
3754 | enumLiteral_4=Min | 4419 | enumLiteral_1=Forall |
3755 | { | 4420 | { |
3756 | $current = grammarAccess.getAggregationOpAccess().getMINEnumLiteralDeclaration_4().getEnumLiteral().getInstance(); | 4421 | $current = grammarAccess.getQuantifierAccess().getFORALLEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); |
3757 | newLeafNode(enumLiteral_4, grammarAccess.getAggregationOpAccess().getMINEnumLiteralDeclaration_4()); | 4422 | newLeafNode(enumLiteral_1, grammarAccess.getQuantifierAccess().getFORALLEnumLiteralDeclaration_1()); |
3758 | } | 4423 | } |
3759 | ) | 4424 | ) |
3760 | | | 4425 | | |
3761 | ( | 4426 | ( |
3762 | enumLiteral_5=Max | 4427 | enumLiteral_2=Count |
3763 | { | 4428 | { |
3764 | $current = grammarAccess.getAggregationOpAccess().getMAXEnumLiteralDeclaration_5().getEnumLiteral().getInstance(); | 4429 | $current = grammarAccess.getQuantifierAccess().getCOUNTEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); |
3765 | newLeafNode(enumLiteral_5, grammarAccess.getAggregationOpAccess().getMAXEnumLiteralDeclaration_5()); | 4430 | newLeafNode(enumLiteral_2, grammarAccess.getQuantifierAccess().getCOUNTEnumLiteralDeclaration_2()); |
3766 | } | 4431 | } |
3767 | ) | 4432 | ) |
3768 | ) | 4433 | ) |