blob: bf5d250209a15275089e3204d875011dcc18fce6 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011, 2022 Willink Transformations and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* E.D.Willink - initial API and implementation
*******************************************************************************/
grammar InternalOCLstdlib;
options {
superClass=AbstractInternalAntlrParser;
backtrack=true;
}
@lexer::header {
package org.eclipse.ocl.xtext.oclstdlib.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.oclstdlib.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.oclstdlib.services.OCLstdlibGrammarAccess;
}
@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 OCLstdlibGrammarAccess grammarAccess;
public InternalOCLstdlibParser(TokenStream input, OCLstdlibGrammarAccess grammarAccess) {
this(input);
this.grammarAccess = grammarAccess;
registerRules(grammarAccess.getGrammar());
}
@Override
protected String getFirstRuleName() {
return "Library";
}
@Override
protected OCLstdlibGrammarAccess getGrammarAccess() {
return grammarAccess;
}
}
@rulecatch {
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
}
// Entry rule entryRuleLibrary
entryRuleLibrary returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibraryRule()); }
iv_ruleLibrary=ruleLibrary
{ $current=$iv_ruleLibrary.current; }
EOF
;
// Rule Library
ruleLibrary returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
(((
(
{
newCompositeNode(grammarAccess.getLibraryAccess().getOwnedImportsImportCSParserRuleCall_0_0_0());
}
lv_ownedImports_0_0=ruleImportCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibraryRule());
}
add(
$current,
"ownedImports",
lv_ownedImports_0_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.ImportCS");
afterParserOrEnumRuleCall();
}
)
) otherlv_1=';'
{
newLeafNode(otherlv_1, grammarAccess.getLibraryAccess().getSemicolonKeyword_0_1());
}
)*(
(
{
newCompositeNode(grammarAccess.getLibraryAccess().getOwnedPackagesLibPackageCSParserRuleCall_1_0());
}
lv_ownedPackages_2_0=ruleLibPackageCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibraryRule());
}
add(
$current,
"ownedPackages",
lv_ownedPackages_2_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.LibPackageCS");
afterParserOrEnumRuleCall();
}
)
)*)
;
// 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_0());
}
this_ID_0=ruleID {
$current.merge(this_ID_0);
}
{
afterParserOrEnumRuleCall();
}
|
{
newCompositeNode(grammarAccess.getIdentifierAccess().getRestrictedKeywordsParserRuleCall_1());
}
this_RestrictedKeywords_1=ruleRestrictedKeywords {
$current.merge(this_RestrictedKeywords_1);
}
{
afterParserOrEnumRuleCall();
}
)
;
// Entry rule entryRuleRestrictedKeywords
entryRuleRestrictedKeywords returns [String current=null]
:
{ newCompositeNode(grammarAccess.getRestrictedKeywordsRule()); }
iv_ruleRestrictedKeywords=ruleRestrictedKeywords
{ $current=$iv_ruleRestrictedKeywords.current.getText(); }
EOF
;
// Rule RestrictedKeywords
ruleRestrictedKeywords returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
@init { enterRule();
}
@after { leaveRule(); }:
(
kw='abstract'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getAbstractKeyword_0());
}
|
kw='annotation'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getAnnotationKeyword_1());
}
|
kw='conformsTo'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getConformsToKeyword_2());
}
|
kw='documentation'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getDocumentationKeyword_3());
}
|
kw='extends'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getExtendsKeyword_4());
}
|
kw='import'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getImportKeyword_5());
}
|
kw='inv'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getInvKeyword_6());
}
|
kw='invalidating'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getInvalidatingKeyword_7());
}
|
kw='iteration'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getIterationKeyword_8());
}
|
kw='left'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getLeftKeyword_9());
}
|
kw='library'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getLibraryKeyword_10());
}
|
kw='operation'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getOperationKeyword_11());
}
|
kw='opposite'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getOppositeKeyword_12());
}
|
kw='package'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getPackageKeyword_13());
}
|
kw='post'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getPostKeyword_14());
}
|
kw='pre'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getPreKeyword_15());
}
|
kw='precedence'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getPrecedenceKeyword_16());
}
|
kw='property'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getPropertyKeyword_17());
}
|
kw='right'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getRightKeyword_18());
}
|
kw='static'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getStaticKeyword_19());
}
|
kw='type'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getTypeKeyword_20());
}
|
kw='validating'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getRestrictedKeywordsAccess().getValidatingKeyword_21());
}
)
;
// Entry rule entryRuleName
entryRuleName returns [String current=null]
:
{ newCompositeNode(grammarAccess.getNameRule()); }
iv_ruleName=ruleName
{ $current=$iv_ruleName.current.getText(); }
EOF
;
// Rule Name
ruleName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
@init { enterRule();
}
@after { leaveRule(); }:
(
{
newCompositeNode(grammarAccess.getNameAccess().getIdentifierParserRuleCall_0());
}
this_Identifier_0=ruleIdentifier {
$current.merge(this_Identifier_0);
}
{
afterParserOrEnumRuleCall();
}
| this_DOUBLE_QUOTED_STRING_1=RULE_DOUBLE_QUOTED_STRING {
$current.merge(this_DOUBLE_QUOTED_STRING_1);
}
{
newLeafNode(this_DOUBLE_QUOTED_STRING_1, grammarAccess.getNameAccess().getDOUBLE_QUOTED_STRINGTerminalRuleCall_1());
}
|
{
newCompositeNode(grammarAccess.getNameAccess().getEssentialOCLReservedKeywordParserRuleCall_2());
}
this_EssentialOCLReservedKeyword_2=ruleEssentialOCLReservedKeyword {
$current.merge(this_EssentialOCLReservedKeyword_2);
}
{
afterParserOrEnumRuleCall();
}
|
{
newCompositeNode(grammarAccess.getNameAccess().getPrimitiveTypeIdentifierParserRuleCall_3());
}
this_PrimitiveTypeIdentifier_3=rulePrimitiveTypeIdentifier {
$current.merge(this_PrimitiveTypeIdentifier_3);
}
{
afterParserOrEnumRuleCall();
}
|
{
newCompositeNode(grammarAccess.getNameAccess().getCollectionTypeIdentifierParserRuleCall_4());
}
this_CollectionTypeIdentifier_4=ruleCollectionTypeIdentifier {
$current.merge(this_CollectionTypeIdentifier_4);
}
{
afterParserOrEnumRuleCall();
}
)
;
// Entry rule entryRuleAnyName
entryRuleAnyName returns [String current=null]
:
{ newCompositeNode(grammarAccess.getAnyNameRule()); }
iv_ruleAnyName=ruleAnyName
{ $current=$iv_ruleAnyName.current.getText(); }
EOF
;
// Rule AnyName
ruleAnyName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
@init { enterRule();
}
@after { leaveRule(); }:
(
{
newCompositeNode(grammarAccess.getAnyNameAccess().getNameParserRuleCall_0());
}
this_Name_0=ruleName {
$current.merge(this_Name_0);
}
{
afterParserOrEnumRuleCall();
}
|
kw='Lambda'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getAnyNameAccess().getLambdaKeyword_1());
}
|
kw='Map'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getAnyNameAccess().getMapKeyword_2());
}
|
kw='Tuple'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getAnyNameAccess().getTupleKeyword_3());
}
)
;
// Entry rule entryRuleLibPathNameCS
entryRuleLibPathNameCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibPathNameCSRule()); }
iv_ruleLibPathNameCS=ruleLibPathNameCS
{ $current=$iv_ruleLibPathNameCS.current; }
EOF
;
// Rule LibPathNameCS
ruleLibPathNameCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
{
newCompositeNode(grammarAccess.getLibPathNameCSAccess().getOwnedPathElementsLibPathElementCSParserRuleCall_0_0());
}
lv_ownedPathElements_0_0=ruleLibPathElementCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPathNameCSRule());
}
add(
$current,
"ownedPathElements",
lv_ownedPathElements_0_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.LibPathElementCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_1='::'
{
newLeafNode(otherlv_1, grammarAccess.getLibPathNameCSAccess().getColonColonKeyword_1_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibPathNameCSAccess().getOwnedPathElementsLibPathElementCSParserRuleCall_1_1_0());
}
lv_ownedPathElements_2_0=ruleLibPathElementCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPathNameCSRule());
}
add(
$current,
"ownedPathElements",
lv_ownedPathElements_2_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.LibPathElementCS");
afterParserOrEnumRuleCall();
}
)
))*)
;
// Entry rule entryRuleLibPathElementCS
entryRuleLibPathElementCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibPathElementCSRule()); }
iv_ruleLibPathElementCS=ruleLibPathElementCS
{ $current=$iv_ruleLibPathElementCS.current; }
EOF
;
// Rule LibPathElementCS
ruleLibPathElementCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
(
(
{
/* */
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibPathElementCSRule());
}
}
{
newCompositeNode(grammarAccess.getLibPathElementCSAccess().getReferredElementNamedElementCrossReference_0());
}
ruleName {
afterParserOrEnumRuleCall();
}
)
)
;
// Entry rule entryRuleAccumulatorCS
entryRuleAccumulatorCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getAccumulatorCSRule()); }
iv_ruleAccumulatorCS=ruleAccumulatorCS
{ $current=$iv_ruleAccumulatorCS.current; }
EOF
;
// Rule AccumulatorCS
ruleAccumulatorCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
{
newCompositeNode(grammarAccess.getAccumulatorCSAccess().getNameIdentifierParserRuleCall_0_0());
}
lv_name_0_0=ruleIdentifier {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getAccumulatorCSRule());
}
set(
$current,
"name",
lv_name_0_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Identifier");
afterParserOrEnumRuleCall();
}
)
) otherlv_1=':'
{
newLeafNode(otherlv_1, grammarAccess.getAccumulatorCSAccess().getColonKeyword_1());
}
(
(
{
newCompositeNode(grammarAccess.getAccumulatorCSAccess().getOwnedTypeTypedMultiplicityRefCSParserRuleCall_2_0());
}
lv_ownedType_2_0=ruleTypedMultiplicityRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getAccumulatorCSRule());
}
set(
$current,
"ownedType",
lv_ownedType_2_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedMultiplicityRefCS");
afterParserOrEnumRuleCall();
}
)
))
;
// Entry rule entryRuleAnnotationCS
entryRuleAnnotationCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getAnnotationCSRule()); }
iv_ruleAnnotationCS=ruleAnnotationCS
{ $current=$iv_ruleAnnotationCS.current; }
EOF
;
// Rule AnnotationCS
ruleAnnotationCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
( otherlv_0='annotation'
{
newLeafNode(otherlv_0, grammarAccess.getAnnotationCSAccess().getAnnotationKeyword_0());
}
(
(
(
{
newCompositeNode(grammarAccess.getAnnotationCSAccess().getNameIdentifierParserRuleCall_1_0_0());
}
lv_name_1_1=ruleIdentifier {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getAnnotationCSRule());
}
set(
$current,
"name",
lv_name_1_1,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Identifier");
afterParserOrEnumRuleCall();
}
| lv_name_1_2=RULE_SINGLE_QUOTED_STRING
{
newLeafNode(lv_name_1_2, grammarAccess.getAnnotationCSAccess().getNameSINGLE_QUOTED_STRINGTerminalRuleCall_1_0_1());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getAnnotationCSRule());
}
setWithLastConsumed(
$current,
"name",
lv_name_1_2,
"org.eclipse.ocl.xtext.base.Base.SINGLE_QUOTED_STRING");
}
)
)
)( otherlv_2='('
{
newLeafNode(otherlv_2, grammarAccess.getAnnotationCSAccess().getLeftParenthesisKeyword_2_0());
}
(
(
{
newCompositeNode(grammarAccess.getAnnotationCSAccess().getOwnedDetailsDetailCSParserRuleCall_2_1_0());
}
lv_ownedDetails_3_0=ruleDetailCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getAnnotationCSRule());
}
add(
$current,
"ownedDetails",
lv_ownedDetails_3_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.DetailCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_4=','
{
newLeafNode(otherlv_4, grammarAccess.getAnnotationCSAccess().getCommaKeyword_2_2_0());
}
(
(
{
newCompositeNode(grammarAccess.getAnnotationCSAccess().getOwnedDetailsDetailCSParserRuleCall_2_2_1_0());
}
lv_ownedDetails_5_0=ruleDetailCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getAnnotationCSRule());
}
add(
$current,
"ownedDetails",
lv_ownedDetails_5_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.DetailCS");
afterParserOrEnumRuleCall();
}
)
))* otherlv_6=')'
{
newLeafNode(otherlv_6, grammarAccess.getAnnotationCSAccess().getRightParenthesisKeyword_2_3());
}
)?(( otherlv_7='{'
{
newLeafNode(otherlv_7, grammarAccess.getAnnotationCSAccess().getLeftCurlyBracketKeyword_3_0_0());
}
(
(
{
newCompositeNode(grammarAccess.getAnnotationCSAccess().getOwnedAnnotationsAnnotationElementCSParserRuleCall_3_0_1_0());
}
lv_ownedAnnotations_8_0=ruleAnnotationElementCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getAnnotationCSRule());
}
add(
$current,
"ownedAnnotations",
lv_ownedAnnotations_8_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AnnotationElementCS");
afterParserOrEnumRuleCall();
}
)
) otherlv_9='}'
{
newLeafNode(otherlv_9, grammarAccess.getAnnotationCSAccess().getRightCurlyBracketKeyword_3_0_2());
}
)
| otherlv_10=';'
{
newLeafNode(otherlv_10, grammarAccess.getAnnotationCSAccess().getSemicolonKeyword_3_1());
}
))
;
// Entry rule entryRuleAnnotationElementCS
entryRuleAnnotationElementCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getAnnotationElementCSRule()); }
iv_ruleAnnotationElementCS=ruleAnnotationElementCS
{ $current=$iv_ruleAnnotationElementCS.current; }
EOF
;
// Rule AnnotationElementCS
ruleAnnotationElementCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
(
{
/* */
}
{
newCompositeNode(grammarAccess.getAnnotationElementCSAccess().getAnnotationCSParserRuleCall_0());
}
this_AnnotationCS_0=ruleAnnotationCS
{
$current = $this_AnnotationCS_0.current;
afterParserOrEnumRuleCall();
}
|
{
/* */
}
{
newCompositeNode(grammarAccess.getAnnotationElementCSAccess().getDocumentationCSParserRuleCall_1());
}
this_DocumentationCS_1=ruleDocumentationCS
{
$current = $this_DocumentationCS_1.current;
afterParserOrEnumRuleCall();
}
)
;
// Entry rule entryRuleLibClassCS
entryRuleLibClassCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibClassCSRule()); }
iv_ruleLibClassCS=ruleLibClassCS
{ $current=$iv_ruleLibClassCS.current; }
EOF
;
// Rule LibClassCS
ruleLibClassCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
lv_isAbstract_0_0= 'abstract'
{
newLeafNode(lv_isAbstract_0_0, grammarAccess.getLibClassCSAccess().getIsAbstractAbstractKeyword_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibClassCSRule());
}
setWithLastConsumed($current, "isAbstract", true, "abstract");
}
)
)? otherlv_1='type'
{
newLeafNode(otherlv_1, grammarAccess.getLibClassCSAccess().getTypeKeyword_1());
}
(
(
{
newCompositeNode(grammarAccess.getLibClassCSAccess().getNameAnyNameParserRuleCall_2_0());
}
lv_name_2_0=ruleAnyName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibClassCSRule());
}
set(
$current,
"name",
lv_name_2_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AnyName");
afterParserOrEnumRuleCall();
}
)
)(
(
{
newCompositeNode(grammarAccess.getLibClassCSAccess().getOwnedSignatureTemplateSignatureCSParserRuleCall_3_0());
}
lv_ownedSignature_3_0=ruleTemplateSignatureCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibClassCSRule());
}
set(
$current,
"ownedSignature",
lv_ownedSignature_3_0,
"org.eclipse.ocl.xtext.base.Base.TemplateSignatureCS");
afterParserOrEnumRuleCall();
}
)
)?( otherlv_4=':'
{
newLeafNode(otherlv_4, grammarAccess.getLibClassCSAccess().getColonKeyword_4_0());
}
(
(
{
/* */
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibClassCSRule());
}
}
{
newCompositeNode(grammarAccess.getLibClassCSAccess().getMetaclassNameMetaclassNameCSCrossReference_4_1_0());
}
ruleAnyName {
afterParserOrEnumRuleCall();
}
)
))?( otherlv_6='conformsTo'
{
newLeafNode(otherlv_6, grammarAccess.getLibClassCSAccess().getConformsToKeyword_5_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibClassCSAccess().getOwnedSuperTypesTypedRefCSParserRuleCall_5_1_0());
}
lv_ownedSuperTypes_7_0=ruleTypedRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibClassCSRule());
}
add(
$current,
"ownedSuperTypes",
lv_ownedSuperTypes_7_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedRefCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_8=','
{
newLeafNode(otherlv_8, grammarAccess.getLibClassCSAccess().getCommaKeyword_5_2_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibClassCSAccess().getOwnedSuperTypesTypedRefCSParserRuleCall_5_2_1_0());
}
lv_ownedSuperTypes_9_0=ruleTypedRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibClassCSRule());
}
add(
$current,
"ownedSuperTypes",
lv_ownedSuperTypes_9_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedRefCS");
afterParserOrEnumRuleCall();
}
)
))*)? otherlv_10='{'
{
newLeafNode(otherlv_10, grammarAccess.getLibClassCSAccess().getLeftCurlyBracketKeyword_6());
}
((
(
{
newCompositeNode(grammarAccess.getLibClassCSAccess().getOwnedOperationsOperationCSParserRuleCall_7_0_0());
}
lv_ownedOperations_11_0=ruleOperationCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibClassCSRule());
}
add(
$current,
"ownedOperations",
lv_ownedOperations_11_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.OperationCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getLibClassCSAccess().getOwnedPropertiesLibPropertyCSParserRuleCall_7_1_0());
}
lv_ownedProperties_12_0=ruleLibPropertyCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibClassCSRule());
}
add(
$current,
"ownedProperties",
lv_ownedProperties_12_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.LibPropertyCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getLibClassCSAccess().getOwnedConstraintsInvCSParserRuleCall_7_2_0());
}
lv_ownedConstraints_13_0=ruleInvCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibClassCSRule());
}
add(
$current,
"ownedConstraints",
lv_ownedConstraints_13_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.InvCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getLibClassCSAccess().getOwnedAnnotationsAnnotationElementCSParserRuleCall_7_3_0());
}
lv_ownedAnnotations_14_0=ruleAnnotationElementCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibClassCSRule());
}
add(
$current,
"ownedAnnotations",
lv_ownedAnnotations_14_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AnnotationElementCS");
afterParserOrEnumRuleCall();
}
)
))* otherlv_15='}'
{
newLeafNode(otherlv_15, grammarAccess.getLibClassCSAccess().getRightCurlyBracketKeyword_8());
}
)
;
// Entry rule entryRuleClassCS
entryRuleClassCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getClassCSRule()); }
iv_ruleClassCS=ruleClassCS
{ $current=$iv_ruleClassCS.current; }
EOF
;
// Rule ClassCS
ruleClassCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
{
/* */
}
{
newCompositeNode(grammarAccess.getClassCSAccess().getLibClassCSParserRuleCall());
}
this_LibClassCS_0=ruleLibClassCS
{
$current = $this_LibClassCS_0.current;
afterParserOrEnumRuleCall();
}
;
// Entry rule entryRuleDetailCS
entryRuleDetailCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getDetailCSRule()); }
iv_ruleDetailCS=ruleDetailCS
{ $current=$iv_ruleDetailCS.current; }
EOF
;
// Rule DetailCS
ruleDetailCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
(
{
newCompositeNode(grammarAccess.getDetailCSAccess().getNameNameParserRuleCall_0_0_0());
}
lv_name_0_1=ruleName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getDetailCSRule());
}
set(
$current,
"name",
lv_name_0_1,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Name");
afterParserOrEnumRuleCall();
}
| lv_name_0_2=RULE_SINGLE_QUOTED_STRING
{
newLeafNode(lv_name_0_2, grammarAccess.getDetailCSAccess().getNameSINGLE_QUOTED_STRINGTerminalRuleCall_0_0_1());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getDetailCSRule());
}
setWithLastConsumed(
$current,
"name",
lv_name_0_2,
"org.eclipse.ocl.xtext.base.Base.SINGLE_QUOTED_STRING");
}
)
)
) otherlv_1='='
{
newLeafNode(otherlv_1, grammarAccess.getDetailCSAccess().getEqualsSignKeyword_1());
}
(
(
(
lv_values_2_1=RULE_SINGLE_QUOTED_STRING
{
newLeafNode(lv_values_2_1, grammarAccess.getDetailCSAccess().getValuesSINGLE_QUOTED_STRINGTerminalRuleCall_2_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getDetailCSRule());
}
addWithLastConsumed(
$current,
"values",
lv_values_2_1,
"org.eclipse.ocl.xtext.base.Base.SINGLE_QUOTED_STRING");
}
| lv_values_2_2=RULE_ML_SINGLE_QUOTED_STRING
{
newLeafNode(lv_values_2_2, grammarAccess.getDetailCSAccess().getValuesML_SINGLE_QUOTED_STRINGTerminalRuleCall_2_0_1());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getDetailCSRule());
}
addWithLastConsumed(
$current,
"values",
lv_values_2_2,
"org.eclipse.ocl.xtext.base.Base.ML_SINGLE_QUOTED_STRING");
}
)
)
)*)
;
// Entry rule entryRuleDocumentationCS
entryRuleDocumentationCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getDocumentationCSRule()); }
iv_ruleDocumentationCS=ruleDocumentationCS
{ $current=$iv_ruleDocumentationCS.current; }
EOF
;
// Rule DocumentationCS
ruleDocumentationCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
{
/* */
}
{
$current = forceCreateModelElement(
grammarAccess.getDocumentationCSAccess().getDocumentationCSAction_0(),
$current);
}
) otherlv_1='documentation'
{
newLeafNode(otherlv_1, grammarAccess.getDocumentationCSAccess().getDocumentationKeyword_1());
}
(
(
lv_value_2_0=RULE_SINGLE_QUOTED_STRING
{
newLeafNode(lv_value_2_0, grammarAccess.getDocumentationCSAccess().getValueSINGLE_QUOTED_STRINGTerminalRuleCall_2_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getDocumentationCSRule());
}
setWithLastConsumed(
$current,
"value",
lv_value_2_0,
"org.eclipse.ocl.xtext.base.Base.SINGLE_QUOTED_STRING");
}
)
)?( otherlv_3='('
{
newLeafNode(otherlv_3, grammarAccess.getDocumentationCSAccess().getLeftParenthesisKeyword_3_0());
}
(
(
{
newCompositeNode(grammarAccess.getDocumentationCSAccess().getOwnedDetailsDetailCSParserRuleCall_3_1_0());
}
lv_ownedDetails_4_0=ruleDetailCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getDocumentationCSRule());
}
add(
$current,
"ownedDetails",
lv_ownedDetails_4_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.DetailCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_5=','
{
newLeafNode(otherlv_5, grammarAccess.getDocumentationCSAccess().getCommaKeyword_3_2_0());
}
(
(
{
newCompositeNode(grammarAccess.getDocumentationCSAccess().getOwnedDetailsDetailCSParserRuleCall_3_2_1_0());
}
lv_ownedDetails_6_0=ruleDetailCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getDocumentationCSRule());
}
add(
$current,
"ownedDetails",
lv_ownedDetails_6_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.DetailCS");
afterParserOrEnumRuleCall();
}
)
))* otherlv_7=')'
{
newLeafNode(otherlv_7, grammarAccess.getDocumentationCSAccess().getRightParenthesisKeyword_3_3());
}
)? otherlv_8=';'
{
newLeafNode(otherlv_8, grammarAccess.getDocumentationCSAccess().getSemicolonKeyword_4());
}
)
;
// Entry rule entryRuleImportCS
entryRuleImportCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getImportCSRule()); }
iv_ruleImportCS=ruleImportCS
{ $current=$iv_ruleImportCS.current; }
EOF
;
// Rule ImportCS
ruleImportCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
( otherlv_0='import'
{
newLeafNode(otherlv_0, grammarAccess.getImportCSAccess().getImportKeyword_0());
}
((
(
{
newCompositeNode(grammarAccess.getImportCSAccess().getNameIdentifierParserRuleCall_1_0_0());
}
lv_name_1_0=ruleIdentifier {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getImportCSRule());
}
set(
$current,
"name",
lv_name_1_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Identifier");
afterParserOrEnumRuleCall();
}
)
) otherlv_2=':'
{
newLeafNode(otherlv_2, grammarAccess.getImportCSAccess().getColonKeyword_1_1());
}
)?(
(
{
newCompositeNode(grammarAccess.getImportCSAccess().getOwnedPathNameURIPathNameCSParserRuleCall_2_0());
}
lv_ownedPathName_3_0=ruleURIPathNameCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getImportCSRule());
}
set(
$current,
"ownedPathName",
lv_ownedPathName_3_0,
"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.URIPathNameCS");
afterParserOrEnumRuleCall();
}
)
)(
(
lv_isAll_4_0= '::*'
{
newLeafNode(lv_isAll_4_0, grammarAccess.getImportCSAccess().getIsAllColonColonAsteriskKeyword_3_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getImportCSRule());
}
setWithLastConsumed($current, "isAll", true, "::*");
}
)
)?)
;
// Entry rule entryRuleInvCS
entryRuleInvCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getInvCSRule()); }
iv_ruleInvCS=ruleInvCS
{ $current=$iv_ruleInvCS.current; }
EOF
;
// Rule InvCS
ruleInvCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
lv_stereotype_0_0= 'inv'
{
newLeafNode(lv_stereotype_0_0, grammarAccess.getInvCSAccess().getStereotypeInvKeyword_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getInvCSRule());
}
setWithLastConsumed($current, "stereotype", lv_stereotype_0_0, "inv");
}
)
)((
(
{
newCompositeNode(grammarAccess.getInvCSAccess().getNameUnrestrictedNameParserRuleCall_1_0_0());
}
lv_name_1_0=ruleUnrestrictedName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getInvCSRule());
}
set(
$current,
"name",
lv_name_1_0,
"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.UnrestrictedName");
afterParserOrEnumRuleCall();
}
)
)( otherlv_2='('
{
newLeafNode(otherlv_2, grammarAccess.getInvCSAccess().getLeftParenthesisKeyword_1_1_0());
}
(
(
{
newCompositeNode(grammarAccess.getInvCSAccess().getOwnedMessageSpecificationSpecificationCSParserRuleCall_1_1_1_0());
}
lv_ownedMessageSpecification_3_0=ruleSpecificationCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getInvCSRule());
}
set(
$current,
"ownedMessageSpecification",
lv_ownedMessageSpecification_3_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.SpecificationCS");
afterParserOrEnumRuleCall();
}
)
) otherlv_4=')'
{
newLeafNode(otherlv_4, grammarAccess.getInvCSAccess().getRightParenthesisKeyword_1_1_2());
}
)?)? otherlv_5=':'
{
newLeafNode(otherlv_5, grammarAccess.getInvCSAccess().getColonKeyword_2());
}
(
(
{
newCompositeNode(grammarAccess.getInvCSAccess().getOwnedSpecificationSpecificationCSParserRuleCall_3_0());
}
lv_ownedSpecification_6_0=ruleSpecificationCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getInvCSRule());
}
set(
$current,
"ownedSpecification",
lv_ownedSpecification_6_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.SpecificationCS");
afterParserOrEnumRuleCall();
}
)
) otherlv_7=';'
{
newLeafNode(otherlv_7, grammarAccess.getInvCSAccess().getSemicolonKeyword_4());
}
)
;
// Entry rule entryRuleLibCoercionCS
entryRuleLibCoercionCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibCoercionCSRule()); }
iv_ruleLibCoercionCS=ruleLibCoercionCS
{ $current=$iv_ruleLibCoercionCS.current; }
EOF
;
// Rule LibCoercionCS
ruleLibCoercionCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
( otherlv_0='coercion'
{
newLeafNode(otherlv_0, grammarAccess.getLibCoercionCSAccess().getCoercionKeyword_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibCoercionCSAccess().getNameNameParserRuleCall_1_0());
}
lv_name_1_0=ruleName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibCoercionCSRule());
}
set(
$current,
"name",
lv_name_1_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Name");
afterParserOrEnumRuleCall();
}
)
) otherlv_2='('
{
newLeafNode(otherlv_2, grammarAccess.getLibCoercionCSAccess().getLeftParenthesisKeyword_2());
}
otherlv_3=')'
{
newLeafNode(otherlv_3, grammarAccess.getLibCoercionCSAccess().getRightParenthesisKeyword_3());
}
otherlv_4=':'
{
newLeafNode(otherlv_4, grammarAccess.getLibCoercionCSAccess().getColonKeyword_4());
}
(
(
{
newCompositeNode(grammarAccess.getLibCoercionCSAccess().getOwnedTypeTypedMultiplicityRefCSParserRuleCall_5_0());
}
lv_ownedType_5_0=ruleTypedMultiplicityRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibCoercionCSRule());
}
set(
$current,
"ownedType",
lv_ownedType_5_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedMultiplicityRefCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_6='=>'
{
newLeafNode(otherlv_6, grammarAccess.getLibCoercionCSAccess().getEqualsSignGreaterThanSignKeyword_6_0());
}
(
(
{
/* */
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibCoercionCSRule());
}
}
otherlv_7=RULE_SINGLE_QUOTED_STRING
{
newLeafNode(otherlv_7, grammarAccess.getLibCoercionCSAccess().getImplementationJavaClassCSCrossReference_6_1_0());
}
)
))?(( otherlv_8='{'
{
newLeafNode(otherlv_8, grammarAccess.getLibCoercionCSAccess().getLeftCurlyBracketKeyword_7_0_0());
}
((
(
{
newCompositeNode(grammarAccess.getLibCoercionCSAccess().getOwnedAnnotationsAnnotationElementCSParserRuleCall_7_0_1_0_0());
}
lv_ownedAnnotations_9_0=ruleAnnotationElementCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibCoercionCSRule());
}
add(
$current,
"ownedAnnotations",
lv_ownedAnnotations_9_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AnnotationElementCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getLibCoercionCSAccess().getOwnedPreconditionsPostCSParserRuleCall_7_0_1_1_0());
}
lv_ownedPreconditions_10_0=rulePostCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibCoercionCSRule());
}
add(
$current,
"ownedPreconditions",
lv_ownedPreconditions_10_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.PostCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getLibCoercionCSAccess().getOwnedPostconditionsPreCSParserRuleCall_7_0_1_2_0());
}
lv_ownedPostconditions_11_0=rulePreCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibCoercionCSRule());
}
add(
$current,
"ownedPostconditions",
lv_ownedPostconditions_11_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.PreCS");
afterParserOrEnumRuleCall();
}
)
))* otherlv_12='}'
{
newLeafNode(otherlv_12, grammarAccess.getLibCoercionCSAccess().getRightCurlyBracketKeyword_7_0_2());
}
)
| otherlv_13=';'
{
newLeafNode(otherlv_13, grammarAccess.getLibCoercionCSAccess().getSemicolonKeyword_7_1());
}
))
;
// Entry rule entryRuleLibIterationCS
entryRuleLibIterationCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibIterationCSRule()); }
iv_ruleLibIterationCS=ruleLibIterationCS
{ $current=$iv_ruleLibIterationCS.current; }
EOF
;
// Rule LibIterationCS
ruleLibIterationCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
( otherlv_0='iteration'
{
newLeafNode(otherlv_0, grammarAccess.getLibIterationCSAccess().getIterationKeyword_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getNameNameParserRuleCall_1_0());
}
lv_name_1_0=ruleName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
set(
$current,
"name",
lv_name_1_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Name");
afterParserOrEnumRuleCall();
}
)
)(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedSignatureTemplateSignatureCSParserRuleCall_2_0());
}
lv_ownedSignature_2_0=ruleTemplateSignatureCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
set(
$current,
"ownedSignature",
lv_ownedSignature_2_0,
"org.eclipse.ocl.xtext.base.Base.TemplateSignatureCS");
afterParserOrEnumRuleCall();
}
)
)? otherlv_3='('
{
newLeafNode(otherlv_3, grammarAccess.getLibIterationCSAccess().getLeftParenthesisKeyword_3());
}
(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedIteratorsIteratorCSParserRuleCall_4_0());
}
lv_ownedIterators_4_0=ruleIteratorCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
add(
$current,
"ownedIterators",
lv_ownedIterators_4_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.IteratorCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_5=','
{
newLeafNode(otherlv_5, grammarAccess.getLibIterationCSAccess().getCommaKeyword_5_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedIteratorsIteratorCSParserRuleCall_5_1_0());
}
lv_ownedIterators_6_0=ruleIteratorCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
add(
$current,
"ownedIterators",
lv_ownedIterators_6_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.IteratorCS");
afterParserOrEnumRuleCall();
}
)
))*( otherlv_7=';'
{
newLeafNode(otherlv_7, grammarAccess.getLibIterationCSAccess().getSemicolonKeyword_6_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedAccumulatorsAccumulatorCSParserRuleCall_6_1_0());
}
lv_ownedAccumulators_8_0=ruleAccumulatorCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
add(
$current,
"ownedAccumulators",
lv_ownedAccumulators_8_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AccumulatorCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_9=','
{
newLeafNode(otherlv_9, grammarAccess.getLibIterationCSAccess().getCommaKeyword_6_2_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedAccumulatorsAccumulatorCSParserRuleCall_6_2_1_0());
}
lv_ownedAccumulators_10_0=ruleAccumulatorCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
add(
$current,
"ownedAccumulators",
lv_ownedAccumulators_10_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AccumulatorCS");
afterParserOrEnumRuleCall();
}
)
))*)?( otherlv_11='|'
{
newLeafNode(otherlv_11, grammarAccess.getLibIterationCSAccess().getVerticalLineKeyword_7_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedParametersParameterCSParserRuleCall_7_1_0());
}
lv_ownedParameters_12_0=ruleParameterCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
add(
$current,
"ownedParameters",
lv_ownedParameters_12_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.ParameterCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_13=','
{
newLeafNode(otherlv_13, grammarAccess.getLibIterationCSAccess().getCommaKeyword_7_2_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedParametersParameterCSParserRuleCall_7_2_1_0());
}
lv_ownedParameters_14_0=ruleParameterCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
add(
$current,
"ownedParameters",
lv_ownedParameters_14_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.ParameterCS");
afterParserOrEnumRuleCall();
}
)
))*)? otherlv_15=')'
{
newLeafNode(otherlv_15, grammarAccess.getLibIterationCSAccess().getRightParenthesisKeyword_8());
}
otherlv_16=':'
{
newLeafNode(otherlv_16, grammarAccess.getLibIterationCSAccess().getColonKeyword_9());
}
(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedTypeTypedMultiplicityRefCSParserRuleCall_10_0());
}
lv_ownedType_17_0=ruleTypedMultiplicityRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
set(
$current,
"ownedType",
lv_ownedType_17_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedMultiplicityRefCS");
afterParserOrEnumRuleCall();
}
)
)(
(
lv_isInvalidating_18_0= 'invalidating'
{
newLeafNode(lv_isInvalidating_18_0, grammarAccess.getLibIterationCSAccess().getIsInvalidatingInvalidatingKeyword_11_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibIterationCSRule());
}
setWithLastConsumed($current, "isInvalidating", true, "invalidating");
}
)
)?(
(
lv_isValidating_19_0= 'validating'
{
newLeafNode(lv_isValidating_19_0, grammarAccess.getLibIterationCSAccess().getIsValidatingValidatingKeyword_12_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibIterationCSRule());
}
setWithLastConsumed($current, "isValidating", true, "validating");
}
)
)?( otherlv_20='=>'
{
newLeafNode(otherlv_20, grammarAccess.getLibIterationCSAccess().getEqualsSignGreaterThanSignKeyword_13_0());
}
(
(
{
/* */
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibIterationCSRule());
}
}
otherlv_21=RULE_SINGLE_QUOTED_STRING
{
newLeafNode(otherlv_21, grammarAccess.getLibIterationCSAccess().getImplementationJavaClassCSCrossReference_13_1_0());
}
)
))?(( otherlv_22='{'
{
newLeafNode(otherlv_22, grammarAccess.getLibIterationCSAccess().getLeftCurlyBracketKeyword_14_0_0());
}
((
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedAnnotationsAnnotationElementCSParserRuleCall_14_0_1_0_0());
}
lv_ownedAnnotations_23_0=ruleAnnotationElementCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
add(
$current,
"ownedAnnotations",
lv_ownedAnnotations_23_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AnnotationElementCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedPreconditionsPostCSParserRuleCall_14_0_1_1_0());
}
lv_ownedPreconditions_24_0=rulePostCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
add(
$current,
"ownedPreconditions",
lv_ownedPreconditions_24_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.PostCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getLibIterationCSAccess().getOwnedPostconditionsPreCSParserRuleCall_14_0_1_2_0());
}
lv_ownedPostconditions_25_0=rulePreCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibIterationCSRule());
}
add(
$current,
"ownedPostconditions",
lv_ownedPostconditions_25_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.PreCS");
afterParserOrEnumRuleCall();
}
)
))* otherlv_26='}'
{
newLeafNode(otherlv_26, grammarAccess.getLibIterationCSAccess().getRightCurlyBracketKeyword_14_0_2());
}
)
| otherlv_27=';'
{
newLeafNode(otherlv_27, grammarAccess.getLibIterationCSAccess().getSemicolonKeyword_14_1());
}
))
;
// Entry rule entryRuleIteratorCS
entryRuleIteratorCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getIteratorCSRule()); }
iv_ruleIteratorCS=ruleIteratorCS
{ $current=$iv_ruleIteratorCS.current; }
EOF
;
// Rule IteratorCS
ruleIteratorCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
{
newCompositeNode(grammarAccess.getIteratorCSAccess().getNameIdentifierParserRuleCall_0_0());
}
lv_name_0_0=ruleIdentifier {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getIteratorCSRule());
}
set(
$current,
"name",
lv_name_0_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Identifier");
afterParserOrEnumRuleCall();
}
)
) otherlv_1=':'
{
newLeafNode(otherlv_1, grammarAccess.getIteratorCSAccess().getColonKeyword_1());
}
(
(
{
newCompositeNode(grammarAccess.getIteratorCSAccess().getOwnedTypeTypedMultiplicityRefCSParserRuleCall_2_0());
}
lv_ownedType_2_0=ruleTypedMultiplicityRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getIteratorCSRule());
}
set(
$current,
"ownedType",
lv_ownedType_2_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedMultiplicityRefCS");
afterParserOrEnumRuleCall();
}
)
))
;
// Entry rule entryRuleLambdaTypeCS
entryRuleLambdaTypeCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLambdaTypeCSRule()); }
iv_ruleLambdaTypeCS=ruleLambdaTypeCS
{ $current=$iv_ruleLambdaTypeCS.current; }
EOF
;
// Rule LambdaTypeCS
ruleLambdaTypeCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
lv_name_0_0= 'Lambda'
{
newLeafNode(lv_name_0_0, grammarAccess.getLambdaTypeCSAccess().getNameLambdaKeyword_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLambdaTypeCSRule());
}
setWithLastConsumed($current, "name", lv_name_0_0, "Lambda");
}
)
)(
(
{
newCompositeNode(grammarAccess.getLambdaTypeCSAccess().getOwnedSignatureTemplateSignatureCSParserRuleCall_1_0());
}
lv_ownedSignature_1_0=ruleTemplateSignatureCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLambdaTypeCSRule());
}
set(
$current,
"ownedSignature",
lv_ownedSignature_1_0,
"org.eclipse.ocl.xtext.base.Base.TemplateSignatureCS");
afterParserOrEnumRuleCall();
}
)
)?(
(
{
newCompositeNode(grammarAccess.getLambdaTypeCSAccess().getOwnedContextTypeLambdaContextTypeRefCSParserRuleCall_2_0());
}
lv_ownedContextType_2_0=ruleLambdaContextTypeRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLambdaTypeCSRule());
}
set(
$current,
"ownedContextType",
lv_ownedContextType_2_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.LambdaContextTypeRefCS");
afterParserOrEnumRuleCall();
}
)
) otherlv_3='('
{
newLeafNode(otherlv_3, grammarAccess.getLambdaTypeCSAccess().getLeftParenthesisKeyword_3());
}
((
(
{
newCompositeNode(grammarAccess.getLambdaTypeCSAccess().getOwnedParameterTypesTypedMultiplicityRefCSParserRuleCall_4_0_0());
}
lv_ownedParameterTypes_4_0=ruleTypedMultiplicityRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLambdaTypeCSRule());
}
add(
$current,
"ownedParameterTypes",
lv_ownedParameterTypes_4_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedMultiplicityRefCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_5=','
{
newLeafNode(otherlv_5, grammarAccess.getLambdaTypeCSAccess().getCommaKeyword_4_1_0());
}
(
(
{
newCompositeNode(grammarAccess.getLambdaTypeCSAccess().getOwnedParameterTypesTypedMultiplicityRefCSParserRuleCall_4_1_1_0());
}
lv_ownedParameterTypes_6_0=ruleTypedMultiplicityRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLambdaTypeCSRule());
}
add(
$current,
"ownedParameterTypes",
lv_ownedParameterTypes_6_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedMultiplicityRefCS");
afterParserOrEnumRuleCall();
}
)
))*)? otherlv_7=')'
{
newLeafNode(otherlv_7, grammarAccess.getLambdaTypeCSAccess().getRightParenthesisKeyword_5());
}
otherlv_8=':'
{
newLeafNode(otherlv_8, grammarAccess.getLambdaTypeCSAccess().getColonKeyword_6());
}
(
(
{
newCompositeNode(grammarAccess.getLambdaTypeCSAccess().getOwnedResultTypeTypedRefCSParserRuleCall_7_0());
}
lv_ownedResultType_9_0=ruleTypedRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLambdaTypeCSRule());
}
set(
$current,
"ownedResultType",
lv_ownedResultType_9_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedRefCS");
afterParserOrEnumRuleCall();
}
)
))
;
// Entry rule entryRuleLambdaContextTypeRefCS
entryRuleLambdaContextTypeRefCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLambdaContextTypeRefCSRule()); }
iv_ruleLambdaContextTypeRefCS=ruleLambdaContextTypeRefCS
{ $current=$iv_ruleLambdaContextTypeRefCS.current; }
EOF
;
// Rule LambdaContextTypeRefCS
ruleLambdaContextTypeRefCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
(
(
{
newCompositeNode(grammarAccess.getLambdaContextTypeRefCSAccess().getOwnedPathNameLibPathNameCSParserRuleCall_0());
}
lv_ownedPathName_0_0=ruleLibPathNameCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLambdaContextTypeRefCSRule());
}
set(
$current,
"ownedPathName",
lv_ownedPathName_0_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.LibPathNameCS");
afterParserOrEnumRuleCall();
}
)
)
;
// Entry rule entryRuleOperationCS
entryRuleOperationCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getOperationCSRule()); }
iv_ruleOperationCS=ruleOperationCS
{ $current=$iv_ruleOperationCS.current; }
EOF
;
// Rule OperationCS
ruleOperationCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
(
{
/* */
}
{
newCompositeNode(grammarAccess.getOperationCSAccess().getLibCoercionCSParserRuleCall_0());
}
this_LibCoercionCS_0=ruleLibCoercionCS
{
$current = $this_LibCoercionCS_0.current;
afterParserOrEnumRuleCall();
}
|
{
/* */
}
{
newCompositeNode(grammarAccess.getOperationCSAccess().getLibIterationCSParserRuleCall_1());
}
this_LibIterationCS_1=ruleLibIterationCS
{
$current = $this_LibIterationCS_1.current;
afterParserOrEnumRuleCall();
}
|
{
/* */
}
{
newCompositeNode(grammarAccess.getOperationCSAccess().getLibOperationCSParserRuleCall_2());
}
this_LibOperationCS_2=ruleLibOperationCS
{
$current = $this_LibOperationCS_2.current;
afterParserOrEnumRuleCall();
}
)
;
// Entry rule entryRuleLibOperationCS
entryRuleLibOperationCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibOperationCSRule()); }
iv_ruleLibOperationCS=ruleLibOperationCS
{ $current=$iv_ruleLibOperationCS.current; }
EOF
;
// Rule LibOperationCS
ruleLibOperationCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
lv_isStatic_0_0= 'static'
{
newLeafNode(lv_isStatic_0_0, grammarAccess.getLibOperationCSAccess().getIsStaticStaticKeyword_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibOperationCSRule());
}
setWithLastConsumed($current, "isStatic", true, "static");
}
)
)? otherlv_1='operation'
{
newLeafNode(otherlv_1, grammarAccess.getLibOperationCSAccess().getOperationKeyword_1());
}
(
(
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getNameNameParserRuleCall_2_0());
}
lv_name_2_0=ruleName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOperationCSRule());
}
set(
$current,
"name",
lv_name_2_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Name");
afterParserOrEnumRuleCall();
}
)
)(
(
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getOwnedSignatureTemplateSignatureCSParserRuleCall_3_0());
}
lv_ownedSignature_3_0=ruleTemplateSignatureCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOperationCSRule());
}
set(
$current,
"ownedSignature",
lv_ownedSignature_3_0,
"org.eclipse.ocl.xtext.base.Base.TemplateSignatureCS");
afterParserOrEnumRuleCall();
}
)
)? otherlv_4='('
{
newLeafNode(otherlv_4, grammarAccess.getLibOperationCSAccess().getLeftParenthesisKeyword_4());
}
((
(
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getOwnedParametersParameterCSParserRuleCall_5_0_0());
}
lv_ownedParameters_5_0=ruleParameterCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOperationCSRule());
}
add(
$current,
"ownedParameters",
lv_ownedParameters_5_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.ParameterCS");
afterParserOrEnumRuleCall();
}
)
)( otherlv_6=','
{
newLeafNode(otherlv_6, grammarAccess.getLibOperationCSAccess().getCommaKeyword_5_1_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getOwnedParametersParameterCSParserRuleCall_5_1_1_0());
}
lv_ownedParameters_7_0=ruleParameterCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOperationCSRule());
}
add(
$current,
"ownedParameters",
lv_ownedParameters_7_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.ParameterCS");
afterParserOrEnumRuleCall();
}
)
))*)? otherlv_8=')'
{
newLeafNode(otherlv_8, grammarAccess.getLibOperationCSAccess().getRightParenthesisKeyword_6());
}
otherlv_9=':'
{
newLeafNode(otherlv_9, grammarAccess.getLibOperationCSAccess().getColonKeyword_7());
}
(
(
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getOwnedTypeTypedMultiplicityRefCSParserRuleCall_8_0());
}
lv_ownedType_10_0=ruleTypedMultiplicityRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOperationCSRule());
}
set(
$current,
"ownedType",
lv_ownedType_10_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedMultiplicityRefCS");
afterParserOrEnumRuleCall();
}
)
)(
(
lv_isValidating_11_0= 'validating'
{
newLeafNode(lv_isValidating_11_0, grammarAccess.getLibOperationCSAccess().getIsValidatingValidatingKeyword_9_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibOperationCSRule());
}
setWithLastConsumed($current, "isValidating", true, "validating");
}
)
)?(
(
lv_isInvalidating_12_0= 'invalidating'
{
newLeafNode(lv_isInvalidating_12_0, grammarAccess.getLibOperationCSAccess().getIsInvalidatingInvalidatingKeyword_10_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibOperationCSRule());
}
setWithLastConsumed($current, "isInvalidating", true, "invalidating");
}
)
)?( otherlv_13='precedence'
{
newLeafNode(otherlv_13, grammarAccess.getLibOperationCSAccess().getPrecedenceKeyword_11_0());
}
otherlv_14='='
{
newLeafNode(otherlv_14, grammarAccess.getLibOperationCSAccess().getEqualsSignKeyword_11_1());
}
(
(
{
/* */
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibOperationCSRule());
}
}
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getPrecedencePrecedenceCrossReference_11_2_0());
}
ruleName {
afterParserOrEnumRuleCall();
}
)
))?( otherlv_16='=>'
{
newLeafNode(otherlv_16, grammarAccess.getLibOperationCSAccess().getEqualsSignGreaterThanSignKeyword_12_0());
}
(
(
{
/* */
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibOperationCSRule());
}
}
otherlv_17=RULE_SINGLE_QUOTED_STRING
{
newLeafNode(otherlv_17, grammarAccess.getLibOperationCSAccess().getImplementationJavaClassCSCrossReference_12_1_0());
}
)
))?(( otherlv_18='{'
{
newLeafNode(otherlv_18, grammarAccess.getLibOperationCSAccess().getLeftCurlyBracketKeyword_13_0_0());
}
((
(
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getOwnedAnnotationsAnnotationElementCSParserRuleCall_13_0_1_0_0());
}
lv_ownedAnnotations_19_0=ruleAnnotationElementCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOperationCSRule());
}
add(
$current,
"ownedAnnotations",
lv_ownedAnnotations_19_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AnnotationElementCS");
afterParserOrEnumRuleCall();
}
)
)
|( otherlv_20='body'
{
newLeafNode(otherlv_20, grammarAccess.getLibOperationCSAccess().getBodyKeyword_13_0_1_1_0());
}
(
{
/* */
}
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getUnrestrictedNameParserRuleCall_13_0_1_1_1());
}
ruleUnrestrictedName
{
afterParserOrEnumRuleCall();
}
)? otherlv_22=':'
{
newLeafNode(otherlv_22, grammarAccess.getLibOperationCSAccess().getColonKeyword_13_0_1_1_2());
}
(
(
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getOwnedBodyExpressionsSpecificationCSParserRuleCall_13_0_1_1_3_0());
}
lv_ownedBodyExpressions_23_0=ruleSpecificationCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOperationCSRule());
}
add(
$current,
"ownedBodyExpressions",
lv_ownedBodyExpressions_23_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.SpecificationCS");
afterParserOrEnumRuleCall();
}
)
) otherlv_24=';'
{
newLeafNode(otherlv_24, grammarAccess.getLibOperationCSAccess().getSemicolonKeyword_13_0_1_1_4());
}
)
|(
(
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getOwnedPostconditionsPostCSParserRuleCall_13_0_1_2_0());
}
lv_ownedPostconditions_25_0=rulePostCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOperationCSRule());
}
add(
$current,
"ownedPostconditions",
lv_ownedPostconditions_25_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.PostCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getLibOperationCSAccess().getOwnedPreconditionsPreCSParserRuleCall_13_0_1_3_0());
}
lv_ownedPreconditions_26_0=rulePreCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOperationCSRule());
}
add(
$current,
"ownedPreconditions",
lv_ownedPreconditions_26_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.PreCS");
afterParserOrEnumRuleCall();
}
)
))* otherlv_27='}'
{
newLeafNode(otherlv_27, grammarAccess.getLibOperationCSAccess().getRightCurlyBracketKeyword_13_0_2());
}
)
| otherlv_28=';'
{
newLeafNode(otherlv_28, grammarAccess.getLibOperationCSAccess().getSemicolonKeyword_13_1());
}
))
;
// Entry rule entryRuleLibOppositeCS
entryRuleLibOppositeCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibOppositeCSRule()); }
iv_ruleLibOppositeCS=ruleLibOppositeCS
{ $current=$iv_ruleLibOppositeCS.current; }
EOF
;
// Rule LibOppositeCS
ruleLibOppositeCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
( otherlv_0='opposite'
{
newLeafNode(otherlv_0, grammarAccess.getLibOppositeCSAccess().getOppositeKeyword_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibOppositeCSAccess().getNameNameParserRuleCall_1_0());
}
lv_name_1_0=ruleName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOppositeCSRule());
}
set(
$current,
"name",
lv_name_1_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Name");
afterParserOrEnumRuleCall();
}
)
) otherlv_2=':'
{
newLeafNode(otherlv_2, grammarAccess.getLibOppositeCSAccess().getColonKeyword_2());
}
(
(
{
newCompositeNode(grammarAccess.getLibOppositeCSAccess().getOwnedTypeTypedMultiplicityRefCSParserRuleCall_3_0());
}
lv_ownedType_3_0=ruleTypedMultiplicityRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibOppositeCSRule());
}
set(
$current,
"ownedType",
lv_ownedType_3_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedMultiplicityRefCS");
afterParserOrEnumRuleCall();
}
)
))
;
// Entry rule entryRuleLibPackageCS
entryRuleLibPackageCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibPackageCSRule()); }
iv_ruleLibPackageCS=ruleLibPackageCS
{ $current=$iv_ruleLibPackageCS.current; }
EOF
;
// Rule LibPackageCS
ruleLibPackageCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
( otherlv_0='library'
{
newLeafNode(otherlv_0, grammarAccess.getLibPackageCSAccess().getLibraryKeyword_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibPackageCSAccess().getNameNameParserRuleCall_1_0());
}
lv_name_1_0=ruleName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPackageCSRule());
}
set(
$current,
"name",
lv_name_1_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Name");
afterParserOrEnumRuleCall();
}
)
)( otherlv_2=':'
{
newLeafNode(otherlv_2, grammarAccess.getLibPackageCSAccess().getColonKeyword_2_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibPackageCSAccess().getNsPrefixIdentifierParserRuleCall_2_1_0());
}
lv_nsPrefix_3_0=ruleIdentifier {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPackageCSRule());
}
set(
$current,
"nsPrefix",
lv_nsPrefix_3_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Identifier");
afterParserOrEnumRuleCall();
}
)
) otherlv_4='='
{
newLeafNode(otherlv_4, grammarAccess.getLibPackageCSAccess().getEqualsSignKeyword_2_2());
}
(
(
{
newCompositeNode(grammarAccess.getLibPackageCSAccess().getNsURIURIParserRuleCall_2_3_0());
}
lv_nsURI_5_0=ruleURI {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPackageCSRule());
}
set(
$current,
"nsURI",
lv_nsURI_5_0,
"org.eclipse.ocl.xtext.base.Base.URI");
afterParserOrEnumRuleCall();
}
)
))? otherlv_6='{'
{
newLeafNode(otherlv_6, grammarAccess.getLibPackageCSAccess().getLeftCurlyBracketKeyword_3());
}
((
(
{
newCompositeNode(grammarAccess.getLibPackageCSAccess().getOwnedPackagesPackageCSParserRuleCall_4_0_0());
}
lv_ownedPackages_7_0=rulePackageCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPackageCSRule());
}
add(
$current,
"ownedPackages",
lv_ownedPackages_7_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.PackageCS");
afterParserOrEnumRuleCall();
}
)
)
|( otherlv_8='precedence'
{
newLeafNode(otherlv_8, grammarAccess.getLibPackageCSAccess().getPrecedenceKeyword_4_1_0());
}
(
(
{
newCompositeNode(grammarAccess.getLibPackageCSAccess().getOwnedPrecedencesPrecedenceCSParserRuleCall_4_1_1_0());
}
lv_ownedPrecedences_9_0=rulePrecedenceCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPackageCSRule());
}
add(
$current,
"ownedPrecedences",
lv_ownedPrecedences_9_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.PrecedenceCS");
afterParserOrEnumRuleCall();
}
)
)+ otherlv_10=';'
{
newLeafNode(otherlv_10, grammarAccess.getLibPackageCSAccess().getSemicolonKeyword_4_1_2());
}
)
|(
(
{
newCompositeNode(grammarAccess.getLibPackageCSAccess().getOwnedClassesClassCSParserRuleCall_4_2_0());
}
lv_ownedClasses_11_0=ruleClassCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPackageCSRule());
}
add(
$current,
"ownedClasses",
lv_ownedClasses_11_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.ClassCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getLibPackageCSAccess().getOwnedAnnotationsAnnotationElementCSParserRuleCall_4_3_0());
}
lv_ownedAnnotations_12_0=ruleAnnotationElementCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPackageCSRule());
}
add(
$current,
"ownedAnnotations",
lv_ownedAnnotations_12_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AnnotationElementCS");
afterParserOrEnumRuleCall();
}
)
))* otherlv_13='}'
{
newLeafNode(otherlv_13, grammarAccess.getLibPackageCSAccess().getRightCurlyBracketKeyword_5());
}
)
;
// Entry rule entryRulePackageCS
entryRulePackageCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getPackageCSRule()); }
iv_rulePackageCS=rulePackageCS
{ $current=$iv_rulePackageCS.current; }
EOF
;
// Rule PackageCS
rulePackageCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
( otherlv_0='package'
{
newLeafNode(otherlv_0, grammarAccess.getPackageCSAccess().getPackageKeyword_0());
}
(
(
{
newCompositeNode(grammarAccess.getPackageCSAccess().getNameNameParserRuleCall_1_0());
}
lv_name_1_0=ruleName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPackageCSRule());
}
set(
$current,
"name",
lv_name_1_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Name");
afterParserOrEnumRuleCall();
}
)
)( otherlv_2=':'
{
newLeafNode(otherlv_2, grammarAccess.getPackageCSAccess().getColonKeyword_2_0());
}
(
(
{
newCompositeNode(grammarAccess.getPackageCSAccess().getNsPrefixIdentifierParserRuleCall_2_1_0());
}
lv_nsPrefix_3_0=ruleIdentifier {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPackageCSRule());
}
set(
$current,
"nsPrefix",
lv_nsPrefix_3_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Identifier");
afterParserOrEnumRuleCall();
}
)
) otherlv_4='='
{
newLeafNode(otherlv_4, grammarAccess.getPackageCSAccess().getEqualsSignKeyword_2_2());
}
(
(
{
newCompositeNode(grammarAccess.getPackageCSAccess().getNsURIURIParserRuleCall_2_3_0());
}
lv_nsURI_5_0=ruleURI {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPackageCSRule());
}
set(
$current,
"nsURI",
lv_nsURI_5_0,
"org.eclipse.ocl.xtext.base.Base.URI");
afterParserOrEnumRuleCall();
}
)
))? otherlv_6='{'
{
newLeafNode(otherlv_6, grammarAccess.getPackageCSAccess().getLeftCurlyBracketKeyword_3());
}
((
(
{
newCompositeNode(grammarAccess.getPackageCSAccess().getOwnedPackagesPackageCSParserRuleCall_4_0_0());
}
lv_ownedPackages_7_0=rulePackageCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPackageCSRule());
}
add(
$current,
"ownedPackages",
lv_ownedPackages_7_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.PackageCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getPackageCSAccess().getOwnedClassesClassCSParserRuleCall_4_1_0());
}
lv_ownedClasses_8_0=ruleClassCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPackageCSRule());
}
add(
$current,
"ownedClasses",
lv_ownedClasses_8_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.ClassCS");
afterParserOrEnumRuleCall();
}
)
)
|(
(
{
newCompositeNode(grammarAccess.getPackageCSAccess().getOwnedAnnotationsAnnotationElementCSParserRuleCall_4_2_0());
}
lv_ownedAnnotations_9_0=ruleAnnotationElementCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getPackageCSRule());
}
add(
$current,
"ownedAnnotations",
lv_ownedAnnotations_9_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.AnnotationElementCS");
afterParserOrEnumRuleCall();
}
)
))* otherlv_10='}'
{
newLeafNode(otherlv_10, grammarAccess.getPackageCSAccess().getRightCurlyBracketKeyword_5());
}
)
;
// Entry rule entryRuleParameterCS
entryRuleParameterCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getParameterCSRule()); }
iv_ruleParameterCS=ruleParameterCS
{ $current=$iv_ruleParameterCS.current; }
EOF
;
// Rule ParameterCS
ruleParameterCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
{
newCompositeNode(grammarAccess.getParameterCSAccess().getNameIdentifierParserRuleCall_0_0());
}
lv_name_0_0=ruleIdentifier {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getParameterCSRule());
}
set(
$current,
"name",
lv_name_0_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Identifier");
afterParserOrEnumRuleCall();
}
)
) otherlv_1=':'
{
newLeafNode(otherlv_1, grammarAccess.getParameterCSAccess().getColonKeyword_1());
}
(
(
{
newCompositeNode(grammarAccess.getParameterCSAccess().getOwnedTypeTypedMultiplicityRefCSParserRuleCall_2_0());
}
lv_ownedType_2_0=ruleTypedMultiplicityRefCS {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getParameterCSRule());
}
set(
$current,
"ownedType",
lv_ownedType_2_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.TypedMultiplicityRefCS");
afterParserOrEnumRuleCall();
}
)
))
;
// Entry rule entryRuleLibPropertyCS
entryRuleLibPropertyCS returns [EObject current=null]
:
{ newCompositeNode(grammarAccess.getLibPropertyCSRule()); }
iv_ruleLibPropertyCS=ruleLibPropertyCS
{ $current=$iv_ruleLibPropertyCS.current; }
EOF
;
// Rule LibPropertyCS
ruleLibPropertyCS returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
lv_isStatic_0_0= 'static'
{
newLeafNode(lv_isStatic_0_0, grammarAccess.getLibPropertyCSAccess().getIsStaticStaticKeyword_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getLibPropertyCSRule());
}
setWithLastConsumed($current, "isStatic", true, "static");
}
)
)? otherlv_1='property'
{
newLeafNode(otherlv_1, grammarAccess.getLibPropertyCSAccess().getPropertyKeyword_1());
}
(
(
{
newCompositeNode(grammarAccess.getLibPropertyCSAccess().getNameNameParserRuleCall_2_0());
}
lv_name_2_0=ruleName {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getLibPropertyCSRule());
}
set(
$current,
"name",
lv_name_2_0,
"org.eclipse.ocl.xtext.oclstdlib.OCLstdlib.Name");
afterParserOrEnumRuleCall();
}
)
) otherlv_3=':'
{
newLeafNode(otherlv_3, grammarAccess.getLibPropertyCSAccess().getColonKeyword_3());
}