| /* |
| * generated by Xtext |
| */ |
| package org.eclipse.qvto.examples.xtext.imperativeocl.services; |
| |
| import com.google.inject.Singleton; |
| import com.google.inject.Inject; |
| |
| import java.util.List; |
| |
| import org.eclipse.xtext.*; |
| import org.eclipse.xtext.service.GrammarProvider; |
| import org.eclipse.xtext.service.AbstractElementFinder.*; |
| |
| import org.eclipse.ocl.xtext.essentialocl.services.EssentialOCLGrammarAccess; |
| import org.eclipse.ocl.xtext.base.services.BaseGrammarAccess; |
| |
| @Singleton |
| public class ImperativeOCLGrammarAccess extends AbstractGrammarElementFinder { |
| |
| |
| public class GrammmarCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "GrammmarCS"); |
| private final RuleCall cImperativeOCLExpCSParserRuleCall = (RuleCall)rule.eContents().get(1); |
| |
| //GrammmarCS returns essentialocl::ExpCS: |
| // ImperativeOCLExpCS; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //ImperativeOCLExpCS |
| public RuleCall getImperativeOCLExpCSParserRuleCall() { return cImperativeOCLExpCSParserRuleCall; } |
| } |
| |
| public class ImperativeOCLReservedKeywordElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ImperativeOCLReservedKeyword"); |
| private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); |
| private final Keyword cDefaultKeyword_0 = (Keyword)cAlternatives.eContents().get(0); |
| private final Keyword cElifKeyword_1 = (Keyword)cAlternatives.eContents().get(1); |
| private final RuleCall cRESOLVE_KINDTerminalRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); |
| private final RuleCall cRESOLVE_IN_KINDTerminalRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); |
| |
| //ImperativeOCLReservedKeyword: |
| // "default" | "elif" | RESOLVE_KIND | RESOLVE_IN_KIND; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //"default" | "elif" | RESOLVE_KIND | RESOLVE_IN_KIND |
| public Alternatives getAlternatives() { return cAlternatives; } |
| |
| //"default" |
| public Keyword getDefaultKeyword_0() { return cDefaultKeyword_0; } |
| |
| //"elif" |
| public Keyword getElifKeyword_1() { return cElifKeyword_1; } |
| |
| //RESOLVE_KIND |
| public RuleCall getRESOLVE_KINDTerminalRuleCall_2() { return cRESOLVE_KINDTerminalRuleCall_2; } |
| |
| //RESOLVE_IN_KIND |
| public RuleCall getRESOLVE_IN_KINDTerminalRuleCall_3() { return cRESOLVE_IN_KINDTerminalRuleCall_3; } |
| } |
| |
| public class ImperativeOCLPrefixOperatorElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ImperativeOCLPrefixOperator"); |
| private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); |
| private final Keyword cNumberSignKeyword_0 = (Keyword)cAlternatives.eContents().get(0); |
| private final Keyword cNumberSignNumberSignKeyword_1 = (Keyword)cAlternatives.eContents().get(1); |
| private final Keyword cAsteriskKeyword_2 = (Keyword)cAlternatives.eContents().get(2); |
| |
| //ImperativeOCLPrefixOperator: |
| // "#" | "##" | "*"; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //"#" | "##" | "*" |
| public Alternatives getAlternatives() { return cAlternatives; } |
| |
| //"#" |
| public Keyword getNumberSignKeyword_0() { return cNumberSignKeyword_0; } |
| |
| //"##" |
| public Keyword getNumberSignNumberSignKeyword_1() { return cNumberSignNumberSignKeyword_1; } |
| |
| //"*" |
| public Keyword getAsteriskKeyword_2() { return cAsteriskKeyword_2; } |
| } |
| |
| public class ImperativeOCLInfixOperatorElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ImperativeOCLInfixOperator"); |
| private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); |
| private final RuleCall cASSIGN_OPTerminalRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); |
| private final Keyword cDefaultKeyword_1 = (Keyword)cAlternatives.eContents().get(1); |
| private final Keyword cEqualsSignEqualsSignKeyword_2 = (Keyword)cAlternatives.eContents().get(2); |
| |
| //ImperativeOCLInfixOperator: |
| // ASSIGN_OP | "default" | "=="; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //ASSIGN_OP | "default" | "==" |
| public Alternatives getAlternatives() { return cAlternatives; } |
| |
| //ASSIGN_OP |
| public RuleCall getASSIGN_OPTerminalRuleCall_0() { return cASSIGN_OPTerminalRuleCall_0; } |
| |
| //"default" |
| public Keyword getDefaultKeyword_1() { return cDefaultKeyword_1; } |
| |
| //"==" |
| public Keyword getEqualsSignEqualsSignKeyword_2() { return cEqualsSignEqualsSignKeyword_2; } |
| } |
| |
| public class ImperativeOCLNavigationOperatorElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ImperativeOCLNavigationOperator"); |
| private final Keyword cExclamationMarkHyphenMinusGreaterThanSignKeyword = (Keyword)rule.eContents().get(1); |
| |
| //ImperativeOCLNavigationOperator: |
| // "!->"; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //"!->" |
| public Keyword getExclamationMarkHyphenMinusGreaterThanSignKeyword() { return cExclamationMarkHyphenMinusGreaterThanSignKeyword; } |
| } |
| |
| public class ImperativeOCLExpCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ImperativeOCLExpCS"); |
| private final RuleCall cExpCSParserRuleCall = (RuleCall)rule.eContents().get(1); |
| |
| ////PrefixOperator: |
| //// EssentialOCLPrefixOperator | QVToPrefixOperator; |
| //// |
| ////InfixOperator: |
| //// EssentialOCLInfixOperator | QVToInfixOperator; |
| //// |
| ////NavigationOperator: |
| //// EssentialOCLNavigationOperator | QVToNavigationOperator; |
| //ImperativeOCLExpCS returns essentialocl::ExpCS: |
| // ExpCS; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //ExpCS |
| public RuleCall getExpCSParserRuleCall() { return cExpCSParserRuleCall; } |
| } |
| |
| public class TypeLiteralCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "TypeLiteralCS"); |
| private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); |
| private final RuleCall cPrimitiveTypeCSParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); |
| private final RuleCall cCollectionTypeCSParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); |
| private final RuleCall cMapTypeCSParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); |
| private final RuleCall cTupleTypeCSParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); |
| private final RuleCall cListTypeCSParserRuleCall_4 = (RuleCall)cAlternatives.eContents().get(4); |
| private final RuleCall cDictTypeCSParserRuleCall_5 = (RuleCall)cAlternatives.eContents().get(5); |
| |
| //// ********* ImperativeOCL Types ********* |
| //// TypeLiteralCS redefined to include the new List and Dict types |
| //// FIXME refactor its definition in EssentialOCL to allow extension |
| //TypeLiteralCS returns base::TypedRefCS: |
| // PrimitiveTypeCS | CollectionTypeCS | MapTypeCS | TupleTypeCS | ListTypeCS | DictTypeCS; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //PrimitiveTypeCS | CollectionTypeCS | MapTypeCS | TupleTypeCS | ListTypeCS | DictTypeCS |
| public Alternatives getAlternatives() { return cAlternatives; } |
| |
| //PrimitiveTypeCS |
| public RuleCall getPrimitiveTypeCSParserRuleCall_0() { return cPrimitiveTypeCSParserRuleCall_0; } |
| |
| //CollectionTypeCS |
| public RuleCall getCollectionTypeCSParserRuleCall_1() { return cCollectionTypeCSParserRuleCall_1; } |
| |
| //MapTypeCS |
| public RuleCall getMapTypeCSParserRuleCall_2() { return cMapTypeCSParserRuleCall_2; } |
| |
| //TupleTypeCS |
| public RuleCall getTupleTypeCSParserRuleCall_3() { return cTupleTypeCSParserRuleCall_3; } |
| |
| //ListTypeCS |
| public RuleCall getListTypeCSParserRuleCall_4() { return cListTypeCSParserRuleCall_4; } |
| |
| //DictTypeCS |
| public RuleCall getDictTypeCSParserRuleCall_5() { return cDictTypeCSParserRuleCall_5; } |
| } |
| |
| public class ListTypeCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ListTypeCS"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cListKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Keyword cLeftParenthesisKeyword_1 = (Keyword)cGroup.eContents().get(1); |
| private final Assignment cTypeAssignment_2 = (Assignment)cGroup.eContents().get(2); |
| private final RuleCall cTypeTypeExpCSParserRuleCall_2_0 = (RuleCall)cTypeAssignment_2.eContents().get(0); |
| private final Keyword cRightParenthesisKeyword_3 = (Keyword)cGroup.eContents().get(3); |
| |
| //ListTypeCS: |
| // "List" "(" type=TypeExpCS ")"; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //"List" "(" type=TypeExpCS ")" |
| public Group getGroup() { return cGroup; } |
| |
| //"List" |
| public Keyword getListKeyword_0() { return cListKeyword_0; } |
| |
| //"(" |
| public Keyword getLeftParenthesisKeyword_1() { return cLeftParenthesisKeyword_1; } |
| |
| //type=TypeExpCS |
| public Assignment getTypeAssignment_2() { return cTypeAssignment_2; } |
| |
| //TypeExpCS |
| public RuleCall getTypeTypeExpCSParserRuleCall_2_0() { return cTypeTypeExpCSParserRuleCall_2_0; } |
| |
| //")" |
| public Keyword getRightParenthesisKeyword_3() { return cRightParenthesisKeyword_3; } |
| } |
| |
| public class DictTypeCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DictTypeCS"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cDictKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Keyword cLeftParenthesisKeyword_1 = (Keyword)cGroup.eContents().get(1); |
| private final Assignment cKeyTypeAssignment_2 = (Assignment)cGroup.eContents().get(2); |
| private final RuleCall cKeyTypeTypeExpCSParserRuleCall_2_0 = (RuleCall)cKeyTypeAssignment_2.eContents().get(0); |
| private final Keyword cCommaKeyword_3 = (Keyword)cGroup.eContents().get(3); |
| private final Assignment cValueTypeAssignment_4 = (Assignment)cGroup.eContents().get(4); |
| private final RuleCall cValueTypeTypeExpCSParserRuleCall_4_0 = (RuleCall)cValueTypeAssignment_4.eContents().get(0); |
| private final Keyword cRightParenthesisKeyword_5 = (Keyword)cGroup.eContents().get(5); |
| |
| //DictTypeCS: |
| // "Dict" "(" keyType=TypeExpCS "," valueType=TypeExpCS ")"; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //"Dict" "(" keyType=TypeExpCS "," valueType=TypeExpCS ")" |
| public Group getGroup() { return cGroup; } |
| |
| //"Dict" |
| public Keyword getDictKeyword_0() { return cDictKeyword_0; } |
| |
| //"(" |
| public Keyword getLeftParenthesisKeyword_1() { return cLeftParenthesisKeyword_1; } |
| |
| //keyType=TypeExpCS |
| public Assignment getKeyTypeAssignment_2() { return cKeyTypeAssignment_2; } |
| |
| //TypeExpCS |
| public RuleCall getKeyTypeTypeExpCSParserRuleCall_2_0() { return cKeyTypeTypeExpCSParserRuleCall_2_0; } |
| |
| //"," |
| public Keyword getCommaKeyword_3() { return cCommaKeyword_3; } |
| |
| //valueType=TypeExpCS |
| public Assignment getValueTypeAssignment_4() { return cValueTypeAssignment_4; } |
| |
| //TypeExpCS |
| public RuleCall getValueTypeTypeExpCSParserRuleCall_4_0() { return cValueTypeTypeExpCSParserRuleCall_4_0; } |
| |
| //")" |
| public Keyword getRightParenthesisKeyword_5() { return cRightParenthesisKeyword_5; } |
| } |
| |
| public class PrimaryExpCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "PrimaryExpCS"); |
| private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); |
| private final RuleCall cNestedExpCSParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); |
| private final RuleCall cIfExpCSParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); |
| private final RuleCall cSelfExpCSParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); |
| private final RuleCall cPrimitiveLiteralExpCSParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); |
| private final RuleCall cTupleLiteralExpCSParserRuleCall_4 = (RuleCall)cAlternatives.eContents().get(4); |
| private final RuleCall cMapLiteralExpCSParserRuleCall_5 = (RuleCall)cAlternatives.eContents().get(5); |
| private final RuleCall cCollectionLiteralExpCSParserRuleCall_6 = (RuleCall)cAlternatives.eContents().get(6); |
| private final RuleCall cLambdaLiteralExpCSParserRuleCall_7 = (RuleCall)cAlternatives.eContents().get(7); |
| private final RuleCall cListLiteralExpCSParserRuleCall_8 = (RuleCall)cAlternatives.eContents().get(8); |
| private final RuleCall cDictLiteralExpCSParserRuleCall_9 = (RuleCall)cAlternatives.eContents().get(9); |
| private final RuleCall cTypeLiteralExpCSParserRuleCall_10 = (RuleCall)cAlternatives.eContents().get(10); |
| private final RuleCall cReturnExpCSParserRuleCall_11 = (RuleCall)cAlternatives.eContents().get(11); |
| private final RuleCall cNameExpCSParserRuleCall_12 = (RuleCall)cAlternatives.eContents().get(12); |
| |
| //// ********* ImperativeOCL Expressions ********* |
| //// PrimaryExpCS redefined to include the new List and Dict literal expressions |
| //// FIXME refactor its definition in EssentialOCL to allow extension |
| //// These rules are ordered most rejectable first |
| //PrimaryExpCS returns essentialocl::ExpCS: |
| // NestedExpCS | IfExpCS | SelfExpCS | PrimitiveLiteralExpCS | TupleLiteralExpCS | MapLiteralExpCS | |
| // CollectionLiteralExpCS | LambdaLiteralExpCS | ListLiteralExpCS | DictLiteralExpCS | TypeLiteralExpCS | ReturnExpCS | |
| // NameExpCS; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //NestedExpCS | IfExpCS | SelfExpCS | PrimitiveLiteralExpCS | TupleLiteralExpCS | MapLiteralExpCS | CollectionLiteralExpCS |
| //| LambdaLiteralExpCS | ListLiteralExpCS | DictLiteralExpCS | TypeLiteralExpCS | ReturnExpCS | NameExpCS |
| public Alternatives getAlternatives() { return cAlternatives; } |
| |
| //NestedExpCS |
| public RuleCall getNestedExpCSParserRuleCall_0() { return cNestedExpCSParserRuleCall_0; } |
| |
| //IfExpCS |
| public RuleCall getIfExpCSParserRuleCall_1() { return cIfExpCSParserRuleCall_1; } |
| |
| //SelfExpCS |
| public RuleCall getSelfExpCSParserRuleCall_2() { return cSelfExpCSParserRuleCall_2; } |
| |
| //PrimitiveLiteralExpCS |
| public RuleCall getPrimitiveLiteralExpCSParserRuleCall_3() { return cPrimitiveLiteralExpCSParserRuleCall_3; } |
| |
| //TupleLiteralExpCS |
| public RuleCall getTupleLiteralExpCSParserRuleCall_4() { return cTupleLiteralExpCSParserRuleCall_4; } |
| |
| //MapLiteralExpCS |
| public RuleCall getMapLiteralExpCSParserRuleCall_5() { return cMapLiteralExpCSParserRuleCall_5; } |
| |
| //CollectionLiteralExpCS |
| public RuleCall getCollectionLiteralExpCSParserRuleCall_6() { return cCollectionLiteralExpCSParserRuleCall_6; } |
| |
| //LambdaLiteralExpCS |
| public RuleCall getLambdaLiteralExpCSParserRuleCall_7() { return cLambdaLiteralExpCSParserRuleCall_7; } |
| |
| //ListLiteralExpCS |
| public RuleCall getListLiteralExpCSParserRuleCall_8() { return cListLiteralExpCSParserRuleCall_8; } |
| |
| //DictLiteralExpCS |
| public RuleCall getDictLiteralExpCSParserRuleCall_9() { return cDictLiteralExpCSParserRuleCall_9; } |
| |
| //TypeLiteralExpCS |
| public RuleCall getTypeLiteralExpCSParserRuleCall_10() { return cTypeLiteralExpCSParserRuleCall_10; } |
| |
| //ReturnExpCS |
| public RuleCall getReturnExpCSParserRuleCall_11() { return cReturnExpCSParserRuleCall_11; } |
| |
| //NameExpCS |
| public RuleCall getNameExpCSParserRuleCall_12() { return cNameExpCSParserRuleCall_12; } |
| } |
| |
| public class ListLiteralExpCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ListLiteralExpCS"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cListKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Keyword cLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1); |
| private final Action cListLiteralExpCSAction_2 = (Action)cGroup.eContents().get(2); |
| private final Group cGroup_3 = (Group)cGroup.eContents().get(3); |
| private final Assignment cOwnedPartsAssignment_3_0 = (Assignment)cGroup_3.eContents().get(0); |
| private final RuleCall cOwnedPartsCollectionLiteralPartCSParserRuleCall_3_0_0 = (RuleCall)cOwnedPartsAssignment_3_0.eContents().get(0); |
| private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1); |
| private final Keyword cCommaKeyword_3_1_0 = (Keyword)cGroup_3_1.eContents().get(0); |
| private final Assignment cOwnedPartsAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1); |
| private final RuleCall cOwnedPartsCollectionLiteralPartCSParserRuleCall_3_1_1_0 = (RuleCall)cOwnedPartsAssignment_3_1_1.eContents().get(0); |
| private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4); |
| |
| //ListLiteralExpCS: |
| // "List" "{" {ListLiteralExpCS} (ownedParts+=CollectionLiteralPartCS ("," ownedParts+=CollectionLiteralPartCS)*)? "}"; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //"List" "{" {ListLiteralExpCS} (ownedParts+=CollectionLiteralPartCS ("," ownedParts+=CollectionLiteralPartCS)*)? "}" |
| public Group getGroup() { return cGroup; } |
| |
| //"List" |
| public Keyword getListKeyword_0() { return cListKeyword_0; } |
| |
| //"{" |
| public Keyword getLeftCurlyBracketKeyword_1() { return cLeftCurlyBracketKeyword_1; } |
| |
| //{ListLiteralExpCS} |
| public Action getListLiteralExpCSAction_2() { return cListLiteralExpCSAction_2; } |
| |
| //(ownedParts+=CollectionLiteralPartCS ("," ownedParts+=CollectionLiteralPartCS)*)? |
| public Group getGroup_3() { return cGroup_3; } |
| |
| //ownedParts+=CollectionLiteralPartCS |
| public Assignment getOwnedPartsAssignment_3_0() { return cOwnedPartsAssignment_3_0; } |
| |
| //CollectionLiteralPartCS |
| public RuleCall getOwnedPartsCollectionLiteralPartCSParserRuleCall_3_0_0() { return cOwnedPartsCollectionLiteralPartCSParserRuleCall_3_0_0; } |
| |
| //("," ownedParts+=CollectionLiteralPartCS)* |
| public Group getGroup_3_1() { return cGroup_3_1; } |
| |
| //"," |
| public Keyword getCommaKeyword_3_1_0() { return cCommaKeyword_3_1_0; } |
| |
| //ownedParts+=CollectionLiteralPartCS |
| public Assignment getOwnedPartsAssignment_3_1_1() { return cOwnedPartsAssignment_3_1_1; } |
| |
| //CollectionLiteralPartCS |
| public RuleCall getOwnedPartsCollectionLiteralPartCSParserRuleCall_3_1_1_0() { return cOwnedPartsCollectionLiteralPartCSParserRuleCall_3_1_1_0; } |
| |
| //"}" |
| public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; } |
| } |
| |
| public class DictLiteralExpCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DictLiteralExpCS"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cDictKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Keyword cLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1); |
| private final Action cDictLiteralExpCSAction_2 = (Action)cGroup.eContents().get(2); |
| private final Group cGroup_3 = (Group)cGroup.eContents().get(3); |
| private final Assignment cOwnedPartsAssignment_3_0 = (Assignment)cGroup_3.eContents().get(0); |
| private final RuleCall cOwnedPartsDictLiteralPartCSParserRuleCall_3_0_0 = (RuleCall)cOwnedPartsAssignment_3_0.eContents().get(0); |
| private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1); |
| private final Keyword cCommaKeyword_3_1_0 = (Keyword)cGroup_3_1.eContents().get(0); |
| private final Assignment cOwnedPartsAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1); |
| private final RuleCall cOwnedPartsDictLiteralPartCSParserRuleCall_3_1_1_0 = (RuleCall)cOwnedPartsAssignment_3_1_1.eContents().get(0); |
| private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4); |
| |
| //DictLiteralExpCS: |
| // "Dict" "{" {DictLiteralExpCS} (ownedParts+=DictLiteralPartCS ("," ownedParts+=DictLiteralPartCS)*)? "}"; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //"Dict" "{" {DictLiteralExpCS} (ownedParts+=DictLiteralPartCS ("," ownedParts+=DictLiteralPartCS)*)? "}" |
| public Group getGroup() { return cGroup; } |
| |
| //"Dict" |
| public Keyword getDictKeyword_0() { return cDictKeyword_0; } |
| |
| //"{" |
| public Keyword getLeftCurlyBracketKeyword_1() { return cLeftCurlyBracketKeyword_1; } |
| |
| //{DictLiteralExpCS} |
| public Action getDictLiteralExpCSAction_2() { return cDictLiteralExpCSAction_2; } |
| |
| //(ownedParts+=DictLiteralPartCS ("," ownedParts+=DictLiteralPartCS)*)? |
| public Group getGroup_3() { return cGroup_3; } |
| |
| //ownedParts+=DictLiteralPartCS |
| public Assignment getOwnedPartsAssignment_3_0() { return cOwnedPartsAssignment_3_0; } |
| |
| //DictLiteralPartCS |
| public RuleCall getOwnedPartsDictLiteralPartCSParserRuleCall_3_0_0() { return cOwnedPartsDictLiteralPartCSParserRuleCall_3_0_0; } |
| |
| //("," ownedParts+=DictLiteralPartCS)* |
| public Group getGroup_3_1() { return cGroup_3_1; } |
| |
| //"," |
| public Keyword getCommaKeyword_3_1_0() { return cCommaKeyword_3_1_0; } |
| |
| //ownedParts+=DictLiteralPartCS |
| public Assignment getOwnedPartsAssignment_3_1_1() { return cOwnedPartsAssignment_3_1_1; } |
| |
| //DictLiteralPartCS |
| public RuleCall getOwnedPartsDictLiteralPartCSParserRuleCall_3_1_1_0() { return cOwnedPartsDictLiteralPartCSParserRuleCall_3_1_1_0; } |
| |
| //"}" |
| public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; } |
| } |
| |
| public class DictLiteralPartCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DictLiteralPartCS"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Assignment cKeyAssignment_0 = (Assignment)cGroup.eContents().get(0); |
| private final RuleCall cKeyPrimitiveLiteralExpCSParserRuleCall_0_0 = (RuleCall)cKeyAssignment_0.eContents().get(0); |
| private final Keyword cEqualsSignKeyword_1 = (Keyword)cGroup.eContents().get(1); |
| private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); |
| private final RuleCall cValueExpCSParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); |
| |
| //DictLiteralPartCS: |
| // key=PrimitiveLiteralExpCS "=" value=ExpCS; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //key=PrimitiveLiteralExpCS "=" value=ExpCS |
| public Group getGroup() { return cGroup; } |
| |
| //key=PrimitiveLiteralExpCS |
| public Assignment getKeyAssignment_0() { return cKeyAssignment_0; } |
| |
| //PrimitiveLiteralExpCS |
| public RuleCall getKeyPrimitiveLiteralExpCSParserRuleCall_0_0() { return cKeyPrimitiveLiteralExpCSParserRuleCall_0_0; } |
| |
| //"=" |
| public Keyword getEqualsSignKeyword_1() { return cEqualsSignKeyword_1; } |
| |
| //value=ExpCS |
| public Assignment getValueAssignment_2() { return cValueAssignment_2; } |
| |
| //ExpCS |
| public RuleCall getValueExpCSParserRuleCall_2_0() { return cValueExpCSParserRuleCall_2_0; } |
| } |
| |
| public class ReturnExpCSElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ReturnExpCS"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cReturnKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Action cReturnExpCSAction_1 = (Action)cGroup.eContents().get(1); |
| private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); |
| private final RuleCall cValueExpCSParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); |
| |
| //ReturnExpCS: |
| // "return" {ReturnExpCS} value=ExpCS?; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //"return" {ReturnExpCS} value=ExpCS? |
| public Group getGroup() { return cGroup; } |
| |
| //"return" |
| public Keyword getReturnKeyword_0() { return cReturnKeyword_0; } |
| |
| //{ReturnExpCS} |
| public Action getReturnExpCSAction_1() { return cReturnExpCSAction_1; } |
| |
| //value=ExpCS? |
| public Assignment getValueAssignment_2() { return cValueAssignment_2; } |
| |
| //ExpCS |
| public RuleCall getValueExpCSParserRuleCall_2_0() { return cValueExpCSParserRuleCall_2_0; } |
| } |
| |
| |
| private final GrammmarCSElements pGrammmarCS; |
| private final TerminalRule tACCESS_OP; |
| private final TerminalRule tASSIGN_OP; |
| private final TerminalRule tCMP_OP; |
| private final TerminalRule tMULT_OP; |
| private final TerminalRule tMULTI_ITERATOR_OP; |
| private final TerminalRule tRESOLVE_IN_KIND; |
| private final TerminalRule tRESOLVE_KIND; |
| private final TerminalRule tSIMPLE_ITERATOR_OP; |
| private final TerminalRule tUNARY_OP; |
| private final ImperativeOCLReservedKeywordElements pImperativeOCLReservedKeyword; |
| private final ImperativeOCLPrefixOperatorElements pImperativeOCLPrefixOperator; |
| private final ImperativeOCLInfixOperatorElements pImperativeOCLInfixOperator; |
| private final ImperativeOCLNavigationOperatorElements pImperativeOCLNavigationOperator; |
| private final ImperativeOCLExpCSElements pImperativeOCLExpCS; |
| private final TypeLiteralCSElements pTypeLiteralCS; |
| private final ListTypeCSElements pListTypeCS; |
| private final DictTypeCSElements pDictTypeCS; |
| private final PrimaryExpCSElements pPrimaryExpCS; |
| private final ListLiteralExpCSElements pListLiteralExpCS; |
| private final DictLiteralExpCSElements pDictLiteralExpCS; |
| private final DictLiteralPartCSElements pDictLiteralPartCS; |
| private final ReturnExpCSElements pReturnExpCS; |
| |
| private final Grammar grammar; |
| |
| private final EssentialOCLGrammarAccess gaEssentialOCL; |
| |
| @Inject |
| public ImperativeOCLGrammarAccess(GrammarProvider grammarProvider, |
| EssentialOCLGrammarAccess gaEssentialOCL) { |
| this.grammar = internalFindGrammar(grammarProvider); |
| this.gaEssentialOCL = gaEssentialOCL; |
| this.pGrammmarCS = new GrammmarCSElements(); |
| this.tACCESS_OP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ACCESS_OP"); |
| this.tASSIGN_OP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ASSIGN_OP"); |
| this.tCMP_OP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "CMP_OP"); |
| this.tMULT_OP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "MULT_OP"); |
| this.tMULTI_ITERATOR_OP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "MULTI_ITERATOR_OP"); |
| this.tRESOLVE_IN_KIND = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "RESOLVE_IN_KIND"); |
| this.tRESOLVE_KIND = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "RESOLVE_KIND"); |
| this.tSIMPLE_ITERATOR_OP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "SIMPLE_ITERATOR_OP"); |
| this.tUNARY_OP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "UNARY_OP"); |
| this.pImperativeOCLReservedKeyword = new ImperativeOCLReservedKeywordElements(); |
| this.pImperativeOCLPrefixOperator = new ImperativeOCLPrefixOperatorElements(); |
| this.pImperativeOCLInfixOperator = new ImperativeOCLInfixOperatorElements(); |
| this.pImperativeOCLNavigationOperator = new ImperativeOCLNavigationOperatorElements(); |
| this.pImperativeOCLExpCS = new ImperativeOCLExpCSElements(); |
| this.pTypeLiteralCS = new TypeLiteralCSElements(); |
| this.pListTypeCS = new ListTypeCSElements(); |
| this.pDictTypeCS = new DictTypeCSElements(); |
| this.pPrimaryExpCS = new PrimaryExpCSElements(); |
| this.pListLiteralExpCS = new ListLiteralExpCSElements(); |
| this.pDictLiteralExpCS = new DictLiteralExpCSElements(); |
| this.pDictLiteralPartCS = new DictLiteralPartCSElements(); |
| this.pReturnExpCS = new ReturnExpCSElements(); |
| } |
| |
| protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { |
| Grammar grammar = grammarProvider.getGrammar(this); |
| while (grammar != null) { |
| if ("org.eclipse.qvto.examples.xtext.imperativeocl.ImperativeOCL".equals(grammar.getName())) { |
| return grammar; |
| } |
| List<Grammar> grammars = grammar.getUsedGrammars(); |
| if (!grammars.isEmpty()) { |
| grammar = grammars.iterator().next(); |
| } else { |
| return null; |
| } |
| } |
| return grammar; |
| } |
| |
| @Override |
| public Grammar getGrammar() { |
| return grammar; |
| } |
| |
| |
| public EssentialOCLGrammarAccess getEssentialOCLGrammarAccess() { |
| return gaEssentialOCL; |
| } |
| |
| |
| //GrammmarCS returns essentialocl::ExpCS: |
| // ImperativeOCLExpCS; |
| public GrammmarCSElements getGrammmarCSAccess() { |
| return pGrammmarCS; |
| } |
| |
| public ParserRule getGrammmarCSRule() { |
| return getGrammmarCSAccess().getRule(); |
| } |
| |
| //terminal ACCESS_OP: |
| // "." | "->" | "!->"; |
| public TerminalRule getACCESS_OPRule() { |
| return tACCESS_OP; |
| } |
| |
| //// terminal ADD_OP: '+' | '-'; |
| //terminal ASSIGN_OP: |
| // ":=" | "::=" | "+=" | "-="; |
| public TerminalRule getASSIGN_OPRule() { |
| return tASSIGN_OP; |
| } |
| |
| //terminal CMP_OP: |
| // "=" | "==" | "<>" | "<" | ">" | "<=" | ">="; |
| public TerminalRule getCMP_OPRule() { |
| return tCMP_OP; |
| } |
| |
| //terminal MULT_OP: |
| // "*" | "/" | "%"; |
| public TerminalRule getMULT_OPRule() { |
| return tMULT_OP; |
| } |
| |
| //terminal MULTI_ITERATOR_OP: |
| // "forAll"; |
| public TerminalRule getMULTI_ITERATOR_OPRule() { |
| return tMULTI_ITERATOR_OP; |
| } |
| |
| //// terminal OR_OP: 'or' | 'xor'; |
| //terminal RESOLVE_IN_KIND: |
| // "resolveIn" | "resolveoneIn" | "invresolveIn" | "invresolveoneIn"; |
| public TerminalRule getRESOLVE_IN_KINDRule() { |
| return tRESOLVE_IN_KIND; |
| } |
| |
| //terminal RESOLVE_KIND: |
| // "resolve" | "resolveone" | "invresolve" | "invresolveone"; |
| public TerminalRule getRESOLVE_KINDRule() { |
| return tRESOLVE_KIND; |
| } |
| |
| //terminal SIMPLE_ITERATOR_OP: |
| // "reject" | "select" | "collect" | "exists" | "one" | "any" | "isUnique" | "collectNested" | "sortedBy" | "xselect" | |
| // "xcollect" | "selectOne" | "collectOne" | "collectselect" | "collectselectOne"; |
| public TerminalRule getSIMPLE_ITERATOR_OPRule() { |
| return tSIMPLE_ITERATOR_OP; |
| } |
| |
| //terminal UNARY_OP: |
| // "-" | "not" | "#" | "##" | "*"; |
| public TerminalRule getUNARY_OPRule() { |
| return tUNARY_OP; |
| } |
| |
| //ImperativeOCLReservedKeyword: |
| // "default" | "elif" | RESOLVE_KIND | RESOLVE_IN_KIND; |
| public ImperativeOCLReservedKeywordElements getImperativeOCLReservedKeywordAccess() { |
| return pImperativeOCLReservedKeyword; |
| } |
| |
| public ParserRule getImperativeOCLReservedKeywordRule() { |
| return getImperativeOCLReservedKeywordAccess().getRule(); |
| } |
| |
| //ImperativeOCLPrefixOperator: |
| // "#" | "##" | "*"; |
| public ImperativeOCLPrefixOperatorElements getImperativeOCLPrefixOperatorAccess() { |
| return pImperativeOCLPrefixOperator; |
| } |
| |
| public ParserRule getImperativeOCLPrefixOperatorRule() { |
| return getImperativeOCLPrefixOperatorAccess().getRule(); |
| } |
| |
| //ImperativeOCLInfixOperator: |
| // ASSIGN_OP | "default" | "=="; |
| public ImperativeOCLInfixOperatorElements getImperativeOCLInfixOperatorAccess() { |
| return pImperativeOCLInfixOperator; |
| } |
| |
| public ParserRule getImperativeOCLInfixOperatorRule() { |
| return getImperativeOCLInfixOperatorAccess().getRule(); |
| } |
| |
| //ImperativeOCLNavigationOperator: |
| // "!->"; |
| public ImperativeOCLNavigationOperatorElements getImperativeOCLNavigationOperatorAccess() { |
| return pImperativeOCLNavigationOperator; |
| } |
| |
| public ParserRule getImperativeOCLNavigationOperatorRule() { |
| return getImperativeOCLNavigationOperatorAccess().getRule(); |
| } |
| |
| ////PrefixOperator: |
| //// EssentialOCLPrefixOperator | QVToPrefixOperator; |
| //// |
| ////InfixOperator: |
| //// EssentialOCLInfixOperator | QVToInfixOperator; |
| //// |
| ////NavigationOperator: |
| //// EssentialOCLNavigationOperator | QVToNavigationOperator; |
| //ImperativeOCLExpCS returns essentialocl::ExpCS: |
| // ExpCS; |
| public ImperativeOCLExpCSElements getImperativeOCLExpCSAccess() { |
| return pImperativeOCLExpCS; |
| } |
| |
| public ParserRule getImperativeOCLExpCSRule() { |
| return getImperativeOCLExpCSAccess().getRule(); |
| } |
| |
| //// ********* ImperativeOCL Types ********* |
| //// TypeLiteralCS redefined to include the new List and Dict types |
| //// FIXME refactor its definition in EssentialOCL to allow extension |
| //TypeLiteralCS returns base::TypedRefCS: |
| // PrimitiveTypeCS | CollectionTypeCS | MapTypeCS | TupleTypeCS | ListTypeCS | DictTypeCS; |
| public TypeLiteralCSElements getTypeLiteralCSAccess() { |
| return pTypeLiteralCS; |
| } |
| |
| public ParserRule getTypeLiteralCSRule() { |
| return getTypeLiteralCSAccess().getRule(); |
| } |
| |
| //ListTypeCS: |
| // "List" "(" type=TypeExpCS ")"; |
| public ListTypeCSElements getListTypeCSAccess() { |
| return pListTypeCS; |
| } |
| |
| public ParserRule getListTypeCSRule() { |
| return getListTypeCSAccess().getRule(); |
| } |
| |
| //DictTypeCS: |
| // "Dict" "(" keyType=TypeExpCS "," valueType=TypeExpCS ")"; |
| public DictTypeCSElements getDictTypeCSAccess() { |
| return pDictTypeCS; |
| } |
| |
| public ParserRule getDictTypeCSRule() { |
| return getDictTypeCSAccess().getRule(); |
| } |
| |
| //// ********* ImperativeOCL Expressions ********* |
| //// PrimaryExpCS redefined to include the new List and Dict literal expressions |
| //// FIXME refactor its definition in EssentialOCL to allow extension |
| //// These rules are ordered most rejectable first |
| //PrimaryExpCS returns essentialocl::ExpCS: |
| // NestedExpCS | IfExpCS | SelfExpCS | PrimitiveLiteralExpCS | TupleLiteralExpCS | MapLiteralExpCS | |
| // CollectionLiteralExpCS | LambdaLiteralExpCS | ListLiteralExpCS | DictLiteralExpCS | TypeLiteralExpCS | ReturnExpCS | |
| // NameExpCS; |
| public PrimaryExpCSElements getPrimaryExpCSAccess() { |
| return pPrimaryExpCS; |
| } |
| |
| public ParserRule getPrimaryExpCSRule() { |
| return getPrimaryExpCSAccess().getRule(); |
| } |
| |
| //ListLiteralExpCS: |
| // "List" "{" {ListLiteralExpCS} (ownedParts+=CollectionLiteralPartCS ("," ownedParts+=CollectionLiteralPartCS)*)? "}"; |
| public ListLiteralExpCSElements getListLiteralExpCSAccess() { |
| return pListLiteralExpCS; |
| } |
| |
| public ParserRule getListLiteralExpCSRule() { |
| return getListLiteralExpCSAccess().getRule(); |
| } |
| |
| //DictLiteralExpCS: |
| // "Dict" "{" {DictLiteralExpCS} (ownedParts+=DictLiteralPartCS ("," ownedParts+=DictLiteralPartCS)*)? "}"; |
| public DictLiteralExpCSElements getDictLiteralExpCSAccess() { |
| return pDictLiteralExpCS; |
| } |
| |
| public ParserRule getDictLiteralExpCSRule() { |
| return getDictLiteralExpCSAccess().getRule(); |
| } |
| |
| //DictLiteralPartCS: |
| // key=PrimitiveLiteralExpCS "=" value=ExpCS; |
| public DictLiteralPartCSElements getDictLiteralPartCSAccess() { |
| return pDictLiteralPartCS; |
| } |
| |
| public ParserRule getDictLiteralPartCSRule() { |
| return getDictLiteralPartCSAccess().getRule(); |
| } |
| |
| //ReturnExpCS: |
| // "return" {ReturnExpCS} value=ExpCS?; |
| public ReturnExpCSElements getReturnExpCSAccess() { |
| return pReturnExpCS; |
| } |
| |
| public ParserRule getReturnExpCSRule() { |
| return getReturnExpCSAccess().getRule(); |
| } |
| |
| ////generate essentialOCLCST "http://www.eclipse.org/ocl/3.0.0/EssentialOCLCST" |
| // Model returns ContextCS: |
| // ownedExpression=ExpCS; |
| public EssentialOCLGrammarAccess.ModelElements getModelAccess() { |
| return gaEssentialOCL.getModelAccess(); |
| } |
| |
| public ParserRule getModelRule() { |
| return getModelAccess().getRule(); |
| } |
| |
| /// ** <<<This is a join point for derived grammars - replace with a more disciplined grammar extensibility>>> * / |
| //EssentialOCLReservedKeyword: |
| // "and" | "else" | "endif" | "if" | "implies" | "in" | "let" | "not" | "or" | "then" | "xor"; |
| public EssentialOCLGrammarAccess.EssentialOCLReservedKeywordElements getEssentialOCLReservedKeywordAccess() { |
| return gaEssentialOCL.getEssentialOCLReservedKeywordAccess(); |
| } |
| |
| public ParserRule getEssentialOCLReservedKeywordRule() { |
| return getEssentialOCLReservedKeywordAccess().getRule(); |
| } |
| |
| /// ** <<<This is a join point for derived grammars - replace with a more disciplined grammar extensibility>>> * / |
| //EssentialOCLUnaryOperatorName: |
| // "-" | "not"; |
| public EssentialOCLGrammarAccess.EssentialOCLUnaryOperatorNameElements getEssentialOCLUnaryOperatorNameAccess() { |
| return gaEssentialOCL.getEssentialOCLUnaryOperatorNameAccess(); |
| } |
| |
| public ParserRule getEssentialOCLUnaryOperatorNameRule() { |
| return getEssentialOCLUnaryOperatorNameAccess().getRule(); |
| } |
| |
| /// ** <<<This is a join point for derived grammars - replace with a more disciplined grammar extensibility>>> * / |
| //EssentialOCLInfixOperatorName: |
| // "*" | "/" | "+" | "-" | ">" | "<" | ">=" | "<=" | "=" | "<>" | "and" | "or" | "xor" | "implies"; |
| public EssentialOCLGrammarAccess.EssentialOCLInfixOperatorNameElements getEssentialOCLInfixOperatorNameAccess() { |
| return gaEssentialOCL.getEssentialOCLInfixOperatorNameAccess(); |
| } |
| |
| public ParserRule getEssentialOCLInfixOperatorNameRule() { |
| return getEssentialOCLInfixOperatorNameAccess().getRule(); |
| } |
| |
| /// ** <<<This is a join point for derived grammars - replace with a more disciplined grammar extensibility>>> * / |
| //EssentialOCLNavigationOperatorName: |
| // "." | "->" | "?." | "?->"; |
| public EssentialOCLGrammarAccess.EssentialOCLNavigationOperatorNameElements getEssentialOCLNavigationOperatorNameAccess() { |
| return gaEssentialOCL.getEssentialOCLNavigationOperatorNameAccess(); |
| } |
| |
| public ParserRule getEssentialOCLNavigationOperatorNameRule() { |
| return getEssentialOCLNavigationOperatorNameAccess().getRule(); |
| } |
| |
| //BinaryOperatorName: |
| // InfixOperatorName | NavigationOperatorName; |
| public EssentialOCLGrammarAccess.BinaryOperatorNameElements getBinaryOperatorNameAccess() { |
| return gaEssentialOCL.getBinaryOperatorNameAccess(); |
| } |
| |
| public ParserRule getBinaryOperatorNameRule() { |
| return getBinaryOperatorNameAccess().getRule(); |
| } |
| |
| //// Intended to be overrideable |
| // InfixOperatorName: |
| // EssentialOCLInfixOperatorName; |
| public EssentialOCLGrammarAccess.InfixOperatorNameElements getInfixOperatorNameAccess() { |
| return gaEssentialOCL.getInfixOperatorNameAccess(); |
| } |
| |
| public ParserRule getInfixOperatorNameRule() { |
| return getInfixOperatorNameAccess().getRule(); |
| } |
| |
| //// Intended to be overrideable |
| // NavigationOperatorName: |
| // EssentialOCLNavigationOperatorName; |
| public EssentialOCLGrammarAccess.NavigationOperatorNameElements getNavigationOperatorNameAccess() { |
| return gaEssentialOCL.getNavigationOperatorNameAccess(); |
| } |
| |
| public ParserRule getNavigationOperatorNameRule() { |
| return getNavigationOperatorNameAccess().getRule(); |
| } |
| |
| //// Intended to be overrideable |
| // UnaryOperatorName: |
| // EssentialOCLUnaryOperatorName; |
| public EssentialOCLGrammarAccess.UnaryOperatorNameElements getUnaryOperatorNameAccess() { |
| return gaEssentialOCL.getUnaryOperatorNameAccess(); |
| } |
| |
| public ParserRule getUnaryOperatorNameRule() { |
| return getUnaryOperatorNameAccess().getRule(); |
| } |
| |
| ////--------------------------------------------------------------------- |
| // // Names |
| // |
| ////--------------------------------------------------------------------- |
| // |
| /// ** <<<This is a join point for derived grammars - replace with a more disciplined grammar extensibility>>> * / |
| //EssentialOCLUnrestrictedName returns ecore::EString: |
| // Identifier; |
| public EssentialOCLGrammarAccess.EssentialOCLUnrestrictedNameElements getEssentialOCLUnrestrictedNameAccess() { |
| return gaEssentialOCL.getEssentialOCLUnrestrictedNameAccess(); |
| } |
| |
| public ParserRule getEssentialOCLUnrestrictedNameRule() { |
| return getEssentialOCLUnrestrictedNameAccess().getRule(); |
| } |
| |
| //// Intended to be overridden |
| // UnrestrictedName returns ecore::EString: |
| // EssentialOCLUnrestrictedName; |
| public EssentialOCLGrammarAccess.UnrestrictedNameElements getUnrestrictedNameAccess() { |
| return gaEssentialOCL.getUnrestrictedNameAccess(); |
| } |
| |
| public ParserRule getUnrestrictedNameRule() { |
| return getUnrestrictedNameAccess().getRule(); |
| } |
| |
| /// ** <<<This is a join point for derived grammars - replace with a more disciplined grammar extensibility>>> * / |
| //EssentialOCLUnreservedName returns ecore::EString: |
| // UnrestrictedName | CollectionTypeIdentifier | PrimitiveTypeIdentifier | "Map" | "Tuple"; |
| public EssentialOCLGrammarAccess.EssentialOCLUnreservedNameElements getEssentialOCLUnreservedNameAccess() { |
| return gaEssentialOCL.getEssentialOCLUnreservedNameAccess(); |
| } |
| |
| public ParserRule getEssentialOCLUnreservedNameRule() { |
| return getEssentialOCLUnreservedNameAccess().getRule(); |
| } |
| |
| //// Intended to be overridden |
| // UnreservedName returns ecore::EString: |
| // EssentialOCLUnreservedName; |
| public EssentialOCLGrammarAccess.UnreservedNameElements getUnreservedNameAccess() { |
| return gaEssentialOCL.getUnreservedNameAccess(); |
| } |
| |
| public ParserRule getUnreservedNameRule() { |
| return getUnreservedNameAccess().getRule(); |
| } |
| |
| //URIPathNameCS returns base::PathNameCS: |
| // ownedPathElements+=URIFirstPathElementCS ("::" ownedPathElements+=NextPathElementCS)*; |
| public EssentialOCLGrammarAccess.URIPathNameCSElements getURIPathNameCSAccess() { |
| return gaEssentialOCL.getURIPathNameCSAccess(); |
| } |
| |
| public ParserRule getURIPathNameCSRule() { |
| return getURIPathNameCSAccess().getRule(); |
| } |
| |
| //URIFirstPathElementCS returns base::PathElementCS: |
| // referredElement=[pivot::NamedElement|UnrestrictedName] | {base::PathElementWithURICS} |
| // referredElement=[pivot::Namespace|URI]; |
| public EssentialOCLGrammarAccess.URIFirstPathElementCSElements getURIFirstPathElementCSAccess() { |
| return gaEssentialOCL.getURIFirstPathElementCSAccess(); |
| } |
| |
| public ParserRule getURIFirstPathElementCSRule() { |
| return getURIFirstPathElementCSAccess().getRule(); |
| } |
| |
| ////--------------------------------------------------------------------- |
| // // Types |
| // |
| ////--------------------------------------------------------------------- |
| // PrimitiveTypeIdentifier: |
| // "Boolean" | "Integer" | "Real" | "String" | "UnlimitedNatural" | "OclAny" | "OclInvalid" | "OclVoid"; |
| public EssentialOCLGrammarAccess.PrimitiveTypeIdentifierElements getPrimitiveTypeIdentifierAccess() { |
| return gaEssentialOCL.getPrimitiveTypeIdentifierAccess(); |
| } |
| |
| public ParserRule getPrimitiveTypeIdentifierRule() { |
| return getPrimitiveTypeIdentifierAccess().getRule(); |
| } |
| |
| //PrimitiveTypeCS returns base::PrimitiveTypeRefCS: |
| // name=PrimitiveTypeIdentifier; |
| public EssentialOCLGrammarAccess.PrimitiveTypeCSElements getPrimitiveTypeCSAccess() { |
| return gaEssentialOCL.getPrimitiveTypeCSAccess(); |
| } |
| |
| public ParserRule getPrimitiveTypeCSRule() { |
| return getPrimitiveTypeCSAccess().getRule(); |
| } |
| |
| //CollectionTypeIdentifier returns ecore::EString: |
| // "Set" | "Bag" | "Sequence" | "Collection" | "OrderedSet"; |
| public EssentialOCLGrammarAccess.CollectionTypeIdentifierElements getCollectionTypeIdentifierAccess() { |
| return gaEssentialOCL.getCollectionTypeIdentifierAccess(); |
| } |
| |
| public ParserRule getCollectionTypeIdentifierRule() { |
| return getCollectionTypeIdentifierAccess().getRule(); |
| } |
| |
| //CollectionTypeCS: |
| // name=CollectionTypeIdentifier ("(" ownedType=TypeExpCS ")")?; |
| public EssentialOCLGrammarAccess.CollectionTypeCSElements getCollectionTypeCSAccess() { |
| return gaEssentialOCL.getCollectionTypeCSAccess(); |
| } |
| |
| public ParserRule getCollectionTypeCSRule() { |
| return getCollectionTypeCSAccess().getRule(); |
| } |
| |
| //MapTypeCS: |
| // name="Map" ("(" ownedKeyType=TypeExpCS "," ownedValueType=TypeExpCS ")")?; |
| public EssentialOCLGrammarAccess.MapTypeCSElements getMapTypeCSAccess() { |
| return gaEssentialOCL.getMapTypeCSAccess(); |
| } |
| |
| public ParserRule getMapTypeCSRule() { |
| return getMapTypeCSAccess().getRule(); |
| } |
| |
| //TupleTypeCS returns base::TupleTypeCS: |
| // name="Tuple" ("(" (ownedParts+=TuplePartCS ("," ownedParts+=TuplePartCS)*)? ")")?; |
| public EssentialOCLGrammarAccess.TupleTypeCSElements getTupleTypeCSAccess() { |
| return gaEssentialOCL.getTupleTypeCSAccess(); |
| } |
| |
| public ParserRule getTupleTypeCSRule() { |
| return getTupleTypeCSAccess().getRule(); |
| } |
| |
| //TuplePartCS returns base::TuplePartCS: |
| // name=UnrestrictedName ":" ownedType=TypeExpCS; |
| public EssentialOCLGrammarAccess.TuplePartCSElements getTuplePartCSAccess() { |
| return gaEssentialOCL.getTuplePartCSAccess(); |
| } |
| |
| public ParserRule getTuplePartCSRule() { |
| return getTuplePartCSAccess().getRule(); |
| } |
| |
| ////--------------------------------------------------------------------- |
| // // Literals |
| // |
| ////--------------------------------------------------------------------- |
| // CollectionLiteralExpCS: |
| // ownedType=CollectionTypeCS "{" (ownedParts+=CollectionLiteralPartCS ("," ownedParts+=CollectionLiteralPartCS)*)? "}"; |
| public EssentialOCLGrammarAccess.CollectionLiteralExpCSElements getCollectionLiteralExpCSAccess() { |
| return gaEssentialOCL.getCollectionLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getCollectionLiteralExpCSRule() { |
| return getCollectionLiteralExpCSAccess().getRule(); |
| } |
| |
| //CollectionLiteralPartCS: |
| // ownedExpression=ExpCS (".." ownedLastExpression=ExpCS)? | ownedExpression=PatternExpCS; |
| public EssentialOCLGrammarAccess.CollectionLiteralPartCSElements getCollectionLiteralPartCSAccess() { |
| return gaEssentialOCL.getCollectionLiteralPartCSAccess(); |
| } |
| |
| public ParserRule getCollectionLiteralPartCSRule() { |
| return getCollectionLiteralPartCSAccess().getRule(); |
| } |
| |
| //CollectionPatternCS: |
| // ownedType=CollectionTypeCS "{" (ownedParts+=PatternExpCS ("," ownedParts+=PatternExpCS)* ("++" |
| // restVariableName=Identifier))? "}"; |
| public EssentialOCLGrammarAccess.CollectionPatternCSElements getCollectionPatternCSAccess() { |
| return gaEssentialOCL.getCollectionPatternCSAccess(); |
| } |
| |
| public ParserRule getCollectionPatternCSRule() { |
| return getCollectionPatternCSAccess().getRule(); |
| } |
| |
| //// PatternPartCS |
| // ShadowPartCS: |
| // referredProperty=[pivot::Property|UnrestrictedName] "=" ownedInitExpression=(ExpCS | PatternExpCS); |
| public EssentialOCLGrammarAccess.ShadowPartCSElements getShadowPartCSAccess() { |
| return gaEssentialOCL.getShadowPartCSAccess(); |
| } |
| |
| public ParserRule getShadowPartCSRule() { |
| return getShadowPartCSAccess().getRule(); |
| } |
| |
| //PatternExpCS: |
| // patternVariableName=UnrestrictedName? ":" ownedPatternType=TypeExpCS; |
| public EssentialOCLGrammarAccess.PatternExpCSElements getPatternExpCSAccess() { |
| return gaEssentialOCL.getPatternExpCSAccess(); |
| } |
| |
| public ParserRule getPatternExpCSRule() { |
| return getPatternExpCSAccess().getRule(); |
| } |
| |
| //LambdaLiteralExpCS: |
| // "Lambda" "{" ownedExpressionCS=ExpCS "}"; |
| public EssentialOCLGrammarAccess.LambdaLiteralExpCSElements getLambdaLiteralExpCSAccess() { |
| return gaEssentialOCL.getLambdaLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getLambdaLiteralExpCSRule() { |
| return getLambdaLiteralExpCSAccess().getRule(); |
| } |
| |
| //MapLiteralExpCS: |
| // ownedType=MapTypeCS "{" (ownedParts+=MapLiteralPartCS ("," ownedParts+=MapLiteralPartCS)*)? "}"; |
| public EssentialOCLGrammarAccess.MapLiteralExpCSElements getMapLiteralExpCSAccess() { |
| return gaEssentialOCL.getMapLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getMapLiteralExpCSRule() { |
| return getMapLiteralExpCSAccess().getRule(); |
| } |
| |
| //MapLiteralPartCS: |
| // ownedKey=ExpCS "<-" ownedValue=ExpCS; |
| public EssentialOCLGrammarAccess.MapLiteralPartCSElements getMapLiteralPartCSAccess() { |
| return gaEssentialOCL.getMapLiteralPartCSAccess(); |
| } |
| |
| public ParserRule getMapLiteralPartCSRule() { |
| return getMapLiteralPartCSAccess().getRule(); |
| } |
| |
| //PrimitiveLiteralExpCS: |
| // NumberLiteralExpCS | StringLiteralExpCS | BooleanLiteralExpCS | UnlimitedNaturalLiteralExpCS | InvalidLiteralExpCS | |
| // NullLiteralExpCS; |
| public EssentialOCLGrammarAccess.PrimitiveLiteralExpCSElements getPrimitiveLiteralExpCSAccess() { |
| return gaEssentialOCL.getPrimitiveLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getPrimitiveLiteralExpCSRule() { |
| return getPrimitiveLiteralExpCSAccess().getRule(); |
| } |
| |
| //TupleLiteralExpCS: |
| // "Tuple" "{" ownedParts+=TupleLiteralPartCS ("," ownedParts+=TupleLiteralPartCS)* "}"; |
| public EssentialOCLGrammarAccess.TupleLiteralExpCSElements getTupleLiteralExpCSAccess() { |
| return gaEssentialOCL.getTupleLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getTupleLiteralExpCSRule() { |
| return getTupleLiteralExpCSAccess().getRule(); |
| } |
| |
| //TupleLiteralPartCS: |
| // name=UnrestrictedName (":" ownedType=TypeExpCS)? "=" ownedInitExpression=ExpCS; |
| public EssentialOCLGrammarAccess.TupleLiteralPartCSElements getTupleLiteralPartCSAccess() { |
| return gaEssentialOCL.getTupleLiteralPartCSAccess(); |
| } |
| |
| public ParserRule getTupleLiteralPartCSRule() { |
| return getTupleLiteralPartCSAccess().getRule(); |
| } |
| |
| //NumberLiteralExpCS: |
| // symbol=NUMBER_LITERAL; |
| public EssentialOCLGrammarAccess.NumberLiteralExpCSElements getNumberLiteralExpCSAccess() { |
| return gaEssentialOCL.getNumberLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getNumberLiteralExpCSRule() { |
| return getNumberLiteralExpCSAccess().getRule(); |
| } |
| |
| //StringLiteralExpCS: |
| // segments+=StringLiteral+; |
| public EssentialOCLGrammarAccess.StringLiteralExpCSElements getStringLiteralExpCSAccess() { |
| return gaEssentialOCL.getStringLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getStringLiteralExpCSRule() { |
| return getStringLiteralExpCSAccess().getRule(); |
| } |
| |
| //BooleanLiteralExpCS: |
| // symbol="true" | symbol="false"; |
| public EssentialOCLGrammarAccess.BooleanLiteralExpCSElements getBooleanLiteralExpCSAccess() { |
| return gaEssentialOCL.getBooleanLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getBooleanLiteralExpCSRule() { |
| return getBooleanLiteralExpCSAccess().getRule(); |
| } |
| |
| //UnlimitedNaturalLiteralExpCS: |
| // {UnlimitedNaturalLiteralExpCS} "*"; |
| public EssentialOCLGrammarAccess.UnlimitedNaturalLiteralExpCSElements getUnlimitedNaturalLiteralExpCSAccess() { |
| return gaEssentialOCL.getUnlimitedNaturalLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getUnlimitedNaturalLiteralExpCSRule() { |
| return getUnlimitedNaturalLiteralExpCSAccess().getRule(); |
| } |
| |
| //InvalidLiteralExpCS: |
| // {InvalidLiteralExpCS} "invalid"; |
| public EssentialOCLGrammarAccess.InvalidLiteralExpCSElements getInvalidLiteralExpCSAccess() { |
| return gaEssentialOCL.getInvalidLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getInvalidLiteralExpCSRule() { |
| return getInvalidLiteralExpCSAccess().getRule(); |
| } |
| |
| //NullLiteralExpCS: |
| // {NullLiteralExpCS} "null"; |
| public EssentialOCLGrammarAccess.NullLiteralExpCSElements getNullLiteralExpCSAccess() { |
| return gaEssentialOCL.getNullLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getNullLiteralExpCSRule() { |
| return getNullLiteralExpCSAccess().getRule(); |
| } |
| |
| //TypeLiteralWithMultiplicityCS returns base::TypedRefCS: |
| // TypeLiteralCS ownedMultiplicity=MultiplicityCS?; |
| public EssentialOCLGrammarAccess.TypeLiteralWithMultiplicityCSElements getTypeLiteralWithMultiplicityCSAccess() { |
| return gaEssentialOCL.getTypeLiteralWithMultiplicityCSAccess(); |
| } |
| |
| public ParserRule getTypeLiteralWithMultiplicityCSRule() { |
| return getTypeLiteralWithMultiplicityCSAccess().getRule(); |
| } |
| |
| //TypeLiteralExpCS: |
| // ownedType=TypeLiteralWithMultiplicityCS; |
| public EssentialOCLGrammarAccess.TypeLiteralExpCSElements getTypeLiteralExpCSAccess() { |
| return gaEssentialOCL.getTypeLiteralExpCSAccess(); |
| } |
| |
| public ParserRule getTypeLiteralExpCSRule() { |
| return getTypeLiteralExpCSAccess().getRule(); |
| } |
| |
| //TypeNameExpCS: |
| // ownedPathName=PathNameCS (ownedCurlyBracketedClause=CurlyBracketedClauseCS ("{" ownedPatternGuard=ExpCS "}")?)?; |
| public EssentialOCLGrammarAccess.TypeNameExpCSElements getTypeNameExpCSAccess() { |
| return gaEssentialOCL.getTypeNameExpCSAccess(); |
| } |
| |
| public ParserRule getTypeNameExpCSRule() { |
| return getTypeNameExpCSAccess().getRule(); |
| } |
| |
| //TypeExpCS returns base::TypedRefCS: |
| // (TypeNameExpCS | TypeLiteralCS | CollectionPatternCS) ownedMultiplicity=MultiplicityCS?; |
| public EssentialOCLGrammarAccess.TypeExpCSElements getTypeExpCSAccess() { |
| return gaEssentialOCL.getTypeExpCSAccess(); |
| } |
| |
| public ParserRule getTypeExpCSRule() { |
| return getTypeExpCSAccess().getRule(); |
| } |
| |
| ////--------------------------------------------------------------------- |
| // // Expressions |
| // |
| ////--------------------------------------------------------------------- |
| // |
| //// An ExpCS permits a LetExpCS only in the final term to ensure |
| // |
| //// that let is right associative, whereas infix operators are left associative. |
| // |
| //// a = 64 / 16 / let b : Integer in 8 / let c : Integer in 4 |
| // // is |
| // |
| //// a = (64 / 16) / (let b : Integer in 8 / (let c : Integer in 4 )) |
| // |
| /// * An expression elaborates a prefixed expression with zero or more binary operator and expression suffixes. |
| // * An optionally prefixed let expression is permitted except when suffixed with further expressions.* / |
| //ExpCS: |
| // PrefixedPrimaryExpCS ({InfixExpCS.ownedLeft=current} name=BinaryOperatorName ownedRight=ExpCS)? |
| // // ({InfixExpCS} ownedSource=PrefixedExpCS name=BinaryOperatorName ownedArgument=ExpCS) |
| // //| PrefixedExpCS |
| // |
| // // the above takes exponential or worse time for backtracking, below is fast |
| // | PrefixedLetExpCS; |
| public EssentialOCLGrammarAccess.ExpCSElements getExpCSAccess() { |
| return gaEssentialOCL.getExpCSAccess(); |
| } |
| |
| public ParserRule getExpCSRule() { |
| return getExpCSAccess().getRule(); |
| } |
| |
| /// * A prefixed let expression elaborates a let expression with zero or more unary prefix operators. * / PrefixedLetExpCS |
| //returns ExpCS: |
| // {PrefixExpCS} name=UnaryOperatorName ownedRight=PrefixedLetExpCS | LetExpCS; |
| public EssentialOCLGrammarAccess.PrefixedLetExpCSElements getPrefixedLetExpCSAccess() { |
| return gaEssentialOCL.getPrefixedLetExpCSAccess(); |
| } |
| |
| public ParserRule getPrefixedLetExpCSRule() { |
| return getPrefixedLetExpCSAccess().getRule(); |
| } |
| |
| /// * A prefixed primary expression elaborates a primary expression with zero or more unary prefix operators. * / |
| //PrefixedPrimaryExpCS returns ExpCS: |
| // {PrefixExpCS} name=UnaryOperatorName ownedRight=PrefixedPrimaryExpCS | PrimaryExpCS; |
| public EssentialOCLGrammarAccess.PrefixedPrimaryExpCSElements getPrefixedPrimaryExpCSAccess() { |
| return gaEssentialOCL.getPrefixedPrimaryExpCSAccess(); |
| } |
| |
| public ParserRule getPrefixedPrimaryExpCSRule() { |
| return getPrefixedPrimaryExpCSAccess().getRule(); |
| } |
| |
| /// * A name expression is a generalised rule for expressions that start with a name and which may be followed by square, round or |
| // * curly bracket clauses and optionally an @pre as well.* / |
| //NameExpCS: |
| // ownedPathName=PathNameCS ownedSquareBracketedClauses+=SquareBracketedClauseCS* |
| // ownedRoundBracketedClause=RoundBracketedClauseCS? ownedCurlyBracketedClause=CurlyBracketedClauseCS? (isPre?="@" |
| // "pre")?; |
| public EssentialOCLGrammarAccess.NameExpCSElements getNameExpCSAccess() { |
| return gaEssentialOCL.getNameExpCSAccess(); |
| } |
| |
| public ParserRule getNameExpCSRule() { |
| return getNameExpCSAccess().getRule(); |
| } |
| |
| /// * A curly bracket clause is a generalized rule for the literal arguments of collections, maps, tuples and shadows.* / |
| //CurlyBracketedClauseCS: |
| // {CurlyBracketedClauseCS} "{" ((ownedParts+=ShadowPartCS ("," ownedParts+=ShadowPartCS)*)? | value=StringLiteral) "}"; |
| public EssentialOCLGrammarAccess.CurlyBracketedClauseCSElements getCurlyBracketedClauseCSAccess() { |
| return gaEssentialOCL.getCurlyBracketedClauseCSAccess(); |
| } |
| |
| public ParserRule getCurlyBracketedClauseCSRule() { |
| return getCurlyBracketedClauseCSAccess().getRule(); |
| } |
| |
| /// * A curly bracket clause is a generalized rule for template specialisations and operations arguments.* / |
| //RoundBracketedClauseCS: |
| // {RoundBracketedClauseCS} "(" (ownedArguments+=NavigatingArgCS ownedArguments+=NavigatingCommaArgCS* |
| // (ownedArguments+=NavigatingSemiArgCS ownedArguments+=NavigatingCommaArgCS*)? (ownedArguments+=NavigatingBarArgCS |
| // ownedArguments+=NavigatingCommaArgCS*)*)? ")"; |
| public EssentialOCLGrammarAccess.RoundBracketedClauseCSElements getRoundBracketedClauseCSAccess() { |
| return gaEssentialOCL.getRoundBracketedClauseCSAccess(); |
| } |
| |
| public ParserRule getRoundBracketedClauseCSRule() { |
| return getRoundBracketedClauseCSAccess().getRule(); |
| } |
| |
| /// * A square bracket clause is a generalized rule for association class qualifiers and roles.* / SquareBracketedClauseCS: |
| // "[" ownedTerms+=ExpCS ("," ownedTerms+=ExpCS)* "]"; |
| public EssentialOCLGrammarAccess.SquareBracketedClauseCSElements getSquareBracketedClauseCSAccess() { |
| return gaEssentialOCL.getSquareBracketedClauseCSAccess(); |
| } |
| |
| public ParserRule getSquareBracketedClauseCSRule() { |
| return getSquareBracketedClauseCSAccess().getRule(); |
| } |
| |
| /// * A navigating argument is a generalized rule for the first argument in a round bracket clause. This is typically the first operation |
| // * parameter or an iterator. * / |
| //// Type-less init is an illegal infix expression |
| // NavigatingArgCS: |
| // ownedNameExpression=NavigatingArgExpCS (":" ownedType=TypeExpCS ("=" ownedInitExpression=ExpCS)? | "in" |
| // ownedInitExpression=ExpCS)? | ":" ownedType=TypeExpCS; |
| public EssentialOCLGrammarAccess.NavigatingArgCSElements getNavigatingArgCSAccess() { |
| return gaEssentialOCL.getNavigatingArgCSAccess(); |
| } |
| |
| public ParserRule getNavigatingArgCSRule() { |
| return getNavigatingArgCSAccess().getRule(); |
| } |
| |
| /// * A navigating bar argument is a generalized rule for a bar-prefixed argument in a round bracket clause. This is typically the body of an iteration. * / |
| //// Type-less init is an illegal infix expression |
| // NavigatingBarArgCS returns NavigatingArgCS: |
| // prefix="|" ownedNameExpression=NavigatingArgExpCS (":" ownedType=TypeExpCS ("=" ownedInitExpression=ExpCS)?)?; |
| public EssentialOCLGrammarAccess.NavigatingBarArgCSElements getNavigatingBarArgCSAccess() { |
| return gaEssentialOCL.getNavigatingBarArgCSAccess(); |
| } |
| |
| public ParserRule getNavigatingBarArgCSRule() { |
| return getNavigatingBarArgCSAccess().getRule(); |
| } |
| |
| /// * A navigating comma argument is a generalized rule for non-first argument in a round bracket clause. These are typically non-first operation |
| // * parameters or a second iterator. * / |
| //// Type-less init is an illegal infix expression |
| // NavigatingCommaArgCS returns NavigatingArgCS: |
| // prefix="," ownedNameExpression=NavigatingArgExpCS (":" ownedType=TypeExpCS ("=" ownedInitExpression=ExpCS)? | "in" |
| // ownedInitExpression=ExpCS)?; |
| public EssentialOCLGrammarAccess.NavigatingCommaArgCSElements getNavigatingCommaArgCSAccess() { |
| return gaEssentialOCL.getNavigatingCommaArgCSAccess(); |
| } |
| |
| public ParserRule getNavigatingCommaArgCSRule() { |
| return getNavigatingCommaArgCSAccess().getRule(); |
| } |
| |
| /// * A navigating semi argument is a generalized rule for a semicolon prefixed argument in a round bracket clause. This is typically an iterate accumulator. * / |
| //// Type-less init is an illegal infix expression |
| // NavigatingSemiArgCS returns NavigatingArgCS: |
| // prefix=";" ownedNameExpression=NavigatingArgExpCS (":" ownedType=TypeExpCS ("=" ownedInitExpression=ExpCS)?)?; |
| public EssentialOCLGrammarAccess.NavigatingSemiArgCSElements getNavigatingSemiArgCSAccess() { |
| return gaEssentialOCL.getNavigatingSemiArgCSAccess(); |
| } |
| |
| public ParserRule getNavigatingSemiArgCSRule() { |
| return getNavigatingSemiArgCSAccess().getRule(); |
| } |
| |
| //// Intended to be overridden |
| // // '?' -- defined by Complete OCL |
| // NavigatingArgExpCS returns ExpCS: |
| // ExpCS; |
| public EssentialOCLGrammarAccess.NavigatingArgExpCSElements getNavigatingArgExpCSAccess() { |
| return gaEssentialOCL.getNavigatingArgExpCSAccess(); |
| } |
| |
| public ParserRule getNavigatingArgExpCSRule() { |
| return getNavigatingArgExpCSAccess().getRule(); |
| } |
| |
| //IfExpCS: |
| // "if" ownedCondition=(ExpCS | PatternExpCS) "then" ownedThenExpression=ExpCS // ifThenExpressions+=IfThenExpCS |
| // |
| // ownedIfThenExpressions+=ElseIfThenExpCS* "else" ownedElseExpression=ExpCS "endif"; |
| public EssentialOCLGrammarAccess.IfExpCSElements getIfExpCSAccess() { |
| return gaEssentialOCL.getIfExpCSAccess(); |
| } |
| |
| public ParserRule getIfExpCSRule() { |
| return getIfExpCSAccess().getRule(); |
| } |
| |
| ////IfThenExpCS returns IfThenExpCS: |
| // // 'if' condition=ExpCS |
| // // 'then' thenExpression=ExpCS |
| // //; |
| // ElseIfThenExpCS |
| //returns IfThenExpCS: |
| // "elseif" ownedCondition=ExpCS "then" ownedThenExpression=ExpCS; |
| public EssentialOCLGrammarAccess.ElseIfThenExpCSElements getElseIfThenExpCSAccess() { |
| return gaEssentialOCL.getElseIfThenExpCSAccess(); |
| } |
| |
| public ParserRule getElseIfThenExpCSRule() { |
| return getElseIfThenExpCSAccess().getRule(); |
| } |
| |
| //LetExpCS: |
| // "let" ownedVariables+=LetVariableCS ("," ownedVariables+=LetVariableCS)* "in" ownedInExpression=ExpCS; |
| public EssentialOCLGrammarAccess.LetExpCSElements getLetExpCSAccess() { |
| return gaEssentialOCL.getLetExpCSAccess(); |
| } |
| |
| public ParserRule getLetExpCSRule() { |
| return getLetExpCSAccess().getRule(); |
| } |
| |
| //LetVariableCS: |
| // name=UnrestrictedName ownedRoundBracketedClause=RoundBracketedClauseCS? (":" ownedType=TypeExpCS)? "=" |
| // ownedInitExpression=ExpCS; |
| public EssentialOCLGrammarAccess.LetVariableCSElements getLetVariableCSAccess() { |
| return gaEssentialOCL.getLetVariableCSAccess(); |
| } |
| |
| public ParserRule getLetVariableCSRule() { |
| return getLetVariableCSAccess().getRule(); |
| } |
| |
| //NestedExpCS: |
| // "(" ownedExpression=ExpCS ")"; |
| public EssentialOCLGrammarAccess.NestedExpCSElements getNestedExpCSAccess() { |
| return gaEssentialOCL.getNestedExpCSAccess(); |
| } |
| |
| public ParserRule getNestedExpCSRule() { |
| return getNestedExpCSAccess().getRule(); |
| } |
| |
| //SelfExpCS: |
| // {SelfExpCS} "self"; |
| public EssentialOCLGrammarAccess.SelfExpCSElements getSelfExpCSAccess() { |
| return gaEssentialOCL.getSelfExpCSAccess(); |
| } |
| |
| public ParserRule getSelfExpCSRule() { |
| return getSelfExpCSAccess().getRule(); |
| } |
| |
| //MultiplicityBoundsCS: |
| // lowerBound=LOWER (".." upperBound=UPPER)?; |
| public BaseGrammarAccess.MultiplicityBoundsCSElements getMultiplicityBoundsCSAccess() { |
| return gaEssentialOCL.getMultiplicityBoundsCSAccess(); |
| } |
| |
| public ParserRule getMultiplicityBoundsCSRule() { |
| return getMultiplicityBoundsCSAccess().getRule(); |
| } |
| |
| //MultiplicityCS: |
| // "[" (MultiplicityBoundsCS | MultiplicityStringCS) "]"; |
| public BaseGrammarAccess.MultiplicityCSElements getMultiplicityCSAccess() { |
| return gaEssentialOCL.getMultiplicityCSAccess(); |
| } |
| |
| public ParserRule getMultiplicityCSRule() { |
| return getMultiplicityCSAccess().getRule(); |
| } |
| |
| //MultiplicityStringCS: |
| // stringBounds=("*" | "+" | "?"); |
| public BaseGrammarAccess.MultiplicityStringCSElements getMultiplicityStringCSAccess() { |
| return gaEssentialOCL.getMultiplicityStringCSAccess(); |
| } |
| |
| public ParserRule getMultiplicityStringCSRule() { |
| return getMultiplicityStringCSAccess().getRule(); |
| } |
| |
| //PathNameCS: |
| // ownedPathElements+=FirstPathElementCS ("::" ownedPathElements+=NextPathElementCS)*; |
| public BaseGrammarAccess.PathNameCSElements getPathNameCSAccess() { |
| return gaEssentialOCL.getPathNameCSAccess(); |
| } |
| |
| public ParserRule getPathNameCSRule() { |
| return getPathNameCSAccess().getRule(); |
| } |
| |
| //FirstPathElementCS returns PathElementCS: |
| // referredElement=[pivot::NamedElement|UnrestrictedName]; |
| public BaseGrammarAccess.FirstPathElementCSElements getFirstPathElementCSAccess() { |
| return gaEssentialOCL.getFirstPathElementCSAccess(); |
| } |
| |
| public ParserRule getFirstPathElementCSRule() { |
| return getFirstPathElementCSAccess().getRule(); |
| } |
| |
| //NextPathElementCS returns PathElementCS: |
| // referredElement=[pivot::NamedElement|UnreservedName]; |
| public BaseGrammarAccess.NextPathElementCSElements getNextPathElementCSAccess() { |
| return gaEssentialOCL.getNextPathElementCSAccess(); |
| } |
| |
| public ParserRule getNextPathElementCSRule() { |
| return getNextPathElementCSAccess().getRule(); |
| } |
| |
| //TemplateBindingCS: |
| // "(" ownedSubstitutions+=TemplateParameterSubstitutionCS ("," ownedSubstitutions+=TemplateParameterSubstitutionCS)* |
| // ")"; |
| public BaseGrammarAccess.TemplateBindingCSElements getTemplateBindingCSAccess() { |
| return gaEssentialOCL.getTemplateBindingCSAccess(); |
| } |
| |
| public ParserRule getTemplateBindingCSRule() { |
| return getTemplateBindingCSAccess().getRule(); |
| } |
| |
| //TemplateParameterSubstitutionCS: |
| // ownedActualParameter=TypeRefCS; |
| public BaseGrammarAccess.TemplateParameterSubstitutionCSElements getTemplateParameterSubstitutionCSAccess() { |
| return gaEssentialOCL.getTemplateParameterSubstitutionCSAccess(); |
| } |
| |
| public ParserRule getTemplateParameterSubstitutionCSRule() { |
| return getTemplateParameterSubstitutionCSAccess().getRule(); |
| } |
| |
| //TemplateSignatureCS: |
| // "(" ownedParameters+=TypeParameterCS ("," ownedParameters+=TypeParameterCS)* ")"; |
| public BaseGrammarAccess.TemplateSignatureCSElements getTemplateSignatureCSAccess() { |
| return gaEssentialOCL.getTemplateSignatureCSAccess(); |
| } |
| |
| public ParserRule getTemplateSignatureCSRule() { |
| return getTemplateSignatureCSAccess().getRule(); |
| } |
| |
| //TypeParameterCS: |
| // name=UnrestrictedName ("extends" ownedExtends+=TypedRefCS ("&&" ownedExtends+=TypedRefCS)*)?; |
| public BaseGrammarAccess.TypeParameterCSElements getTypeParameterCSAccess() { |
| return gaEssentialOCL.getTypeParameterCSAccess(); |
| } |
| |
| public ParserRule getTypeParameterCSRule() { |
| return getTypeParameterCSAccess().getRule(); |
| } |
| |
| //TypeRefCS: |
| // TypedRefCS | WildcardTypeRefCS; |
| public BaseGrammarAccess.TypeRefCSElements getTypeRefCSAccess() { |
| return gaEssentialOCL.getTypeRefCSAccess(); |
| } |
| |
| public ParserRule getTypeRefCSRule() { |
| return getTypeRefCSAccess().getRule(); |
| } |
| |
| //TypedRefCS: |
| // TypedTypeRefCS; |
| public BaseGrammarAccess.TypedRefCSElements getTypedRefCSAccess() { |
| return gaEssentialOCL.getTypedRefCSAccess(); |
| } |
| |
| public ParserRule getTypedRefCSRule() { |
| return getTypedRefCSAccess().getRule(); |
| } |
| |
| //TypedTypeRefCS: |
| // ownedPathName=PathNameCS ownedBinding=TemplateBindingCS?; |
| public BaseGrammarAccess.TypedTypeRefCSElements getTypedTypeRefCSAccess() { |
| return gaEssentialOCL.getTypedTypeRefCSAccess(); |
| } |
| |
| public ParserRule getTypedTypeRefCSRule() { |
| return getTypedTypeRefCSAccess().getRule(); |
| } |
| |
| //WildcardTypeRefCS: |
| // {WildcardTypeRefCS} "?" ("extends" ownedExtends=TypedRefCS)?; |
| public BaseGrammarAccess.WildcardTypeRefCSElements getWildcardTypeRefCSAccess() { |
| return gaEssentialOCL.getWildcardTypeRefCSAccess(); |
| } |
| |
| public ParserRule getWildcardTypeRefCSRule() { |
| return getWildcardTypeRefCSAccess().getRule(); |
| } |
| |
| //ID: |
| // SIMPLE_ID | ESCAPED_ID; |
| public BaseGrammarAccess.IDElements getIDAccess() { |
| return gaEssentialOCL.getIDAccess(); |
| } |
| |
| public ParserRule getIDRule() { |
| return getIDAccess().getRule(); |
| } |
| |
| //Identifier: |
| // ID; |
| public BaseGrammarAccess.IdentifierElements getIdentifierAccess() { |
| return gaEssentialOCL.getIdentifierAccess(); |
| } |
| |
| public ParserRule getIdentifierRule() { |
| return getIdentifierAccess().getRule(); |
| } |
| |
| /// * A lowerbounded integer is used to define the lowerbound of a collection multiplicity. The value may not be the unlimited value. * / |
| //LOWER returns ecore::EInt: |
| // INT; |
| public BaseGrammarAccess.LOWERElements getLOWERAccess() { |
| return gaEssentialOCL.getLOWERAccess(); |
| } |
| |
| public ParserRule getLOWERRule() { |
| return getLOWERAccess().getRule(); |
| } |
| |
| /// * A number may be an integer or floating point value. The declaration here appears to be that for just an integer. This is to avoid |
| // * lookahead conflicts in simple lexers between a dot within a floating point number and the dot-dot in a CollectionLiteralPartCS. A |
| // * practical implementation should give high priority to a successful parse of INT ('.' INT)? (('e' | 'E') ('+' | '-')? INT)? than |
| // * to the unsuccessful partial parse of INT '..'. The type of the INT terminal is String to allow the floating point syntax to be used. |
| // * / |
| //// Not terminal to allow parser backtracking to sort out "5..7" |
| // |
| //// EssentialOCLTokenSource pieces this together ('.' INT)? (('e' | 'E') ('+' | '-')? INT)?; |
| // NUMBER_LITERAL returns |
| //BigNumber: |
| // INT; |
| public BaseGrammarAccess.NUMBER_LITERALElements getNUMBER_LITERALAccess() { |
| return gaEssentialOCL.getNUMBER_LITERALAccess(); |
| } |
| |
| public ParserRule getNUMBER_LITERALRule() { |
| return getNUMBER_LITERALAccess().getRule(); |
| } |
| |
| //StringLiteral: |
| // SINGLE_QUOTED_STRING; |
| public BaseGrammarAccess.StringLiteralElements getStringLiteralAccess() { |
| return gaEssentialOCL.getStringLiteralAccess(); |
| } |
| |
| public ParserRule getStringLiteralRule() { |
| return getStringLiteralAccess().getRule(); |
| } |
| |
| /// * An upperbounded integer is used to define the upperbound of a collection multiplicity. The value may be the unlimited value. * / |
| //UPPER returns ecore::EInt: |
| // INT | "*"; |
| public BaseGrammarAccess.UPPERElements getUPPERAccess() { |
| return gaEssentialOCL.getUPPERAccess(); |
| } |
| |
| public ParserRule getUPPERRule() { |
| return getUPPERAccess().getRule(); |
| } |
| |
| //URI: |
| // SINGLE_QUOTED_STRING; |
| public BaseGrammarAccess.URIElements getURIAccess() { |
| return gaEssentialOCL.getURIAccess(); |
| } |
| |
| public ParserRule getURIRule() { |
| return getURIAccess().getRule(); |
| } |
| |
| //terminal fragment ESCAPED_CHARACTER: |
| // "\\" ("b" | "t" | "n" | "f" | "r" | "u" | "\"" | "\'" | "\\"); |
| public TerminalRule getESCAPED_CHARACTERRule() { |
| return gaEssentialOCL.getESCAPED_CHARACTERRule(); |
| } |
| |
| //terminal fragment LETTER_CHARACTER: |
| // "a".."z" | "A".."Z" | "_"; |
| public TerminalRule getLETTER_CHARACTERRule() { |
| return gaEssentialOCL.getLETTER_CHARACTERRule(); |
| } |
| |
| //terminal DOUBLE_QUOTED_STRING: |
| // "\"" (ESCAPED_CHARACTER | !("\\" | "\""))* "\""; |
| public TerminalRule getDOUBLE_QUOTED_STRINGRule() { |
| return gaEssentialOCL.getDOUBLE_QUOTED_STRINGRule(); |
| } |
| |
| //terminal SINGLE_QUOTED_STRING: |
| // "\'" (ESCAPED_CHARACTER | !("\\" | "\'"))* "\'"; |
| public TerminalRule getSINGLE_QUOTED_STRINGRule() { |
| return gaEssentialOCL.getSINGLE_QUOTED_STRINGRule(); |
| } |
| |
| //terminal ML_SINGLE_QUOTED_STRING: |
| // "/\'"->"\'/"; |
| public TerminalRule getML_SINGLE_QUOTED_STRINGRule() { |
| return gaEssentialOCL.getML_SINGLE_QUOTED_STRINGRule(); |
| } |
| |
| //terminal SIMPLE_ID: |
| // LETTER_CHARACTER (LETTER_CHARACTER | "0".."9")*; |
| public TerminalRule getSIMPLE_IDRule() { |
| return gaEssentialOCL.getSIMPLE_IDRule(); |
| } |
| |
| //terminal ESCAPED_ID: |
| // "_" SINGLE_QUOTED_STRING; |
| public TerminalRule getESCAPED_IDRule() { |
| return gaEssentialOCL.getESCAPED_IDRule(); |
| } |
| |
| //// String to allow diverse re-use |
| // // multiple leading zeroes occur as floating point fractional part |
| // terminal INT: |
| // "0".."9"+; |
| public TerminalRule getINTRule() { |
| return gaEssentialOCL.getINTRule(); |
| } |
| |
| /// * A multi-line comment supports a comment that may span more than one line using familiar slash-star...star-slash comment delimiters * / |
| //terminal ML_COMMENT: |
| // "/ *"->"* /"; |
| public TerminalRule getML_COMMENTRule() { |
| return gaEssentialOCL.getML_COMMENTRule(); |
| } |
| |
| /// * A single-line comment supports a comment that terminates at the end of the line * / terminal SL_COMMENT: |
| // "--" !("\n" | "\r")* ("\r"? "\n")?; |
| public TerminalRule getSL_COMMENTRule() { |
| return gaEssentialOCL.getSL_COMMENTRule(); |
| } |
| |
| /// * Whitespace may occur between any pair of tokens * / terminal WS: |
| // (" " | "\t" | "\r" | "\n")+; |
| public TerminalRule getWSRule() { |
| return gaEssentialOCL.getWSRule(); |
| } |
| |
| //terminal ANY_OTHER: |
| // .; |
| public TerminalRule getANY_OTHERRule() { |
| return gaEssentialOCL.getANY_OTHERRule(); |
| } |
| } |