/* * generated by Xtext */ grammar InternalAlloyLanguage; options { superClass=AbstractInternalAntlrParser; } @lexer::header { package hu.bme.mit.inf.dslreasoner.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 hu.bme.mit.inf.dslreasoner.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 hu.bme.mit.inf.dslreasoner.services.AlloyLanguageGrammarAccess; } @parser::members { private AlloyLanguageGrammarAccess grammarAccess; public InternalAlloyLanguageParser(TokenStream input, AlloyLanguageGrammarAccess grammarAccess) { this(input); this.grammarAccess = grammarAccess; registerRules(grammarAccess.getGrammar()); } @Override protected String getFirstRuleName() { return "ALSDocument"; } @Override protected AlloyLanguageGrammarAccess getGrammarAccess() { return grammarAccess; } } @rulecatch { catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } } // Entry rule entryRuleALSDocument entryRuleALSDocument returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSDocumentRule()); } iv_ruleALSDocument=ruleALSDocument { $current=$iv_ruleALSDocument.current; } EOF ; // Rule ALSDocument ruleALSDocument returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ((( ( { newCompositeNode(grammarAccess.getALSDocumentAccess().getEnumDeclarationsALSEnumDeclarationParserRuleCall_0_0_0()); } lv_enumDeclarations_0_0=ruleALSEnumDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSDocumentRule()); } add( $current, "enumDeclarations", lv_enumDeclarations_0_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSEnumDeclaration"); afterParserOrEnumRuleCall(); } ) ) |( ( { newCompositeNode(grammarAccess.getALSDocumentAccess().getSignatureBodiesALSSignatureBodyParserRuleCall_0_1_0()); } lv_signatureBodies_1_0=ruleALSSignatureBody { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSDocumentRule()); } add( $current, "signatureBodies", lv_signatureBodies_1_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSSignatureBody"); afterParserOrEnumRuleCall(); } ) ) |( ( { newCompositeNode(grammarAccess.getALSDocumentAccess().getFunctionDefinitionsALSFunctionDefinitionParserRuleCall_0_2_0()); } lv_functionDefinitions_2_0=ruleALSFunctionDefinition { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSDocumentRule()); } add( $current, "functionDefinitions", lv_functionDefinitions_2_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSFunctionDefinition"); afterParserOrEnumRuleCall(); } ) ) |( ( { newCompositeNode(grammarAccess.getALSDocumentAccess().getRelationDefinitionsALSRelationDefinitionParserRuleCall_0_3_0()); } lv_relationDefinitions_3_0=ruleALSRelationDefinition { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSDocumentRule()); } add( $current, "relationDefinitions", lv_relationDefinitions_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSRelationDefinition"); afterParserOrEnumRuleCall(); } ) ) |( ( { newCompositeNode(grammarAccess.getALSDocumentAccess().getFactDeclarationsALSFactDeclarationParserRuleCall_0_4_0()); } lv_factDeclarations_4_0=ruleALSFactDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSDocumentRule()); } add( $current, "factDeclarations", lv_factDeclarations_4_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSFactDeclaration"); afterParserOrEnumRuleCall(); } ) ))+( ( { newCompositeNode(grammarAccess.getALSDocumentAccess().getRunCommandALSRunCommandParserRuleCall_1_0()); } lv_runCommand_5_0=ruleALSRunCommand { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSDocumentRule()); } set( $current, "runCommand", lv_runCommand_5_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSRunCommand"); afterParserOrEnumRuleCall(); } ) )) ; // Entry rule entryRuleALSID entryRuleALSID returns [String current=null] : { newCompositeNode(grammarAccess.getALSIDRule()); } iv_ruleALSID=ruleALSID { $current=$iv_ruleALSID.current.getText(); } EOF ; // Rule ALSID ruleALSID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] @init { enterRule(); } @after { leaveRule(); }: this_ID_0=RULE_ID { $current.merge(this_ID_0); } { newLeafNode(this_ID_0, grammarAccess.getALSIDAccess().getIDTerminalRuleCall()); } ; // Entry rule entryRuleALSTypeDeclaration entryRuleALSTypeDeclaration returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSTypeDeclarationRule()); } iv_ruleALSTypeDeclaration=ruleALSTypeDeclaration { $current=$iv_ruleALSTypeDeclaration.current; } EOF ; // Rule ALSTypeDeclaration ruleALSTypeDeclaration returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSTypeDeclarationAccess().getALSEnumDeclarationParserRuleCall_0()); } this_ALSEnumDeclaration_0=ruleALSEnumDeclaration { $current = $this_ALSEnumDeclaration_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getALSTypeDeclarationAccess().getALSSignatureDeclarationParserRuleCall_1()); } this_ALSSignatureDeclaration_1=ruleALSSignatureDeclaration { $current = $this_ALSSignatureDeclaration_1.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleALSEnumDeclaration entryRuleALSEnumDeclaration returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSEnumDeclarationRule()); } iv_ruleALSEnumDeclaration=ruleALSEnumDeclaration { $current=$iv_ruleALSEnumDeclaration.current; } EOF ; // Rule ALSEnumDeclaration ruleALSEnumDeclaration returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='enum' { newLeafNode(otherlv_0, grammarAccess.getALSEnumDeclarationAccess().getEnumKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getALSEnumDeclarationAccess().getNameALSIDParserRuleCall_1_0()); } lv_name_1_0=ruleALSID { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSEnumDeclarationRule()); } set( $current, "name", lv_name_1_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID"); afterParserOrEnumRuleCall(); } ) ) otherlv_2='{' { newLeafNode(otherlv_2, grammarAccess.getALSEnumDeclarationAccess().getLeftCurlyBracketKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getALSEnumDeclarationAccess().getLiteralALSEnumLiteralParserRuleCall_3_0()); } lv_literal_3_0=ruleALSEnumLiteral { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSEnumDeclarationRule()); } add( $current, "literal", lv_literal_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSEnumLiteral"); afterParserOrEnumRuleCall(); } ) )( otherlv_4=',' { newLeafNode(otherlv_4, grammarAccess.getALSEnumDeclarationAccess().getCommaKeyword_4_0()); } ( ( { newCompositeNode(grammarAccess.getALSEnumDeclarationAccess().getLiteralALSEnumLiteralParserRuleCall_4_1_0()); } lv_literal_5_0=ruleALSEnumLiteral { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSEnumDeclarationRule()); } add( $current, "literal", lv_literal_5_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSEnumLiteral"); afterParserOrEnumRuleCall(); } ) ))* otherlv_6='}' { newLeafNode(otherlv_6, grammarAccess.getALSEnumDeclarationAccess().getRightCurlyBracketKeyword_5()); } ) ; // Entry rule entryRuleALSEnumLiteral entryRuleALSEnumLiteral returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSEnumLiteralRule()); } iv_ruleALSEnumLiteral=ruleALSEnumLiteral { $current=$iv_ruleALSEnumLiteral.current; } EOF ; // Rule ALSEnumLiteral ruleALSEnumLiteral returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getALSEnumLiteralAccess().getNameALSIDParserRuleCall_0()); } lv_name_0_0=ruleALSID { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSEnumLiteralRule()); } set( $current, "name", lv_name_0_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID"); afterParserOrEnumRuleCall(); } ) ) ; // Entry rule entryRuleALSSignatureDeclaration entryRuleALSSignatureDeclaration returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSSignatureDeclarationRule()); } iv_ruleALSSignatureDeclaration=ruleALSSignatureDeclaration { $current=$iv_ruleALSSignatureDeclaration.current; } EOF ; // Rule ALSSignatureDeclaration ruleALSSignatureDeclaration returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( ( { newCompositeNode(grammarAccess.getALSSignatureDeclarationAccess().getNameALSIDParserRuleCall_0()); } lv_name_0_0=ruleALSID { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSSignatureDeclarationRule()); } set( $current, "name", lv_name_0_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID"); afterParserOrEnumRuleCall(); } ) ) ; // Entry rule entryRuleALSSignatureBody entryRuleALSSignatureBody returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSSignatureBodyRule()); } iv_ruleALSSignatureBody=ruleALSSignatureBody { $current=$iv_ruleALSSignatureBody.current; } EOF ; // Rule ALSSignatureBody ruleALSSignatureBody returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: (( ( { getUnorderedGroupHelper().enter(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0()); } ( ( ( {getUnorderedGroupHelper().canSelect(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 0)}?=>( { getUnorderedGroupHelper().select(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 0); } ({true}?=>( ( { newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getMultiplicityALSMultiplicityEnumRuleCall_0_0_0()); } lv_multiplicity_1_0=ruleALSMultiplicity { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule()); } set( $current, "multiplicity", lv_multiplicity_1_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity"); afterParserOrEnumRuleCall(); } ) )) { getUnorderedGroupHelper().returnFromSelection(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0()); } ) ) | ( {getUnorderedGroupHelper().canSelect(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 1)}?=>( { getUnorderedGroupHelper().select(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0(), 1); } ({true}?=>( ( lv_abstract_2_0= 'abstract' { newLeafNode(lv_abstract_2_0, grammarAccess.getALSSignatureBodyAccess().getAbstractAbstractKeyword_0_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getALSSignatureBodyRule()); } setWithLastConsumed($current, "abstract", true, "abstract"); } ) )) { getUnorderedGroupHelper().returnFromSelection(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0()); } ) ) )* ) ) { getUnorderedGroupHelper().leave(grammarAccess.getALSSignatureBodyAccess().getUnorderedGroup_0()); } ) otherlv_3='sig' { newLeafNode(otherlv_3, grammarAccess.getALSSignatureBodyAccess().getSigKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getDeclarationsALSSignatureDeclarationParserRuleCall_2_0()); } lv_declarations_4_0=ruleALSSignatureDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule()); } add( $current, "declarations", lv_declarations_4_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSSignatureDeclaration"); afterParserOrEnumRuleCall(); } ) )( otherlv_5=',' { newLeafNode(otherlv_5, grammarAccess.getALSSignatureBodyAccess().getCommaKeyword_3_0()); } ( ( { newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getDeclarationsALSSignatureDeclarationParserRuleCall_3_1_0()); } lv_declarations_6_0=ruleALSSignatureDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule()); } add( $current, "declarations", lv_declarations_6_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSSignatureDeclaration"); afterParserOrEnumRuleCall(); } ) ))*(( otherlv_7='extends' { newLeafNode(otherlv_7, grammarAccess.getALSSignatureBodyAccess().getExtendsKeyword_4_0_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getALSSignatureBodyRule()); } } otherlv_8=RULE_ID { newLeafNode(otherlv_8, grammarAccess.getALSSignatureBodyAccess().getSupertypeALSSignatureDeclarationCrossReference_4_0_1_0()); } ) )) |( otherlv_9='in' { newLeafNode(otherlv_9, grammarAccess.getALSSignatureBodyAccess().getInKeyword_4_1_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getALSSignatureBodyRule()); } } otherlv_10=RULE_ID { newLeafNode(otherlv_10, grammarAccess.getALSSignatureBodyAccess().getSupersetALSSignatureDeclarationCrossReference_4_1_1_0()); } ) )( otherlv_11='+' { newLeafNode(otherlv_11, grammarAccess.getALSSignatureBodyAccess().getPlusSignKeyword_4_1_2_0()); } ( ( { if ($current==null) { $current = createModelElement(grammarAccess.getALSSignatureBodyRule()); } } otherlv_12=RULE_ID { newLeafNode(otherlv_12, grammarAccess.getALSSignatureBodyAccess().getSupersetALSSignatureDeclarationCrossReference_4_1_2_1_0()); } ) ))*))? otherlv_13='{' { newLeafNode(otherlv_13, grammarAccess.getALSSignatureBodyAccess().getLeftCurlyBracketKeyword_5()); } (( ( { newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getFieldsALSFieldDeclarationParserRuleCall_6_0_0()); } lv_fields_14_0=ruleALSFieldDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule()); } add( $current, "fields", lv_fields_14_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSFieldDeclaration"); afterParserOrEnumRuleCall(); } ) )( otherlv_15=',' { newLeafNode(otherlv_15, grammarAccess.getALSSignatureBodyAccess().getCommaKeyword_6_1_0()); } ( ( { newCompositeNode(grammarAccess.getALSSignatureBodyAccess().getFieldsALSFieldDeclarationParserRuleCall_6_1_1_0()); } lv_fields_16_0=ruleALSFieldDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSSignatureBodyRule()); } add( $current, "fields", lv_fields_16_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSFieldDeclaration"); afterParserOrEnumRuleCall(); } ) ))*)? otherlv_17='}' { newLeafNode(otherlv_17, grammarAccess.getALSSignatureBodyAccess().getRightCurlyBracketKeyword_7()); } ) ; // Entry rule entryRuleALSFieldDeclaration entryRuleALSFieldDeclaration returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSFieldDeclarationRule()); } iv_ruleALSFieldDeclaration=ruleALSFieldDeclaration { $current=$iv_ruleALSFieldDeclaration.current; } EOF ; // Rule ALSFieldDeclaration ruleALSFieldDeclaration returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: (( ( { newCompositeNode(grammarAccess.getALSFieldDeclarationAccess().getNameALSIDParserRuleCall_0_0()); } lv_name_0_0=ruleALSID { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFieldDeclarationRule()); } set( $current, "name", lv_name_0_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID"); afterParserOrEnumRuleCall(); } ) ) otherlv_1=':' { newLeafNode(otherlv_1, grammarAccess.getALSFieldDeclarationAccess().getColonKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getALSFieldDeclarationAccess().getMultiplicityALSMultiplicityEnumRuleCall_2_0()); } lv_multiplicity_2_0=ruleALSMultiplicity { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFieldDeclarationRule()); } set( $current, "multiplicity", lv_multiplicity_2_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity"); afterParserOrEnumRuleCall(); } ) )?( ( { newCompositeNode(grammarAccess.getALSFieldDeclarationAccess().getTypeALSTermParserRuleCall_3_0()); } lv_type_3_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFieldDeclarationRule()); } set( $current, "type", lv_type_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) )) ; // Entry rule entryRuleALSFunctionDefinition entryRuleALSFunctionDefinition returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSFunctionDefinitionRule()); } iv_ruleALSFunctionDefinition=ruleALSFunctionDefinition { $current=$iv_ruleALSFunctionDefinition.current; } EOF ; // Rule ALSFunctionDefinition ruleALSFunctionDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='fun' { newLeafNode(otherlv_0, grammarAccess.getALSFunctionDefinitionAccess().getFunKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getNameALSIDParserRuleCall_1_0()); } lv_name_1_0=ruleALSID { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule()); } set( $current, "name", lv_name_1_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID"); afterParserOrEnumRuleCall(); } ) ) otherlv_2='[' { newLeafNode(otherlv_2, grammarAccess.getALSFunctionDefinitionAccess().getLeftSquareBracketKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getVariablesALSVariableDeclarationParserRuleCall_3_0()); } lv_variables_3_0=ruleALSVariableDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule()); } add( $current, "variables", lv_variables_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration"); afterParserOrEnumRuleCall(); } ) )( otherlv_4=',' { newLeafNode(otherlv_4, grammarAccess.getALSFunctionDefinitionAccess().getCommaKeyword_4_0()); } ( ( { newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getVariablesALSVariableDeclarationParserRuleCall_4_1_0()); } lv_variables_5_0=ruleALSVariableDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule()); } add( $current, "variables", lv_variables_5_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration"); afterParserOrEnumRuleCall(); } ) ))* otherlv_6=']' { newLeafNode(otherlv_6, grammarAccess.getALSFunctionDefinitionAccess().getRightSquareBracketKeyword_5()); } otherlv_7=':' { newLeafNode(otherlv_7, grammarAccess.getALSFunctionDefinitionAccess().getColonKeyword_6()); } ( ( { newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getTypeALSTermParserRuleCall_7_0()); } lv_type_8_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule()); } set( $current, "type", lv_type_8_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) ) otherlv_9='{' { newLeafNode(otherlv_9, grammarAccess.getALSFunctionDefinitionAccess().getLeftCurlyBracketKeyword_8()); } ( ( { newCompositeNode(grammarAccess.getALSFunctionDefinitionAccess().getValueALSTermParserRuleCall_9_0()); } lv_value_10_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFunctionDefinitionRule()); } set( $current, "value", lv_value_10_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) ) otherlv_11='}' { newLeafNode(otherlv_11, grammarAccess.getALSFunctionDefinitionAccess().getRightCurlyBracketKeyword_10()); } ) ; // Entry rule entryRuleALSRelationDefinition entryRuleALSRelationDefinition returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSRelationDefinitionRule()); } iv_ruleALSRelationDefinition=ruleALSRelationDefinition { $current=$iv_ruleALSRelationDefinition.current; } EOF ; // Rule ALSRelationDefinition ruleALSRelationDefinition returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='pred' { newLeafNode(otherlv_0, grammarAccess.getALSRelationDefinitionAccess().getPredKeyword_0()); } ( ( { newCompositeNode(grammarAccess.getALSRelationDefinitionAccess().getNameALSIDParserRuleCall_1_0()); } lv_name_1_0=ruleALSID { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSRelationDefinitionRule()); } set( $current, "name", lv_name_1_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID"); afterParserOrEnumRuleCall(); } ) ) otherlv_2='[' { newLeafNode(otherlv_2, grammarAccess.getALSRelationDefinitionAccess().getLeftSquareBracketKeyword_2()); } ( ( { newCompositeNode(grammarAccess.getALSRelationDefinitionAccess().getVariablesALSVariableDeclarationParserRuleCall_3_0()); } lv_variables_3_0=ruleALSVariableDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSRelationDefinitionRule()); } add( $current, "variables", lv_variables_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration"); afterParserOrEnumRuleCall(); } ) )( otherlv_4=',' { newLeafNode(otherlv_4, grammarAccess.getALSRelationDefinitionAccess().getCommaKeyword_4_0()); } ( ( { newCompositeNode(grammarAccess.getALSRelationDefinitionAccess().getVariablesALSVariableDeclarationParserRuleCall_4_1_0()); } lv_variables_5_0=ruleALSVariableDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSRelationDefinitionRule()); } add( $current, "variables", lv_variables_5_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration"); afterParserOrEnumRuleCall(); } ) ))* otherlv_6=']' { newLeafNode(otherlv_6, grammarAccess.getALSRelationDefinitionAccess().getRightSquareBracketKeyword_5()); } otherlv_7='{' { newLeafNode(otherlv_7, grammarAccess.getALSRelationDefinitionAccess().getLeftCurlyBracketKeyword_6()); } ( ( { newCompositeNode(grammarAccess.getALSRelationDefinitionAccess().getValueALSTermParserRuleCall_7_0()); } lv_value_8_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSRelationDefinitionRule()); } set( $current, "value", lv_value_8_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) ) otherlv_9='}' { newLeafNode(otherlv_9, grammarAccess.getALSRelationDefinitionAccess().getRightCurlyBracketKeyword_8()); } ) ; // Entry rule entryRuleALSFactDeclaration entryRuleALSFactDeclaration returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSFactDeclarationRule()); } iv_ruleALSFactDeclaration=ruleALSFactDeclaration { $current=$iv_ruleALSFactDeclaration.current; } EOF ; // Rule ALSFactDeclaration ruleALSFactDeclaration returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: (( { $current = forceCreateModelElement( grammarAccess.getALSFactDeclarationAccess().getALSFactDeclarationAction_0(), $current); } ) otherlv_1='fact' { newLeafNode(otherlv_1, grammarAccess.getALSFactDeclarationAccess().getFactKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getALSFactDeclarationAccess().getNameALSIDParserRuleCall_2_0()); } lv_name_2_0=ruleALSID { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFactDeclarationRule()); } set( $current, "name", lv_name_2_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID"); afterParserOrEnumRuleCall(); } ) )? otherlv_3='{' { newLeafNode(otherlv_3, grammarAccess.getALSFactDeclarationAccess().getLeftCurlyBracketKeyword_3()); } ( ( { newCompositeNode(grammarAccess.getALSFactDeclarationAccess().getTermALSTermParserRuleCall_4_0()); } lv_term_4_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSFactDeclarationRule()); } set( $current, "term", lv_term_4_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) ) otherlv_5='}' { newLeafNode(otherlv_5, grammarAccess.getALSFactDeclarationAccess().getRightCurlyBracketKeyword_5()); } ) ; // Entry rule entryRuleALSTerm entryRuleALSTerm returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSTermRule()); } iv_ruleALSTerm=ruleALSTerm { $current=$iv_ruleALSTerm.current; } EOF ; // Rule ALSTerm ruleALSTerm returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: { newCompositeNode(grammarAccess.getALSTermAccess().getALSQuantifiedParserRuleCall()); } this_ALSQuantified_0=ruleALSQuantified { $current = $this_ALSQuantified_0.current; afterParserOrEnumRuleCall(); } ; // Entry rule entryRuleALSQuantified entryRuleALSQuantified returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSQuantifiedRule()); } iv_ruleALSQuantified=ruleALSQuantified { $current=$iv_ruleALSQuantified.current; } EOF ; // Rule ALSQuantified ruleALSQuantified returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ((( { $current = forceCreateModelElement( grammarAccess.getALSQuantifiedAccess().getALSQuantifiedExAction_0_0(), $current); } )( ( { newCompositeNode(grammarAccess.getALSQuantifiedAccess().getTypeALSMultiplicityEnumRuleCall_0_1_0()); } lv_type_1_0=ruleALSMultiplicity { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSQuantifiedRule()); } set( $current, "type", lv_type_1_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity"); afterParserOrEnumRuleCall(); } ) )( ( lv_disj_2_0= 'disj' { newLeafNode(lv_disj_2_0, grammarAccess.getALSQuantifiedAccess().getDisjDisjKeyword_0_2_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getALSQuantifiedRule()); } setWithLastConsumed($current, "disj", true, "disj"); } ) )?( ( { newCompositeNode(grammarAccess.getALSQuantifiedAccess().getVariablesALSVariableDeclarationParserRuleCall_0_3_0()); } lv_variables_3_0=ruleALSVariableDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSQuantifiedRule()); } add( $current, "variables", lv_variables_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration"); afterParserOrEnumRuleCall(); } ) )( otherlv_4=',' { newLeafNode(otherlv_4, grammarAccess.getALSQuantifiedAccess().getCommaKeyword_0_4_0()); } ( ( { newCompositeNode(grammarAccess.getALSQuantifiedAccess().getVariablesALSVariableDeclarationParserRuleCall_0_4_1_0()); } lv_variables_5_0=ruleALSVariableDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSQuantifiedRule()); } add( $current, "variables", lv_variables_5_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration"); afterParserOrEnumRuleCall(); } ) ))* otherlv_6='{' { newLeafNode(otherlv_6, grammarAccess.getALSQuantifiedAccess().getLeftCurlyBracketKeyword_0_5()); } ( ( { newCompositeNode(grammarAccess.getALSQuantifiedAccess().getExpressionALSTermParserRuleCall_0_6_0()); } lv_expression_7_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSQuantifiedRule()); } set( $current, "expression", lv_expression_7_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) ) otherlv_8='}' { newLeafNode(otherlv_8, grammarAccess.getALSQuantifiedAccess().getRightCurlyBracketKeyword_0_7()); } ) | { newCompositeNode(grammarAccess.getALSQuantifiedAccess().getALSOrParserRuleCall_1()); } this_ALSOr_9=ruleALSOr { $current = $this_ALSOr_9.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleALSOr entryRuleALSOr returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSOrRule()); } iv_ruleALSOr=ruleALSOr { $current=$iv_ruleALSOr.current; } EOF ; // Rule ALSOr ruleALSOr returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSOrAccess().getALSIffParserRuleCall_0()); } this_ALSIff_0=ruleALSIff { $current = $this_ALSIff_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSOrAccess().getALSOrLeftOperandAction_1_0(), $current); } )( otherlv_2='||' { newLeafNode(otherlv_2, grammarAccess.getALSOrAccess().getVerticalLineVerticalLineKeyword_1_1_0()); } | otherlv_3='or' { newLeafNode(otherlv_3, grammarAccess.getALSOrAccess().getOrKeyword_1_1_1()); } )( ( { newCompositeNode(grammarAccess.getALSOrAccess().getRightOperandALSIffParserRuleCall_1_2_0()); } lv_rightOperand_4_0=ruleALSIff { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSOrRule()); } set( $current, "rightOperand", lv_rightOperand_4_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSIff"); afterParserOrEnumRuleCall(); } ) ))?) ; // Entry rule entryRuleALSIff entryRuleALSIff returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSIffRule()); } iv_ruleALSIff=ruleALSIff { $current=$iv_ruleALSIff.current; } EOF ; // Rule ALSIff ruleALSIff returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSIffAccess().getALSImplParserRuleCall_0()); } this_ALSImpl_0=ruleALSImpl { $current = $this_ALSImpl_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSIffAccess().getALSIffLeftOperandAction_1_0(), $current); } )( otherlv_2='<=>' { newLeafNode(otherlv_2, grammarAccess.getALSIffAccess().getLessThanSignEqualsSignGreaterThanSignKeyword_1_1_0()); } | otherlv_3='iff' { newLeafNode(otherlv_3, grammarAccess.getALSIffAccess().getIffKeyword_1_1_1()); } )( ( { newCompositeNode(grammarAccess.getALSIffAccess().getRightOperandALSImplParserRuleCall_1_2_0()); } lv_rightOperand_4_0=ruleALSImpl { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSIffRule()); } set( $current, "rightOperand", lv_rightOperand_4_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSImpl"); afterParserOrEnumRuleCall(); } ) ))?) ; // Entry rule entryRuleALSImpl entryRuleALSImpl returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSImplRule()); } iv_ruleALSImpl=ruleALSImpl { $current=$iv_ruleALSImpl.current; } EOF ; // Rule ALSImpl ruleALSImpl returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSImplAccess().getALSAndParserRuleCall_0()); } this_ALSAnd_0=ruleALSAnd { $current = $this_ALSAnd_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSImplAccess().getALSImplLeftOperandAction_1_0(), $current); } )( otherlv_2='=>' { newLeafNode(otherlv_2, grammarAccess.getALSImplAccess().getEqualsSignGreaterThanSignKeyword_1_1_0()); } | otherlv_3='implies' { newLeafNode(otherlv_3, grammarAccess.getALSImplAccess().getImpliesKeyword_1_1_1()); } )( ( { newCompositeNode(grammarAccess.getALSImplAccess().getRightOperandALSAndParserRuleCall_1_2_0()); } lv_rightOperand_4_0=ruleALSAnd { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSImplRule()); } set( $current, "rightOperand", lv_rightOperand_4_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSAnd"); afterParserOrEnumRuleCall(); } ) )( otherlv_5='else' { newLeafNode(otherlv_5, grammarAccess.getALSImplAccess().getElseKeyword_1_3_0()); } ( ( { newCompositeNode(grammarAccess.getALSImplAccess().getElseOperandALSAndParserRuleCall_1_3_1_0()); } lv_elseOperand_6_0=ruleALSAnd { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSImplRule()); } set( $current, "elseOperand", lv_elseOperand_6_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSAnd"); afterParserOrEnumRuleCall(); } ) ))?)?) ; // Entry rule entryRuleALSAnd entryRuleALSAnd returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSAndRule()); } iv_ruleALSAnd=ruleALSAnd { $current=$iv_ruleALSAnd.current; } EOF ; // Rule ALSAnd ruleALSAnd returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSAndAccess().getALSComparisonParserRuleCall_0()); } this_ALSComparison_0=ruleALSComparison { $current = $this_ALSComparison_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSAndAccess().getALSAndLeftOperandAction_1_0(), $current); } )( otherlv_2='&&' { newLeafNode(otherlv_2, grammarAccess.getALSAndAccess().getAmpersandAmpersandKeyword_1_1_0()); } | otherlv_3='and' { newLeafNode(otherlv_3, grammarAccess.getALSAndAccess().getAndKeyword_1_1_1()); } )( ( { newCompositeNode(grammarAccess.getALSAndAccess().getRightOperandALSComparisonParserRuleCall_1_2_0()); } lv_rightOperand_4_0=ruleALSComparison { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSAndRule()); } set( $current, "rightOperand", lv_rightOperand_4_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSComparison"); afterParserOrEnumRuleCall(); } ) ))?) ; // Entry rule entryRuleALSComparison entryRuleALSComparison returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSComparisonRule()); } iv_ruleALSComparison=ruleALSComparison { $current=$iv_ruleALSComparison.current; } EOF ; // Rule ALSComparison ruleALSComparison returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSComparisonAccess().getALSOverrideParserRuleCall_0()); } this_ALSOverride_0=ruleALSOverride { $current = $this_ALSOverride_0.current; afterParserOrEnumRuleCall(); } (((( { $current = forceCreateModelElementAndSet( grammarAccess.getALSComparisonAccess().getALSEqualsLeftOperandAction_1_0_0_0(), $current); } ) otherlv_2='=' { newLeafNode(otherlv_2, grammarAccess.getALSComparisonAccess().getEqualsSignKeyword_1_0_0_1()); } ) |(( { $current = forceCreateModelElementAndSet( grammarAccess.getALSComparisonAccess().getALSNotEqualsLeftOperandAction_1_0_1_0(), $current); } ) otherlv_4='!=' { newLeafNode(otherlv_4, grammarAccess.getALSComparisonAccess().getExclamationMarkEqualsSignKeyword_1_0_1_1()); } ) |(( { $current = forceCreateModelElementAndSet( grammarAccess.getALSComparisonAccess().getALSSubsetLeftOperandAction_1_0_2_0(), $current); } ) otherlv_6='in' { newLeafNode(otherlv_6, grammarAccess.getALSComparisonAccess().getInKeyword_1_0_2_1()); } ) |(( { $current = forceCreateModelElementAndSet( grammarAccess.getALSComparisonAccess().getALSLessLeftOperandAction_1_0_3_0(), $current); } ) otherlv_8='>' { newLeafNode(otherlv_8, grammarAccess.getALSComparisonAccess().getGreaterThanSignKeyword_1_0_3_1()); } ) |(( { $current = forceCreateModelElementAndSet( grammarAccess.getALSComparisonAccess().getALSLeqLeftOperandAction_1_0_4_0(), $current); } ) otherlv_10='>=' { newLeafNode(otherlv_10, grammarAccess.getALSComparisonAccess().getGreaterThanSignEqualsSignKeyword_1_0_4_1()); } ) |(( { $current = forceCreateModelElementAndSet( grammarAccess.getALSComparisonAccess().getALSMoreLeftOperandAction_1_0_5_0(), $current); } ) otherlv_12='<' { newLeafNode(otherlv_12, grammarAccess.getALSComparisonAccess().getLessThanSignKeyword_1_0_5_1()); } ) |(( { $current = forceCreateModelElementAndSet( grammarAccess.getALSComparisonAccess().getALSMeqLeftOperandAction_1_0_6_0(), $current); } ) otherlv_14='<=' { newLeafNode(otherlv_14, grammarAccess.getALSComparisonAccess().getLessThanSignEqualsSignKeyword_1_0_6_1()); } ))( ( { newCompositeNode(grammarAccess.getALSComparisonAccess().getRightOperandALSOverrideParserRuleCall_1_1_0()); } lv_rightOperand_15_0=ruleALSOverride { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSComparisonRule()); } set( $current, "rightOperand", lv_rightOperand_15_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSOverride"); afterParserOrEnumRuleCall(); } ) ))?) ; // Entry rule entryRuleALSOverride entryRuleALSOverride returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSOverrideRule()); } iv_ruleALSOverride=ruleALSOverride { $current=$iv_ruleALSOverride.current; } EOF ; // Rule ALSOverride ruleALSOverride returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSOverrideAccess().getALSRangeRestrictionRightParserRuleCall_0()); } this_ALSRangeRestrictionRight_0=ruleALSRangeRestrictionRight { $current = $this_ALSRangeRestrictionRight_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSOverrideAccess().getALSOverrideLeftOperandAction_1_0(), $current); } ) otherlv_2='++' { newLeafNode(otherlv_2, grammarAccess.getALSOverrideAccess().getPlusSignPlusSignKeyword_1_1()); } ( ( { newCompositeNode(grammarAccess.getALSOverrideAccess().getRightOperandALSRangeRestrictionRightParserRuleCall_1_2_0()); } lv_rightOperand_3_0=ruleALSRangeRestrictionRight { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSOverrideRule()); } set( $current, "rightOperand", lv_rightOperand_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSRangeRestrictionRight"); afterParserOrEnumRuleCall(); } ) ))?) ; // Entry rule entryRuleALSRangeRestrictionRight entryRuleALSRangeRestrictionRight returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSRangeRestrictionRightRule()); } iv_ruleALSRangeRestrictionRight=ruleALSRangeRestrictionRight { $current=$iv_ruleALSRangeRestrictionRight.current; } EOF ; // Rule ALSRangeRestrictionRight ruleALSRangeRestrictionRight returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSRangeRestrictionRightAccess().getALSRangeRestrictionLeftParserRuleCall_0()); } this_ALSRangeRestrictionLeft_0=ruleALSRangeRestrictionLeft { $current = $this_ALSRangeRestrictionLeft_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSRangeRestrictionRightAccess().getALSRangeRestrictionRightRelationAction_1_0(), $current); } ) otherlv_2=':>' { newLeafNode(otherlv_2, grammarAccess.getALSRangeRestrictionRightAccess().getColonGreaterThanSignKeyword_1_1()); } ( ( { newCompositeNode(grammarAccess.getALSRangeRestrictionRightAccess().getFilterALSRangeRestrictionLeftParserRuleCall_1_2_0()); } lv_filter_3_0=ruleALSRangeRestrictionLeft { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSRangeRestrictionRightRule()); } set( $current, "filter", lv_filter_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSRangeRestrictionLeft"); afterParserOrEnumRuleCall(); } ) ))?) ; // Entry rule entryRuleALSRangeRestrictionLeft entryRuleALSRangeRestrictionLeft returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSRangeRestrictionLeftRule()); } iv_ruleALSRangeRestrictionLeft=ruleALSRangeRestrictionLeft { $current=$iv_ruleALSRangeRestrictionLeft.current; } EOF ; // Rule ALSRangeRestrictionLeft ruleALSRangeRestrictionLeft returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSRangeRestrictionLeftAccess().getALSJoinParserRuleCall_0()); } this_ALSJoin_0=ruleALSJoin { $current = $this_ALSJoin_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSRangeRestrictionLeftAccess().getALSRangeRestrictionLeftFilterAction_1_0(), $current); } ) otherlv_2='<:' { newLeafNode(otherlv_2, grammarAccess.getALSRangeRestrictionLeftAccess().getLessThanSignColonKeyword_1_1()); } ( ( { newCompositeNode(grammarAccess.getALSRangeRestrictionLeftAccess().getRelationALSJoinParserRuleCall_1_2_0()); } lv_relation_3_0=ruleALSJoin { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSRangeRestrictionLeftRule()); } set( $current, "relation", lv_relation_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSJoin"); afterParserOrEnumRuleCall(); } ) ))?) ; // Entry rule entryRuleALSJoin entryRuleALSJoin returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSJoinRule()); } iv_ruleALSJoin=ruleALSJoin { $current=$iv_ruleALSJoin.current; } EOF ; // Rule ALSJoin ruleALSJoin returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSJoinAccess().getALSMinusParserRuleCall_0()); } this_ALSMinus_0=ruleALSMinus { $current = $this_ALSMinus_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSJoinAccess().getALSJoinLeftOperandAction_1_0(), $current); } ) otherlv_2='.' { newLeafNode(otherlv_2, grammarAccess.getALSJoinAccess().getFullStopKeyword_1_1()); } ( ( { newCompositeNode(grammarAccess.getALSJoinAccess().getRightOperandALSMinusParserRuleCall_1_2_0()); } lv_rightOperand_3_0=ruleALSMinus { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSJoinRule()); } set( $current, "rightOperand", lv_rightOperand_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMinus"); afterParserOrEnumRuleCall(); } ) ))*) ; // Entry rule entryRuleALSMinus entryRuleALSMinus returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSMinusRule()); } iv_ruleALSMinus=ruleALSMinus { $current=$iv_ruleALSMinus.current; } EOF ; // Rule ALSMinus ruleALSMinus returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSMinusAccess().getALSPlusParserRuleCall_0()); } this_ALSPlus_0=ruleALSPlus { $current = $this_ALSPlus_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSMinusAccess().getALSMinusLeftOperandAction_1_0(), $current); } ) otherlv_2='-' { newLeafNode(otherlv_2, grammarAccess.getALSMinusAccess().getHyphenMinusKeyword_1_1()); } ( ( { newCompositeNode(grammarAccess.getALSMinusAccess().getRightOperandALSPlusParserRuleCall_1_2_0()); } lv_rightOperand_3_0=ruleALSPlus { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSMinusRule()); } set( $current, "rightOperand", lv_rightOperand_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSPlus"); afterParserOrEnumRuleCall(); } ) ))*) ; // Entry rule entryRuleALSPlus entryRuleALSPlus returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSPlusRule()); } iv_ruleALSPlus=ruleALSPlus { $current=$iv_ruleALSPlus.current; } EOF ; // Rule ALSPlus ruleALSPlus returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSPlusAccess().getALSIntersectionParserRuleCall_0()); } this_ALSIntersection_0=ruleALSIntersection { $current = $this_ALSIntersection_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSPlusAccess().getALSPlusLeftOperandAction_1_0(), $current); } ) otherlv_2='+' { newLeafNode(otherlv_2, grammarAccess.getALSPlusAccess().getPlusSignKeyword_1_1()); } ( ( { newCompositeNode(grammarAccess.getALSPlusAccess().getRightOperandALSIntersectionParserRuleCall_1_2_0()); } lv_rightOperand_3_0=ruleALSIntersection { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPlusRule()); } set( $current, "rightOperand", lv_rightOperand_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSIntersection"); afterParserOrEnumRuleCall(); } ) ))*) ; // Entry rule entryRuleALSIntersection entryRuleALSIntersection returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSIntersectionRule()); } iv_ruleALSIntersection=ruleALSIntersection { $current=$iv_ruleALSIntersection.current; } EOF ; // Rule ALSIntersection ruleALSIntersection returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSIntersectionAccess().getALSDirectProductParserRuleCall_0()); } this_ALSDirectProduct_0=ruleALSDirectProduct { $current = $this_ALSDirectProduct_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSIntersectionAccess().getALSIntersectionLeftOperandAction_1_0(), $current); } ) otherlv_2='&' { newLeafNode(otherlv_2, grammarAccess.getALSIntersectionAccess().getAmpersandKeyword_1_1()); } ( ( { newCompositeNode(grammarAccess.getALSIntersectionAccess().getRightOperandALSDirectProductParserRuleCall_1_2_0()); } lv_rightOperand_3_0=ruleALSDirectProduct { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSIntersectionRule()); } set( $current, "rightOperand", lv_rightOperand_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSDirectProduct"); afterParserOrEnumRuleCall(); } ) ))*) ; // Entry rule entryRuleALSDirectProduct entryRuleALSDirectProduct returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSDirectProductRule()); } iv_ruleALSDirectProduct=ruleALSDirectProduct { $current=$iv_ruleALSDirectProduct.current; } EOF ; // Rule ALSDirectProduct ruleALSDirectProduct returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSDirectProductAccess().getALSPreficedParserRuleCall_0()); } this_ALSPreficed_0=ruleALSPreficed { $current = $this_ALSPreficed_0.current; afterParserOrEnumRuleCall(); } (( { $current = forceCreateModelElementAndSet( grammarAccess.getALSDirectProductAccess().getALSDirectProductLeftOperandAction_1_0(), $current); } )( ( { newCompositeNode(grammarAccess.getALSDirectProductAccess().getLeftMultiplicitALSMultiplicityEnumRuleCall_1_1_0()); } lv_leftMultiplicit_2_0=ruleALSMultiplicity { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSDirectProductRule()); } set( $current, "leftMultiplicit", lv_leftMultiplicit_2_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity"); afterParserOrEnumRuleCall(); } ) )? otherlv_3='->' { newLeafNode(otherlv_3, grammarAccess.getALSDirectProductAccess().getHyphenMinusGreaterThanSignKeyword_1_2()); } ( ( { newCompositeNode(grammarAccess.getALSDirectProductAccess().getRightMultiplicitALSMultiplicityEnumRuleCall_1_3_0()); } lv_rightMultiplicit_4_0=ruleALSMultiplicity { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSDirectProductRule()); } set( $current, "rightMultiplicit", lv_rightMultiplicit_4_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSMultiplicity"); afterParserOrEnumRuleCall(); } ) )?( ( { newCompositeNode(grammarAccess.getALSDirectProductAccess().getRightOperandALSPreficedParserRuleCall_1_4_0()); } lv_rightOperand_5_0=ruleALSPreficed { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSDirectProductRule()); } set( $current, "rightOperand", lv_rightOperand_5_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSPreficed"); afterParserOrEnumRuleCall(); } ) ))?) ; // Entry rule entryRuleALSPreficed entryRuleALSPreficed returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSPreficedRule()); } iv_ruleALSPreficed=ruleALSPreficed { $current=$iv_ruleALSPreficed.current; } EOF ; // Rule ALSPreficed ruleALSPreficed returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ((( { $current = forceCreateModelElement( grammarAccess.getALSPreficedAccess().getALSNotAction_0_0(), $current); } )((( '!' | 'not' ))=>( otherlv_1='!' { newLeafNode(otherlv_1, grammarAccess.getALSPreficedAccess().getExclamationMarkKeyword_0_1_0_0()); } | otherlv_2='not' { newLeafNode(otherlv_2, grammarAccess.getALSPreficedAccess().getNotKeyword_0_1_0_1()); } ))( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_0_2_0()); } lv_operand_3_0=ruleALSBasicRelationTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } set( $current, "operand", lv_operand_3_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm"); afterParserOrEnumRuleCall(); } ) )) |(( { $current = forceCreateModelElement( grammarAccess.getALSPreficedAccess().getALSInverseRelationAction_1_0(), $current); } )(( '~' )=> otherlv_5='~' { newLeafNode(otherlv_5, grammarAccess.getALSPreficedAccess().getTildeKeyword_1_1()); } )( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_1_2_0()); } lv_operand_6_0=ruleALSBasicRelationTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } set( $current, "operand", lv_operand_6_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm"); afterParserOrEnumRuleCall(); } ) )) |(( { $current = forceCreateModelElement( grammarAccess.getALSPreficedAccess().getAlSTransitiveClosureAction_2_0(), $current); } ) otherlv_8='^' { newLeafNode(otherlv_8, grammarAccess.getALSPreficedAccess().getCircumflexAccentKeyword_2_1()); } ( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_2_2_0()); } lv_operand_9_0=ruleALSBasicRelationTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } set( $current, "operand", lv_operand_9_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm"); afterParserOrEnumRuleCall(); } ) )) |(( { $current = forceCreateModelElement( grammarAccess.getALSPreficedAccess().getALSReflectiveTransitiveClosureAction_3_0(), $current); } ) otherlv_11='*' { newLeafNode(otherlv_11, grammarAccess.getALSPreficedAccess().getAsteriskKeyword_3_1()); } ( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_3_2_0()); } lv_operand_12_0=ruleALSBasicRelationTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } set( $current, "operand", lv_operand_12_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm"); afterParserOrEnumRuleCall(); } ) )) |(( { $current = forceCreateModelElement( grammarAccess.getALSPreficedAccess().getALSCardinalityAction_4_0(), $current); } ) otherlv_14='#' { newLeafNode(otherlv_14, grammarAccess.getALSPreficedAccess().getNumberSignKeyword_4_1()); } ( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_4_2_0()); } lv_operand_15_0=ruleALSBasicRelationTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } set( $current, "operand", lv_operand_15_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm"); afterParserOrEnumRuleCall(); } ) )) |(( { $current = forceCreateModelElement( grammarAccess.getALSPreficedAccess().getALSUnaryMinusAction_5_0(), $current); } )(( '-' )=> otherlv_17='-' { newLeafNode(otherlv_17, grammarAccess.getALSPreficedAccess().getHyphenMinusKeyword_5_1()); } )( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getOperandALSBasicRelationTermParserRuleCall_5_2_0()); } lv_operand_18_0=ruleALSBasicRelationTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } set( $current, "operand", lv_operand_18_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSBasicRelationTerm"); afterParserOrEnumRuleCall(); } ) )) |(( { $current = forceCreateModelElement( grammarAccess.getALSPreficedAccess().getALSSumAction_6_0(), $current); } ) otherlv_20='sum' { newLeafNode(otherlv_20, grammarAccess.getALSPreficedAccess().getSumKeyword_6_1()); } ( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getVariablesALSVariableDeclarationParserRuleCall_6_2_0()); } lv_variables_21_0=ruleALSVariableDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } add( $current, "variables", lv_variables_21_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration"); afterParserOrEnumRuleCall(); } ) )( otherlv_22=',' { newLeafNode(otherlv_22, grammarAccess.getALSPreficedAccess().getCommaKeyword_6_3_0()); } ( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getVariablesALSVariableDeclarationParserRuleCall_6_3_1_0()); } lv_variables_23_0=ruleALSVariableDeclaration { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } add( $current, "variables", lv_variables_23_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSVariableDeclaration"); afterParserOrEnumRuleCall(); } ) ))* otherlv_24='{' { newLeafNode(otherlv_24, grammarAccess.getALSPreficedAccess().getLeftCurlyBracketKeyword_6_4()); } ( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getExpressionALSTermParserRuleCall_6_5_0()); } lv_expression_25_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } set( $current, "expression", lv_expression_25_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) ) otherlv_26='}' { newLeafNode(otherlv_26, grammarAccess.getALSPreficedAccess().getRightCurlyBracketKeyword_6_6()); } ) |(( { $current = forceCreateModelElement( grammarAccess.getALSPreficedAccess().getALSFunctionCallAction_7_0(), $current); } )(( ( { if ($current==null) { $current = createModelElement(grammarAccess.getALSPreficedRule()); } } otherlv_28=RULE_ID { newLeafNode(otherlv_28, grammarAccess.getALSPreficedAccess().getReferredDefinitionALSDefinitionCrossReference_7_1_0_0()); } ) ) |( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getReferredNumericOperatorALSNumericOperatorEnumRuleCall_7_1_1_0()); } lv_referredNumericOperator_29_0=ruleALSNumericOperator { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } set( $current, "referredNumericOperator", lv_referredNumericOperator_29_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSNumericOperator"); afterParserOrEnumRuleCall(); } ) )) otherlv_30='[' { newLeafNode(otherlv_30, grammarAccess.getALSPreficedAccess().getLeftSquareBracketKeyword_7_2()); } ( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getParamsALSTermParserRuleCall_7_3_0()); } lv_params_31_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } add( $current, "params", lv_params_31_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) )( otherlv_32=',' { newLeafNode(otherlv_32, grammarAccess.getALSPreficedAccess().getCommaKeyword_7_4_0()); } ( ( { newCompositeNode(grammarAccess.getALSPreficedAccess().getParamsALSTermParserRuleCall_7_4_1_0()); } lv_params_33_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSPreficedRule()); } add( $current, "params", lv_params_33_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) ))* otherlv_34=']' { newLeafNode(otherlv_34, grammarAccess.getALSPreficedAccess().getRightSquareBracketKeyword_7_5()); } ) | { newCompositeNode(grammarAccess.getALSPreficedAccess().getALSBasicRelationTermParserRuleCall_8()); } this_ALSBasicRelationTerm_35=ruleALSBasicRelationTerm { $current = $this_ALSBasicRelationTerm_35.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleALSVariableDeclaration entryRuleALSVariableDeclaration returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSVariableDeclarationRule()); } iv_ruleALSVariableDeclaration=ruleALSVariableDeclaration { $current=$iv_ruleALSVariableDeclaration.current; } EOF ; // Rule ALSVariableDeclaration ruleALSVariableDeclaration returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: (( ( { newCompositeNode(grammarAccess.getALSVariableDeclarationAccess().getNameALSIDParserRuleCall_0_0()); } lv_name_0_0=ruleALSID { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSVariableDeclarationRule()); } set( $current, "name", lv_name_0_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSID"); afterParserOrEnumRuleCall(); } ) ) otherlv_1=':' { newLeafNode(otherlv_1, grammarAccess.getALSVariableDeclarationAccess().getColonKeyword_1()); } ( ( { newCompositeNode(grammarAccess.getALSVariableDeclarationAccess().getRangeALSTermParserRuleCall_2_0()); } lv_range_2_0=ruleALSTerm { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSVariableDeclarationRule()); } set( $current, "range", lv_range_2_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTerm"); afterParserOrEnumRuleCall(); } ) )) ; // Entry rule entryRuleALSBasicRelationTerm entryRuleALSBasicRelationTerm returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSBasicRelationTermRule()); } iv_ruleALSBasicRelationTerm=ruleALSBasicRelationTerm { $current=$iv_ruleALSBasicRelationTerm.current; } EOF ; // Rule ALSBasicRelationTerm ruleALSBasicRelationTerm returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ((( { $current = forceCreateModelElement( grammarAccess.getALSBasicRelationTermAccess().getALSNoneAction_0_0(), $current); } ) otherlv_1='none' { newLeafNode(otherlv_1, grammarAccess.getALSBasicRelationTermAccess().getNoneKeyword_0_1()); } ) |(( { $current = forceCreateModelElement( grammarAccess.getALSBasicRelationTermAccess().getALSIdenAction_1_0(), $current); } ) otherlv_3='iden' { newLeafNode(otherlv_3, grammarAccess.getALSBasicRelationTermAccess().getIdenKeyword_1_1()); } ) |(( { $current = forceCreateModelElement( grammarAccess.getALSBasicRelationTermAccess().getALSUnivAction_2_0(), $current); } ) otherlv_5='univ' { newLeafNode(otherlv_5, grammarAccess.getALSBasicRelationTermAccess().getUnivKeyword_2_1()); } ) |(( { $current = forceCreateModelElement( grammarAccess.getALSBasicRelationTermAccess().getALSIntAction_3_0(), $current); } ) otherlv_7='Int' { newLeafNode(otherlv_7, grammarAccess.getALSBasicRelationTermAccess().getIntKeyword_3_1()); } ) |(( { $current = forceCreateModelElement( grammarAccess.getALSBasicRelationTermAccess().getALSStringAction_4_0(), $current); } ) otherlv_9='String' { newLeafNode(otherlv_9, grammarAccess.getALSBasicRelationTermAccess().getStringKeyword_4_1()); } ) |(( { $current = forceCreateModelElement( grammarAccess.getALSBasicRelationTermAccess().getALSReferenceAction_5_0(), $current); } )( ( { if ($current==null) { $current = createModelElement(grammarAccess.getALSBasicRelationTermRule()); } } otherlv_11=RULE_ID { newLeafNode(otherlv_11, grammarAccess.getALSBasicRelationTermAccess().getReferredALSRelationDeclarationCrossReference_5_1_0()); } ) )) |(( { $current = forceCreateModelElement( grammarAccess.getALSBasicRelationTermAccess().getALSNumberLiteralAction_6_0(), $current); } )( ( lv_value_13_0=RULE_INT { newLeafNode(lv_value_13_0, grammarAccess.getALSBasicRelationTermAccess().getValueINTTerminalRuleCall_6_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getALSBasicRelationTermRule()); } setWithLastConsumed( $current, "value", lv_value_13_0, "org.eclipse.xtext.common.Terminals.INT"); } ) )) |(( { $current = forceCreateModelElement( grammarAccess.getALSBasicRelationTermAccess().getALSStringLiteralAction_7_0(), $current); } )( ( lv_value_15_0=RULE_STRING { newLeafNode(lv_value_15_0, grammarAccess.getALSBasicRelationTermAccess().getValueSTRINGTerminalRuleCall_7_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getALSBasicRelationTermRule()); } setWithLastConsumed( $current, "value", lv_value_15_0, "org.eclipse.xtext.common.Terminals.STRING"); } ) )) |( otherlv_16='(' { newLeafNode(otherlv_16, grammarAccess.getALSBasicRelationTermAccess().getLeftParenthesisKeyword_8_0()); } { newCompositeNode(grammarAccess.getALSBasicRelationTermAccess().getALSTermParserRuleCall_8_1()); } this_ALSTerm_17=ruleALSTerm { $current = $this_ALSTerm_17.current; afterParserOrEnumRuleCall(); } otherlv_18=')' { newLeafNode(otherlv_18, grammarAccess.getALSBasicRelationTermAccess().getRightParenthesisKeyword_8_2()); } )) ; // Entry rule entryRuleALSRunCommand entryRuleALSRunCommand returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSRunCommandRule()); } iv_ruleALSRunCommand=ruleALSRunCommand { $current=$iv_ruleALSRunCommand.current; } EOF ; // Rule ALSRunCommand ruleALSRunCommand returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: (( { $current = forceCreateModelElement( grammarAccess.getALSRunCommandAccess().getALSRunCommandAction_0(), $current); } ) otherlv_1='run' { newLeafNode(otherlv_1, grammarAccess.getALSRunCommandAccess().getRunKeyword_1()); } otherlv_2='{' { newLeafNode(otherlv_2, grammarAccess.getALSRunCommandAccess().getLeftCurlyBracketKeyword_2()); } otherlv_3='}' { newLeafNode(otherlv_3, grammarAccess.getALSRunCommandAccess().getRightCurlyBracketKeyword_3()); } ( otherlv_4='for' { newLeafNode(otherlv_4, grammarAccess.getALSRunCommandAccess().getForKeyword_4_0()); } ( ( { newCompositeNode(grammarAccess.getALSRunCommandAccess().getTypeScopesALSTypeScopeParserRuleCall_4_1_0()); } lv_typeScopes_5_0=ruleALSTypeScope { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSRunCommandRule()); } add( $current, "typeScopes", lv_typeScopes_5_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTypeScope"); afterParserOrEnumRuleCall(); } ) )( otherlv_6=',' { newLeafNode(otherlv_6, grammarAccess.getALSRunCommandAccess().getCommaKeyword_4_2_0()); } ( ( { newCompositeNode(grammarAccess.getALSRunCommandAccess().getTypeScopesALSTypeScopeParserRuleCall_4_2_1_0()); } lv_typeScopes_7_0=ruleALSTypeScope { if ($current==null) { $current = createModelElementForParent(grammarAccess.getALSRunCommandRule()); } add( $current, "typeScopes", lv_typeScopes_7_0, "hu.bme.mit.inf.dslreasoner.AlloyLanguage.ALSTypeScope"); afterParserOrEnumRuleCall(); } ) ))*)?) ; // Entry rule entryRuleALSTypeScope entryRuleALSTypeScope returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSTypeScopeRule()); } iv_ruleALSTypeScope=ruleALSTypeScope { $current=$iv_ruleALSTypeScope.current; } EOF ; // Rule ALSTypeScope ruleALSTypeScope returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( { newCompositeNode(grammarAccess.getALSTypeScopeAccess().getALSSigScopeParserRuleCall_0()); } this_ALSSigScope_0=ruleALSSigScope { $current = $this_ALSSigScope_0.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getALSTypeScopeAccess().getALSIntScopeParserRuleCall_1()); } this_ALSIntScope_1=ruleALSIntScope { $current = $this_ALSIntScope_1.current; afterParserOrEnumRuleCall(); } | { newCompositeNode(grammarAccess.getALSTypeScopeAccess().getALSStringScopeParserRuleCall_2()); } this_ALSStringScope_2=ruleALSStringScope { $current = $this_ALSStringScope_2.current; afterParserOrEnumRuleCall(); } ) ; // Entry rule entryRuleALSSigScope entryRuleALSSigScope returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSSigScopeRule()); } iv_ruleALSSigScope=ruleALSSigScope { $current=$iv_ruleALSSigScope.current; } EOF ; // Rule ALSSigScope ruleALSSigScope returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: (( ( lv_exactly_0_0= 'exactly' { newLeafNode(lv_exactly_0_0, grammarAccess.getALSSigScopeAccess().getExactlyExactlyKeyword_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getALSSigScopeRule()); } setWithLastConsumed($current, "exactly", true, "exactly"); } ) )?( ( lv_number_1_0=RULE_INT { newLeafNode(lv_number_1_0, grammarAccess.getALSSigScopeAccess().getNumberINTTerminalRuleCall_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getALSSigScopeRule()); } setWithLastConsumed( $current, "number", lv_number_1_0, "org.eclipse.xtext.common.Terminals.INT"); } ) )( ( { if ($current==null) { $current = createModelElement(grammarAccess.getALSSigScopeRule()); } } otherlv_2=RULE_ID { newLeafNode(otherlv_2, grammarAccess.getALSSigScopeAccess().getTypeALSSignatureDeclarationCrossReference_2_0()); } ) )) ; // Entry rule entryRuleALSIntScope entryRuleALSIntScope returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSIntScopeRule()); } iv_ruleALSIntScope=ruleALSIntScope { $current=$iv_ruleALSIntScope.current; } EOF ; // Rule ALSIntScope ruleALSIntScope returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: (( ( lv_number_0_0=RULE_INT { newLeafNode(lv_number_0_0, grammarAccess.getALSIntScopeAccess().getNumberINTTerminalRuleCall_0_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getALSIntScopeRule()); } setWithLastConsumed( $current, "number", lv_number_0_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) otherlv_1='Int' { newLeafNode(otherlv_1, grammarAccess.getALSIntScopeAccess().getIntKeyword_1()); } ) ; // Entry rule entryRuleALSStringScope entryRuleALSStringScope returns [EObject current=null] : { newCompositeNode(grammarAccess.getALSStringScopeRule()); } iv_ruleALSStringScope=ruleALSStringScope { $current=$iv_ruleALSStringScope.current; } EOF ; // Rule ALSStringScope ruleALSStringScope returns [EObject current=null] @init { enterRule(); } @after { leaveRule(); }: ( otherlv_0='exactly' { newLeafNode(otherlv_0, grammarAccess.getALSStringScopeAccess().getExactlyKeyword_0()); } ( ( lv_number_1_0=RULE_INT { newLeafNode(lv_number_1_0, grammarAccess.getALSStringScopeAccess().getNumberINTTerminalRuleCall_1_0()); } { if ($current==null) { $current = createModelElement(grammarAccess.getALSStringScopeRule()); } setWithLastConsumed( $current, "number", lv_number_1_0, "org.eclipse.xtext.common.Terminals.INT"); } ) ) otherlv_2='String' { newLeafNode(otherlv_2, grammarAccess.getALSStringScopeAccess().getStringKeyword_2()); } ) ; // Rule ALSMultiplicity ruleALSMultiplicity returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: (( enumLiteral_0='all' { $current = grammarAccess.getALSMultiplicityAccess().getAllEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getALSMultiplicityAccess().getAllEnumLiteralDeclaration_0()); } ) |( enumLiteral_1='no' { $current = grammarAccess.getALSMultiplicityAccess().getNoEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_1, grammarAccess.getALSMultiplicityAccess().getNoEnumLiteralDeclaration_1()); } ) |( enumLiteral_2='some' { $current = grammarAccess.getALSMultiplicityAccess().getSomeEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_2, grammarAccess.getALSMultiplicityAccess().getSomeEnumLiteralDeclaration_2()); } ) |( enumLiteral_3='lone' { $current = grammarAccess.getALSMultiplicityAccess().getLoneEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_3, grammarAccess.getALSMultiplicityAccess().getLoneEnumLiteralDeclaration_3()); } ) |( enumLiteral_4='one' { $current = grammarAccess.getALSMultiplicityAccess().getOneEnumLiteralDeclaration_4().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_4, grammarAccess.getALSMultiplicityAccess().getOneEnumLiteralDeclaration_4()); } ) |( enumLiteral_5='set' { $current = grammarAccess.getALSMultiplicityAccess().getSetEnumLiteralDeclaration_5().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_5, grammarAccess.getALSMultiplicityAccess().getSetEnumLiteralDeclaration_5()); } )); // Rule ALSNumericOperator ruleALSNumericOperator returns [Enumerator current=null] @init { enterRule(); } @after { leaveRule(); }: (( enumLiteral_0='plus' { $current = grammarAccess.getALSNumericOperatorAccess().getPlusEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_0, grammarAccess.getALSNumericOperatorAccess().getPlusEnumLiteralDeclaration_0()); } ) |( enumLiteral_1='sub' { $current = grammarAccess.getALSNumericOperatorAccess().getSubEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_1, grammarAccess.getALSNumericOperatorAccess().getSubEnumLiteralDeclaration_1()); } ) |( enumLiteral_2='mul' { $current = grammarAccess.getALSNumericOperatorAccess().getMulEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_2, grammarAccess.getALSNumericOperatorAccess().getMulEnumLiteralDeclaration_2()); } ) |( enumLiteral_3='rem' { $current = grammarAccess.getALSNumericOperatorAccess().getRemEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_3, grammarAccess.getALSNumericOperatorAccess().getRemEnumLiteralDeclaration_3()); } ) |( enumLiteral_4='div' { $current = grammarAccess.getALSNumericOperatorAccess().getDivEnumLiteralDeclaration_4().getEnumLiteral().getInstance(); newLeafNode(enumLiteral_4, grammarAccess.getALSNumericOperatorAccess().getDivEnumLiteralDeclaration_4()); } )); RULE_ID : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'\''|'"'|'0'..'9')*; RULE_INT : ('0'..'9')+; RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; RULE_WS : (' '|'\t'|'\r'|'\n')+; RULE_ANY_OTHER : .;