/* * generated by Xtext 2.21.0 */ parser grammar InternalSolverLanguageParser; options { tokenVocab=InternalSolverLanguageLexer; superClass=AbstractInternalAntlrParser; } @header { package org.eclipse.viatra.solver.language.parser.antlr.internal; import org.eclipse.xtext.*; import org.eclipse.xtext.parser.*; import org.eclipse.xtext.parser.impl.*; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.common.util.Enumerator; import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; import org.eclipse.xtext.parser.antlr.XtextTokenStream; import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; import org.eclipse.viatra.solver.language.services.SolverLanguageGrammarAccess; } @members { private SolverLanguageGrammarAccess grammarAccess; public InternalSolverLanguageParser(TokenStream input, SolverLanguageGrammarAccess grammarAccess) { this(input); this.grammarAccess = grammarAccess; registerRules(grammarAccess.getGrammar()); } @Override protected String getFirstRuleName() { return "Problem"; } @Override protected SolverLanguageGrammarAccess getGrammarAccess() { return grammarAccess; } } @rulecatch { catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } } // Entry rule entryRuleProblem entryRuleProblem returns [EObject current=null]: { newCompositeNode(grammarAccess.getProblemRule()); } iv_ruleProblem=ruleProblem { $current=$iv_ruleProblem.current; } EOF; // Rule Problem ruleProblem returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); } lv_statements_0_0=ruleStatement { if ($current==null) { $current = createModelElementForParent(grammarAccess.getProblemRule()); } add( $current, "statements", lv_statements_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.Statement"); afterParserOrEnumRuleCall(); } ) )* ; // Entry rule entryRuleStatement entryRuleStatement returns [EObject current=null]: { newCompositeNode(grammarAccess.getStatementRule()); } iv_ruleStatement=ruleStatement { $current=$iv_ruleStatement.current; } EOF; // Rule Statement ruleStatement returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getStatementAccess().getAssertionOrDefinitionParserRuleCall_0_0()); } this_AssertionOrDefinition_0=ruleAssertionOrDefinition { $current = $this_AssertionOrDefinition_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_0_1()); } this_PredicateDefinition_1=rulePredicateDefinition { $current = $this_PredicateDefinition_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getUnnamedErrorPrediateDefinitionParserRuleCall_0_2()); } this_UnnamedErrorPrediateDefinition_2=ruleUnnamedErrorPrediateDefinition { $current = $this_UnnamedErrorPrediateDefinition_2.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getDefaultDefinitionParserRuleCall_0_3()); } this_DefaultDefinition_3=ruleDefaultDefinition { $current = $this_DefaultDefinition_3.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getMetricDefinitionParserRuleCall_0_4()); } this_MetricDefinition_4=ruleMetricDefinition { $current = $this_MetricDefinition_4.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getExternPredicateDefinitionParserRuleCall_0_5()); } this_ExternPredicateDefinition_5=ruleExternPredicateDefinition { $current = $this_ExternPredicateDefinition_5.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getExternMetricDefinitionParserRuleCall_0_6()); } this_ExternMetricDefinition_6=ruleExternMetricDefinition { $current = $this_ExternMetricDefinition_6.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getExternAggregatorDefinitionParserRuleCall_0_7()); } this_ExternAggregatorDefinition_7=ruleExternAggregatorDefinition { $current = $this_ExternAggregatorDefinition_7.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getExternDatatypeDefinitionParserRuleCall_0_8()); } this_ExternDatatypeDefinition_8=ruleExternDatatypeDefinition { $current = $this_ExternDatatypeDefinition_8.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getClassDefinitionParserRuleCall_0_9()); } this_ClassDefinition_9=ruleClassDefinition { $current = $this_ClassDefinition_9.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getScopeDefinitionParserRuleCall_0_10()); } this_ScopeDefinition_10=ruleScopeDefinition { $current = $this_ScopeDefinition_10.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getObjectiveDefinitionParserRuleCall_0_11()); } this_ObjectiveDefinition_11=ruleObjectiveDefinition { $current = $this_ObjectiveDefinition_11.current; afterParserOrEnumRuleCall(); } ) this_FULL_STOP_12=RULE_FULL_STOP { newLeafNode(this_FULL_STOP_12, grammarAccess.getStatementAccess().getFULL_STOPTerminalRuleCall_1()); } ) ; // Entry rule entryRuleAssertionOrDefinition entryRuleAssertionOrDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getAssertionOrDefinitionRule()); } iv_ruleAssertionOrDefinition=ruleAssertionOrDefinition { $current=$iv_ruleAssertionOrDefinition.current; } EOF; // Rule AssertionOrDefinition ruleAssertionOrDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getExpressionParserRuleCall_0()); } this_Expression_0=ruleExpression { $current = $this_Expression_0.current; afterParserOrEnumRuleCall(); } ( ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getAssertionOrDefinitionAccess().getInterpretationBodyAction_1_0_0(), $current); } ) otherlv_2=Colon { newLeafNode(otherlv_2, grammarAccess.getAssertionOrDefinitionAccess().getColonKeyword_1_0_1()); } ( ( { newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getRangeExpressionParserRuleCall_1_0_2_0()); } lv_range_3_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule()); } set( $current, "range", lv_range_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) | ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getAssertionOrDefinitionAccess().getPredicateDefinitionHeadAction_1_1_0(), $current); } ) otherlv_5=ColonHyphenMinus { newLeafNode(otherlv_5, grammarAccess.getAssertionOrDefinitionAccess().getColonHyphenMinusKeyword_1_1_1()); } ( ( { newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getBodyExpressionParserRuleCall_1_1_2_0()); } lv_body_6_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule()); } set( $current, "body", lv_body_6_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) | ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getAssertionOrDefinitionAccess().getMetricDefinitionHeadAction_1_2_0(), $current); } ) otherlv_8=EqualsSign { newLeafNode(otherlv_8, grammarAccess.getAssertionOrDefinitionAccess().getEqualsSignKeyword_1_2_1()); } ( ( { newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getBodyExpressionParserRuleCall_1_2_2_0()); } lv_body_9_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule()); } set( $current, "body", lv_body_9_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) )? ) ; // Entry rule entryRulePredicateDefinition entryRulePredicateDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getPredicateDefinitionRule()); } iv_rulePredicateDefinition=rulePredicateDefinition { $current=$iv_rulePredicateDefinition.current; } EOF; // Rule PredicateDefinition rulePredicateDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( ( ( lv_functional_0_0=Functional { newLeafNode(lv_functional_0_0, grammarAccess.getPredicateDefinitionAccess().getFunctionalFunctionalKeyword_0_0_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); } setWithLastConsumed($current, "functional", true, "functional"); } ) ) ( ( lv_error_1_0=Error { newLeafNode(lv_error_1_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); } setWithLastConsumed($current, "error", true, "error"); } ) )? ) | ( ( ( lv_error_2_0=Error { newLeafNode(lv_error_2_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_1_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); } setWithLastConsumed($current, "error", true, "error"); } ) ) ( ( lv_functional_3_0=Functional { newLeafNode(lv_functional_3_0, grammarAccess.getPredicateDefinitionAccess().getFunctionalFunctionalKeyword_0_1_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); } setWithLastConsumed($current, "functional", true, "functional"); } ) )? ) ) ( ( { newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getHeadCallParserRuleCall_1_0()); } lv_head_4_0=ruleCall { if ($current==null) { $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); } set( $current, "head", lv_head_4_0, "org.eclipse.viatra.solver.language.SolverLanguage.Call"); afterParserOrEnumRuleCall(); } ) ) otherlv_5=ColonHyphenMinus { newLeafNode(otherlv_5, grammarAccess.getPredicateDefinitionAccess().getColonHyphenMinusKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodyExpressionParserRuleCall_3_0()); } lv_body_6_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); } set( $current, "body", lv_body_6_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleUnnamedErrorPrediateDefinition entryRuleUnnamedErrorPrediateDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getUnnamedErrorPrediateDefinitionRule()); } iv_ruleUnnamedErrorPrediateDefinition=ruleUnnamedErrorPrediateDefinition { $current=$iv_ruleUnnamedErrorPrediateDefinition.current; } EOF; // Rule UnnamedErrorPrediateDefinition ruleUnnamedErrorPrediateDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Error { newLeafNode(otherlv_0, grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getErrorKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getArgumentListArgumentListParserRuleCall_1_0()); } lv_argumentList_1_0=ruleArgumentList { if ($current==null) { $current = createModelElementForParent(grammarAccess.getUnnamedErrorPrediateDefinitionRule()); } set( $current, "argumentList", lv_argumentList_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList"); afterParserOrEnumRuleCall(); } ) ) otherlv_2=ColonHyphenMinus { newLeafNode(otherlv_2, grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getColonHyphenMinusKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getBodyExpressionParserRuleCall_3_0()); } lv_body_3_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getUnnamedErrorPrediateDefinitionRule()); } set( $current, "body", lv_body_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleDefaultDefinition entryRuleDefaultDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getDefaultDefinitionRule()); } iv_ruleDefaultDefinition=ruleDefaultDefinition { $current=$iv_ruleDefaultDefinition.current; } EOF; // Rule DefaultDefinition ruleDefaultDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Default { newLeafNode(otherlv_0, grammarAccess.getDefaultDefinitionAccess().getDefaultKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getDefaultDefinitionAccess().getHeadCallParserRuleCall_1_0()); } lv_head_1_0=ruleCall { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDefaultDefinitionRule()); } set( $current, "head", lv_head_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.Call"); afterParserOrEnumRuleCall(); } ) ) otherlv_2=Colon { newLeafNode(otherlv_2, grammarAccess.getDefaultDefinitionAccess().getColonKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getDefaultDefinitionAccess().getRangeExpressionParserRuleCall_3_0()); } lv_range_3_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDefaultDefinitionRule()); } set( $current, "range", lv_range_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleMetricDefinition entryRuleMetricDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getMetricDefinitionRule()); } iv_ruleMetricDefinition=ruleMetricDefinition { $current=$iv_ruleMetricDefinition.current; } EOF; // Rule MetricDefinition ruleMetricDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getMetricDefinitionRule()); } } { newCompositeNode(grammarAccess.getMetricDefinitionAccess().getTypeNamedElementCrossReference_0_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getMetricDefinitionAccess().getHeadCallParserRuleCall_1_0()); } lv_head_1_0=ruleCall { if ($current==null) { $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); } set( $current, "head", lv_head_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.Call"); afterParserOrEnumRuleCall(); } ) ) otherlv_2=EqualsSign { newLeafNode(otherlv_2, grammarAccess.getMetricDefinitionAccess().getEqualsSignKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getMetricDefinitionAccess().getBodyExpressionParserRuleCall_3_0()); } lv_body_3_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule()); } set( $current, "body", lv_body_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleExternPredicateDefinition entryRuleExternPredicateDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getExternPredicateDefinitionRule()); } iv_ruleExternPredicateDefinition=ruleExternPredicateDefinition { $current=$iv_ruleExternPredicateDefinition.current; } EOF; // Rule ExternPredicateDefinition ruleExternPredicateDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Extern { newLeafNode(otherlv_0, grammarAccess.getExternPredicateDefinitionAccess().getExternKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getExternPredicateDefinitionAccess().getNameQualifiedNameParserRuleCall_1_0()); } lv_name_1_0=ruleQualifiedName { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExternPredicateDefinitionRule()); } set( $current, "name", lv_name_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.QualifiedName"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getExternPredicateDefinitionAccess().getArgumentListArgumentListParserRuleCall_2_0()); } lv_argumentList_2_0=ruleArgumentList { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExternPredicateDefinitionRule()); } set( $current, "argumentList", lv_argumentList_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleExternMetricDefinition entryRuleExternMetricDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getExternMetricDefinitionRule()); } iv_ruleExternMetricDefinition=ruleExternMetricDefinition { $current=$iv_ruleExternMetricDefinition.current; } EOF; // Rule ExternMetricDefinition ruleExternMetricDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Extern { newLeafNode(otherlv_0, grammarAccess.getExternMetricDefinitionAccess().getExternKeyword_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getExternMetricDefinitionRule()); } } { newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getTypeNamedElementCrossReference_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getNameQualifiedNameParserRuleCall_2_0()); } lv_name_2_0=ruleQualifiedName { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule()); } set( $current, "name", lv_name_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.QualifiedName"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getArgumentListArgumentListParserRuleCall_3_0()); } lv_argumentList_3_0=ruleArgumentList { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule()); } set( $current, "argumentList", lv_argumentList_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleExternAggregatorDefinition entryRuleExternAggregatorDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getExternAggregatorDefinitionRule()); } iv_ruleExternAggregatorDefinition=ruleExternAggregatorDefinition { $current=$iv_ruleExternAggregatorDefinition.current; } EOF; // Rule ExternAggregatorDefinition ruleExternAggregatorDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Extern { newLeafNode(otherlv_0, grammarAccess.getExternAggregatorDefinitionAccess().getExternKeyword_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getExternAggregatorDefinitionRule()); } } { newCompositeNode(grammarAccess.getExternAggregatorDefinitionAccess().getTypeNamedElementCrossReference_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getExternAggregatorDefinitionAccess().getNameQualifiedNameParserRuleCall_2_0()); } lv_name_2_0=ruleQualifiedName { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExternAggregatorDefinitionRule()); } set( $current, "name", lv_name_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.QualifiedName"); afterParserOrEnumRuleCall(); } ) ) otherlv_3=LeftCurlyBracket { newLeafNode(otherlv_3, grammarAccess.getExternAggregatorDefinitionAccess().getLeftCurlyBracketKeyword_3()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getExternAggregatorDefinitionRule()); } } { newCompositeNode(grammarAccess.getExternAggregatorDefinitionAccess().getInputTypeNamedElementCrossReference_4_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) otherlv_5=FullStopFullStopFullStop { newLeafNode(otherlv_5, grammarAccess.getExternAggregatorDefinitionAccess().getFullStopFullStopFullStopKeyword_5()); } otherlv_6=RightCurlyBracket { newLeafNode(otherlv_6, grammarAccess.getExternAggregatorDefinitionAccess().getRightCurlyBracketKeyword_6()); } ) ; // Entry rule entryRuleExternDatatypeDefinition entryRuleExternDatatypeDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getExternDatatypeDefinitionRule()); } iv_ruleExternDatatypeDefinition=ruleExternDatatypeDefinition { $current=$iv_ruleExternDatatypeDefinition.current; } EOF; // Rule ExternDatatypeDefinition ruleExternDatatypeDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Extern { newLeafNode(otherlv_0, grammarAccess.getExternDatatypeDefinitionAccess().getExternKeyword_0()); } otherlv_1=Datatype { newLeafNode(otherlv_1, grammarAccess.getExternDatatypeDefinitionAccess().getDatatypeKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getExternDatatypeDefinitionAccess().getNameQualifiedNameParserRuleCall_2_0()); } lv_name_2_0=ruleQualifiedName { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExternDatatypeDefinitionRule()); } set( $current, "name", lv_name_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.QualifiedName"); afterParserOrEnumRuleCall(); } ) ) ( otherlv_3=Extends { newLeafNode(otherlv_3, grammarAccess.getExternDatatypeDefinitionAccess().getExtendsKeyword_3_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getExternDatatypeDefinitionRule()); } } { newCompositeNode(grammarAccess.getExternDatatypeDefinitionAccess().getSupertypesNamedElementCrossReference_3_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ( otherlv_5=Comma { newLeafNode(otherlv_5, grammarAccess.getExternDatatypeDefinitionAccess().getCommaKeyword_3_2_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getExternDatatypeDefinitionRule()); } } { newCompositeNode(grammarAccess.getExternDatatypeDefinitionAccess().getSupertypesNamedElementCrossReference_3_2_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) )* ) ) ; // Entry rule entryRuleVariable entryRuleVariable returns [EObject current=null]: { newCompositeNode(grammarAccess.getVariableRule()); } iv_ruleVariable=ruleVariable { $current=$iv_ruleVariable.current; } EOF; // Rule Variable ruleVariable returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getVariableRule()); } } { newCompositeNode(grammarAccess.getVariableAccess().getTypeNamedElementCrossReference_0_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) )? ( ( lv_name_1_0=RULE_ID { newLeafNode(lv_name_1_0, grammarAccess.getVariableAccess().getNameIDTerminalRuleCall_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getVariableRule()); } setWithLastConsumed( $current, "name", lv_name_1_0, "org.eclipse.xtext.common.Terminals.ID"); } ) ) ) ; // Entry rule entryRuleExpression entryRuleExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getExpressionRule()); } iv_ruleExpression=ruleExpression { $current=$iv_ruleExpression.current; } EOF; // Rule Expression ruleExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getExpressionAccess().getIfElseParserRuleCall_0()); } this_IfElse_0=ruleIfElse { $current = $this_IfElse_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getExpressionAccess().getLetParserRuleCall_1()); } this_Let_1=ruleLet { $current = $this_Let_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getExpressionAccess().getImplicationExpressionParserRuleCall_2()); } this_ImplicationExpression_2=ruleImplicationExpression { $current = $this_ImplicationExpression_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleIfElse entryRuleIfElse returns [EObject current=null]: { newCompositeNode(grammarAccess.getIfElseRule()); } iv_ruleIfElse=ruleIfElse { $current=$iv_ruleIfElse.current; } EOF; // Rule IfElse ruleIfElse returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=If { newLeafNode(otherlv_0, grammarAccess.getIfElseAccess().getIfKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getIfElseAccess().getConditionExpressionParserRuleCall_1_0()); } lv_condition_1_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getIfElseRule()); } set( $current, "condition", lv_condition_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) otherlv_2=Then { newLeafNode(otherlv_2, grammarAccess.getIfElseAccess().getThenKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getIfElseAccess().getThenExpressionParserRuleCall_3_0()); } lv_then_3_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getIfElseRule()); } set( $current, "then", lv_then_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) otherlv_4=Else { newLeafNode(otherlv_4, grammarAccess.getIfElseAccess().getElseKeyword_4()); } ( ( { newCompositeNode(grammarAccess.getIfElseAccess().getElseExpressionParserRuleCall_5_0()); } lv_else_5_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getIfElseRule()); } set( $current, "else", lv_else_5_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleLet entryRuleLet returns [EObject current=null]: { newCompositeNode(grammarAccess.getLetRule()); } iv_ruleLet=ruleLet { $current=$iv_ruleLet.current; } EOF; // Rule Let ruleLet returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Let { newLeafNode(otherlv_0, grammarAccess.getLetAccess().getLetKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getLetAccess().getBindingsLetBindingParserRuleCall_1_0()); } lv_bindings_1_0=ruleLetBinding { if ($current==null) { $current = createModelElementForParent(grammarAccess.getLetRule()); } add( $current, "bindings", lv_bindings_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.LetBinding"); afterParserOrEnumRuleCall(); } ) ) ( otherlv_2=Comma { newLeafNode(otherlv_2, grammarAccess.getLetAccess().getCommaKeyword_2_0()); } ( ( { newCompositeNode(grammarAccess.getLetAccess().getBindingsLetBindingParserRuleCall_2_1_0()); } lv_bindings_3_0=ruleLetBinding { if ($current==null) { $current = createModelElementForParent(grammarAccess.getLetRule()); } add( $current, "bindings", lv_bindings_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.LetBinding"); afterParserOrEnumRuleCall(); } ) ) )* otherlv_4=In { newLeafNode(otherlv_4, grammarAccess.getLetAccess().getInKeyword_3()); } ( ( { newCompositeNode(grammarAccess.getLetAccess().getBodyExpressionParserRuleCall_4_0()); } lv_body_5_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getLetRule()); } set( $current, "body", lv_body_5_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleLetBinding entryRuleLetBinding returns [EObject current=null]: { newCompositeNode(grammarAccess.getLetBindingRule()); } iv_ruleLetBinding=ruleLetBinding { $current=$iv_ruleLetBinding.current; } EOF; // Rule LetBinding ruleLetBinding returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { newCompositeNode(grammarAccess.getLetBindingAccess().getVariableVariableParserRuleCall_0_0()); } lv_variable_0_0=ruleVariable { if ($current==null) { $current = createModelElementForParent(grammarAccess.getLetBindingRule()); } set( $current, "variable", lv_variable_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); afterParserOrEnumRuleCall(); } ) ) otherlv_1=EqualsSign { newLeafNode(otherlv_1, grammarAccess.getLetBindingAccess().getEqualsSignKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getLetBindingAccess().getValueAdditiveExpressionParserRuleCall_2_0()); } lv_value_2_0=ruleAdditiveExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getLetBindingRule()); } set( $current, "value", lv_value_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.AdditiveExpression"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleImplicationExpression entryRuleImplicationExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getImplicationExpressionRule()); } iv_ruleImplicationExpression=ruleImplicationExpression { $current=$iv_ruleImplicationExpression.current; } EOF; // Rule ImplicationExpression ruleImplicationExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getImplicationExpressionAccess().getDisjunctiveExpressionParserRuleCall_0()); } this_DisjunctiveExpression_0=ruleDisjunctiveExpression { $current = $this_DisjunctiveExpression_0.current; afterParserOrEnumRuleCall(); } ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getImplicationExpressionAccess().getBinaryExpressionLeftAction_1_0(), $current); } ) ( ( { newCompositeNode(grammarAccess.getImplicationExpressionAccess().getOpImplicationOperatorEnumRuleCall_1_1_0()); } lv_op_2_0=ruleImplicationOperator { if ($current==null) { $current = createModelElementForParent(grammarAccess.getImplicationExpressionRule()); } set( $current, "op", lv_op_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.ImplicationOperator"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getImplicationExpressionAccess().getRightImplicationExpressionParserRuleCall_1_2_0()); } lv_right_3_0=ruleImplicationExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getImplicationExpressionRule()); } set( $current, "right", lv_right_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.ImplicationExpression"); afterParserOrEnumRuleCall(); } ) ) )? ) ; // Entry rule entryRuleDisjunctiveExpression entryRuleDisjunctiveExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getDisjunctiveExpressionRule()); } iv_ruleDisjunctiveExpression=ruleDisjunctiveExpression { $current=$iv_ruleDisjunctiveExpression.current; } EOF; // Rule DisjunctiveExpression ruleDisjunctiveExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getConjunctiveExpressionParserRuleCall_0()); } this_ConjunctiveExpression_0=ruleConjunctiveExpression { $current = $this_ConjunctiveExpression_0.current; afterParserOrEnumRuleCall(); } ( ( ( { $current = forceCreateModelElementAndAdd( grammarAccess.getDisjunctiveExpressionAccess().getDisjunctionChildrenAction_1_0_0(), $current); } ) ( otherlv_2=Semicolon { newLeafNode(otherlv_2, grammarAccess.getDisjunctiveExpressionAccess().getSemicolonKeyword_1_0_1_0()); } ( ( { newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getChildrenConjunctiveExpressionParserRuleCall_1_0_1_1_0()); } lv_children_3_0=ruleConjunctiveExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDisjunctiveExpressionRule()); } add( $current, "children", lv_children_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression"); afterParserOrEnumRuleCall(); } ) ) )+ ) | ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getDisjunctiveExpressionAccess().getCaseConditionAction_1_1_0(), $current); } ) otherlv_5=HyphenMinusGreaterThanSign { newLeafNode(otherlv_5, grammarAccess.getDisjunctiveExpressionAccess().getHyphenMinusGreaterThanSignKeyword_1_1_1()); } ( ( { newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getBodyConjunctiveExpressionParserRuleCall_1_1_2_0()); } lv_body_6_0=ruleConjunctiveExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDisjunctiveExpressionRule()); } set( $current, "body", lv_body_6_0, "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression"); afterParserOrEnumRuleCall(); } ) ) ( { $current = forceCreateModelElementAndAdd( grammarAccess.getDisjunctiveExpressionAccess().getSwitchCasesAction_1_1_3(), $current); } ) ( otherlv_8=Semicolon { newLeafNode(otherlv_8, grammarAccess.getDisjunctiveExpressionAccess().getSemicolonKeyword_1_1_4_0()); } ( ( { newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getCasesCaseParserRuleCall_1_1_4_1_0()); } lv_cases_9_0=ruleCase { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDisjunctiveExpressionRule()); } add( $current, "cases", lv_cases_9_0, "org.eclipse.viatra.solver.language.SolverLanguage.Case"); afterParserOrEnumRuleCall(); } ) ) )* ) )? ) ; // Entry rule entryRuleCase entryRuleCase returns [EObject current=null]: { newCompositeNode(grammarAccess.getCaseRule()); } iv_ruleCase=ruleCase { $current=$iv_ruleCase.current; } EOF; // Rule Case ruleCase returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { newCompositeNode(grammarAccess.getCaseAccess().getConditionConjunctiveExpressionParserRuleCall_0_0()); } lv_condition_0_0=ruleConjunctiveExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getCaseRule()); } set( $current, "condition", lv_condition_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression"); afterParserOrEnumRuleCall(); } ) ) otherlv_1=HyphenMinusGreaterThanSign { newLeafNode(otherlv_1, grammarAccess.getCaseAccess().getHyphenMinusGreaterThanSignKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getCaseAccess().getBodyConjunctiveExpressionParserRuleCall_2_0()); } lv_body_2_0=ruleConjunctiveExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getCaseRule()); } set( $current, "body", lv_body_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleConjunctiveExpression entryRuleConjunctiveExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getConjunctiveExpressionRule()); } iv_ruleConjunctiveExpression=ruleConjunctiveExpression { $current=$iv_ruleConjunctiveExpression.current; } EOF; // Rule ConjunctiveExpression ruleConjunctiveExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getConjunctiveExpressionAccess().getComparisonExpressionParserRuleCall_0()); } this_ComparisonExpression_0=ruleComparisonExpression { $current = $this_ComparisonExpression_0.current; afterParserOrEnumRuleCall(); } ( ( { $current = forceCreateModelElementAndAdd( grammarAccess.getConjunctiveExpressionAccess().getConjunctionChildrenAction_1_0(), $current); } ) ( otherlv_2=Comma { newLeafNode(otherlv_2, grammarAccess.getConjunctiveExpressionAccess().getCommaKeyword_1_1_0()); } ( ( { newCompositeNode(grammarAccess.getConjunctiveExpressionAccess().getChildrenComparisonExpressionParserRuleCall_1_1_1_0()); } lv_children_3_0=ruleComparisonExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getConjunctiveExpressionRule()); } add( $current, "children", lv_children_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonExpression"); afterParserOrEnumRuleCall(); } ) ) )+ )? ) ; // Entry rule entryRuleComparisonExpression entryRuleComparisonExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getComparisonExpressionRule()); } iv_ruleComparisonExpression=ruleComparisonExpression { $current=$iv_ruleComparisonExpression.current; } EOF; // Rule ComparisonExpression ruleComparisonExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getComparisonExpressionAccess().getAdditiveExpressionParserRuleCall_0()); } this_AdditiveExpression_0=ruleAdditiveExpression { $current = $this_AdditiveExpression_0.current; afterParserOrEnumRuleCall(); } ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getComparisonExpressionAccess().getComparisonLeftAction_1_0(), $current); } ) ( ( { newCompositeNode(grammarAccess.getComparisonExpressionAccess().getOpComparisonOperatorEnumRuleCall_1_1_0()); } lv_op_2_0=ruleComparisonOperator { if ($current==null) { $current = createModelElementForParent(grammarAccess.getComparisonExpressionRule()); } set( $current, "op", lv_op_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonOperator"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getComparisonExpressionAccess().getRightAdditiveExpressionParserRuleCall_1_2_0()); } lv_right_3_0=ruleAdditiveExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getComparisonExpressionRule()); } set( $current, "right", lv_right_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.AdditiveExpression"); afterParserOrEnumRuleCall(); } ) ) )? ) ; // Entry rule entryRuleAdditiveExpression entryRuleAdditiveExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getAdditiveExpressionRule()); } iv_ruleAdditiveExpression=ruleAdditiveExpression { $current=$iv_ruleAdditiveExpression.current; } EOF; // Rule AdditiveExpression ruleAdditiveExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0()); } this_MultiplicativeExpression_0=ruleMultiplicativeExpression { $current = $this_MultiplicativeExpression_0.current; afterParserOrEnumRuleCall(); } ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getAdditiveExpressionAccess().getBinaryExpressionLeftAction_1_0(), $current); } ) ( ( { newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getOpAdditiveBinaryOperatorEnumRuleCall_1_1_0()); } lv_op_2_0=ruleAdditiveBinaryOperator { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule()); } set( $current, "op", lv_op_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.AdditiveBinaryOperator"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_2_0()); } lv_right_3_0=ruleMultiplicativeExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule()); } set( $current, "right", lv_right_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicativeExpression"); afterParserOrEnumRuleCall(); } ) ) )* ) ; // Entry rule entryRuleMultiplicativeExpression entryRuleMultiplicativeExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getMultiplicativeExpressionRule()); } iv_ruleMultiplicativeExpression=ruleMultiplicativeExpression { $current=$iv_ruleMultiplicativeExpression.current; } EOF; // Rule MultiplicativeExpression ruleMultiplicativeExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getExponentialExpressionParserRuleCall_0()); } this_ExponentialExpression_0=ruleExponentialExpression { $current = $this_ExponentialExpression_0.current; afterParserOrEnumRuleCall(); } ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getMultiplicativeExpressionAccess().getBinaryExpressionLeftAction_1_0(), $current); } ) ( ( { newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getOpMultiplicativeBinaryOperatorEnumRuleCall_1_1_0()); } lv_op_2_0=ruleMultiplicativeBinaryOperator { if ($current==null) { $current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule()); } set( $current, "op", lv_op_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicativeBinaryOperator"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getRightExponentialExpressionParserRuleCall_1_2_0()); } lv_right_3_0=ruleExponentialExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule()); } set( $current, "right", lv_right_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialExpression"); afterParserOrEnumRuleCall(); } ) ) )* ) ; // Entry rule entryRuleExponentialExpression entryRuleExponentialExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getExponentialExpressionRule()); } iv_ruleExponentialExpression=ruleExponentialExpression { $current=$iv_ruleExponentialExpression.current; } EOF; // Rule ExponentialExpression ruleExponentialExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getExponentialExpressionAccess().getCastExpressionParserRuleCall_0()); } this_CastExpression_0=ruleCastExpression { $current = $this_CastExpression_0.current; afterParserOrEnumRuleCall(); } ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getExponentialExpressionAccess().getBinaryExpressionLeftAction_1_0(), $current); } ) ( ( { newCompositeNode(grammarAccess.getExponentialExpressionAccess().getOpExponentialOpEnumRuleCall_1_1_0()); } lv_op_2_0=ruleExponentialOp { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExponentialExpressionRule()); } set( $current, "op", lv_op_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialOp"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getExponentialExpressionAccess().getRightCastExpressionParserRuleCall_1_2_0()); } lv_right_3_0=ruleCastExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExponentialExpressionRule()); } set( $current, "right", lv_right_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.CastExpression"); afterParserOrEnumRuleCall(); } ) ) )? ) ; // Entry rule entryRuleCastExpression entryRuleCastExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getCastExpressionRule()); } iv_ruleCastExpression=ruleCastExpression { $current=$iv_ruleCastExpression.current; } EOF; // Rule CastExpression ruleCastExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getCastExpressionAccess().getUnaryExpressionParserRuleCall_0()); } this_UnaryExpression_0=ruleUnaryExpression { $current = $this_UnaryExpression_0.current; afterParserOrEnumRuleCall(); } ( ( { $current = forceCreateModelElementAndSet( grammarAccess.getCastExpressionAccess().getCastExpressionBodyAction_1_0(), $current); } ) otherlv_2=As { newLeafNode(otherlv_2, grammarAccess.getCastExpressionAccess().getAsKeyword_1_1()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getCastExpressionRule()); } } { newCompositeNode(grammarAccess.getCastExpressionAccess().getTypeNamedElementCrossReference_1_2_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) )? ) ; // Entry rule entryRuleUnaryExpression entryRuleUnaryExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getUnaryExpressionRule()); } iv_ruleUnaryExpression=ruleUnaryExpression { $current=$iv_ruleUnaryExpression.current; } EOF; // Rule UnaryExpression ruleUnaryExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getUnaryExpressionAccess().getAggregationExpressionParserRuleCall_0()); } this_AggregationExpression_0=ruleAggregationExpression { $current = $this_AggregationExpression_0.current; afterParserOrEnumRuleCall(); } | ( ( { $current = forceCreateModelElement( grammarAccess.getUnaryExpressionAccess().getUnaryExpressionAction_1_0(), $current); } ) ( ( { newCompositeNode(grammarAccess.getUnaryExpressionAccess().getOpUnaryOpEnumRuleCall_1_1_0()); } lv_op_2_0=ruleUnaryOp { if ($current==null) { $current = createModelElementForParent(grammarAccess.getUnaryExpressionRule()); } set( $current, "op", lv_op_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.UnaryOp"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getUnaryExpressionAccess().getBodyAggregationExpressionParserRuleCall_1_2_0()); } lv_body_3_0=ruleAggregationExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getUnaryExpressionRule()); } set( $current, "body", lv_body_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.AggregationExpression"); afterParserOrEnumRuleCall(); } ) ) ) ) ; // Entry rule entryRuleAggregationExpression entryRuleAggregationExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getAggregationExpressionRule()); } iv_ruleAggregationExpression=ruleAggregationExpression { $current=$iv_ruleAggregationExpression.current; } EOF; // Rule AggregationExpression ruleAggregationExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getAggregationExpressionAccess().getAtomicExpressionParserRuleCall_0()); } this_AtomicExpression_0=ruleAtomicExpression { $current = $this_AtomicExpression_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getAggregationExpressionAccess().getQuantifiedExpressionParserRuleCall_1()); } this_QuantifiedExpression_1=ruleQuantifiedExpression { $current = $this_QuantifiedExpression_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getAggregationExpressionAccess().getAggregationParserRuleCall_2()); } this_Aggregation_2=ruleAggregation { $current = $this_Aggregation_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleLocalVariables entryRuleLocalVariables returns [EObject current=null]: { newCompositeNode(grammarAccess.getLocalVariablesRule()); } iv_ruleLocalVariables=ruleLocalVariables { $current=$iv_ruleLocalVariables.current; } EOF; // Rule LocalVariables ruleLocalVariables returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { $current = forceCreateModelElement( grammarAccess.getLocalVariablesAccess().getLocalVariablesAction_0(), $current); } ) otherlv_1=LeftSquareBracket { newLeafNode(otherlv_1, grammarAccess.getLocalVariablesAccess().getLeftSquareBracketKeyword_1()); } ( ( ( { newCompositeNode(grammarAccess.getLocalVariablesAccess().getVariablesVariableParserRuleCall_2_0_0()); } lv_variables_2_0=ruleVariable { if ($current==null) { $current = createModelElementForParent(grammarAccess.getLocalVariablesRule()); } add( $current, "variables", lv_variables_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); afterParserOrEnumRuleCall(); } ) ) ( otherlv_3=Comma { newLeafNode(otherlv_3, grammarAccess.getLocalVariablesAccess().getCommaKeyword_2_1_0()); } ( ( { newCompositeNode(grammarAccess.getLocalVariablesAccess().getVariablesVariableParserRuleCall_2_1_1_0()); } lv_variables_4_0=ruleVariable { if ($current==null) { $current = createModelElementForParent(grammarAccess.getLocalVariablesRule()); } add( $current, "variables", lv_variables_4_0, "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); afterParserOrEnumRuleCall(); } ) ) )* )? otherlv_5=RightSquareBracket { newLeafNode(otherlv_5, grammarAccess.getLocalVariablesAccess().getRightSquareBracketKeyword_3()); } ) ; // Entry rule entryRuleQuantifiedExpression entryRuleQuantifiedExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getQuantifiedExpressionRule()); } iv_ruleQuantifiedExpression=ruleQuantifiedExpression { $current=$iv_ruleQuantifiedExpression.current; } EOF; // Rule QuantifiedExpression ruleQuantifiedExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { newCompositeNode(grammarAccess.getQuantifiedExpressionAccess().getQuantifierQuantifierEnumRuleCall_0_0()); } lv_quantifier_0_0=ruleQuantifier { if ($current==null) { $current = createModelElementForParent(grammarAccess.getQuantifiedExpressionRule()); } set( $current, "quantifier", lv_quantifier_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.Quantifier"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getQuantifiedExpressionAccess().getLocalVariablesLocalVariablesParserRuleCall_1_0()); } lv_localVariables_1_0=ruleLocalVariables { if ($current==null) { $current = createModelElementForParent(grammarAccess.getQuantifiedExpressionRule()); } set( $current, "localVariables", lv_localVariables_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.LocalVariables"); afterParserOrEnumRuleCall(); } ) )? otherlv_2=LeftCurlyBracket { newLeafNode(otherlv_2, grammarAccess.getQuantifiedExpressionAccess().getLeftCurlyBracketKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getQuantifiedExpressionAccess().getBodyExpressionParserRuleCall_3_0()); } lv_body_3_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getQuantifiedExpressionRule()); } set( $current, "body", lv_body_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) otherlv_4=RightCurlyBracket { newLeafNode(otherlv_4, grammarAccess.getQuantifiedExpressionAccess().getRightCurlyBracketKeyword_4()); } ) ; // Entry rule entryRuleAggregation entryRuleAggregation returns [EObject current=null]: { newCompositeNode(grammarAccess.getAggregationRule()); } iv_ruleAggregation=ruleAggregation { $current=$iv_ruleAggregation.current; } EOF; // Rule Aggregation ruleAggregation returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getAggregationRule()); } } { newCompositeNode(grammarAccess.getAggregationAccess().getOpNamedElementCrossReference_0_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getAggregationAccess().getLocalVariablesLocalVariablesParserRuleCall_1_0()); } lv_localVariables_1_0=ruleLocalVariables { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAggregationRule()); } set( $current, "localVariables", lv_localVariables_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.LocalVariables"); afterParserOrEnumRuleCall(); } ) )? otherlv_2=LeftCurlyBracket { newLeafNode(otherlv_2, grammarAccess.getAggregationAccess().getLeftCurlyBracketKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getAggregationAccess().getBodyExpressionParserRuleCall_3_0()); } lv_body_3_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAggregationRule()); } set( $current, "body", lv_body_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ( otherlv_4=VerticalLine { newLeafNode(otherlv_4, grammarAccess.getAggregationAccess().getVerticalLineKeyword_4_0()); } ( ( { newCompositeNode(grammarAccess.getAggregationAccess().getConditionExpressionParserRuleCall_4_1_0()); } lv_condition_5_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAggregationRule()); } set( $current, "condition", lv_condition_5_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) )? otherlv_6=RightCurlyBracket { newLeafNode(otherlv_6, grammarAccess.getAggregationAccess().getRightCurlyBracketKeyword_5()); } ) ; // Entry rule entryRuleAtomicExpression entryRuleAtomicExpression returns [EObject current=null]: { newCompositeNode(grammarAccess.getAtomicExpressionRule()); } iv_ruleAtomicExpression=ruleAtomicExpression { $current=$iv_ruleAtomicExpression.current; } EOF; // Rule AtomicExpression ruleAtomicExpression returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getAtomicExpressionAccess().getReferenceParserRuleCall_0()); } this_Reference_0=ruleReference { $current = $this_Reference_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getAtomicExpressionAccess().getCallParserRuleCall_1()); } this_Call_1=ruleCall { $current = $this_Call_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getAtomicExpressionAccess().getIntervalParserRuleCall_2()); } this_Interval_2=ruleInterval { $current = $this_Interval_2.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getAtomicExpressionAccess().getLiteralParserRuleCall_3()); } this_Literal_3=ruleLiteral { $current = $this_Literal_3.current; afterParserOrEnumRuleCall(); } | ( otherlv_4=LeftParenthesis { newLeafNode(otherlv_4, grammarAccess.getAtomicExpressionAccess().getLeftParenthesisKeyword_4_0()); } { newCompositeNode(grammarAccess.getAtomicExpressionAccess().getExpressionParserRuleCall_4_1()); } this_Expression_5=ruleExpression { $current = $this_Expression_5.current; afterParserOrEnumRuleCall(); } otherlv_6=RightParenthesis { newLeafNode(otherlv_6, grammarAccess.getAtomicExpressionAccess().getRightParenthesisKeyword_4_2()); } ) ) ; // Entry rule entryRuleCall entryRuleCall returns [EObject current=null]: { newCompositeNode(grammarAccess.getCallRule()); } iv_ruleCall=ruleCall { $current=$iv_ruleCall.current; } EOF; // Rule Call ruleCall returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { newCompositeNode(grammarAccess.getCallAccess().getFunctorReferenceParserRuleCall_0_0()); } lv_functor_0_0=ruleReference { if ($current==null) { $current = createModelElementForParent(grammarAccess.getCallRule()); } set( $current, "functor", lv_functor_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.Reference"); afterParserOrEnumRuleCall(); } ) ) ( ( ( lv_transitiveClosure_1_0=RULE_TRANSITIVE_CLOSURE { newLeafNode(lv_transitiveClosure_1_0, grammarAccess.getCallAccess().getTransitiveClosureTRANSITIVE_CLOSURETerminalRuleCall_1_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getCallRule()); } setWithLastConsumed( $current, "transitiveClosure", true, "org.eclipse.viatra.solver.language.SolverLanguage.TRANSITIVE_CLOSURE"); } ) ) | ( ( lv_reflexiveTransitiveClosure_2_0=RULE_REFLEXIVE_TRANSITIVE_CLOSURE { newLeafNode(lv_reflexiveTransitiveClosure_2_0, grammarAccess.getCallAccess().getReflexiveTransitiveClosureREFLEXIVE_TRANSITIVE_CLOSURETerminalRuleCall_1_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getCallRule()); } setWithLastConsumed( $current, "reflexiveTransitiveClosure", true, "org.eclipse.viatra.solver.language.SolverLanguage.REFLEXIVE_TRANSITIVE_CLOSURE"); } ) ) )? ( ( { newCompositeNode(grammarAccess.getCallAccess().getArgumentListArgumentListParserRuleCall_2_0()); } lv_argumentList_3_0=ruleArgumentList { if ($current==null) { $current = createModelElementForParent(grammarAccess.getCallRule()); } set( $current, "argumentList", lv_argumentList_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleArgumentList entryRuleArgumentList returns [EObject current=null]: { newCompositeNode(grammarAccess.getArgumentListRule()); } iv_ruleArgumentList=ruleArgumentList { $current=$iv_ruleArgumentList.current; } EOF; // Rule ArgumentList ruleArgumentList returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { $current = forceCreateModelElement( grammarAccess.getArgumentListAccess().getArgumentListAction_0(), $current); } ) otherlv_1=LeftParenthesis { newLeafNode(otherlv_1, grammarAccess.getArgumentListAccess().getLeftParenthesisKeyword_1()); } ( ( ( { newCompositeNode(grammarAccess.getArgumentListAccess().getArgumentsArgumentParserRuleCall_2_0_0()); } lv_arguments_2_0=ruleArgument { if ($current==null) { $current = createModelElementForParent(grammarAccess.getArgumentListRule()); } add( $current, "arguments", lv_arguments_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.Argument"); afterParserOrEnumRuleCall(); } ) ) ( otherlv_3=Comma { newLeafNode(otherlv_3, grammarAccess.getArgumentListAccess().getCommaKeyword_2_1_0()); } ( ( { newCompositeNode(grammarAccess.getArgumentListAccess().getArgumentsArgumentParserRuleCall_2_1_1_0()); } lv_arguments_4_0=ruleArgument { if ($current==null) { $current = createModelElementForParent(grammarAccess.getArgumentListRule()); } add( $current, "arguments", lv_arguments_4_0, "org.eclipse.viatra.solver.language.SolverLanguage.Argument"); afterParserOrEnumRuleCall(); } ) ) )* )? otherlv_5=RightParenthesis { newLeafNode(otherlv_5, grammarAccess.getArgumentListAccess().getRightParenthesisKeyword_3()); } ) ; // Entry rule entryRuleArgument entryRuleArgument returns [EObject current=null]: { newCompositeNode(grammarAccess.getArgumentRule()); } iv_ruleArgument=ruleArgument { $current=$iv_ruleArgument.current; } EOF; // Rule Argument ruleArgument returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getArgumentAccess().getExpressionArgumentParserRuleCall_0()); } this_ExpressionArgument_0=ruleExpressionArgument { $current = $this_ExpressionArgument_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getArgumentAccess().getStarArgumentParserRuleCall_1()); } this_StarArgument_1=ruleStarArgument { $current = $this_StarArgument_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getArgumentAccess().getTypedArgumentParserRuleCall_2()); } this_TypedArgument_2=ruleTypedArgument { $current = $this_TypedArgument_2.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getArgumentAccess().getTypedStarArgumentParserRuleCall_3()); } this_TypedStarArgument_3=ruleTypedStarArgument { $current = $this_TypedStarArgument_3.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleExpressionArgument entryRuleExpressionArgument returns [EObject current=null]: { newCompositeNode(grammarAccess.getExpressionArgumentRule()); } iv_ruleExpressionArgument=ruleExpressionArgument { $current=$iv_ruleExpressionArgument.current; } EOF; // Rule ExpressionArgument ruleExpressionArgument returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getExpressionArgumentAccess().getBodyComparisonExpressionParserRuleCall_0()); } lv_body_0_0=ruleComparisonExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExpressionArgumentRule()); } set( $current, "body", lv_body_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonExpression"); afterParserOrEnumRuleCall(); } ) ) ; // Entry rule entryRuleStarArgument entryRuleStarArgument returns [EObject current=null]: { newCompositeNode(grammarAccess.getStarArgumentRule()); } iv_ruleStarArgument=ruleStarArgument { $current=$iv_ruleStarArgument.current; } EOF; // Rule StarArgument ruleStarArgument returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { $current = forceCreateModelElement( grammarAccess.getStarArgumentAccess().getStarArgumentAction_0(), $current); } ) otherlv_1=Asterisk { newLeafNode(otherlv_1, grammarAccess.getStarArgumentAccess().getAsteriskKeyword_1()); } ) ; // Entry rule entryRuleTypedArgument entryRuleTypedArgument returns [EObject current=null]: { newCompositeNode(grammarAccess.getTypedArgumentRule()); } iv_ruleTypedArgument=ruleTypedArgument { $current=$iv_ruleTypedArgument.current; } EOF; // Rule TypedArgument ruleTypedArgument returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getTypedArgumentRule()); } } { newCompositeNode(grammarAccess.getTypedArgumentAccess().getTypeNamedElementCrossReference_0_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getTypedArgumentRule()); } } { newCompositeNode(grammarAccess.getTypedArgumentAccess().getVariableNamedElementCrossReference_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleTypedStarArgument entryRuleTypedStarArgument returns [EObject current=null]: { newCompositeNode(grammarAccess.getTypedStarArgumentRule()); } iv_ruleTypedStarArgument=ruleTypedStarArgument { $current=$iv_ruleTypedStarArgument.current; } EOF; // Rule TypedStarArgument ruleTypedStarArgument returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getTypedStarArgumentRule()); } } { newCompositeNode(grammarAccess.getTypedStarArgumentAccess().getTypeNamedElementCrossReference_0_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) otherlv_1=Asterisk { newLeafNode(otherlv_1, grammarAccess.getTypedStarArgumentAccess().getAsteriskKeyword_1()); } ) ; // Entry rule entryRuleReference entryRuleReference returns [EObject current=null]: { newCompositeNode(grammarAccess.getReferenceRule()); } iv_ruleReference=ruleReference { $current=$iv_ruleReference.current; } EOF; // Rule Reference ruleReference returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getReferenceRule()); } } { newCompositeNode(grammarAccess.getReferenceAccess().getReferredNamedElementCrossReference_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ; // Entry rule entryRuleInterval entryRuleInterval returns [EObject current=null]: { newCompositeNode(grammarAccess.getIntervalRule()); } iv_ruleInterval=ruleInterval { $current=$iv_ruleInterval.current; } EOF; // Rule Interval ruleInterval returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=LeftSquareBracket { newLeafNode(otherlv_0, grammarAccess.getIntervalAccess().getLeftSquareBracketKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getIntervalAccess().getLowerBoundExpressionParserRuleCall_1_0()); } lv_lowerBound_1_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getIntervalRule()); } set( $current, "lowerBound", lv_lowerBound_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) otherlv_2=FullStopFullStop { newLeafNode(otherlv_2, grammarAccess.getIntervalAccess().getFullStopFullStopKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getIntervalAccess().getUpperBoundExpressionParserRuleCall_3_0()); } lv_upperBound_3_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getIntervalRule()); } set( $current, "upperBound", lv_upperBound_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) otherlv_4=RightSquareBracket { newLeafNode(otherlv_4, grammarAccess.getIntervalAccess().getRightSquareBracketKeyword_4()); } ) ; // Entry rule entryRuleLiteral entryRuleLiteral returns [EObject current=null]: { newCompositeNode(grammarAccess.getLiteralRule()); } iv_ruleLiteral=ruleLiteral { $current=$iv_ruleLiteral.current; } EOF; // Rule Literal ruleLiteral returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getLiteralAccess().getLogicLiteralParserRuleCall_0()); } this_LogicLiteral_0=ruleLogicLiteral { $current = $this_LogicLiteral_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getLiteralAccess().getNumericLiteralParserRuleCall_1()); } this_NumericLiteral_1=ruleNumericLiteral { $current = $this_NumericLiteral_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getLiteralAccess().getInfinityLiteralParserRuleCall_2()); } this_InfinityLiteral_2=ruleInfinityLiteral { $current = $this_InfinityLiteral_2.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getLiteralAccess().getEmptyIntervalLiteralParserRuleCall_3()); } this_EmptyIntervalLiteral_3=ruleEmptyIntervalLiteral { $current = $this_EmptyIntervalLiteral_3.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getLiteralAccess().getStringLiteralParserRuleCall_4()); } this_StringLiteral_4=ruleStringLiteral { $current = $this_StringLiteral_4.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleLogicLiteral entryRuleLogicLiteral returns [EObject current=null]: { newCompositeNode(grammarAccess.getLogicLiteralRule()); } iv_ruleLogicLiteral=ruleLogicLiteral { $current=$iv_ruleLogicLiteral.current; } EOF; // Rule LogicLiteral ruleLogicLiteral returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getLogicLiteralAccess().getValueLogicValueEnumRuleCall_0()); } lv_value_0_0=ruleLogicValue { if ($current==null) { $current = createModelElementForParent(grammarAccess.getLogicLiteralRule()); } set( $current, "value", lv_value_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.LogicValue"); afterParserOrEnumRuleCall(); } ) ) ; // Entry rule entryRuleNumericLiteral entryRuleNumericLiteral returns [EObject current=null]: { newCompositeNode(grammarAccess.getNumericLiteralRule()); } iv_ruleNumericLiteral=ruleNumericLiteral { $current=$iv_ruleNumericLiteral.current; } EOF; // Rule NumericLiteral ruleNumericLiteral returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getNumericLiteralAccess().getValueRealParserRuleCall_0()); } lv_value_0_0=ruleReal { if ($current==null) { $current = createModelElementForParent(grammarAccess.getNumericLiteralRule()); } set( $current, "value", lv_value_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.Real"); afterParserOrEnumRuleCall(); } ) ) ; // Entry rule entryRuleInfinityLiteral entryRuleInfinityLiteral returns [EObject current=null]: { newCompositeNode(grammarAccess.getInfinityLiteralRule()); } iv_ruleInfinityLiteral=ruleInfinityLiteral { $current=$iv_ruleInfinityLiteral.current; } EOF; // Rule InfinityLiteral ruleInfinityLiteral returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { $current = forceCreateModelElement( grammarAccess.getInfinityLiteralAccess().getInfinityLiteralAction_0(), $current); } ) otherlv_1=Inf { newLeafNode(otherlv_1, grammarAccess.getInfinityLiteralAccess().getInfKeyword_1()); } ) ; // Entry rule entryRuleEmptyIntervalLiteral entryRuleEmptyIntervalLiteral returns [EObject current=null]: { newCompositeNode(grammarAccess.getEmptyIntervalLiteralRule()); } iv_ruleEmptyIntervalLiteral=ruleEmptyIntervalLiteral { $current=$iv_ruleEmptyIntervalLiteral.current; } EOF; // Rule EmptyIntervalLiteral ruleEmptyIntervalLiteral returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { $current = forceCreateModelElement( grammarAccess.getEmptyIntervalLiteralAccess().getEmptyIntervalLiteralAction_0(), $current); } ) otherlv_1=Empty { newLeafNode(otherlv_1, grammarAccess.getEmptyIntervalLiteralAccess().getEmptyKeyword_1()); } ) ; // Entry rule entryRuleStringLiteral entryRuleStringLiteral returns [EObject current=null]: { newCompositeNode(grammarAccess.getStringLiteralRule()); } iv_ruleStringLiteral=ruleStringLiteral { $current=$iv_ruleStringLiteral.current; } EOF; // Rule StringLiteral ruleStringLiteral returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( lv_value_0_0=RULE_STRING { newLeafNode(lv_value_0_0, grammarAccess.getStringLiteralAccess().getValueSTRINGTerminalRuleCall_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getStringLiteralRule()); } setWithLastConsumed( $current, "value", lv_value_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.STRING"); } ) ) ; // Entry rule entryRuleClassDefinition entryRuleClassDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getClassDefinitionRule()); } iv_ruleClassDefinition=ruleClassDefinition { $current=$iv_ruleClassDefinition.current; } EOF; // Rule ClassDefinition ruleClassDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( lv_abstract_0_0=Abstract { newLeafNode(lv_abstract_0_0, grammarAccess.getClassDefinitionAccess().getAbstractAbstractKeyword_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getClassDefinitionRule()); } setWithLastConsumed($current, "abstract", true, "abstract"); } ) )? otherlv_1=Class { newLeafNode(otherlv_1, grammarAccess.getClassDefinitionAccess().getClassKeyword_1()); } ( ( lv_name_2_0=RULE_ID { newLeafNode(lv_name_2_0, grammarAccess.getClassDefinitionAccess().getNameIDTerminalRuleCall_2_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getClassDefinitionRule()); } setWithLastConsumed( $current, "name", lv_name_2_0, "org.eclipse.xtext.common.Terminals.ID"); } ) ) ( otherlv_3=Extends { newLeafNode(otherlv_3, grammarAccess.getClassDefinitionAccess().getExtendsKeyword_3_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getClassDefinitionRule()); } } { newCompositeNode(grammarAccess.getClassDefinitionAccess().getSuperclassesNamedElementCrossReference_3_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ( otherlv_5=Comma { newLeafNode(otherlv_5, grammarAccess.getClassDefinitionAccess().getCommaKeyword_3_2_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getClassDefinitionRule()); } } { newCompositeNode(grammarAccess.getClassDefinitionAccess().getSuperclassesNamedElementCrossReference_3_2_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) )* )? otherlv_7=LeftCurlyBracket { newLeafNode(otherlv_7, grammarAccess.getClassDefinitionAccess().getLeftCurlyBracketKeyword_4()); } ( ( { newCompositeNode(grammarAccess.getClassDefinitionAccess().getMembersMemberDefinitionParserRuleCall_5_0()); } lv_members_8_0=ruleMemberDefinition { if ($current==null) { $current = createModelElementForParent(grammarAccess.getClassDefinitionRule()); } add( $current, "members", lv_members_8_0, "org.eclipse.viatra.solver.language.SolverLanguage.MemberDefinition"); afterParserOrEnumRuleCall(); } ) )* otherlv_9=RightCurlyBracket { newLeafNode(otherlv_9, grammarAccess.getClassDefinitionAccess().getRightCurlyBracketKeyword_6()); } ) ; // Entry rule entryRuleMemberDefinition entryRuleMemberDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getMemberDefinitionRule()); } iv_ruleMemberDefinition=ruleMemberDefinition { $current=$iv_ruleMemberDefinition.current; } EOF; // Rule MemberDefinition ruleMemberDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( lv_containment_0_0=Contains { newLeafNode(lv_containment_0_0, grammarAccess.getMemberDefinitionAccess().getContainmentContainsKeyword_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getMemberDefinitionRule()); } setWithLastConsumed($current, "containment", true, "contains"); } ) )? ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getMemberDefinitionRule()); } } { newCompositeNode(grammarAccess.getMemberDefinitionAccess().getTypeNamedElementCrossReference_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getMemberDefinitionAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); } lv_multiplicity_2_0=ruleMultiplicity { if ($current==null) { $current = createModelElementForParent(grammarAccess.getMemberDefinitionRule()); } set( $current, "multiplicity", lv_multiplicity_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.Multiplicity"); afterParserOrEnumRuleCall(); } ) )? ( ( lv_name_3_0=RULE_ID { newLeafNode(lv_name_3_0, grammarAccess.getMemberDefinitionAccess().getNameIDTerminalRuleCall_3_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getMemberDefinitionRule()); } setWithLastConsumed( $current, "name", lv_name_3_0, "org.eclipse.xtext.common.Terminals.ID"); } ) ) ( otherlv_4=Opposite { newLeafNode(otherlv_4, grammarAccess.getMemberDefinitionAccess().getOppositeKeyword_4_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getMemberDefinitionRule()); } } { newCompositeNode(grammarAccess.getMemberDefinitionAccess().getOppositeNamedElementCrossReference_4_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) )? ( otherlv_6=Semicolon { newLeafNode(otherlv_6, grammarAccess.getMemberDefinitionAccess().getSemicolonKeyword_5()); } )? ) ; // Entry rule entryRuleMultiplicity entryRuleMultiplicity returns [EObject current=null]: { newCompositeNode(grammarAccess.getMultiplicityRule()); } iv_ruleMultiplicity=ruleMultiplicity { $current=$iv_ruleMultiplicity.current; } EOF; // Rule Multiplicity ruleMultiplicity returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getMultiplicityAccess().getManyMultiplicityParserRuleCall_0()); } this_ManyMultiplicity_0=ruleManyMultiplicity { $current = $this_ManyMultiplicity_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); } this_ExactMultiplicity_1=ruleExactMultiplicity { $current = $this_ExactMultiplicity_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getMultiplicityAccess().getBoundedMultiplicityParserRuleCall_2()); } this_BoundedMultiplicity_2=ruleBoundedMultiplicity { $current = $this_BoundedMultiplicity_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleManyMultiplicity entryRuleManyMultiplicity returns [EObject current=null]: { newCompositeNode(grammarAccess.getManyMultiplicityRule()); } iv_ruleManyMultiplicity=ruleManyMultiplicity { $current=$iv_ruleManyMultiplicity.current; } EOF; // Rule ManyMultiplicity ruleManyMultiplicity returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { $current = forceCreateModelElement( grammarAccess.getManyMultiplicityAccess().getManyMultiplicityAction_0(), $current); } ) otherlv_1=LeftSquareBracket { newLeafNode(otherlv_1, grammarAccess.getManyMultiplicityAccess().getLeftSquareBracketKeyword_1()); } otherlv_2=RightSquareBracket { newLeafNode(otherlv_2, grammarAccess.getManyMultiplicityAccess().getRightSquareBracketKeyword_2()); } ) ; // Entry rule entryRuleExactMultiplicity entryRuleExactMultiplicity returns [EObject current=null]: { newCompositeNode(grammarAccess.getExactMultiplicityRule()); } iv_ruleExactMultiplicity=ruleExactMultiplicity { $current=$iv_ruleExactMultiplicity.current; } EOF; // Rule ExactMultiplicity ruleExactMultiplicity returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=LeftSquareBracket { newLeafNode(otherlv_0, grammarAccess.getExactMultiplicityAccess().getLeftSquareBracketKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getExactMultiplicityAccess().getMultiplicityUpperMultiplictyParserRuleCall_1_0()); } lv_multiplicity_1_0=ruleUpperMultiplicty { if ($current==null) { $current = createModelElementForParent(grammarAccess.getExactMultiplicityRule()); } set( $current, "multiplicity", lv_multiplicity_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.UpperMultiplicty"); afterParserOrEnumRuleCall(); } ) ) otherlv_2=RightSquareBracket { newLeafNode(otherlv_2, grammarAccess.getExactMultiplicityAccess().getRightSquareBracketKeyword_2()); } ) ; // Entry rule entryRuleBoundedMultiplicity entryRuleBoundedMultiplicity returns [EObject current=null]: { newCompositeNode(grammarAccess.getBoundedMultiplicityRule()); } iv_ruleBoundedMultiplicity=ruleBoundedMultiplicity { $current=$iv_ruleBoundedMultiplicity.current; } EOF; // Rule BoundedMultiplicity ruleBoundedMultiplicity returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=LeftSquareBracket { newLeafNode(otherlv_0, grammarAccess.getBoundedMultiplicityAccess().getLeftSquareBracketKeyword_0()); } ( ( lv_lowerBound_1_0=RULE_INT { newLeafNode(lv_lowerBound_1_0, grammarAccess.getBoundedMultiplicityAccess().getLowerBoundINTTerminalRuleCall_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getBoundedMultiplicityRule()); } setWithLastConsumed( $current, "lowerBound", lv_lowerBound_1_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) otherlv_2=FullStopFullStop { newLeafNode(otherlv_2, grammarAccess.getBoundedMultiplicityAccess().getFullStopFullStopKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getBoundedMultiplicityAccess().getUpperBoundUpperMultiplictyParserRuleCall_3_0()); } lv_upperBound_3_0=ruleUpperMultiplicty { if ($current==null) { $current = createModelElementForParent(grammarAccess.getBoundedMultiplicityRule()); } set( $current, "upperBound", lv_upperBound_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.UpperMultiplicty"); afterParserOrEnumRuleCall(); } ) ) otherlv_4=RightSquareBracket { newLeafNode(otherlv_4, grammarAccess.getBoundedMultiplicityAccess().getRightSquareBracketKeyword_4()); } ) ; // Entry rule entryRuleScopeDefinition entryRuleScopeDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getScopeDefinitionRule()); } iv_ruleScopeDefinition=ruleScopeDefinition { $current=$iv_ruleScopeDefinition.current; } EOF; // Rule ScopeDefinition ruleScopeDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getScopeDefinitionAccess().getExactScopeDefinitionParserRuleCall_0()); } this_ExactScopeDefinition_0=ruleExactScopeDefinition { $current = $this_ExactScopeDefinition_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getScopeDefinitionAccess().getBoundedScopeDefinitionParserRuleCall_1()); } this_BoundedScopeDefinition_1=ruleBoundedScopeDefinition { $current = $this_BoundedScopeDefinition_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getScopeDefinitionAccess().getLowerBoundedScopeDefinitionParserRuleCall_2()); } this_LowerBoundedScopeDefinition_2=ruleLowerBoundedScopeDefinition { $current = $this_LowerBoundedScopeDefinition_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleExactScopeDefinition entryRuleExactScopeDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getExactScopeDefinitionRule()); } iv_ruleExactScopeDefinition=ruleExactScopeDefinition { $current=$iv_ruleExactScopeDefinition.current; } EOF; // Rule ExactScopeDefinition ruleExactScopeDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Scope { newLeafNode(otherlv_0, grammarAccess.getExactScopeDefinitionAccess().getScopeKeyword_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getExactScopeDefinitionRule()); } } { newCompositeNode(grammarAccess.getExactScopeDefinitionAccess().getTypeNamedElementCrossReference_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) otherlv_2=EqualsSignEqualsSign { newLeafNode(otherlv_2, grammarAccess.getExactScopeDefinitionAccess().getEqualsSignEqualsSignKeyword_2()); } ( ( lv_exactScope_3_0=RULE_INT { newLeafNode(lv_exactScope_3_0, grammarAccess.getExactScopeDefinitionAccess().getExactScopeINTTerminalRuleCall_3_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getExactScopeDefinitionRule()); } setWithLastConsumed( $current, "exactScope", lv_exactScope_3_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) ) ; // Entry rule entryRuleBoundedScopeDefinition entryRuleBoundedScopeDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getBoundedScopeDefinitionRule()); } iv_ruleBoundedScopeDefinition=ruleBoundedScopeDefinition { $current=$iv_ruleBoundedScopeDefinition.current; } EOF; // Rule BoundedScopeDefinition ruleBoundedScopeDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Scope { newLeafNode(otherlv_0, grammarAccess.getBoundedScopeDefinitionAccess().getScopeKeyword_0()); } ( ( ( ( ( lv_lowerBound_1_0=RULE_INT { newLeafNode(lv_lowerBound_1_0, grammarAccess.getBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_0_0_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); } setWithLastConsumed( $current, "lowerBound", lv_lowerBound_1_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) otherlv_2=LessThanSignEqualsSign { newLeafNode(otherlv_2, grammarAccess.getBoundedScopeDefinitionAccess().getLessThanSignEqualsSignKeyword_1_0_0_1()); } )? ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); } } { newCompositeNode(grammarAccess.getBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_0_1_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) otherlv_4=LessThanSignEqualsSign { newLeafNode(otherlv_4, grammarAccess.getBoundedScopeDefinitionAccess().getLessThanSignEqualsSignKeyword_1_0_2()); } ( ( lv_upperBound_5_0=RULE_INT { newLeafNode(lv_upperBound_5_0, grammarAccess.getBoundedScopeDefinitionAccess().getUpperBoundINTTerminalRuleCall_1_0_3_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); } setWithLastConsumed( $current, "upperBound", lv_upperBound_5_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) ) | ( ( ( lv_upperBound_6_0=RULE_INT { newLeafNode(lv_upperBound_6_0, grammarAccess.getBoundedScopeDefinitionAccess().getUpperBoundINTTerminalRuleCall_1_1_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); } setWithLastConsumed( $current, "upperBound", lv_upperBound_6_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) otherlv_7=GreaterThanSignEqualsSign { newLeafNode(otherlv_7, grammarAccess.getBoundedScopeDefinitionAccess().getGreaterThanSignEqualsSignKeyword_1_1_1()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); } } { newCompositeNode(grammarAccess.getBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_1_2_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ( otherlv_9=GreaterThanSignEqualsSign { newLeafNode(otherlv_9, grammarAccess.getBoundedScopeDefinitionAccess().getGreaterThanSignEqualsSignKeyword_1_1_3_0()); } ( ( lv_lowerBound_10_0=RULE_INT { newLeafNode(lv_lowerBound_10_0, grammarAccess.getBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_1_3_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule()); } setWithLastConsumed( $current, "lowerBound", lv_lowerBound_10_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) )? ) ) ) ; // Entry rule entryRuleLowerBoundedScopeDefinition entryRuleLowerBoundedScopeDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getLowerBoundedScopeDefinitionRule()); } iv_ruleLowerBoundedScopeDefinition=ruleLowerBoundedScopeDefinition { $current=$iv_ruleLowerBoundedScopeDefinition.current; } EOF; // Rule LowerBoundedScopeDefinition ruleLowerBoundedScopeDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=Scope { newLeafNode(otherlv_0, grammarAccess.getLowerBoundedScopeDefinitionAccess().getScopeKeyword_0()); } ( ( ( ( lv_lowerBound_1_0=RULE_INT { newLeafNode(lv_lowerBound_1_0, grammarAccess.getLowerBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_0_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule()); } setWithLastConsumed( $current, "lowerBound", lv_lowerBound_1_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) otherlv_2=LessThanSignEqualsSign { newLeafNode(otherlv_2, grammarAccess.getLowerBoundedScopeDefinitionAccess().getLessThanSignEqualsSignKeyword_1_0_1()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule()); } } { newCompositeNode(grammarAccess.getLowerBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_0_2_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) ) | ( ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule()); } } { newCompositeNode(grammarAccess.getLowerBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_1_0_0()); } ruleQualifiedName { afterParserOrEnumRuleCall(); } ) ) otherlv_5=GreaterThanSignEqualsSign { newLeafNode(otherlv_5, grammarAccess.getLowerBoundedScopeDefinitionAccess().getGreaterThanSignEqualsSignKeyword_1_1_1()); } ( ( lv_lowerBound_6_0=RULE_INT { newLeafNode(lv_lowerBound_6_0, grammarAccess.getLowerBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_1_2_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule()); } setWithLastConsumed( $current, "lowerBound", lv_lowerBound_6_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) ) ) ) ; // Entry rule entryRuleObjectiveDefinition entryRuleObjectiveDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getObjectiveDefinitionRule()); } iv_ruleObjectiveDefinition=ruleObjectiveDefinition { $current=$iv_ruleObjectiveDefinition.current; } EOF; // Rule ObjectiveDefinition ruleObjectiveDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { newCompositeNode(grammarAccess.getObjectiveDefinitionAccess().getKindObjectiveKindEnumRuleCall_0_0()); } lv_kind_0_0=ruleObjectiveKind { if ($current==null) { $current = createModelElementForParent(grammarAccess.getObjectiveDefinitionRule()); } set( $current, "kind", lv_kind_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.ObjectiveKind"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getObjectiveDefinitionAccess().getObjectiveExpressionParserRuleCall_1_0()); } lv_objective_1_0=ruleExpression { if ($current==null) { $current = createModelElementForParent(grammarAccess.getObjectiveDefinitionRule()); } set( $current, "objective", lv_objective_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleUpperMultiplicty entryRuleUpperMultiplicty returns [String current=null]: { newCompositeNode(grammarAccess.getUpperMultiplictyRule()); } iv_ruleUpperMultiplicty=ruleUpperMultiplicty { $current=$iv_ruleUpperMultiplicty.current.getText(); } EOF; // Rule UpperMultiplicty ruleUpperMultiplicty returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] @init { enterRule(); } @after { leaveRule(); }: ( this_INT_0=RULE_INT { $current.merge(this_INT_0); } { newLeafNode(this_INT_0, grammarAccess.getUpperMultiplictyAccess().getINTTerminalRuleCall_0()); } | kw=Asterisk { $current.merge(kw); newLeafNode(kw, grammarAccess.getUpperMultiplictyAccess().getAsteriskKeyword_1()); } ) ; // Entry rule entryRuleReal entryRuleReal returns [String current=null]@init { HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); }: { newCompositeNode(grammarAccess.getRealRule()); } iv_ruleReal=ruleReal { $current=$iv_ruleReal.current.getText(); } EOF; finally { myHiddenTokenState.restore(); } // Rule Real ruleReal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] @init { enterRule(); HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); } @after { leaveRule(); }: ( this_INT_0=RULE_INT { $current.merge(this_INT_0); } { newLeafNode(this_INT_0, grammarAccess.getRealAccess().getINTTerminalRuleCall_0()); } ( kw=FullStop { $current.merge(kw); newLeafNode(kw, grammarAccess.getRealAccess().getFullStopKeyword_1_0()); } this_INT_2=RULE_INT { $current.merge(this_INT_2); } { newLeafNode(this_INT_2, grammarAccess.getRealAccess().getINTTerminalRuleCall_1_1()); } )? ) ; finally { myHiddenTokenState.restore(); } // Entry rule entryRuleQualifiedName entryRuleQualifiedName returns [String current=null]@init { HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); }: { newCompositeNode(grammarAccess.getQualifiedNameRule()); } iv_ruleQualifiedName=ruleQualifiedName { $current=$iv_ruleQualifiedName.current.getText(); } EOF; finally { myHiddenTokenState.restore(); } // Rule QualifiedName ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] @init { enterRule(); HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); } @after { leaveRule(); }: ( ( this_ID_0=RULE_ID { $current.merge(this_ID_0); } { newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0_0()); } ( kw=FullStop { $current.merge(kw); newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getFullStopKeyword_0_1_0()); } this_ID_2=RULE_ID { $current.merge(this_ID_2); } { newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0_1_1()); } )* ) | this_QUOTED_ID_3=RULE_QUOTED_ID { $current.merge(this_QUOTED_ID_3); } { newLeafNode(this_QUOTED_ID_3, grammarAccess.getQualifiedNameAccess().getQUOTED_IDTerminalRuleCall_1()); } ) ; finally { myHiddenTokenState.restore(); } // Rule ImplicationOperator ruleImplicationOperator returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: ( enumLiteral_0=EqualsSignGreaterThanSign { $current = grammarAccess.getImplicationOperatorAccess().getIMPLIESEnumLiteralDeclaration().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getImplicationOperatorAccess().getIMPLIESEnumLiteralDeclaration()); } ) ; // Rule ComparisonOperator ruleComparisonOperator returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( enumLiteral_0=EqualsSignEqualsSign { $current = grammarAccess.getComparisonOperatorAccess().getEQEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getComparisonOperatorAccess().getEQEnumLiteralDeclaration_0()); } ) | ( enumLiteral_1=ExclamationMarkEqualsSign { $current = grammarAccess.getComparisonOperatorAccess().getNOT_EQEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_1, grammarAccess.getComparisonOperatorAccess().getNOT_EQEnumLiteralDeclaration_1()); } ) | ( enumLiteral_2=LessThanSign { $current = grammarAccess.getComparisonOperatorAccess().getLESSEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_2, grammarAccess.getComparisonOperatorAccess().getLESSEnumLiteralDeclaration_2()); } ) | ( enumLiteral_3=LessThanSignEqualsSign { $current = grammarAccess.getComparisonOperatorAccess().getLESS_EQEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_3, grammarAccess.getComparisonOperatorAccess().getLESS_EQEnumLiteralDeclaration_3()); } ) | ( enumLiteral_4=GreaterThanSign { $current = grammarAccess.getComparisonOperatorAccess().getGREATEREnumLiteralDeclaration_4().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_4, grammarAccess.getComparisonOperatorAccess().getGREATEREnumLiteralDeclaration_4()); } ) | ( enumLiteral_5=GreaterThanSignEqualsSign { $current = grammarAccess.getComparisonOperatorAccess().getGREATER_EQEnumLiteralDeclaration_5().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_5, grammarAccess.getComparisonOperatorAccess().getGREATER_EQEnumLiteralDeclaration_5()); } ) | ( enumLiteral_6=In { $current = grammarAccess.getComparisonOperatorAccess().getINEnumLiteralDeclaration_6().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_6, grammarAccess.getComparisonOperatorAccess().getINEnumLiteralDeclaration_6()); } ) ) ; // Rule AdditiveBinaryOperator ruleAdditiveBinaryOperator returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( enumLiteral_0=PlusSign { $current = grammarAccess.getAdditiveBinaryOperatorAccess().getADDEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getAdditiveBinaryOperatorAccess().getADDEnumLiteralDeclaration_0()); } ) | ( enumLiteral_1=HyphenMinus { $current = grammarAccess.getAdditiveBinaryOperatorAccess().getSUBEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_1, grammarAccess.getAdditiveBinaryOperatorAccess().getSUBEnumLiteralDeclaration_1()); } ) ) ; // Rule MultiplicativeBinaryOperator ruleMultiplicativeBinaryOperator returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( enumLiteral_0=Asterisk { $current = grammarAccess.getMultiplicativeBinaryOperatorAccess().getMULEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getMultiplicativeBinaryOperatorAccess().getMULEnumLiteralDeclaration_0()); } ) | ( enumLiteral_1=Solidus { $current = grammarAccess.getMultiplicativeBinaryOperatorAccess().getDIVEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_1, grammarAccess.getMultiplicativeBinaryOperatorAccess().getDIVEnumLiteralDeclaration_1()); } ) ) ; // Rule ExponentialOp ruleExponentialOp returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: ( enumLiteral_0=CircumflexAccent { $current = grammarAccess.getExponentialOpAccess().getPOWEnumLiteralDeclaration().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getExponentialOpAccess().getPOWEnumLiteralDeclaration()); } ) ; // Rule UnaryOp ruleUnaryOp returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( enumLiteral_0=ExclamationMark { $current = grammarAccess.getUnaryOpAccess().getNEGEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getUnaryOpAccess().getNEGEnumLiteralDeclaration_0()); } ) | ( enumLiteral_1=PlusSign { $current = grammarAccess.getUnaryOpAccess().getPLUSEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_1, grammarAccess.getUnaryOpAccess().getPLUSEnumLiteralDeclaration_1()); } ) | ( enumLiteral_2=HyphenMinus { $current = grammarAccess.getUnaryOpAccess().getMINUSEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_2, grammarAccess.getUnaryOpAccess().getMINUSEnumLiteralDeclaration_2()); } ) | ( enumLiteral_3=May { $current = grammarAccess.getUnaryOpAccess().getMAYEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_3, grammarAccess.getUnaryOpAccess().getMAYEnumLiteralDeclaration_3()); } ) | ( enumLiteral_4=Must { $current = grammarAccess.getUnaryOpAccess().getMUSTEnumLiteralDeclaration_4().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_4, grammarAccess.getUnaryOpAccess().getMUSTEnumLiteralDeclaration_4()); } ) | ( enumLiteral_5=Current { $current = grammarAccess.getUnaryOpAccess().getCURRENTEnumLiteralDeclaration_5().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_5, grammarAccess.getUnaryOpAccess().getCURRENTEnumLiteralDeclaration_5()); } ) ) ; // Rule Quantifier ruleQuantifier returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( enumLiteral_0=Exists { $current = grammarAccess.getQuantifierAccess().getEXISTSEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getQuantifierAccess().getEXISTSEnumLiteralDeclaration_0()); } ) | ( enumLiteral_1=Forall { $current = grammarAccess.getQuantifierAccess().getFORALLEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_1, grammarAccess.getQuantifierAccess().getFORALLEnumLiteralDeclaration_1()); } ) | ( enumLiteral_2=Count { $current = grammarAccess.getQuantifierAccess().getCOUNTEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_2, grammarAccess.getQuantifierAccess().getCOUNTEnumLiteralDeclaration_2()); } ) ) ; // Rule LogicValue ruleLogicValue returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( enumLiteral_0=True { $current = grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); } ) | ( enumLiteral_1=False { $current = grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_1, grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); } ) | ( enumLiteral_2=Unknown { $current = grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_2, grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); } ) | ( enumLiteral_3=Error { $current = grammarAccess.getLogicValueAccess().getERROREnumLiteralDeclaration_3().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_3, grammarAccess.getLogicValueAccess().getERROREnumLiteralDeclaration_3()); } ) ) ; // Rule ObjectiveKind ruleObjectiveKind returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( enumLiteral_0=Minimize { $current = grammarAccess.getObjectiveKindAccess().getMINIMIZEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getObjectiveKindAccess().getMINIMIZEEnumLiteralDeclaration_0()); } ) | ( enumLiteral_1=Maximize { $current = grammarAccess.getObjectiveKindAccess().getMAXIMIZEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_1, grammarAccess.getObjectiveKindAccess().getMAXIMIZEEnumLiteralDeclaration_1()); } ) ) ;