/* * generated by Xtext 2.18.0.M3 */ grammar InternalSolverLanguage; options { superClass=AbstractInternalAntlrParser; } @lexer::header { package org.eclipse.viatra.solver.language.parser.antlr.internal; // Hack: Use our own Lexer superclass by means of import. // Currently there is no other way to specify the superclass for the lexer. import org.eclipse.xtext.parser.antlr.Lexer; } @parser::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.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; } @parser::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().getInterpretationParserRuleCall_0()); } this_Interpretation_0=ruleInterpretation { $current = $this_Interpretation_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getStatementAccess().getPredicateParserRuleCall_1()); } this_Predicate_1=rulePredicate { $current = $this_Predicate_1.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleREALLiteral entryRuleREALLiteral returns [String current=null]: { newCompositeNode(grammarAccess.getREALLiteralRule()); } iv_ruleREALLiteral=ruleREALLiteral { $current=$iv_ruleREALLiteral.current.getText(); } EOF; // Rule REALLiteral ruleREALLiteral returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] @init { enterRule(); } @after { leaveRule(); }: ( ( kw='-' { $current.merge(kw); newLeafNode(kw, grammarAccess.getREALLiteralAccess().getHyphenMinusKeyword_0()); } )? this_INT_1=RULE_INT { $current.merge(this_INT_1); } { newLeafNode(this_INT_1, grammarAccess.getREALLiteralAccess().getINTTerminalRuleCall_1()); } kw='.' { $current.merge(kw); newLeafNode(kw, grammarAccess.getREALLiteralAccess().getFullStopKeyword_2()); } this_INT_3=RULE_INT { $current.merge(this_INT_3); } { newLeafNode(this_INT_3, grammarAccess.getREALLiteralAccess().getINTTerminalRuleCall_3()); } ) ; // Entry rule entryRuleINTLiteral entryRuleINTLiteral returns [String current=null]: { newCompositeNode(grammarAccess.getINTLiteralRule()); } iv_ruleINTLiteral=ruleINTLiteral { $current=$iv_ruleINTLiteral.current.getText(); } EOF; // Rule INTLiteral ruleINTLiteral returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] @init { enterRule(); } @after { leaveRule(); }: ( ( kw='-' { $current.merge(kw); newLeafNode(kw, grammarAccess.getINTLiteralAccess().getHyphenMinusKeyword_0()); } )? this_INT_1=RULE_INT { $current.merge(this_INT_1); } { newLeafNode(this_INT_1, grammarAccess.getINTLiteralAccess().getINTTerminalRuleCall_1()); } ) ; // Entry rule entryRuleBooleanValue entryRuleBooleanValue returns [EObject current=null]: { newCompositeNode(grammarAccess.getBooleanValueRule()); } iv_ruleBooleanValue=ruleBooleanValue { $current=$iv_ruleBooleanValue.current; } EOF; // Rule BooleanValue ruleBooleanValue returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { $current = forceCreateModelElement( grammarAccess.getBooleanValueAccess().getBooleanTrueAction_0_0(), $current); } ) otherlv_1='true' { newLeafNode(otherlv_1, grammarAccess.getBooleanValueAccess().getTrueKeyword_0_1()); } ) | ( otherlv_2='false' { newLeafNode(otherlv_2, grammarAccess.getBooleanValueAccess().getFalseKeyword_1_0()); } ( { $current = forceCreateModelElement( grammarAccess.getBooleanValueAccess().getBooleanFalseAction_1_1(), $current); } ) ) ) ; // Entry rule entryRuleTruthValue entryRuleTruthValue returns [EObject current=null]: { newCompositeNode(grammarAccess.getTruthValueRule()); } iv_ruleTruthValue=ruleTruthValue { $current=$iv_ruleTruthValue.current; } EOF; // Rule TruthValue ruleTruthValue returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { $current = forceCreateModelElement( grammarAccess.getTruthValueAccess().getTrueAction_0_0(), $current); } ) otherlv_1='true' { newLeafNode(otherlv_1, grammarAccess.getTruthValueAccess().getTrueKeyword_0_1()); } ) | ( ( { $current = forceCreateModelElement( grammarAccess.getTruthValueAccess().getFalseAction_1_0(), $current); } ) otherlv_3='false' { newLeafNode(otherlv_3, grammarAccess.getTruthValueAccess().getFalseKeyword_1_1()); } ) | ( ( { $current = forceCreateModelElement( grammarAccess.getTruthValueAccess().getUnknownAction_2_0(), $current); } ) otherlv_5='unknown' { newLeafNode(otherlv_5, grammarAccess.getTruthValueAccess().getUnknownKeyword_2_1()); } ) | ( ( { $current = forceCreateModelElement( grammarAccess.getTruthValueAccess().getErrorAction_3_0(), $current); } ) otherlv_7='error' { newLeafNode(otherlv_7, grammarAccess.getTruthValueAccess().getErrorKeyword_3_1()); } ) ) ; // Entry rule entryRuleInterpretation entryRuleInterpretation returns [EObject current=null]: { newCompositeNode(grammarAccess.getInterpretationRule()); } iv_ruleInterpretation=ruleInterpretation { $current=$iv_ruleInterpretation.current; } EOF; // Rule Interpretation ruleInterpretation returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getInterpretationAccess().getBasicInterpretationParserRuleCall_0()); } this_BasicInterpretation_0=ruleBasicInterpretation { $current = $this_BasicInterpretation_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getInterpretationAccess().getDefaultInterpretationParserRuleCall_1()); } this_DefaultInterpretation_1=ruleDefaultInterpretation { $current = $this_DefaultInterpretation_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getInterpretationAccess().getCDInterpretationParserRuleCall_2()); } this_CDInterpretation_2=ruleCDInterpretation { $current = $this_CDInterpretation_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleBasicInterpretation entryRuleBasicInterpretation returns [EObject current=null]: { newCompositeNode(grammarAccess.getBasicInterpretationRule()); } iv_ruleBasicInterpretation=ruleBasicInterpretation { $current=$iv_ruleBasicInterpretation.current; } EOF; // Rule BasicInterpretation ruleBasicInterpretation returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { newCompositeNode(grammarAccess.getBasicInterpretationAccess().getSymbolSymbolParserRuleCall_0_0()); } lv_symbol_0_0=ruleSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); } set( $current, "symbol", lv_symbol_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); afterParserOrEnumRuleCall(); } ) ) otherlv_1='(' { newLeafNode(otherlv_1, grammarAccess.getBasicInterpretationAccess().getLeftParenthesisKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getBasicInterpretationAccess().getObjectsComplexObjectParserRuleCall_2_0()); } lv_objects_2_0=ruleComplexObject { if ($current==null) { $current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); } add( $current, "objects", lv_objects_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.ComplexObject"); afterParserOrEnumRuleCall(); } ) )* otherlv_3=')' { newLeafNode(otherlv_3, grammarAccess.getBasicInterpretationAccess().getRightParenthesisKeyword_3()); } otherlv_4=':' { newLeafNode(otherlv_4, grammarAccess.getBasicInterpretationAccess().getColonKeyword_4()); } ( ( { newCompositeNode(grammarAccess.getBasicInterpretationAccess().getValueTruthValueParserRuleCall_5_0()); } lv_value_5_0=ruleTruthValue { if ($current==null) { $current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); } set( $current, "value", lv_value_5_0, "org.eclipse.viatra.solver.language.SolverLanguage.TruthValue"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleSymbol entryRuleSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getSymbolRule()); } iv_ruleSymbol=ruleSymbol { $current=$iv_ruleSymbol.current; } EOF; // Rule Symbol ruleSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getSymbolAccess().getModelSymbolParserRuleCall_0()); } this_ModelSymbol_0=ruleModelSymbol { $current = $this_ModelSymbol_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getSymbolAccess().getPartialitySymbolParserRuleCall_1()); } this_PartialitySymbol_1=rulePartialitySymbol { $current = $this_PartialitySymbol_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getSymbolAccess().getDataSymbolParserRuleCall_2()); } this_DataSymbol_2=ruleDataSymbol { $current = $this_DataSymbol_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleModelSymbol entryRuleModelSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getModelSymbolRule()); } iv_ruleModelSymbol=ruleModelSymbol { $current=$iv_ruleModelSymbol.current; } EOF; // Rule ModelSymbol ruleModelSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( lv_name_0_0=RULE_ID { newLeafNode(lv_name_0_0, grammarAccess.getModelSymbolAccess().getNameIDTerminalRuleCall_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getModelSymbolRule()); } setWithLastConsumed( $current, "name", lv_name_0_0, "org.eclipse.xtext.common.Terminals.ID"); } ) ) ; // Entry rule entryRulePartialitySymbol entryRulePartialitySymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getPartialitySymbolRule()); } iv_rulePartialitySymbol=rulePartialitySymbol { $current=$iv_rulePartialitySymbol.current; } EOF; // Rule PartialitySymbol rulePartialitySymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getPartialitySymbolAccess().getExistSymbolParserRuleCall_0()); } this_ExistSymbol_0=ruleExistSymbol { $current = $this_ExistSymbol_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getPartialitySymbolAccess().getEqualsSymbolParserRuleCall_1()); } this_EqualsSymbol_1=ruleEqualsSymbol { $current = $this_EqualsSymbol_1.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleExistSymbol entryRuleExistSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getExistSymbolRule()); } iv_ruleExistSymbol=ruleExistSymbol { $current=$iv_ruleExistSymbol.current; } EOF; // Rule ExistSymbol ruleExistSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='exists' { newLeafNode(otherlv_0, grammarAccess.getExistSymbolAccess().getExistsKeyword_0()); } ( { $current = forceCreateModelElement( grammarAccess.getExistSymbolAccess().getExistSymbolAction_1(), $current); } ) ) ; // Entry rule entryRuleEqualsSymbol entryRuleEqualsSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getEqualsSymbolRule()); } iv_ruleEqualsSymbol=ruleEqualsSymbol { $current=$iv_ruleEqualsSymbol.current; } EOF; // Rule EqualsSymbol ruleEqualsSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='equals' { newLeafNode(otherlv_0, grammarAccess.getEqualsSymbolAccess().getEqualsKeyword_0()); } ( { $current = forceCreateModelElement( grammarAccess.getEqualsSymbolAccess().getEqualsSymbolAction_1(), $current); } ) ) ; // Entry rule entryRuleDataSymbol entryRuleDataSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getDataSymbolRule()); } iv_ruleDataSymbol=ruleDataSymbol { $current=$iv_ruleDataSymbol.current; } EOF; // Rule DataSymbol ruleDataSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getDataSymbolAccess().getBooleanSymbolParserRuleCall_0()); } this_BooleanSymbol_0=ruleBooleanSymbol { $current = $this_BooleanSymbol_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getDataSymbolAccess().getIntegerSymbolParserRuleCall_1()); } this_IntegerSymbol_1=ruleIntegerSymbol { $current = $this_IntegerSymbol_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getDataSymbolAccess().getRealSymbolParserRuleCall_2()); } this_RealSymbol_2=ruleRealSymbol { $current = $this_RealSymbol_2.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getDataSymbolAccess().getStringSymbolParserRuleCall_3()); } this_StringSymbol_3=ruleStringSymbol { $current = $this_StringSymbol_3.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleBooleanSymbol entryRuleBooleanSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getBooleanSymbolRule()); } iv_ruleBooleanSymbol=ruleBooleanSymbol { $current=$iv_ruleBooleanSymbol.current; } EOF; // Rule BooleanSymbol ruleBooleanSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='bool' { newLeafNode(otherlv_0, grammarAccess.getBooleanSymbolAccess().getBoolKeyword_0()); } ( { $current = forceCreateModelElement( grammarAccess.getBooleanSymbolAccess().getBooleanSymbolAction_1(), $current); } ) ) ; // Entry rule entryRuleIntegerSymbol entryRuleIntegerSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getIntegerSymbolRule()); } iv_ruleIntegerSymbol=ruleIntegerSymbol { $current=$iv_ruleIntegerSymbol.current; } EOF; // Rule IntegerSymbol ruleIntegerSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='int' { newLeafNode(otherlv_0, grammarAccess.getIntegerSymbolAccess().getIntKeyword_0()); } ( { $current = forceCreateModelElement( grammarAccess.getIntegerSymbolAccess().getIntegerSymbolAction_1(), $current); } ) ) ; // Entry rule entryRuleRealSymbol entryRuleRealSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getRealSymbolRule()); } iv_ruleRealSymbol=ruleRealSymbol { $current=$iv_ruleRealSymbol.current; } EOF; // Rule RealSymbol ruleRealSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='real' { newLeafNode(otherlv_0, grammarAccess.getRealSymbolAccess().getRealKeyword_0()); } ( { $current = forceCreateModelElement( grammarAccess.getRealSymbolAccess().getRealSymbolAction_1(), $current); } ) ) ; // Entry rule entryRuleStringSymbol entryRuleStringSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getStringSymbolRule()); } iv_ruleStringSymbol=ruleStringSymbol { $current=$iv_ruleStringSymbol.current; } EOF; // Rule StringSymbol ruleStringSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='string' { newLeafNode(otherlv_0, grammarAccess.getStringSymbolAccess().getStringKeyword_0()); } ( { $current = forceCreateModelElement( grammarAccess.getStringSymbolAccess().getStringSymbolAction_1(), $current); } ) ) ; // Entry rule entryRuleComplexObject entryRuleComplexObject returns [EObject current=null]: { newCompositeNode(grammarAccess.getComplexObjectRule()); } iv_ruleComplexObject=ruleComplexObject { $current=$iv_ruleComplexObject.current; } EOF; // Rule ComplexObject ruleComplexObject returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getComplexObjectAccess().getObjectParserRuleCall_0()); } this_Object_0=ruleObject { $current = $this_Object_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getComplexObjectAccess().getAllInstancesParserRuleCall_1()); } this_AllInstances_1=ruleAllInstances { $current = $this_AllInstances_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getComplexObjectAccess().getAllObjectsParserRuleCall_2()); } this_AllObjects_2=ruleAllObjects { $current = $this_AllObjects_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleObject entryRuleObject returns [EObject current=null]: { newCompositeNode(grammarAccess.getObjectRule()); } iv_ruleObject=ruleObject { $current=$iv_ruleObject.current; } EOF; // Rule Object ruleObject returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getObjectAccess().getNamedObjectParserRuleCall_0()); } this_NamedObject_0=ruleNamedObject { $current = $this_NamedObject_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getObjectAccess().getUnnamedObjectParserRuleCall_1()); } this_UnnamedObject_1=ruleUnnamedObject { $current = $this_UnnamedObject_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getObjectAccess().getDataObjectParserRuleCall_2()); } this_DataObject_2=ruleDataObject { $current = $this_DataObject_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleNamedObject entryRuleNamedObject returns [EObject current=null]: { newCompositeNode(grammarAccess.getNamedObjectRule()); } iv_ruleNamedObject=ruleNamedObject { $current=$iv_ruleNamedObject.current; } EOF; // Rule NamedObject ruleNamedObject returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='\'' { newLeafNode(otherlv_0, grammarAccess.getNamedObjectAccess().getApostropheKeyword_0()); } ( ( lv_name_1_0=RULE_ID { newLeafNode(lv_name_1_0, grammarAccess.getNamedObjectAccess().getNameIDTerminalRuleCall_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getNamedObjectRule()); } setWithLastConsumed( $current, "name", lv_name_1_0, "org.eclipse.xtext.common.Terminals.ID"); } ) ) otherlv_2='\'' { newLeafNode(otherlv_2, grammarAccess.getNamedObjectAccess().getApostropheKeyword_2()); } ) ; // Entry rule entryRuleUnnamedObject entryRuleUnnamedObject returns [EObject current=null]: { newCompositeNode(grammarAccess.getUnnamedObjectRule()); } iv_ruleUnnamedObject=ruleUnnamedObject { $current=$iv_ruleUnnamedObject.current; } EOF; // Rule UnnamedObject ruleUnnamedObject returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( lv_name_0_0=RULE_ID { newLeafNode(lv_name_0_0, grammarAccess.getUnnamedObjectAccess().getNameIDTerminalRuleCall_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getUnnamedObjectRule()); } setWithLastConsumed( $current, "name", lv_name_0_0, "org.eclipse.xtext.common.Terminals.ID"); } ) ) ; // Entry rule entryRuleDataObject entryRuleDataObject returns [EObject current=null]: { newCompositeNode(grammarAccess.getDataObjectRule()); } iv_ruleDataObject=ruleDataObject { $current=$iv_ruleDataObject.current; } EOF; // Rule DataObject ruleDataObject returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getDataObjectAccess().getBooleanObjectParserRuleCall_0()); } this_BooleanObject_0=ruleBooleanObject { $current = $this_BooleanObject_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getDataObjectAccess().getIntObjectParserRuleCall_1()); } this_IntObject_1=ruleIntObject { $current = $this_IntObject_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getDataObjectAccess().getRealObjectParserRuleCall_2()); } this_RealObject_2=ruleRealObject { $current = $this_RealObject_2.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getDataObjectAccess().getStringObjectParserRuleCall_3()); } this_StringObject_3=ruleStringObject { $current = $this_StringObject_3.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleBooleanObject entryRuleBooleanObject returns [EObject current=null]: { newCompositeNode(grammarAccess.getBooleanObjectRule()); } iv_ruleBooleanObject=ruleBooleanObject { $current=$iv_ruleBooleanObject.current; } EOF; // Rule BooleanObject ruleBooleanObject returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getBooleanObjectAccess().getValueBooleanValueParserRuleCall_0()); } lv_value_0_0=ruleBooleanValue { if ($current==null) { $current = createModelElementForParent(grammarAccess.getBooleanObjectRule()); } set( $current, "value", lv_value_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.BooleanValue"); afterParserOrEnumRuleCall(); } ) ) ; // Entry rule entryRuleIntObject entryRuleIntObject returns [EObject current=null]: { newCompositeNode(grammarAccess.getIntObjectRule()); } iv_ruleIntObject=ruleIntObject { $current=$iv_ruleIntObject.current; } EOF; // Rule IntObject ruleIntObject returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getIntObjectAccess().getValueINTLiteralParserRuleCall_0()); } lv_value_0_0=ruleINTLiteral { if ($current==null) { $current = createModelElementForParent(grammarAccess.getIntObjectRule()); } set( $current, "value", lv_value_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.INTLiteral"); afterParserOrEnumRuleCall(); } ) ) ; // Entry rule entryRuleRealObject entryRuleRealObject returns [EObject current=null]: { newCompositeNode(grammarAccess.getRealObjectRule()); } iv_ruleRealObject=ruleRealObject { $current=$iv_ruleRealObject.current; } EOF; // Rule RealObject ruleRealObject returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getRealObjectAccess().getValueREALLiteralParserRuleCall_0()); } lv_value_0_0=ruleREALLiteral { if ($current==null) { $current = createModelElementForParent(grammarAccess.getRealObjectRule()); } set( $current, "value", lv_value_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.REALLiteral"); afterParserOrEnumRuleCall(); } ) ) ; // Entry rule entryRuleStringObject entryRuleStringObject returns [EObject current=null]: { newCompositeNode(grammarAccess.getStringObjectRule()); } iv_ruleStringObject=ruleStringObject { $current=$iv_ruleStringObject.current; } EOF; // Rule StringObject ruleStringObject returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( lv_value_0_0=RULE_STRING { newLeafNode(lv_value_0_0, grammarAccess.getStringObjectAccess().getValueSTRINGTerminalRuleCall_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getStringObjectRule()); } setWithLastConsumed( $current, "value", lv_value_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.STRING"); } ) ) ; // Entry rule entryRulePredicate entryRulePredicate returns [EObject current=null]: { newCompositeNode(grammarAccess.getPredicateRule()); } iv_rulePredicate=rulePredicate { $current=$iv_rulePredicate.current; } EOF; // Rule Predicate rulePredicate returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getPredicateAccess().getPredicateSymbolParserRuleCall_0()); } this_PredicateSymbol_0=rulePredicateSymbol { $current = $this_PredicateSymbol_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getPredicateAccess().getErrorPredicateParserRuleCall_1()); } this_ErrorPredicate_1=ruleErrorPredicate { $current = $this_ErrorPredicate_1.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRulePredicateSymbol entryRulePredicateSymbol returns [EObject current=null]: { newCompositeNode(grammarAccess.getPredicateSymbolRule()); } iv_rulePredicateSymbol=rulePredicateSymbol { $current=$iv_rulePredicateSymbol.current; } EOF; // Rule PredicateSymbol rulePredicateSymbol returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='predicate' { newLeafNode(otherlv_0, grammarAccess.getPredicateSymbolAccess().getPredicateKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getPredicateSymbolAccess().getSymbolModelSymbolParserRuleCall_1_0()); } lv_symbol_1_0=ruleModelSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getPredicateSymbolRule()); } set( $current, "symbol", lv_symbol_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); afterParserOrEnumRuleCall(); } ) ) otherlv_2='(' { newLeafNode(otherlv_2, grammarAccess.getPredicateSymbolAccess().getLeftParenthesisKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getPredicateSymbolAccess().getParametersParameterParserRuleCall_3_0()); } lv_parameters_3_0=ruleParameter { if ($current==null) { $current = createModelElementForParent(grammarAccess.getPredicateSymbolRule()); } add( $current, "parameters", lv_parameters_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Parameter"); afterParserOrEnumRuleCall(); } ) )* otherlv_4=')' { newLeafNode(otherlv_4, grammarAccess.getPredicateSymbolAccess().getRightParenthesisKeyword_4()); } otherlv_5=':' { newLeafNode(otherlv_5, grammarAccess.getPredicateSymbolAccess().getColonKeyword_5()); } ( otherlv_6='false' { newLeafNode(otherlv_6, grammarAccess.getPredicateSymbolAccess().getFalseKeyword_6_0()); } | ( ( ( { newCompositeNode(grammarAccess.getPredicateSymbolAccess().getBodiesPatternBodyParserRuleCall_6_1_0_0()); } lv_bodies_7_0=rulePatternBody { if ($current==null) { $current = createModelElementForParent(grammarAccess.getPredicateSymbolRule()); } add( $current, "bodies", lv_bodies_7_0, "org.eclipse.viatra.solver.language.SolverLanguage.PatternBody"); afterParserOrEnumRuleCall(); } ) ) ( otherlv_8='|' { newLeafNode(otherlv_8, grammarAccess.getPredicateSymbolAccess().getVerticalLineKeyword_6_1_1_0()); } ( ( { newCompositeNode(grammarAccess.getPredicateSymbolAccess().getBodiesPatternBodyParserRuleCall_6_1_1_1_0()); } lv_bodies_9_0=rulePatternBody { if ($current==null) { $current = createModelElementForParent(grammarAccess.getPredicateSymbolRule()); } add( $current, "bodies", lv_bodies_9_0, "org.eclipse.viatra.solver.language.SolverLanguage.PatternBody"); afterParserOrEnumRuleCall(); } ) ) )* ) ) otherlv_10='.' { newLeafNode(otherlv_10, grammarAccess.getPredicateSymbolAccess().getFullStopKeyword_7()); } ) ; // Entry rule entryRuleErrorPredicate entryRuleErrorPredicate returns [EObject current=null]: { newCompositeNode(grammarAccess.getErrorPredicateRule()); } iv_ruleErrorPredicate=ruleErrorPredicate { $current=$iv_ruleErrorPredicate.current; } EOF; // Rule ErrorPredicate ruleErrorPredicate returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { $current = forceCreateModelElement( grammarAccess.getErrorPredicateAccess().getErrorPredicateAction_0(), $current); } ) otherlv_1='error' { newLeafNode(otherlv_1, grammarAccess.getErrorPredicateAccess().getErrorKeyword_1()); } ( ( lv_name_2_0=RULE_ID { newLeafNode(lv_name_2_0, grammarAccess.getErrorPredicateAccess().getNameIDTerminalRuleCall_2_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getErrorPredicateRule()); } setWithLastConsumed( $current, "name", lv_name_2_0, "org.eclipse.xtext.common.Terminals.ID"); } ) )? ( otherlv_3='(' { newLeafNode(otherlv_3, grammarAccess.getErrorPredicateAccess().getLeftParenthesisKeyword_3_0()); } ( ( { newCompositeNode(grammarAccess.getErrorPredicateAccess().getParametersParameterParserRuleCall_3_1_0()); } lv_parameters_4_0=ruleParameter { if ($current==null) { $current = createModelElementForParent(grammarAccess.getErrorPredicateRule()); } add( $current, "parameters", lv_parameters_4_0, "org.eclipse.viatra.solver.language.SolverLanguage.Parameter"); afterParserOrEnumRuleCall(); } ) )* otherlv_5=')' { newLeafNode(otherlv_5, grammarAccess.getErrorPredicateAccess().getRightParenthesisKeyword_3_2()); } ) otherlv_6=':' { newLeafNode(otherlv_6, grammarAccess.getErrorPredicateAccess().getColonKeyword_4()); } ( otherlv_7='false' { newLeafNode(otherlv_7, grammarAccess.getErrorPredicateAccess().getFalseKeyword_5_0()); } | ( ( ( { newCompositeNode(grammarAccess.getErrorPredicateAccess().getBodiesPatternBodyParserRuleCall_5_1_0_0()); } lv_bodies_8_0=rulePatternBody { if ($current==null) { $current = createModelElementForParent(grammarAccess.getErrorPredicateRule()); } add( $current, "bodies", lv_bodies_8_0, "org.eclipse.viatra.solver.language.SolverLanguage.PatternBody"); afterParserOrEnumRuleCall(); } ) ) ( otherlv_9='|' { newLeafNode(otherlv_9, grammarAccess.getErrorPredicateAccess().getVerticalLineKeyword_5_1_1_0()); } ( ( { newCompositeNode(grammarAccess.getErrorPredicateAccess().getBodiesPatternBodyParserRuleCall_5_1_1_1_0()); } lv_bodies_10_0=rulePatternBody { if ($current==null) { $current = createModelElementForParent(grammarAccess.getErrorPredicateRule()); } add( $current, "bodies", lv_bodies_10_0, "org.eclipse.viatra.solver.language.SolverLanguage.PatternBody"); afterParserOrEnumRuleCall(); } ) ) )* ) ) otherlv_11='.' { newLeafNode(otherlv_11, grammarAccess.getErrorPredicateAccess().getFullStopKeyword_6()); } ) ; // Entry rule entryRuleParameter entryRuleParameter returns [EObject current=null]: { newCompositeNode(grammarAccess.getParameterRule()); } iv_ruleParameter=ruleParameter { $current=$iv_ruleParameter.current; } EOF; // Rule Parameter ruleParameter returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { newCompositeNode(grammarAccess.getParameterAccess().getVariableVariableParserRuleCall_0_0()); } lv_variable_0_0=ruleVariable { if ($current==null) { $current = createModelElementForParent(grammarAccess.getParameterRule()); } set( $current, "variable", lv_variable_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); afterParserOrEnumRuleCall(); } ) ) ( otherlv_1=':' { newLeafNode(otherlv_1, grammarAccess.getParameterAccess().getColonKeyword_1_0()); } ( ( { newCompositeNode(grammarAccess.getParameterAccess().getTypeSymbolParserRuleCall_1_1_0()); } lv_type_2_0=ruleSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getParameterRule()); } set( $current, "type", lv_type_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); afterParserOrEnumRuleCall(); } ) ) )? ) ; // Entry rule entryRulePatternBody entryRulePatternBody returns [EObject current=null]: { newCompositeNode(grammarAccess.getPatternBodyRule()); } iv_rulePatternBody=rulePatternBody { $current=$iv_rulePatternBody.current; } EOF; // Rule PatternBody rulePatternBody returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { $current = forceCreateModelElement( grammarAccess.getPatternBodyAccess().getPatternBodyAction_0(), $current); } ) ( otherlv_1='true' { newLeafNode(otherlv_1, grammarAccess.getPatternBodyAccess().getTrueKeyword_1_0()); } | ( ( { newCompositeNode(grammarAccess.getPatternBodyAccess().getConstraintsConstraintParserRuleCall_1_1_0()); } lv_constraints_2_0=ruleConstraint { if ($current==null) { $current = createModelElementForParent(grammarAccess.getPatternBodyRule()); } add( $current, "constraints", lv_constraints_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.Constraint"); afterParserOrEnumRuleCall(); } ) )* ) ) ; // Entry rule entryRulePolarity entryRulePolarity returns [EObject current=null]: { newCompositeNode(grammarAccess.getPolarityRule()); } iv_rulePolarity=rulePolarity { $current=$iv_rulePolarity.current; } EOF; // Rule Polarity rulePolarity returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { $current = forceCreateModelElement( grammarAccess.getPolarityAccess().getPositiveAction_0_0(), $current); } ) otherlv_1='+' { newLeafNode(otherlv_1, grammarAccess.getPolarityAccess().getPlusSignKeyword_0_1()); } ) | ( ( { $current = forceCreateModelElement( grammarAccess.getPolarityAccess().getNegativeAction_1_0(), $current); } ) otherlv_3='-' { newLeafNode(otherlv_3, grammarAccess.getPolarityAccess().getHyphenMinusKeyword_1_1()); } ) ) ; // Entry rule entryRuleConstraint entryRuleConstraint returns [EObject current=null]: { newCompositeNode(grammarAccess.getConstraintRule()); } iv_ruleConstraint=ruleConstraint { $current=$iv_ruleConstraint.current; } EOF; // Rule Constraint ruleConstraint returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { newCompositeNode(grammarAccess.getConstraintAccess().getPolarityPolarityParserRuleCall_0_0()); } lv_polarity_0_0=rulePolarity { if ($current==null) { $current = createModelElementForParent(grammarAccess.getConstraintRule()); } set( $current, "polarity", lv_polarity_0_0, "org.eclipse.viatra.solver.language.SolverLanguage.Polarity"); afterParserOrEnumRuleCall(); } ) )? ( ( { newCompositeNode(grammarAccess.getConstraintAccess().getSymbolModelSymbolParserRuleCall_1_0()); } lv_symbol_1_0=ruleModelSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getConstraintRule()); } set( $current, "symbol", lv_symbol_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); afterParserOrEnumRuleCall(); } ) ) ( ( otherlv_2='(' { newLeafNode(otherlv_2, grammarAccess.getConstraintAccess().getLeftParenthesisKeyword_2_0_0()); } ( ( { newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_2_0_1_0()); } lv_params_3_0=ruleLiteral { if ($current==null) { $current = createModelElementForParent(grammarAccess.getConstraintRule()); } add( $current, "params", lv_params_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); afterParserOrEnumRuleCall(); } ) )* otherlv_4=')' { newLeafNode(otherlv_4, grammarAccess.getConstraintAccess().getRightParenthesisKeyword_2_0_2()); } ) | ( ( ( { newCompositeNode(grammarAccess.getConstraintAccess().getClosureTypeClosureTypeParserRuleCall_2_1_0_0()); } lv_closureType_5_0=ruleClosureType { if ($current==null) { $current = createModelElementForParent(grammarAccess.getConstraintRule()); } set( $current, "closureType", lv_closureType_5_0, "org.eclipse.viatra.solver.language.SolverLanguage.ClosureType"); afterParserOrEnumRuleCall(); } ) ) otherlv_6='(' { newLeafNode(otherlv_6, grammarAccess.getConstraintAccess().getLeftParenthesisKeyword_2_1_1()); } ( ( { newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_2_1_2_0()); } lv_params_7_0=ruleLiteral { if ($current==null) { $current = createModelElementForParent(grammarAccess.getConstraintRule()); } add( $current, "params", lv_params_7_0, "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_2_1_3_0()); } lv_params_8_0=ruleLiteral { if ($current==null) { $current = createModelElementForParent(grammarAccess.getConstraintRule()); } add( $current, "params", lv_params_8_0, "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); afterParserOrEnumRuleCall(); } ) ) otherlv_9=')' { newLeafNode(otherlv_9, grammarAccess.getConstraintAccess().getRightParenthesisKeyword_2_1_4()); } ) ) ) ; // Entry rule entryRuleClosureType entryRuleClosureType returns [EObject current=null]: { newCompositeNode(grammarAccess.getClosureTypeRule()); } iv_ruleClosureType=ruleClosureType { $current=$iv_ruleClosureType.current; } EOF; // Rule ClosureType ruleClosureType returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( { $current = forceCreateModelElement( grammarAccess.getClosureTypeAccess().getReflexiveClosureAction_0_0(), $current); } ) otherlv_1='*' { newLeafNode(otherlv_1, grammarAccess.getClosureTypeAccess().getAsteriskKeyword_0_1()); } ) | ( ( { $current = forceCreateModelElement( grammarAccess.getClosureTypeAccess().getIrreflexiveClosureAction_1_0(), $current); } ) otherlv_3='+' { newLeafNode(otherlv_3, grammarAccess.getClosureTypeAccess().getPlusSignKeyword_1_1()); } ) ) ; // 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().getVariableParserRuleCall_0()); } this_Variable_0=ruleVariable { $current = $this_Variable_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getLiteralAccess().getDataObjectParserRuleCall_1()); } this_DataObject_1=ruleDataObject { $current = $this_DataObject_1.current; 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(); }: ( ( lv_name_0_0=RULE_ID { newLeafNode(lv_name_0_0, grammarAccess.getVariableAccess().getNameIDTerminalRuleCall_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getVariableRule()); } setWithLastConsumed( $current, "name", lv_name_0_0, "org.eclipse.xtext.common.Terminals.ID"); } ) ) ; // Entry rule entryRuleAllInstances entryRuleAllInstances returns [EObject current=null]: { newCompositeNode(grammarAccess.getAllInstancesRule()); } iv_ruleAllInstances=ruleAllInstances { $current=$iv_ruleAllInstances.current; } EOF; // Rule AllInstances ruleAllInstances returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0=':' { newLeafNode(otherlv_0, grammarAccess.getAllInstancesAccess().getColonKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getAllInstancesAccess().getSymbolSymbolParserRuleCall_1_0()); } lv_symbol_1_0=ruleSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAllInstancesRule()); } set( $current, "symbol", lv_symbol_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleAllObjects entryRuleAllObjects returns [EObject current=null]: { newCompositeNode(grammarAccess.getAllObjectsRule()); } iv_ruleAllObjects=ruleAllObjects { $current=$iv_ruleAllObjects.current; } EOF; // Rule AllObjects ruleAllObjects returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { $current = forceCreateModelElement( grammarAccess.getAllObjectsAccess().getAllObjectsAction_0(), $current); } ) otherlv_1='*' { newLeafNode(otherlv_1, grammarAccess.getAllObjectsAccess().getAsteriskKeyword_1()); } ) ; // Entry rule entryRuleDefaultInterpretation entryRuleDefaultInterpretation returns [EObject current=null]: { newCompositeNode(grammarAccess.getDefaultInterpretationRule()); } iv_ruleDefaultInterpretation=ruleDefaultInterpretation { $current=$iv_ruleDefaultInterpretation.current; } EOF; // Rule DefaultInterpretation ruleDefaultInterpretation returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='default' { newLeafNode(otherlv_0, grammarAccess.getDefaultInterpretationAccess().getDefaultKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getDefaultInterpretationAccess().getInterpretationBasicInterpretationParserRuleCall_1_0()); } lv_interpretation_1_0=ruleBasicInterpretation { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDefaultInterpretationRule()); } set( $current, "interpretation", lv_interpretation_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.BasicInterpretation"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleCDInterpretation entryRuleCDInterpretation returns [EObject current=null]: { newCompositeNode(grammarAccess.getCDInterpretationRule()); } iv_ruleCDInterpretation=ruleCDInterpretation { $current=$iv_ruleCDInterpretation.current; } EOF; // Rule CDInterpretation ruleCDInterpretation returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getCDInterpretationAccess().getClassInterpretationParserRuleCall_0()); } this_ClassInterpretation_0=ruleClassInterpretation { $current = $this_ClassInterpretation_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getCDInterpretationAccess().getEnumInterpretationParserRuleCall_1()); } this_EnumInterpretation_1=ruleEnumInterpretation { $current = $this_EnumInterpretation_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getCDInterpretationAccess().getGlobalRelationInterpretationParserRuleCall_2()); } this_GlobalRelationInterpretation_2=ruleGlobalRelationInterpretation { $current = $this_GlobalRelationInterpretation_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleClassInterpretation entryRuleClassInterpretation returns [EObject current=null]: { newCompositeNode(grammarAccess.getClassInterpretationRule()); } iv_ruleClassInterpretation=ruleClassInterpretation { $current=$iv_ruleClassInterpretation.current; } EOF; // Rule ClassInterpretation ruleClassInterpretation returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( lv_abstract_0_0='abstract' { newLeafNode(lv_abstract_0_0, grammarAccess.getClassInterpretationAccess().getAbstractAbstractKeyword_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getClassInterpretationRule()); } setWithLastConsumed($current, "abstract", true, "abstract"); } ) ) otherlv_1='class' { newLeafNode(otherlv_1, grammarAccess.getClassInterpretationAccess().getClassKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getClassInterpretationAccess().getSymbolModelSymbolParserRuleCall_2_0()); } lv_symbol_2_0=ruleModelSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getClassInterpretationRule()); } set( $current, "symbol", lv_symbol_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); afterParserOrEnumRuleCall(); } ) ) ( otherlv_3='extends' { newLeafNode(otherlv_3, grammarAccess.getClassInterpretationAccess().getExtendsKeyword_3_0()); } ( ( { newCompositeNode(grammarAccess.getClassInterpretationAccess().getSupertypesModelSymbolParserRuleCall_3_1_0()); } lv_supertypes_4_0=ruleModelSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getClassInterpretationRule()); } add( $current, "supertypes", lv_supertypes_4_0, "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); afterParserOrEnumRuleCall(); } ) )+ )? otherlv_5='{' { newLeafNode(otherlv_5, grammarAccess.getClassInterpretationAccess().getLeftCurlyBracketKeyword_4()); } ( ( { newCompositeNode(grammarAccess.getClassInterpretationAccess().getFieltFieldRelationInterpretationParserRuleCall_5_0()); } lv_fielt_6_0=ruleFieldRelationInterpretation { if ($current==null) { $current = createModelElementForParent(grammarAccess.getClassInterpretationRule()); } add( $current, "fielt", lv_fielt_6_0, "org.eclipse.viatra.solver.language.SolverLanguage.FieldRelationInterpretation"); afterParserOrEnumRuleCall(); } ) )* otherlv_7='}' { newLeafNode(otherlv_7, grammarAccess.getClassInterpretationAccess().getRightCurlyBracketKeyword_6()); } ) ; // Entry rule entryRuleEnumInterpretation entryRuleEnumInterpretation returns [EObject current=null]: { newCompositeNode(grammarAccess.getEnumInterpretationRule()); } iv_ruleEnumInterpretation=ruleEnumInterpretation { $current=$iv_ruleEnumInterpretation.current; } EOF; // Rule EnumInterpretation ruleEnumInterpretation returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='enum' { newLeafNode(otherlv_0, grammarAccess.getEnumInterpretationAccess().getEnumKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getEnumInterpretationAccess().getSymbolModelSymbolParserRuleCall_1_0()); } lv_Symbol_1_0=ruleModelSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getEnumInterpretationRule()); } set( $current, "Symbol", lv_Symbol_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); afterParserOrEnumRuleCall(); } ) ) otherlv_2='{' { newLeafNode(otherlv_2, grammarAccess.getEnumInterpretationAccess().getLeftCurlyBracketKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getEnumInterpretationAccess().getObjectsNamedObjectParserRuleCall_3_0()); } lv_objects_3_0=ruleNamedObject { if ($current==null) { $current = createModelElementForParent(grammarAccess.getEnumInterpretationRule()); } add( $current, "objects", lv_objects_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.NamedObject"); afterParserOrEnumRuleCall(); } ) )+ otherlv_4='}' { newLeafNode(otherlv_4, grammarAccess.getEnumInterpretationAccess().getRightCurlyBracketKeyword_4()); } ) ; // Entry rule entryRuleFieldRelationInterpretation entryRuleFieldRelationInterpretation returns [EObject current=null]: { newCompositeNode(grammarAccess.getFieldRelationInterpretationRule()); } iv_ruleFieldRelationInterpretation=ruleFieldRelationInterpretation { $current=$iv_ruleFieldRelationInterpretation.current; } EOF; // Rule FieldRelationInterpretation ruleFieldRelationInterpretation returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( lv_containment_0_0='containment' { newLeafNode(lv_containment_0_0, grammarAccess.getFieldRelationInterpretationAccess().getContainmentContainmentKeyword_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getFieldRelationInterpretationRule()); } setWithLastConsumed($current, "containment", true, "containment"); } ) ) ( ( { newCompositeNode(grammarAccess.getFieldRelationInterpretationAccess().getSymbolModelSymbolParserRuleCall_1_0()); } lv_symbol_1_0=ruleModelSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getFieldRelationInterpretationRule()); } set( $current, "symbol", lv_symbol_1_0, "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); afterParserOrEnumRuleCall(); } ) ) otherlv_2=':' { newLeafNode(otherlv_2, grammarAccess.getFieldRelationInterpretationAccess().getColonKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getFieldRelationInterpretationAccess().getMultiplicityMultiplicityDefinitionParserRuleCall_3_0()); } lv_multiplicity_3_0=ruleMultiplicityDefinition { if ($current==null) { $current = createModelElementForParent(grammarAccess.getFieldRelationInterpretationRule()); } set( $current, "multiplicity", lv_multiplicity_3_0, "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicityDefinition"); afterParserOrEnumRuleCall(); } ) )? ( ( { newCompositeNode(grammarAccess.getFieldRelationInterpretationAccess().getTargetSymbolParserRuleCall_4_0()); } lv_target_4_0=ruleSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getFieldRelationInterpretationRule()); } set( $current, "target", lv_target_4_0, "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleGlobalRelationInterpretation entryRuleGlobalRelationInterpretation returns [EObject current=null]: { newCompositeNode(grammarAccess.getGlobalRelationInterpretationRule()); } iv_ruleGlobalRelationInterpretation=ruleGlobalRelationInterpretation { $current=$iv_ruleGlobalRelationInterpretation.current; } EOF; // Rule GlobalRelationInterpretation ruleGlobalRelationInterpretation returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( lv_containment_0_0='containment' { newLeafNode(lv_containment_0_0, grammarAccess.getGlobalRelationInterpretationAccess().getContainmentContainmentKeyword_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getGlobalRelationInterpretationRule()); } setWithLastConsumed($current, "containment", true, "containment"); } ) ) otherlv_1='relation' { newLeafNode(otherlv_1, grammarAccess.getGlobalRelationInterpretationAccess().getRelationKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getSymbolModelSymbolParserRuleCall_2_0()); } lv_symbol_2_0=ruleModelSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); } set( $current, "symbol", lv_symbol_2_0, "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); afterParserOrEnumRuleCall(); } ) ) otherlv_3=':' { newLeafNode(otherlv_3, grammarAccess.getGlobalRelationInterpretationAccess().getColonKeyword_3()); } ( ( { newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getSourceMultiplicityMultiplicityDefinitionParserRuleCall_4_0()); } lv_sourceMultiplicity_4_0=ruleMultiplicityDefinition { if ($current==null) { $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); } set( $current, "sourceMultiplicity", lv_sourceMultiplicity_4_0, "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicityDefinition"); afterParserOrEnumRuleCall(); } ) )? ( ( { newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getSourceSymbolParserRuleCall_5_0()); } lv_source_5_0=ruleSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); } set( $current, "source", lv_source_5_0, "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); afterParserOrEnumRuleCall(); } ) ) ( ( { newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getTargetMultiplicityMultiplicityDefinitionParserRuleCall_6_0()); } lv_targetMultiplicity_6_0=ruleMultiplicityDefinition { if ($current==null) { $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); } set( $current, "targetMultiplicity", lv_targetMultiplicity_6_0, "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicityDefinition"); afterParserOrEnumRuleCall(); } ) )? ( ( { newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getTargetSymbolParserRuleCall_7_0()); } lv_target_7_0=ruleSymbol { if ($current==null) { $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule()); } set( $current, "target", lv_target_7_0, "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); afterParserOrEnumRuleCall(); } ) ) ) ; // Entry rule entryRuleMultiplicityDefinition entryRuleMultiplicityDefinition returns [EObject current=null]: { newCompositeNode(grammarAccess.getMultiplicityDefinitionRule()); } iv_ruleMultiplicityDefinition=ruleMultiplicityDefinition { $current=$iv_ruleMultiplicityDefinition.current; } EOF; // Rule MultiplicityDefinition ruleMultiplicityDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( ( lv_lower_0_0=RULE_INT { newLeafNode(lv_lower_0_0, grammarAccess.getMultiplicityDefinitionAccess().getLowerINTTerminalRuleCall_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getMultiplicityDefinitionRule()); } setWithLastConsumed( $current, "lower", lv_lower_0_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) otherlv_1='..' { newLeafNode(otherlv_1, grammarAccess.getMultiplicityDefinitionAccess().getFullStopFullStopKeyword_1()); } ( ( ( lv_upper_2_0=RULE_INT { newLeafNode(lv_upper_2_0, grammarAccess.getMultiplicityDefinitionAccess().getUpperINTTerminalRuleCall_2_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getMultiplicityDefinitionRule()); } setWithLastConsumed( $current, "upper", lv_upper_2_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) | ( ( lv_unlimitedUpper_3_0='*' { newLeafNode(lv_unlimitedUpper_3_0, grammarAccess.getMultiplicityDefinitionAccess().getUnlimitedUpperAsteriskKeyword_2_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getMultiplicityDefinitionRule()); } setWithLastConsumed($current, "unlimitedUpper", true, "*"); } ) ) ) ) ; RULE_STRING : '"' ('\\' .|~(('\\'|'"')))* '"'; RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; RULE_INT : ('0'..'9')+; RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; RULE_WS : (' '|'\t'|'\r'|'\n')+; RULE_ANY_OTHER : .;