| /******************************************************************************* |
| * Copyright (c) 2011, 2017 Willink Transformations and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * E.D.Willink - initial API and implementation |
| *******************************************************************************/ |
| grammar InternalBase; |
| |
| options { |
| superClass=AbstractInternalAntlrParser; |
| backtrack=true; |
| |
| } |
| |
| @lexer::header { |
| package org.eclipse.ocl.xtext.base.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.ocl.xtext.base.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.ocl.xtext.base.services.BaseGrammarAccess; |
| |
| } |
| |
| @parser::members { |
| |
| /* |
| This grammar contains a lot of empty actions to work around a bug in ANTLR. |
| Otherwise the ANTLR tool will create synpreds that cannot be compiled in some rare cases. |
| */ |
| |
| private BaseGrammarAccess grammarAccess; |
| |
| public InternalBaseParser(TokenStream input, BaseGrammarAccess grammarAccess) { |
| this(input); |
| this.grammarAccess = grammarAccess; |
| registerRules(grammarAccess.getGrammar()); |
| } |
| |
| @Override |
| protected String getFirstRuleName() { |
| return "MultiplicityBoundsCS"; |
| } |
| |
| @Override |
| protected BaseGrammarAccess getGrammarAccess() { |
| return grammarAccess; |
| } |
| } |
| |
| @rulecatch { |
| catch (RecognitionException re) { |
| recover(input,re); |
| appendSkippedTokens(); |
| } |
| } |
| |
| |
| |
| |
| // Entry rule entryRuleMultiplicityBoundsCS |
| entryRuleMultiplicityBoundsCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getMultiplicityBoundsCSRule()); } |
| iv_ruleMultiplicityBoundsCS=ruleMultiplicityBoundsCS |
| { $current=$iv_ruleMultiplicityBoundsCS.current; } |
| EOF |
| ; |
| |
| // Rule MultiplicityBoundsCS |
| ruleMultiplicityBoundsCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| (( |
| ( |
| { |
| newCompositeNode(grammarAccess.getMultiplicityBoundsCSAccess().getLowerBoundLOWERParserRuleCall_0_0()); |
| } |
| lv_lowerBound_0_0=ruleLOWER { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getMultiplicityBoundsCSRule()); |
| } |
| set( |
| $current, |
| "lowerBound", |
| lv_lowerBound_0_0, |
| "org.eclipse.ocl.xtext.base.Base.LOWER"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| )( otherlv_1='..' |
| { |
| newLeafNode(otherlv_1, grammarAccess.getMultiplicityBoundsCSAccess().getFullStopFullStopKeyword_1_0()); |
| } |
| ( |
| ( |
| { |
| newCompositeNode(grammarAccess.getMultiplicityBoundsCSAccess().getUpperBoundUPPERParserRuleCall_1_1_0()); |
| } |
| lv_upperBound_2_0=ruleUPPER { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getMultiplicityBoundsCSRule()); |
| } |
| set( |
| $current, |
| "upperBound", |
| lv_upperBound_2_0, |
| "org.eclipse.ocl.xtext.base.Base.UPPER"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| ))?) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleMultiplicityCS |
| entryRuleMultiplicityCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getMultiplicityCSRule()); } |
| iv_ruleMultiplicityCS=ruleMultiplicityCS |
| { $current=$iv_ruleMultiplicityCS.current; } |
| EOF |
| ; |
| |
| // Rule MultiplicityCS |
| ruleMultiplicityCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| ( otherlv_0='[' |
| { |
| newLeafNode(otherlv_0, grammarAccess.getMultiplicityCSAccess().getLeftSquareBracketKeyword_0()); |
| } |
| ( |
| { |
| /* */ |
| } |
| { |
| newCompositeNode(grammarAccess.getMultiplicityCSAccess().getMultiplicityBoundsCSParserRuleCall_1_0()); |
| } |
| this_MultiplicityBoundsCS_1=ruleMultiplicityBoundsCS |
| { |
| $current = $this_MultiplicityBoundsCS_1.current; |
| afterParserOrEnumRuleCall(); |
| } |
| |
| | |
| { |
| /* */ |
| } |
| { |
| newCompositeNode(grammarAccess.getMultiplicityCSAccess().getMultiplicityStringCSParserRuleCall_1_1()); |
| } |
| this_MultiplicityStringCS_2=ruleMultiplicityStringCS |
| { |
| $current = $this_MultiplicityStringCS_2.current; |
| afterParserOrEnumRuleCall(); |
| } |
| )( otherlv_3='|?' |
| { |
| newLeafNode(otherlv_3, grammarAccess.getMultiplicityCSAccess().getVerticalLineQuestionMarkKeyword_2_0()); |
| } |
| |
| |( |
| ( |
| lv_isNullFree_4_0= '|1' |
| { |
| newLeafNode(lv_isNullFree_4_0, grammarAccess.getMultiplicityCSAccess().getIsNullFree1Keyword_2_1_0()); |
| } |
| |
| { |
| if ($current==null) { |
| $current = createModelElement(grammarAccess.getMultiplicityCSRule()); |
| } |
| setWithLastConsumed($current, "isNullFree", true, "|1"); |
| } |
| |
| ) |
| ))? otherlv_5=']' |
| { |
| newLeafNode(otherlv_5, grammarAccess.getMultiplicityCSAccess().getRightSquareBracketKeyword_3()); |
| } |
| ) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleMultiplicityStringCS |
| entryRuleMultiplicityStringCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getMultiplicityStringCSRule()); } |
| iv_ruleMultiplicityStringCS=ruleMultiplicityStringCS |
| { $current=$iv_ruleMultiplicityStringCS.current; } |
| EOF |
| ; |
| |
| // Rule MultiplicityStringCS |
| ruleMultiplicityStringCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| ( |
| ( |
| ( |
| lv_stringBounds_0_1= '*' |
| { |
| newLeafNode(lv_stringBounds_0_1, grammarAccess.getMultiplicityStringCSAccess().getStringBoundsAsteriskKeyword_0_0()); |
| } |
| |
| { |
| if ($current==null) { |
| $current = createModelElement(grammarAccess.getMultiplicityStringCSRule()); |
| } |
| setWithLastConsumed($current, "stringBounds", lv_stringBounds_0_1, null); |
| } |
| |
| | lv_stringBounds_0_2= '+' |
| { |
| newLeafNode(lv_stringBounds_0_2, grammarAccess.getMultiplicityStringCSAccess().getStringBoundsPlusSignKeyword_0_1()); |
| } |
| |
| { |
| if ($current==null) { |
| $current = createModelElement(grammarAccess.getMultiplicityStringCSRule()); |
| } |
| setWithLastConsumed($current, "stringBounds", lv_stringBounds_0_2, null); |
| } |
| |
| | lv_stringBounds_0_3= '?' |
| { |
| newLeafNode(lv_stringBounds_0_3, grammarAccess.getMultiplicityStringCSAccess().getStringBoundsQuestionMarkKeyword_0_2()); |
| } |
| |
| { |
| if ($current==null) { |
| $current = createModelElement(grammarAccess.getMultiplicityStringCSRule()); |
| } |
| setWithLastConsumed($current, "stringBounds", lv_stringBounds_0_3, null); |
| } |
| |
| ) |
| |
| ) |
| ) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRulePathNameCS |
| entryRulePathNameCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getPathNameCSRule()); } |
| iv_rulePathNameCS=rulePathNameCS |
| { $current=$iv_rulePathNameCS.current; } |
| EOF |
| ; |
| |
| // Rule PathNameCS |
| rulePathNameCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| (( |
| ( |
| { |
| newCompositeNode(grammarAccess.getPathNameCSAccess().getOwnedPathElementsFirstPathElementCSParserRuleCall_0_0()); |
| } |
| lv_ownedPathElements_0_0=ruleFirstPathElementCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getPathNameCSRule()); |
| } |
| add( |
| $current, |
| "ownedPathElements", |
| lv_ownedPathElements_0_0, |
| "org.eclipse.ocl.xtext.base.Base.FirstPathElementCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| )( otherlv_1='::' |
| { |
| newLeafNode(otherlv_1, grammarAccess.getPathNameCSAccess().getColonColonKeyword_1_0()); |
| } |
| ( |
| ( |
| { |
| newCompositeNode(grammarAccess.getPathNameCSAccess().getOwnedPathElementsNextPathElementCSParserRuleCall_1_1_0()); |
| } |
| lv_ownedPathElements_2_0=ruleNextPathElementCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getPathNameCSRule()); |
| } |
| add( |
| $current, |
| "ownedPathElements", |
| lv_ownedPathElements_2_0, |
| "org.eclipse.ocl.xtext.base.Base.NextPathElementCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| ))*) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleFirstPathElementCS |
| entryRuleFirstPathElementCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getFirstPathElementCSRule()); } |
| iv_ruleFirstPathElementCS=ruleFirstPathElementCS |
| { $current=$iv_ruleFirstPathElementCS.current; } |
| EOF |
| ; |
| |
| // Rule FirstPathElementCS |
| ruleFirstPathElementCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| ( |
| ( |
| { |
| /* */ |
| } |
| { |
| if ($current==null) { |
| $current = createModelElement(grammarAccess.getFirstPathElementCSRule()); |
| } |
| } |
| { |
| newCompositeNode(grammarAccess.getFirstPathElementCSAccess().getReferredElementNamedElementCrossReference_0()); |
| } |
| ruleUnrestrictedName { |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| ) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleNextPathElementCS |
| entryRuleNextPathElementCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getNextPathElementCSRule()); } |
| iv_ruleNextPathElementCS=ruleNextPathElementCS |
| { $current=$iv_ruleNextPathElementCS.current; } |
| EOF |
| ; |
| |
| // Rule NextPathElementCS |
| ruleNextPathElementCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| ( |
| ( |
| { |
| /* */ |
| } |
| { |
| if ($current==null) { |
| $current = createModelElement(grammarAccess.getNextPathElementCSRule()); |
| } |
| } |
| { |
| newCompositeNode(grammarAccess.getNextPathElementCSAccess().getReferredElementNamedElementCrossReference_0()); |
| } |
| ruleUnreservedName { |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| ) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleTemplateBindingCS |
| entryRuleTemplateBindingCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getTemplateBindingCSRule()); } |
| iv_ruleTemplateBindingCS=ruleTemplateBindingCS |
| { $current=$iv_ruleTemplateBindingCS.current; } |
| EOF |
| ; |
| |
| // Rule TemplateBindingCS |
| ruleTemplateBindingCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| (( |
| ( |
| { |
| newCompositeNode(grammarAccess.getTemplateBindingCSAccess().getOwnedSubstitutionsTemplateParameterSubstitutionCSParserRuleCall_0_0()); |
| } |
| lv_ownedSubstitutions_0_0=ruleTemplateParameterSubstitutionCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getTemplateBindingCSRule()); |
| } |
| add( |
| $current, |
| "ownedSubstitutions", |
| lv_ownedSubstitutions_0_0, |
| "org.eclipse.ocl.xtext.base.Base.TemplateParameterSubstitutionCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| )( otherlv_1=',' |
| { |
| newLeafNode(otherlv_1, grammarAccess.getTemplateBindingCSAccess().getCommaKeyword_1_0()); |
| } |
| ( |
| ( |
| { |
| newCompositeNode(grammarAccess.getTemplateBindingCSAccess().getOwnedSubstitutionsTemplateParameterSubstitutionCSParserRuleCall_1_1_0()); |
| } |
| lv_ownedSubstitutions_2_0=ruleTemplateParameterSubstitutionCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getTemplateBindingCSRule()); |
| } |
| add( |
| $current, |
| "ownedSubstitutions", |
| lv_ownedSubstitutions_2_0, |
| "org.eclipse.ocl.xtext.base.Base.TemplateParameterSubstitutionCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| ))*( |
| ( |
| { |
| newCompositeNode(grammarAccess.getTemplateBindingCSAccess().getOwnedMultiplicityMultiplicityCSParserRuleCall_2_0()); |
| } |
| lv_ownedMultiplicity_3_0=ruleMultiplicityCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getTemplateBindingCSRule()); |
| } |
| set( |
| $current, |
| "ownedMultiplicity", |
| lv_ownedMultiplicity_3_0, |
| "org.eclipse.ocl.xtext.base.Base.MultiplicityCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| )?) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleTemplateParameterSubstitutionCS |
| entryRuleTemplateParameterSubstitutionCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getTemplateParameterSubstitutionCSRule()); } |
| iv_ruleTemplateParameterSubstitutionCS=ruleTemplateParameterSubstitutionCS |
| { $current=$iv_ruleTemplateParameterSubstitutionCS.current; } |
| EOF |
| ; |
| |
| // Rule TemplateParameterSubstitutionCS |
| ruleTemplateParameterSubstitutionCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| ( |
| ( |
| { |
| newCompositeNode(grammarAccess.getTemplateParameterSubstitutionCSAccess().getOwnedActualParameterTypeRefCSParserRuleCall_0()); |
| } |
| lv_ownedActualParameter_0_0=ruleTypeRefCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getTemplateParameterSubstitutionCSRule()); |
| } |
| set( |
| $current, |
| "ownedActualParameter", |
| lv_ownedActualParameter_0_0, |
| "org.eclipse.ocl.xtext.base.Base.TypeRefCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| ) |
| ; |
| |
| |
| |
| |
| |
| |
| |
| // Entry rule entryRuleTypeParameterCS |
| entryRuleTypeParameterCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getTypeParameterCSRule()); } |
| iv_ruleTypeParameterCS=ruleTypeParameterCS |
| { $current=$iv_ruleTypeParameterCS.current; } |
| EOF |
| ; |
| |
| // Rule TypeParameterCS |
| ruleTypeParameterCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| (( |
| ( |
| { |
| newCompositeNode(grammarAccess.getTypeParameterCSAccess().getNameUnrestrictedNameParserRuleCall_0_0()); |
| } |
| lv_name_0_0=ruleUnrestrictedName { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getTypeParameterCSRule()); |
| } |
| set( |
| $current, |
| "name", |
| lv_name_0_0, |
| "org.eclipse.ocl.xtext.base.Base.UnrestrictedName"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| )( otherlv_1='extends' |
| { |
| newLeafNode(otherlv_1, grammarAccess.getTypeParameterCSAccess().getExtendsKeyword_1_0()); |
| } |
| ( |
| ( |
| { |
| newCompositeNode(grammarAccess.getTypeParameterCSAccess().getOwnedExtendsTypedRefCSParserRuleCall_1_1_0()); |
| } |
| lv_ownedExtends_2_0=ruleTypedRefCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getTypeParameterCSRule()); |
| } |
| add( |
| $current, |
| "ownedExtends", |
| lv_ownedExtends_2_0, |
| "org.eclipse.ocl.xtext.base.Base.TypedRefCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| )( otherlv_3='&&' |
| { |
| newLeafNode(otherlv_3, grammarAccess.getTypeParameterCSAccess().getAmpersandAmpersandKeyword_1_2_0()); |
| } |
| ( |
| ( |
| { |
| newCompositeNode(grammarAccess.getTypeParameterCSAccess().getOwnedExtendsTypedRefCSParserRuleCall_1_2_1_0()); |
| } |
| lv_ownedExtends_4_0=ruleTypedRefCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getTypeParameterCSRule()); |
| } |
| add( |
| $current, |
| "ownedExtends", |
| lv_ownedExtends_4_0, |
| "org.eclipse.ocl.xtext.base.Base.TypedRefCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| ))*)?) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleTypeRefCS |
| entryRuleTypeRefCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getTypeRefCSRule()); } |
| iv_ruleTypeRefCS=ruleTypeRefCS |
| { $current=$iv_ruleTypeRefCS.current; } |
| EOF |
| ; |
| |
| // Rule TypeRefCS |
| ruleTypeRefCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| ( |
| { |
| /* */ |
| } |
| { |
| newCompositeNode(grammarAccess.getTypeRefCSAccess().getTypedRefCSParserRuleCall_0()); |
| } |
| this_TypedRefCS_0=ruleTypedRefCS |
| { |
| $current = $this_TypedRefCS_0.current; |
| afterParserOrEnumRuleCall(); |
| } |
| |
| | |
| { |
| /* */ |
| } |
| { |
| newCompositeNode(grammarAccess.getTypeRefCSAccess().getWildcardTypeRefCSParserRuleCall_1()); |
| } |
| this_WildcardTypeRefCS_1=ruleWildcardTypeRefCS |
| { |
| $current = $this_WildcardTypeRefCS_1.current; |
| afterParserOrEnumRuleCall(); |
| } |
| ) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleTypedRefCS |
| entryRuleTypedRefCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getTypedRefCSRule()); } |
| iv_ruleTypedRefCS=ruleTypedRefCS |
| { $current=$iv_ruleTypedRefCS.current; } |
| EOF |
| ; |
| |
| // Rule TypedRefCS |
| ruleTypedRefCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| |
| { |
| /* */ |
| } |
| { |
| newCompositeNode(grammarAccess.getTypedRefCSAccess().getTypedTypeRefCSParserRuleCall()); |
| } |
| this_TypedTypeRefCS_0=ruleTypedTypeRefCS |
| { |
| $current = $this_TypedTypeRefCS_0.current; |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleTypedTypeRefCS |
| entryRuleTypedTypeRefCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getTypedTypeRefCSRule()); } |
| iv_ruleTypedTypeRefCS=ruleTypedTypeRefCS |
| { $current=$iv_ruleTypedTypeRefCS.current; } |
| EOF |
| ; |
| |
| // Rule TypedTypeRefCS |
| ruleTypedTypeRefCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| (( |
| ( |
| { |
| newCompositeNode(grammarAccess.getTypedTypeRefCSAccess().getOwnedPathNamePathNameCSParserRuleCall_0_0()); |
| } |
| lv_ownedPathName_0_0=rulePathNameCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getTypedTypeRefCSRule()); |
| } |
| set( |
| $current, |
| "ownedPathName", |
| lv_ownedPathName_0_0, |
| "org.eclipse.ocl.xtext.base.Base.PathNameCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| )( otherlv_1='(' |
| { |
| newLeafNode(otherlv_1, grammarAccess.getTypedTypeRefCSAccess().getLeftParenthesisKeyword_1_0()); |
| } |
| ( |
| ( |
| { |
| newCompositeNode(grammarAccess.getTypedTypeRefCSAccess().getOwnedBindingTemplateBindingCSParserRuleCall_1_1_0()); |
| } |
| lv_ownedBinding_2_0=ruleTemplateBindingCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getTypedTypeRefCSRule()); |
| } |
| set( |
| $current, |
| "ownedBinding", |
| lv_ownedBinding_2_0, |
| "org.eclipse.ocl.xtext.base.Base.TemplateBindingCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| ) otherlv_3=')' |
| { |
| newLeafNode(otherlv_3, grammarAccess.getTypedTypeRefCSAccess().getRightParenthesisKeyword_1_2()); |
| } |
| )?) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleUnreservedName |
| entryRuleUnreservedName returns [String current=null] |
| : |
| { newCompositeNode(grammarAccess.getUnreservedNameRule()); } |
| iv_ruleUnreservedName=ruleUnreservedName |
| { $current=$iv_ruleUnreservedName.current.getText(); } |
| EOF |
| ; |
| |
| // Rule UnreservedName |
| ruleUnreservedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| |
| { |
| newCompositeNode(grammarAccess.getUnreservedNameAccess().getUnrestrictedNameParserRuleCall()); |
| } |
| this_UnrestrictedName_0=ruleUnrestrictedName { |
| $current.merge(this_UnrestrictedName_0); |
| } |
| |
| { |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleUnrestrictedName |
| entryRuleUnrestrictedName returns [String current=null] |
| : |
| { newCompositeNode(grammarAccess.getUnrestrictedNameRule()); } |
| iv_ruleUnrestrictedName=ruleUnrestrictedName |
| { $current=$iv_ruleUnrestrictedName.current.getText(); } |
| EOF |
| ; |
| |
| // Rule UnrestrictedName |
| ruleUnrestrictedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| |
| { |
| newCompositeNode(grammarAccess.getUnrestrictedNameAccess().getIdentifierParserRuleCall()); |
| } |
| this_Identifier_0=ruleIdentifier { |
| $current.merge(this_Identifier_0); |
| } |
| |
| { |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleWildcardTypeRefCS |
| entryRuleWildcardTypeRefCS returns [EObject current=null] |
| : |
| { newCompositeNode(grammarAccess.getWildcardTypeRefCSRule()); } |
| iv_ruleWildcardTypeRefCS=ruleWildcardTypeRefCS |
| { $current=$iv_ruleWildcardTypeRefCS.current; } |
| EOF |
| ; |
| |
| // Rule WildcardTypeRefCS |
| ruleWildcardTypeRefCS returns [EObject current=null] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| (( |
| { |
| /* */ |
| } |
| { |
| $current = forceCreateModelElement( |
| grammarAccess.getWildcardTypeRefCSAccess().getWildcardTypeRefCSAction_0(), |
| $current); |
| } |
| ) otherlv_1='?' |
| { |
| newLeafNode(otherlv_1, grammarAccess.getWildcardTypeRefCSAccess().getQuestionMarkKeyword_1()); |
| } |
| ( otherlv_2='extends' |
| { |
| newLeafNode(otherlv_2, grammarAccess.getWildcardTypeRefCSAccess().getExtendsKeyword_2_0()); |
| } |
| ( |
| ( |
| { |
| newCompositeNode(grammarAccess.getWildcardTypeRefCSAccess().getOwnedExtendsTypedRefCSParserRuleCall_2_1_0()); |
| } |
| lv_ownedExtends_3_0=ruleTypedRefCS { |
| if ($current==null) { |
| $current = createModelElementForParent(grammarAccess.getWildcardTypeRefCSRule()); |
| } |
| set( |
| $current, |
| "ownedExtends", |
| lv_ownedExtends_3_0, |
| "org.eclipse.ocl.xtext.base.Base.TypedRefCS"); |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ) |
| ))?) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleID |
| entryRuleID returns [String current=null] |
| : |
| { newCompositeNode(grammarAccess.getIDRule()); } |
| iv_ruleID=ruleID |
| { $current=$iv_ruleID.current.getText(); } |
| EOF |
| ; |
| |
| // Rule ID |
| ruleID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| ( this_SIMPLE_ID_0=RULE_SIMPLE_ID { |
| $current.merge(this_SIMPLE_ID_0); |
| } |
| |
| { |
| newLeafNode(this_SIMPLE_ID_0, grammarAccess.getIDAccess().getSIMPLE_IDTerminalRuleCall_0()); |
| } |
| |
| | this_ESCAPED_ID_1=RULE_ESCAPED_ID { |
| $current.merge(this_ESCAPED_ID_1); |
| } |
| |
| { |
| newLeafNode(this_ESCAPED_ID_1, grammarAccess.getIDAccess().getESCAPED_IDTerminalRuleCall_1()); |
| } |
| ) |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleIdentifier |
| entryRuleIdentifier returns [String current=null] |
| : |
| { newCompositeNode(grammarAccess.getIdentifierRule()); } |
| iv_ruleIdentifier=ruleIdentifier |
| { $current=$iv_ruleIdentifier.current.getText(); } |
| EOF |
| ; |
| |
| // Rule Identifier |
| ruleIdentifier returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| |
| { |
| newCompositeNode(grammarAccess.getIdentifierAccess().getIDParserRuleCall()); |
| } |
| this_ID_0=ruleID { |
| $current.merge(this_ID_0); |
| } |
| |
| { |
| afterParserOrEnumRuleCall(); |
| } |
| |
| ; |
| |
| |
| |
| |
| |
| // Entry rule entryRuleLOWER |
| entryRuleLOWER returns [String current=null] |
| : |
| { newCompositeNode(grammarAccess.getLOWERRule()); } |
| iv_ruleLOWER=ruleLOWER |
| { $current=$iv_ruleLOWER.current.getText(); } |
| EOF |
| ; |
| |
| // Rule LOWER |
| ruleLOWER returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| this_INT_0=RULE_INT { |
| $current.merge(this_INT_0); |
| } |
| |
| { |
| newLeafNode(this_INT_0, grammarAccess.getLOWERAccess().getINTTerminalRuleCall()); |
| } |
| |
| ; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| // Entry rule entryRuleUPPER |
| entryRuleUPPER returns [String current=null] |
| : |
| { newCompositeNode(grammarAccess.getUPPERRule()); } |
| iv_ruleUPPER=ruleUPPER |
| { $current=$iv_ruleUPPER.current.getText(); } |
| EOF |
| ; |
| |
| // Rule UPPER |
| ruleUPPER returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] |
| @init { enterRule(); |
| } |
| @after { leaveRule(); }: |
| ( this_INT_0=RULE_INT { |
| $current.merge(this_INT_0); |
| } |
| |
| { |
| newLeafNode(this_INT_0, grammarAccess.getUPPERAccess().getINTTerminalRuleCall_0()); |
| } |
| |
| | |
| kw='*' |
| { |
| $current.merge(kw); |
| newLeafNode(kw, grammarAccess.getUPPERAccess().getAsteriskKeyword_1()); |
| } |
| ) |
| ; |
| |
| |
| |
| |
| |
| |
| |
| fragment RULE_ESCAPED_CHARACTER : '\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\'); |
| |
| fragment RULE_LETTER_CHARACTER : ('a'..'z'|'A'..'Z'|'_'); |
| |
| RULE_DOUBLE_QUOTED_STRING : '"' (RULE_ESCAPED_CHARACTER|~(('\\'|'"')))* '"'; |
| |
| RULE_SINGLE_QUOTED_STRING : '\'' (RULE_ESCAPED_CHARACTER|~(('\\'|'\'')))* '\''; |
| |
| RULE_ML_SINGLE_QUOTED_STRING : '/\'' ( options {greedy=false;} : . )*'\'/'; |
| |
| RULE_SIMPLE_ID : RULE_LETTER_CHARACTER (RULE_LETTER_CHARACTER|'0'..'9')*; |
| |
| RULE_ESCAPED_ID : '_' RULE_SINGLE_QUOTED_STRING; |
| |
| 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 : .; |
| |
| |