| /* |
| * generated by Xtext 2.11.0 |
| */ |
| package org.eclipse.osbp.xtext.organizationdsl.services; |
| |
| import com.google.inject.Inject; |
| import com.google.inject.Singleton; |
| import java.util.List; |
| import org.eclipse.osbp.xtext.oxtype.services.OXtypeGrammarAccess; |
| import org.eclipse.xtext.Assignment; |
| import org.eclipse.xtext.CrossReference; |
| import org.eclipse.xtext.Grammar; |
| import org.eclipse.xtext.GrammarUtil; |
| import org.eclipse.xtext.Group; |
| import org.eclipse.xtext.Keyword; |
| import org.eclipse.xtext.ParserRule; |
| import org.eclipse.xtext.RuleCall; |
| import org.eclipse.xtext.TerminalRule; |
| import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder; |
| import org.eclipse.xtext.service.GrammarProvider; |
| import org.eclipse.xtext.xbase.annotations.services.XbaseWithAnnotationsGrammarAccess; |
| import org.eclipse.xtext.xbase.services.XbaseGrammarAccess; |
| import org.eclipse.xtext.xbase.services.XtypeGrammarAccess; |
| |
| @Singleton |
| public class OrganizationDslGrammarAccess extends AbstractGrammarElementFinder { |
| |
| public class OrganizationModelElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl.OrganizationModel"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Assignment cImportSectionAssignment_0 = (Assignment)cGroup.eContents().get(0); |
| private final RuleCall cImportSectionXImportSectionParserRuleCall_0_0 = (RuleCall)cImportSectionAssignment_0.eContents().get(0); |
| private final Assignment cPckgAssignment_1 = (Assignment)cGroup.eContents().get(1); |
| private final RuleCall cPckgOrganizationPackageParserRuleCall_1_0 = (RuleCall)cPckgAssignment_1.eContents().get(0); |
| |
| //OrganizationModel: |
| // importSection=XImportSection? |
| // pckg=OrganizationPackage; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //importSection=XImportSection? pckg=OrganizationPackage |
| public Group getGroup() { return cGroup; } |
| |
| //importSection=XImportSection? |
| public Assignment getImportSectionAssignment_0() { return cImportSectionAssignment_0; } |
| |
| //XImportSection |
| public RuleCall getImportSectionXImportSectionParserRuleCall_0_0() { return cImportSectionXImportSectionParserRuleCall_0_0; } |
| |
| //pckg=OrganizationPackage |
| public Assignment getPckgAssignment_1() { return cPckgAssignment_1; } |
| |
| //OrganizationPackage |
| public RuleCall getPckgOrganizationPackageParserRuleCall_1_0() { return cPckgOrganizationPackageParserRuleCall_1_0; } |
| } |
| public class OrganizationPackageElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl.OrganizationPackage"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cPackageKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); |
| private final RuleCall cNameQualifiedNameParserRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); |
| private final Group cGroup_2 = (Group)cGroup.eContents().get(2); |
| private final Keyword cLeftCurlyBracketKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0); |
| private final Assignment cOrganizationsAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); |
| private final RuleCall cOrganizationsOrganizationParserRuleCall_2_1_0 = (RuleCall)cOrganizationsAssignment_2_1.eContents().get(0); |
| private final Keyword cRightCurlyBracketKeyword_2_2 = (Keyword)cGroup_2.eContents().get(2); |
| |
| //OrganizationPackage: |
| // 'package' name=QualifiedName ('{' organizations+=Organization* '}')?; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //'package' name=QualifiedName ('{' organizations+=Organization* '}')? |
| public Group getGroup() { return cGroup; } |
| |
| //'package' |
| public Keyword getPackageKeyword_0() { return cPackageKeyword_0; } |
| |
| //name=QualifiedName |
| public Assignment getNameAssignment_1() { return cNameAssignment_1; } |
| |
| //QualifiedName |
| public RuleCall getNameQualifiedNameParserRuleCall_1_0() { return cNameQualifiedNameParserRuleCall_1_0; } |
| |
| //('{' organizations+=Organization* '}')? |
| public Group getGroup_2() { return cGroup_2; } |
| |
| //'{' |
| public Keyword getLeftCurlyBracketKeyword_2_0() { return cLeftCurlyBracketKeyword_2_0; } |
| |
| //organizations+=Organization* |
| public Assignment getOrganizationsAssignment_2_1() { return cOrganizationsAssignment_2_1; } |
| |
| //Organization |
| public RuleCall getOrganizationsOrganizationParserRuleCall_2_1_0() { return cOrganizationsOrganizationParserRuleCall_2_1_0; } |
| |
| //'}' |
| public Keyword getRightCurlyBracketKeyword_2_2() { return cRightCurlyBracketKeyword_2_2; } |
| } |
| public class OrganizationElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl.Organization"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cOrganizationKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); |
| private final RuleCall cNameTRANSLATABLEIDParserRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); |
| private final Keyword cTitleKeyword_2 = (Keyword)cGroup.eContents().get(2); |
| private final Assignment cTitleAssignment_3 = (Assignment)cGroup.eContents().get(3); |
| private final RuleCall cTitleTRANSLATABLESTRINGParserRuleCall_3_0 = (RuleCall)cTitleAssignment_3.eContents().get(0); |
| private final Group cGroup_4 = (Group)cGroup.eContents().get(4); |
| private final Keyword cSuperiorPosKeyword_4_0 = (Keyword)cGroup_4.eContents().get(0); |
| private final Assignment cSuperiorPosValueAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); |
| private final CrossReference cSuperiorPosValueOrganizationPositionCrossReference_4_1_0 = (CrossReference)cSuperiorPosValueAssignment_4_1.eContents().get(0); |
| private final RuleCall cSuperiorPosValueOrganizationPositionIDTerminalRuleCall_4_1_0_1 = (RuleCall)cSuperiorPosValueOrganizationPositionCrossReference_4_1_0.eContents().get(1); |
| private final Group cGroup_5 = (Group)cGroup.eContents().get(5); |
| private final Keyword cToolbarKeyword_5_0 = (Keyword)cGroup_5.eContents().get(0); |
| private final Assignment cToolbarAssignment_5_1 = (Assignment)cGroup_5.eContents().get(1); |
| private final CrossReference cToolbarActionToolbarCrossReference_5_1_0 = (CrossReference)cToolbarAssignment_5_1.eContents().get(0); |
| private final RuleCall cToolbarActionToolbarIDTerminalRuleCall_5_1_0_1 = (RuleCall)cToolbarActionToolbarCrossReference_5_1_0.eContents().get(1); |
| private final Group cGroup_6 = (Group)cGroup.eContents().get(6); |
| private final Keyword cLeftCurlyBracketKeyword_6_0 = (Keyword)cGroup_6.eContents().get(0); |
| private final Assignment cOrganizationPositionsAssignment_6_1 = (Assignment)cGroup_6.eContents().get(1); |
| private final RuleCall cOrganizationPositionsOrganizationPositionParserRuleCall_6_1_0 = (RuleCall)cOrganizationPositionsAssignment_6_1.eContents().get(0); |
| private final Assignment cSubOrganizationsAssignment_6_2 = (Assignment)cGroup_6.eContents().get(2); |
| private final RuleCall cSubOrganizationsOrganizationParserRuleCall_6_2_0 = (RuleCall)cSubOrganizationsAssignment_6_2.eContents().get(0); |
| private final Keyword cRightCurlyBracketKeyword_6_3 = (Keyword)cGroup_6.eContents().get(3); |
| |
| //Organization: |
| // 'organization' name=TRANSLATABLEID 'Title' title=TRANSLATABLESTRING ('superiorPos' |
| // superiorPosValue=[OrganizationPosition])? ('toolbar' toolbar=[action::ActionToolbar])? ('{' |
| // organizationPositions+=OrganizationPosition* subOrganizations+=Organization* '}')?; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //'organization' name=TRANSLATABLEID 'Title' title=TRANSLATABLESTRING ('superiorPos' |
| //superiorPosValue=[OrganizationPosition])? ('toolbar' toolbar=[action::ActionToolbar])? ('{' |
| //organizationPositions+=OrganizationPosition* subOrganizations+=Organization* '}')? |
| public Group getGroup() { return cGroup; } |
| |
| //'organization' |
| public Keyword getOrganizationKeyword_0() { return cOrganizationKeyword_0; } |
| |
| //name=TRANSLATABLEID |
| public Assignment getNameAssignment_1() { return cNameAssignment_1; } |
| |
| //TRANSLATABLEID |
| public RuleCall getNameTRANSLATABLEIDParserRuleCall_1_0() { return cNameTRANSLATABLEIDParserRuleCall_1_0; } |
| |
| //'Title' |
| public Keyword getTitleKeyword_2() { return cTitleKeyword_2; } |
| |
| //title=TRANSLATABLESTRING |
| public Assignment getTitleAssignment_3() { return cTitleAssignment_3; } |
| |
| //TRANSLATABLESTRING |
| public RuleCall getTitleTRANSLATABLESTRINGParserRuleCall_3_0() { return cTitleTRANSLATABLESTRINGParserRuleCall_3_0; } |
| |
| //('superiorPos' superiorPosValue=[OrganizationPosition])? |
| public Group getGroup_4() { return cGroup_4; } |
| |
| //'superiorPos' |
| public Keyword getSuperiorPosKeyword_4_0() { return cSuperiorPosKeyword_4_0; } |
| |
| //superiorPosValue=[OrganizationPosition] |
| public Assignment getSuperiorPosValueAssignment_4_1() { return cSuperiorPosValueAssignment_4_1; } |
| |
| //[OrganizationPosition] |
| public CrossReference getSuperiorPosValueOrganizationPositionCrossReference_4_1_0() { return cSuperiorPosValueOrganizationPositionCrossReference_4_1_0; } |
| |
| //ID |
| public RuleCall getSuperiorPosValueOrganizationPositionIDTerminalRuleCall_4_1_0_1() { return cSuperiorPosValueOrganizationPositionIDTerminalRuleCall_4_1_0_1; } |
| |
| //('toolbar' toolbar=[action::ActionToolbar])? |
| public Group getGroup_5() { return cGroup_5; } |
| |
| //'toolbar' |
| public Keyword getToolbarKeyword_5_0() { return cToolbarKeyword_5_0; } |
| |
| //toolbar=[action::ActionToolbar] |
| public Assignment getToolbarAssignment_5_1() { return cToolbarAssignment_5_1; } |
| |
| //[action::ActionToolbar] |
| public CrossReference getToolbarActionToolbarCrossReference_5_1_0() { return cToolbarActionToolbarCrossReference_5_1_0; } |
| |
| //ID |
| public RuleCall getToolbarActionToolbarIDTerminalRuleCall_5_1_0_1() { return cToolbarActionToolbarIDTerminalRuleCall_5_1_0_1; } |
| |
| //('{' organizationPositions+=OrganizationPosition* subOrganizations+=Organization* '}')? |
| public Group getGroup_6() { return cGroup_6; } |
| |
| //'{' |
| public Keyword getLeftCurlyBracketKeyword_6_0() { return cLeftCurlyBracketKeyword_6_0; } |
| |
| //organizationPositions+=OrganizationPosition* |
| public Assignment getOrganizationPositionsAssignment_6_1() { return cOrganizationPositionsAssignment_6_1; } |
| |
| //OrganizationPosition |
| public RuleCall getOrganizationPositionsOrganizationPositionParserRuleCall_6_1_0() { return cOrganizationPositionsOrganizationPositionParserRuleCall_6_1_0; } |
| |
| //subOrganizations+=Organization* |
| public Assignment getSubOrganizationsAssignment_6_2() { return cSubOrganizationsAssignment_6_2; } |
| |
| //Organization |
| public RuleCall getSubOrganizationsOrganizationParserRuleCall_6_2_0() { return cSubOrganizationsOrganizationParserRuleCall_6_2_0; } |
| |
| //'}' |
| public Keyword getRightCurlyBracketKeyword_6_3() { return cRightCurlyBracketKeyword_6_3; } |
| } |
| public class OrganizationPositionElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl.OrganizationPosition"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cPositionKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); |
| private final RuleCall cNameTRANSLATABLEIDParserRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); |
| private final Keyword cAliasKeyword_2 = (Keyword)cGroup.eContents().get(2); |
| private final Assignment cLinkAliasAssignment_3 = (Assignment)cGroup.eContents().get(3); |
| private final RuleCall cLinkAliasSTRINGTerminalRuleCall_3_0 = (RuleCall)cLinkAliasAssignment_3.eContents().get(0); |
| private final Assignment cSuperiorAssignment_4 = (Assignment)cGroup.eContents().get(4); |
| private final RuleCall cSuperiorOrganizationSuperiorParserRuleCall_4_0 = (RuleCall)cSuperiorAssignment_4.eContents().get(0); |
| private final Keyword cLeftCurlyBracketKeyword_5 = (Keyword)cGroup.eContents().get(5); |
| private final Assignment cRolesAssignment_6 = (Assignment)cGroup.eContents().get(6); |
| private final RuleCall cRolesOrganizationRoleParserRuleCall_6_0 = (RuleCall)cRolesAssignment_6.eContents().get(0); |
| private final Keyword cRightCurlyBracketKeyword_7 = (Keyword)cGroup.eContents().get(7); |
| |
| //OrganizationPosition: |
| // 'position' name=TRANSLATABLEID 'alias' linkAlias=STRING superior=OrganizationSuperior? '{' roles+=OrganizationRole* |
| // '}'; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //'position' name=TRANSLATABLEID 'alias' linkAlias=STRING superior=OrganizationSuperior? '{' roles+=OrganizationRole* '}' |
| public Group getGroup() { return cGroup; } |
| |
| //'position' |
| public Keyword getPositionKeyword_0() { return cPositionKeyword_0; } |
| |
| //name=TRANSLATABLEID |
| public Assignment getNameAssignment_1() { return cNameAssignment_1; } |
| |
| //TRANSLATABLEID |
| public RuleCall getNameTRANSLATABLEIDParserRuleCall_1_0() { return cNameTRANSLATABLEIDParserRuleCall_1_0; } |
| |
| //'alias' |
| public Keyword getAliasKeyword_2() { return cAliasKeyword_2; } |
| |
| //linkAlias=STRING |
| public Assignment getLinkAliasAssignment_3() { return cLinkAliasAssignment_3; } |
| |
| //STRING |
| public RuleCall getLinkAliasSTRINGTerminalRuleCall_3_0() { return cLinkAliasSTRINGTerminalRuleCall_3_0; } |
| |
| //superior=OrganizationSuperior? |
| public Assignment getSuperiorAssignment_4() { return cSuperiorAssignment_4; } |
| |
| //OrganizationSuperior |
| public RuleCall getSuperiorOrganizationSuperiorParserRuleCall_4_0() { return cSuperiorOrganizationSuperiorParserRuleCall_4_0; } |
| |
| //'{' |
| public Keyword getLeftCurlyBracketKeyword_5() { return cLeftCurlyBracketKeyword_5; } |
| |
| //roles+=OrganizationRole* |
| public Assignment getRolesAssignment_6() { return cRolesAssignment_6; } |
| |
| //OrganizationRole |
| public RuleCall getRolesOrganizationRoleParserRuleCall_6_0() { return cRolesOrganizationRoleParserRuleCall_6_0; } |
| |
| //'}' |
| public Keyword getRightCurlyBracketKeyword_7() { return cRightCurlyBracketKeyword_7; } |
| } |
| public class OrganizationSuperiorElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl.OrganizationSuperior"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cSuperiorPosKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Assignment cSuperiorPosValueAssignment_1 = (Assignment)cGroup.eContents().get(1); |
| private final CrossReference cSuperiorPosValueOrganizationPositionCrossReference_1_0 = (CrossReference)cSuperiorPosValueAssignment_1.eContents().get(0); |
| private final RuleCall cSuperiorPosValueOrganizationPositionIDTerminalRuleCall_1_0_1 = (RuleCall)cSuperiorPosValueOrganizationPositionCrossReference_1_0.eContents().get(1); |
| |
| //OrganizationSuperior: |
| // 'superiorPos' superiorPosValue=[OrganizationPosition]; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //'superiorPos' superiorPosValue=[OrganizationPosition] |
| public Group getGroup() { return cGroup; } |
| |
| //'superiorPos' |
| public Keyword getSuperiorPosKeyword_0() { return cSuperiorPosKeyword_0; } |
| |
| //superiorPosValue=[OrganizationPosition] |
| public Assignment getSuperiorPosValueAssignment_1() { return cSuperiorPosValueAssignment_1; } |
| |
| //[OrganizationPosition] |
| public CrossReference getSuperiorPosValueOrganizationPositionCrossReference_1_0() { return cSuperiorPosValueOrganizationPositionCrossReference_1_0; } |
| |
| //ID |
| public RuleCall getSuperiorPosValueOrganizationPositionIDTerminalRuleCall_1_0_1() { return cSuperiorPosValueOrganizationPositionIDTerminalRuleCall_1_0_1; } |
| } |
| public class OrganizationRoleElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl.OrganizationRole"); |
| private final Group cGroup = (Group)rule.eContents().get(1); |
| private final Keyword cRoleKeyword_0 = (Keyword)cGroup.eContents().get(0); |
| private final Assignment cRoleAssignment_1 = (Assignment)cGroup.eContents().get(1); |
| private final CrossReference cRoleRoleCrossReference_1_0 = (CrossReference)cRoleAssignment_1.eContents().get(0); |
| private final RuleCall cRoleRoleIDTerminalRuleCall_1_0_1 = (RuleCall)cRoleRoleCrossReference_1_0.eContents().get(1); |
| |
| //OrganizationRole: |
| // 'role' role=[authorization::Role]; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //'role' role=[authorization::Role] |
| public Group getGroup() { return cGroup; } |
| |
| //'role' |
| public Keyword getRoleKeyword_0() { return cRoleKeyword_0; } |
| |
| //role=[authorization::Role] |
| public Assignment getRoleAssignment_1() { return cRoleAssignment_1; } |
| |
| //[authorization::Role] |
| public CrossReference getRoleRoleCrossReference_1_0() { return cRoleRoleCrossReference_1_0; } |
| |
| //ID |
| public RuleCall getRoleRoleIDTerminalRuleCall_1_0_1() { return cRoleRoleIDTerminalRuleCall_1_0_1; } |
| } |
| public class TRANSLATABLESTRINGElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl.TRANSLATABLESTRING"); |
| private final RuleCall cSTRINGTerminalRuleCall = (RuleCall)rule.eContents().get(1); |
| |
| //TRANSLATABLESTRING: |
| // STRING; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //STRING |
| public RuleCall getSTRINGTerminalRuleCall() { return cSTRINGTerminalRuleCall; } |
| } |
| public class TRANSLATABLEIDElements extends AbstractParserRuleElementFinder { |
| private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl.TRANSLATABLEID"); |
| private final RuleCall cIDTerminalRuleCall = (RuleCall)rule.eContents().get(1); |
| |
| //TRANSLATABLEID: |
| // ID; |
| @Override public ParserRule getRule() { return rule; } |
| |
| //ID |
| public RuleCall getIDTerminalRuleCall() { return cIDTerminalRuleCall; } |
| } |
| |
| |
| private final OrganizationModelElements pOrganizationModel; |
| private final OrganizationPackageElements pOrganizationPackage; |
| private final OrganizationElements pOrganization; |
| private final OrganizationPositionElements pOrganizationPosition; |
| private final OrganizationSuperiorElements pOrganizationSuperior; |
| private final OrganizationRoleElements pOrganizationRole; |
| private final TRANSLATABLESTRINGElements pTRANSLATABLESTRING; |
| private final TRANSLATABLEIDElements pTRANSLATABLEID; |
| |
| private final Grammar grammar; |
| |
| private final OXtypeGrammarAccess gaOXtype; |
| |
| private final XbaseWithAnnotationsGrammarAccess gaXbaseWithAnnotations; |
| |
| private final XbaseGrammarAccess gaXbase; |
| |
| private final XtypeGrammarAccess gaXtype; |
| |
| @Inject |
| public OrganizationDslGrammarAccess(GrammarProvider grammarProvider, |
| OXtypeGrammarAccess gaOXtype, |
| XbaseWithAnnotationsGrammarAccess gaXbaseWithAnnotations, |
| XbaseGrammarAccess gaXbase, |
| XtypeGrammarAccess gaXtype) { |
| this.grammar = internalFindGrammar(grammarProvider); |
| this.gaOXtype = gaOXtype; |
| this.gaXbaseWithAnnotations = gaXbaseWithAnnotations; |
| this.gaXbase = gaXbase; |
| this.gaXtype = gaXtype; |
| this.pOrganizationModel = new OrganizationModelElements(); |
| this.pOrganizationPackage = new OrganizationPackageElements(); |
| this.pOrganization = new OrganizationElements(); |
| this.pOrganizationPosition = new OrganizationPositionElements(); |
| this.pOrganizationSuperior = new OrganizationSuperiorElements(); |
| this.pOrganizationRole = new OrganizationRoleElements(); |
| this.pTRANSLATABLESTRING = new TRANSLATABLESTRINGElements(); |
| this.pTRANSLATABLEID = new TRANSLATABLEIDElements(); |
| } |
| |
| protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { |
| Grammar grammar = grammarProvider.getGrammar(this); |
| while (grammar != null) { |
| if ("org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl".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 OXtypeGrammarAccess getOXtypeGrammarAccess() { |
| return gaOXtype; |
| } |
| |
| public XbaseWithAnnotationsGrammarAccess getXbaseWithAnnotationsGrammarAccess() { |
| return gaXbaseWithAnnotations; |
| } |
| |
| public XbaseGrammarAccess getXbaseGrammarAccess() { |
| return gaXbase; |
| } |
| |
| public XtypeGrammarAccess getXtypeGrammarAccess() { |
| return gaXtype; |
| } |
| |
| |
| //OrganizationModel: |
| // importSection=XImportSection? |
| // pckg=OrganizationPackage; |
| public OrganizationModelElements getOrganizationModelAccess() { |
| return pOrganizationModel; |
| } |
| |
| public ParserRule getOrganizationModelRule() { |
| return getOrganizationModelAccess().getRule(); |
| } |
| |
| //OrganizationPackage: |
| // 'package' name=QualifiedName ('{' organizations+=Organization* '}')?; |
| public OrganizationPackageElements getOrganizationPackageAccess() { |
| return pOrganizationPackage; |
| } |
| |
| public ParserRule getOrganizationPackageRule() { |
| return getOrganizationPackageAccess().getRule(); |
| } |
| |
| //Organization: |
| // 'organization' name=TRANSLATABLEID 'Title' title=TRANSLATABLESTRING ('superiorPos' |
| // superiorPosValue=[OrganizationPosition])? ('toolbar' toolbar=[action::ActionToolbar])? ('{' |
| // organizationPositions+=OrganizationPosition* subOrganizations+=Organization* '}')?; |
| public OrganizationElements getOrganizationAccess() { |
| return pOrganization; |
| } |
| |
| public ParserRule getOrganizationRule() { |
| return getOrganizationAccess().getRule(); |
| } |
| |
| //OrganizationPosition: |
| // 'position' name=TRANSLATABLEID 'alias' linkAlias=STRING superior=OrganizationSuperior? '{' roles+=OrganizationRole* |
| // '}'; |
| public OrganizationPositionElements getOrganizationPositionAccess() { |
| return pOrganizationPosition; |
| } |
| |
| public ParserRule getOrganizationPositionRule() { |
| return getOrganizationPositionAccess().getRule(); |
| } |
| |
| //OrganizationSuperior: |
| // 'superiorPos' superiorPosValue=[OrganizationPosition]; |
| public OrganizationSuperiorElements getOrganizationSuperiorAccess() { |
| return pOrganizationSuperior; |
| } |
| |
| public ParserRule getOrganizationSuperiorRule() { |
| return getOrganizationSuperiorAccess().getRule(); |
| } |
| |
| //OrganizationRole: |
| // 'role' role=[authorization::Role]; |
| public OrganizationRoleElements getOrganizationRoleAccess() { |
| return pOrganizationRole; |
| } |
| |
| public ParserRule getOrganizationRoleRule() { |
| return getOrganizationRoleAccess().getRule(); |
| } |
| |
| //TRANSLATABLESTRING: |
| // STRING; |
| public TRANSLATABLESTRINGElements getTRANSLATABLESTRINGAccess() { |
| return pTRANSLATABLESTRING; |
| } |
| |
| public ParserRule getTRANSLATABLESTRINGRule() { |
| return getTRANSLATABLESTRINGAccess().getRule(); |
| } |
| |
| //TRANSLATABLEID: |
| // ID; |
| public TRANSLATABLEIDElements getTRANSLATABLEIDAccess() { |
| return pTRANSLATABLEID; |
| } |
| |
| public ParserRule getTRANSLATABLEIDRule() { |
| return getTRANSLATABLEIDAccess().getRule(); |
| } |
| |
| //@ Override XImportDeclaration OXImportDeclaration: |
| // {OXImportDeclaration} |
| // 'import' (static?='static' extension?='extension'? importedType=[JvmDeclaredType|QualifiedNameInStaticImport] |
| // (wildcard?='*' | memberName=ValidID) | importedType=[JvmDeclaredType|QualifiedName] | |
| // importedNamespace=QualifiedNameWithWildcard |
| // | fqnImport?='ns' importedFullyQualifiedName=QualifiedName) ';'?; |
| public OXtypeGrammarAccess.XImportDeclarationElements getXImportDeclarationAccess() { |
| return gaOXtype.getXImportDeclarationAccess(); |
| } |
| |
| public ParserRule getXImportDeclarationRule() { |
| return getXImportDeclarationAccess().getRule(); |
| } |
| |
| //XAnnotation: |
| // {XAnnotation} |
| // '@' annotationType=[types::JvmAnnotationType|QualifiedName] (=> '(' (elementValuePairs+=XAnnotationElementValuePair |
| // (',' elementValuePairs+=XAnnotationElementValuePair)* |
| // | value=XAnnotationElementValueOrCommaList)? |
| // ')')?; |
| public XbaseWithAnnotationsGrammarAccess.XAnnotationElements getXAnnotationAccess() { |
| return gaXbaseWithAnnotations.getXAnnotationAccess(); |
| } |
| |
| public ParserRule getXAnnotationRule() { |
| return getXAnnotationAccess().getRule(); |
| } |
| |
| //XAnnotationElementValuePair: |
| // => (element=[types::JvmOperation|ValidID] '=') value=XAnnotationElementValue; |
| public XbaseWithAnnotationsGrammarAccess.XAnnotationElementValuePairElements getXAnnotationElementValuePairAccess() { |
| return gaXbaseWithAnnotations.getXAnnotationElementValuePairAccess(); |
| } |
| |
| public ParserRule getXAnnotationElementValuePairRule() { |
| return getXAnnotationElementValuePairAccess().getRule(); |
| } |
| |
| //XAnnotationElementValueOrCommaList xbase::XExpression: |
| // => ({xbase::XListLiteral} '#' '[') (elements+=XAnnotationOrExpression (',' elements+=XAnnotationOrExpression)*)? ']' |
| // | XAnnotationOrExpression ({xbase::XListLiteral.elements+=current} (',' elements+=XAnnotationOrExpression)+)?; |
| public XbaseWithAnnotationsGrammarAccess.XAnnotationElementValueOrCommaListElements getXAnnotationElementValueOrCommaListAccess() { |
| return gaXbaseWithAnnotations.getXAnnotationElementValueOrCommaListAccess(); |
| } |
| |
| public ParserRule getXAnnotationElementValueOrCommaListRule() { |
| return getXAnnotationElementValueOrCommaListAccess().getRule(); |
| } |
| |
| //XAnnotationElementValue xbase::XExpression: |
| // => ({xbase::XListLiteral} '#' '[') (elements+=XAnnotationOrExpression (',' elements+=XAnnotationOrExpression)*)? ']' |
| // | XAnnotationOrExpression; |
| public XbaseWithAnnotationsGrammarAccess.XAnnotationElementValueElements getXAnnotationElementValueAccess() { |
| return gaXbaseWithAnnotations.getXAnnotationElementValueAccess(); |
| } |
| |
| public ParserRule getXAnnotationElementValueRule() { |
| return getXAnnotationElementValueAccess().getRule(); |
| } |
| |
| //XAnnotationOrExpression xbase::XExpression: |
| // XAnnotation | XExpression; |
| public XbaseWithAnnotationsGrammarAccess.XAnnotationOrExpressionElements getXAnnotationOrExpressionAccess() { |
| return gaXbaseWithAnnotations.getXAnnotationOrExpressionAccess(); |
| } |
| |
| public ParserRule getXAnnotationOrExpressionRule() { |
| return getXAnnotationOrExpressionAccess().getRule(); |
| } |
| |
| //XExpression: |
| // XAssignment; |
| public XbaseGrammarAccess.XExpressionElements getXExpressionAccess() { |
| return gaXbase.getXExpressionAccess(); |
| } |
| |
| public ParserRule getXExpressionRule() { |
| return getXExpressionAccess().getRule(); |
| } |
| |
| //XAssignment XExpression: |
| // {XAssignment} feature=[types::JvmIdentifiableElement|FeatureCallID] OpSingleAssign value=XAssignment | XOrExpression |
| // (=> ({XBinaryOperation.leftOperand=current} feature=[types::JvmIdentifiableElement|OpMultiAssign]) |
| // rightOperand=XAssignment)?; |
| public XbaseGrammarAccess.XAssignmentElements getXAssignmentAccess() { |
| return gaXbase.getXAssignmentAccess(); |
| } |
| |
| public ParserRule getXAssignmentRule() { |
| return getXAssignmentAccess().getRule(); |
| } |
| |
| //OpSingleAssign: |
| // '='; |
| public XbaseGrammarAccess.OpSingleAssignElements getOpSingleAssignAccess() { |
| return gaXbase.getOpSingleAssignAccess(); |
| } |
| |
| public ParserRule getOpSingleAssignRule() { |
| return getOpSingleAssignAccess().getRule(); |
| } |
| |
| //OpMultiAssign: |
| // '+=' | '-=' | '*=' | '/=' | '%=' | |
| // '<' '<' '=' | |
| // '>' '>'? '>='; |
| public XbaseGrammarAccess.OpMultiAssignElements getOpMultiAssignAccess() { |
| return gaXbase.getOpMultiAssignAccess(); |
| } |
| |
| public ParserRule getOpMultiAssignRule() { |
| return getOpMultiAssignAccess().getRule(); |
| } |
| |
| //XOrExpression XExpression: |
| // XAndExpression (=> ({XBinaryOperation.leftOperand=current} feature=[types::JvmIdentifiableElement|OpOr]) |
| // rightOperand=XAndExpression)*; |
| public XbaseGrammarAccess.XOrExpressionElements getXOrExpressionAccess() { |
| return gaXbase.getXOrExpressionAccess(); |
| } |
| |
| public ParserRule getXOrExpressionRule() { |
| return getXOrExpressionAccess().getRule(); |
| } |
| |
| //OpOr: |
| // '||'; |
| public XbaseGrammarAccess.OpOrElements getOpOrAccess() { |
| return gaXbase.getOpOrAccess(); |
| } |
| |
| public ParserRule getOpOrRule() { |
| return getOpOrAccess().getRule(); |
| } |
| |
| //XAndExpression XExpression: |
| // XEqualityExpression (=> ({XBinaryOperation.leftOperand=current} feature=[types::JvmIdentifiableElement|OpAnd]) |
| // rightOperand=XEqualityExpression)*; |
| public XbaseGrammarAccess.XAndExpressionElements getXAndExpressionAccess() { |
| return gaXbase.getXAndExpressionAccess(); |
| } |
| |
| public ParserRule getXAndExpressionRule() { |
| return getXAndExpressionAccess().getRule(); |
| } |
| |
| //OpAnd: |
| // '&&'; |
| public XbaseGrammarAccess.OpAndElements getOpAndAccess() { |
| return gaXbase.getOpAndAccess(); |
| } |
| |
| public ParserRule getOpAndRule() { |
| return getOpAndAccess().getRule(); |
| } |
| |
| //XEqualityExpression XExpression: |
| // XRelationalExpression (=> ({XBinaryOperation.leftOperand=current} feature=[types::JvmIdentifiableElement|OpEquality]) |
| // rightOperand=XRelationalExpression)*; |
| public XbaseGrammarAccess.XEqualityExpressionElements getXEqualityExpressionAccess() { |
| return gaXbase.getXEqualityExpressionAccess(); |
| } |
| |
| public ParserRule getXEqualityExpressionRule() { |
| return getXEqualityExpressionAccess().getRule(); |
| } |
| |
| //OpEquality: |
| // '==' | '!=' | '===' | '!=='; |
| public XbaseGrammarAccess.OpEqualityElements getOpEqualityAccess() { |
| return gaXbase.getOpEqualityAccess(); |
| } |
| |
| public ParserRule getOpEqualityRule() { |
| return getOpEqualityAccess().getRule(); |
| } |
| |
| //XRelationalExpression XExpression: |
| // XOtherOperatorExpression (=> ({XInstanceOfExpression.expression=current} 'instanceof') type=JvmTypeReference | |
| // => ({XBinaryOperation.leftOperand=current} feature=[types::JvmIdentifiableElement|OpCompare]) |
| // rightOperand=XOtherOperatorExpression)*; |
| public XbaseGrammarAccess.XRelationalExpressionElements getXRelationalExpressionAccess() { |
| return gaXbase.getXRelationalExpressionAccess(); |
| } |
| |
| public ParserRule getXRelationalExpressionRule() { |
| return getXRelationalExpressionAccess().getRule(); |
| } |
| |
| //OpCompare: |
| // '>=' | '<' '=' | '>' | '<'; |
| public XbaseGrammarAccess.OpCompareElements getOpCompareAccess() { |
| return gaXbase.getOpCompareAccess(); |
| } |
| |
| public ParserRule getOpCompareRule() { |
| return getOpCompareAccess().getRule(); |
| } |
| |
| //XOtherOperatorExpression XExpression: |
| // XAdditiveExpression (=> ({XBinaryOperation.leftOperand=current} feature=[types::JvmIdentifiableElement|OpOther]) |
| // rightOperand=XAdditiveExpression)*; |
| public XbaseGrammarAccess.XOtherOperatorExpressionElements getXOtherOperatorExpressionAccess() { |
| return gaXbase.getXOtherOperatorExpressionAccess(); |
| } |
| |
| public ParserRule getXOtherOperatorExpressionRule() { |
| return getXOtherOperatorExpressionAccess().getRule(); |
| } |
| |
| //OpOther: |
| // '->' |
| // | '..<' |
| // | '>' '..' |
| // | '..' |
| // | '=>' |
| // | '>' (=> ('>' '>') | '>') | '<' (=> ('<' '<') | '<' | '=>') | '<>' |
| // | '?:'; |
| public XbaseGrammarAccess.OpOtherElements getOpOtherAccess() { |
| return gaXbase.getOpOtherAccess(); |
| } |
| |
| public ParserRule getOpOtherRule() { |
| return getOpOtherAccess().getRule(); |
| } |
| |
| //XAdditiveExpression XExpression: |
| // XMultiplicativeExpression (=> ({XBinaryOperation.leftOperand=current} feature=[types::JvmIdentifiableElement|OpAdd]) |
| // rightOperand=XMultiplicativeExpression)*; |
| public XbaseGrammarAccess.XAdditiveExpressionElements getXAdditiveExpressionAccess() { |
| return gaXbase.getXAdditiveExpressionAccess(); |
| } |
| |
| public ParserRule getXAdditiveExpressionRule() { |
| return getXAdditiveExpressionAccess().getRule(); |
| } |
| |
| //OpAdd: |
| // '+' | '-'; |
| public XbaseGrammarAccess.OpAddElements getOpAddAccess() { |
| return gaXbase.getOpAddAccess(); |
| } |
| |
| public ParserRule getOpAddRule() { |
| return getOpAddAccess().getRule(); |
| } |
| |
| //XMultiplicativeExpression XExpression: |
| // XUnaryOperation (=> ({XBinaryOperation.leftOperand=current} feature=[types::JvmIdentifiableElement|OpMulti]) |
| // rightOperand=XUnaryOperation)*; |
| public XbaseGrammarAccess.XMultiplicativeExpressionElements getXMultiplicativeExpressionAccess() { |
| return gaXbase.getXMultiplicativeExpressionAccess(); |
| } |
| |
| public ParserRule getXMultiplicativeExpressionRule() { |
| return getXMultiplicativeExpressionAccess().getRule(); |
| } |
| |
| //OpMulti: |
| // '*' | '**' | '/' | '%'; |
| public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() { |
| return gaXbase.getOpMultiAccess(); |
| } |
| |
| public ParserRule getOpMultiRule() { |
| return getOpMultiAccess().getRule(); |
| } |
| |
| //XUnaryOperation XExpression: |
| // {XUnaryOperation} feature=[types::JvmIdentifiableElement|OpUnary] operand=XUnaryOperation |
| // | XCastedExpression; |
| public XbaseGrammarAccess.XUnaryOperationElements getXUnaryOperationAccess() { |
| return gaXbase.getXUnaryOperationAccess(); |
| } |
| |
| public ParserRule getXUnaryOperationRule() { |
| return getXUnaryOperationAccess().getRule(); |
| } |
| |
| //OpUnary: |
| // "!" | "-" | "+"; |
| public XbaseGrammarAccess.OpUnaryElements getOpUnaryAccess() { |
| return gaXbase.getOpUnaryAccess(); |
| } |
| |
| public ParserRule getOpUnaryRule() { |
| return getOpUnaryAccess().getRule(); |
| } |
| |
| //XCastedExpression XExpression: |
| // XPostfixOperation (=> ({XCastedExpression.target=current} 'as') type=JvmTypeReference)*; |
| public XbaseGrammarAccess.XCastedExpressionElements getXCastedExpressionAccess() { |
| return gaXbase.getXCastedExpressionAccess(); |
| } |
| |
| public ParserRule getXCastedExpressionRule() { |
| return getXCastedExpressionAccess().getRule(); |
| } |
| |
| //XPostfixOperation XExpression: |
| // XMemberFeatureCall => ({XPostfixOperation.operand=current} feature=[types::JvmIdentifiableElement|OpPostfix])?; |
| public XbaseGrammarAccess.XPostfixOperationElements getXPostfixOperationAccess() { |
| return gaXbase.getXPostfixOperationAccess(); |
| } |
| |
| public ParserRule getXPostfixOperationRule() { |
| return getXPostfixOperationAccess().getRule(); |
| } |
| |
| //OpPostfix: |
| // "++" | "--"; |
| public XbaseGrammarAccess.OpPostfixElements getOpPostfixAccess() { |
| return gaXbase.getOpPostfixAccess(); |
| } |
| |
| public ParserRule getOpPostfixRule() { |
| return getOpPostfixAccess().getRule(); |
| } |
| |
| //XMemberFeatureCall XExpression: |
| // XPrimaryExpression (=> ({XAssignment.assignable=current} ('.' | explicitStatic?="::") |
| // feature=[types::JvmIdentifiableElement|FeatureCallID] OpSingleAssign) value=XAssignment |
| // | => ({XMemberFeatureCall.memberCallTarget=current} ("." | nullSafe?="?." | explicitStatic?="::")) ('<' |
| // typeArguments+=JvmArgumentTypeReference (',' typeArguments+=JvmArgumentTypeReference)* '>')? |
| // feature=[types::JvmIdentifiableElement|IdOrSuper] (=> explicitOperationCall?='(' (memberCallArguments+=XShortClosure |
| // | memberCallArguments+=XExpression (',' memberCallArguments+=XExpression)*)? |
| // ')')? |
| // memberCallArguments+=XClosure?)*; |
| public XbaseGrammarAccess.XMemberFeatureCallElements getXMemberFeatureCallAccess() { |
| return gaXbase.getXMemberFeatureCallAccess(); |
| } |
| |
| public ParserRule getXMemberFeatureCallRule() { |
| return getXMemberFeatureCallAccess().getRule(); |
| } |
| |
| //XPrimaryExpression XExpression: |
| // XConstructorCall | XBlockExpression | XSwitchExpression | XSynchronizedExpression | XFeatureCall | XLiteral | |
| // XIfExpression | XForLoopExpression | XBasicForLoopExpression | XWhileExpression | XDoWhileExpression | |
| // XThrowExpression | XReturnExpression | XTryCatchFinallyExpression | XParenthesizedExpression; |
| public XbaseGrammarAccess.XPrimaryExpressionElements getXPrimaryExpressionAccess() { |
| return gaXbase.getXPrimaryExpressionAccess(); |
| } |
| |
| public ParserRule getXPrimaryExpressionRule() { |
| return getXPrimaryExpressionAccess().getRule(); |
| } |
| |
| //XLiteral XExpression: |
| // XCollectionLiteral | XClosure | XBooleanLiteral | XNumberLiteral | XNullLiteral | XStringLiteral | XTypeLiteral; |
| public XbaseGrammarAccess.XLiteralElements getXLiteralAccess() { |
| return gaXbase.getXLiteralAccess(); |
| } |
| |
| public ParserRule getXLiteralRule() { |
| return getXLiteralAccess().getRule(); |
| } |
| |
| //XCollectionLiteral: |
| // XSetLiteral | XListLiteral; |
| public XbaseGrammarAccess.XCollectionLiteralElements getXCollectionLiteralAccess() { |
| return gaXbase.getXCollectionLiteralAccess(); |
| } |
| |
| public ParserRule getXCollectionLiteralRule() { |
| return getXCollectionLiteralAccess().getRule(); |
| } |
| |
| //XSetLiteral: |
| // {XSetLiteral} '#' '{' (elements+=XExpression (',' elements+=XExpression)*)? '}'; |
| public XbaseGrammarAccess.XSetLiteralElements getXSetLiteralAccess() { |
| return gaXbase.getXSetLiteralAccess(); |
| } |
| |
| public ParserRule getXSetLiteralRule() { |
| return getXSetLiteralAccess().getRule(); |
| } |
| |
| //XListLiteral: |
| // {XListLiteral} '#' '[' (elements+=XExpression (',' elements+=XExpression)*)? ']'; |
| public XbaseGrammarAccess.XListLiteralElements getXListLiteralAccess() { |
| return gaXbase.getXListLiteralAccess(); |
| } |
| |
| public ParserRule getXListLiteralRule() { |
| return getXListLiteralAccess().getRule(); |
| } |
| |
| //XClosure XExpression: |
| // => ({XClosure} |
| // '[') |
| // => ((declaredFormalParameters+=JvmFormalParameter (',' declaredFormalParameters+=JvmFormalParameter)*)? |
| // explicitSyntax?='|')? |
| // expression=XExpressionInClosure |
| // ']'; |
| public XbaseGrammarAccess.XClosureElements getXClosureAccess() { |
| return gaXbase.getXClosureAccess(); |
| } |
| |
| public ParserRule getXClosureRule() { |
| return getXClosureAccess().getRule(); |
| } |
| |
| //XExpressionInClosure XExpression: |
| // {XBlockExpression} (expressions+=XExpressionOrVarDeclaration ';'?)*; |
| public XbaseGrammarAccess.XExpressionInClosureElements getXExpressionInClosureAccess() { |
| return gaXbase.getXExpressionInClosureAccess(); |
| } |
| |
| public ParserRule getXExpressionInClosureRule() { |
| return getXExpressionInClosureAccess().getRule(); |
| } |
| |
| //XShortClosure XExpression: |
| // => ({XClosure} (declaredFormalParameters+=JvmFormalParameter (',' declaredFormalParameters+=JvmFormalParameter)*)? |
| // explicitSyntax?='|') expression=XExpression; |
| public XbaseGrammarAccess.XShortClosureElements getXShortClosureAccess() { |
| return gaXbase.getXShortClosureAccess(); |
| } |
| |
| public ParserRule getXShortClosureRule() { |
| return getXShortClosureAccess().getRule(); |
| } |
| |
| //XParenthesizedExpression XExpression: |
| // '(' XExpression ')'; |
| public XbaseGrammarAccess.XParenthesizedExpressionElements getXParenthesizedExpressionAccess() { |
| return gaXbase.getXParenthesizedExpressionAccess(); |
| } |
| |
| public ParserRule getXParenthesizedExpressionRule() { |
| return getXParenthesizedExpressionAccess().getRule(); |
| } |
| |
| //XIfExpression XExpression: |
| // {XIfExpression} |
| // 'if' '(' if=XExpression ')' |
| // then=XExpression (=> 'else' else=XExpression)?; |
| public XbaseGrammarAccess.XIfExpressionElements getXIfExpressionAccess() { |
| return gaXbase.getXIfExpressionAccess(); |
| } |
| |
| public ParserRule getXIfExpressionRule() { |
| return getXIfExpressionAccess().getRule(); |
| } |
| |
| //XSwitchExpression XExpression: |
| // {XSwitchExpression} |
| // 'switch' (=> ('(' declaredParam=JvmFormalParameter ':') switch=XExpression ')' |
| // | => (declaredParam=JvmFormalParameter ':')? switch=XExpression) '{' |
| // cases+=XCasePart* ('default' ':' default=XExpression)? |
| // '}'; |
| public XbaseGrammarAccess.XSwitchExpressionElements getXSwitchExpressionAccess() { |
| return gaXbase.getXSwitchExpressionAccess(); |
| } |
| |
| public ParserRule getXSwitchExpressionRule() { |
| return getXSwitchExpressionAccess().getRule(); |
| } |
| |
| //XCasePart: |
| // {XCasePart} typeGuard=JvmTypeReference? ('case' case=XExpression)? (':' then=XExpression | fallThrough?=','); |
| public XbaseGrammarAccess.XCasePartElements getXCasePartAccess() { |
| return gaXbase.getXCasePartAccess(); |
| } |
| |
| public ParserRule getXCasePartRule() { |
| return getXCasePartAccess().getRule(); |
| } |
| |
| //XForLoopExpression XExpression: |
| // => ({XForLoopExpression} |
| // 'for' '(' declaredParam=JvmFormalParameter ':') forExpression=XExpression ')' |
| // eachExpression=XExpression; |
| public XbaseGrammarAccess.XForLoopExpressionElements getXForLoopExpressionAccess() { |
| return gaXbase.getXForLoopExpressionAccess(); |
| } |
| |
| public ParserRule getXForLoopExpressionRule() { |
| return getXForLoopExpressionAccess().getRule(); |
| } |
| |
| //XBasicForLoopExpression XExpression: |
| // {XBasicForLoopExpression} |
| // 'for' '(' (initExpressions+=XExpressionOrVarDeclaration (',' initExpressions+=XExpressionOrVarDeclaration)*)? ';' |
| // expression=XExpression? ';' (updateExpressions+=XExpression (',' updateExpressions+=XExpression)*)? ')' |
| // eachExpression=XExpression; |
| public XbaseGrammarAccess.XBasicForLoopExpressionElements getXBasicForLoopExpressionAccess() { |
| return gaXbase.getXBasicForLoopExpressionAccess(); |
| } |
| |
| public ParserRule getXBasicForLoopExpressionRule() { |
| return getXBasicForLoopExpressionAccess().getRule(); |
| } |
| |
| //XWhileExpression XExpression: |
| // {XWhileExpression} |
| // 'while' '(' predicate=XExpression ')' |
| // body=XExpression; |
| public XbaseGrammarAccess.XWhileExpressionElements getXWhileExpressionAccess() { |
| return gaXbase.getXWhileExpressionAccess(); |
| } |
| |
| public ParserRule getXWhileExpressionRule() { |
| return getXWhileExpressionAccess().getRule(); |
| } |
| |
| //XDoWhileExpression XExpression: |
| // {XDoWhileExpression} |
| // 'do' |
| // body=XExpression |
| // 'while' '(' predicate=XExpression ')'; |
| public XbaseGrammarAccess.XDoWhileExpressionElements getXDoWhileExpressionAccess() { |
| return gaXbase.getXDoWhileExpressionAccess(); |
| } |
| |
| public ParserRule getXDoWhileExpressionRule() { |
| return getXDoWhileExpressionAccess().getRule(); |
| } |
| |
| //XBlockExpression XExpression: |
| // {XBlockExpression} |
| // '{' (expressions+=XExpressionOrVarDeclaration ';'?)* |
| // '}'; |
| public XbaseGrammarAccess.XBlockExpressionElements getXBlockExpressionAccess() { |
| return gaXbase.getXBlockExpressionAccess(); |
| } |
| |
| public ParserRule getXBlockExpressionRule() { |
| return getXBlockExpressionAccess().getRule(); |
| } |
| |
| //XExpressionOrVarDeclaration XExpression: |
| // XVariableDeclaration | XExpression; |
| public XbaseGrammarAccess.XExpressionOrVarDeclarationElements getXExpressionOrVarDeclarationAccess() { |
| return gaXbase.getXExpressionOrVarDeclarationAccess(); |
| } |
| |
| public ParserRule getXExpressionOrVarDeclarationRule() { |
| return getXExpressionOrVarDeclarationAccess().getRule(); |
| } |
| |
| //XVariableDeclaration XExpression: |
| // {XVariableDeclaration} (writeable?='var' | 'val') (=> (type=JvmTypeReference name=ValidID) | name=ValidID) ('=' |
| // right=XExpression)?; |
| public XbaseGrammarAccess.XVariableDeclarationElements getXVariableDeclarationAccess() { |
| return gaXbase.getXVariableDeclarationAccess(); |
| } |
| |
| public ParserRule getXVariableDeclarationRule() { |
| return getXVariableDeclarationAccess().getRule(); |
| } |
| |
| //JvmFormalParameter types::JvmFormalParameter: |
| // parameterType=JvmTypeReference? name=ValidID; |
| public XbaseGrammarAccess.JvmFormalParameterElements getJvmFormalParameterAccess() { |
| return gaXbase.getJvmFormalParameterAccess(); |
| } |
| |
| public ParserRule getJvmFormalParameterRule() { |
| return getJvmFormalParameterAccess().getRule(); |
| } |
| |
| //FullJvmFormalParameter types::JvmFormalParameter: |
| // parameterType=JvmTypeReference name=ValidID; |
| public XbaseGrammarAccess.FullJvmFormalParameterElements getFullJvmFormalParameterAccess() { |
| return gaXbase.getFullJvmFormalParameterAccess(); |
| } |
| |
| public ParserRule getFullJvmFormalParameterRule() { |
| return getFullJvmFormalParameterAccess().getRule(); |
| } |
| |
| //XFeatureCall XExpression: |
| // {XFeatureCall} ('<' typeArguments+=JvmArgumentTypeReference (',' typeArguments+=JvmArgumentTypeReference)* '>')? |
| // feature=[types::JvmIdentifiableElement|IdOrSuper] (=> explicitOperationCall?='(' (featureCallArguments+=XShortClosure |
| // | featureCallArguments+=XExpression (',' featureCallArguments+=XExpression)*)? |
| // ')')? |
| // featureCallArguments+=XClosure?; |
| public XbaseGrammarAccess.XFeatureCallElements getXFeatureCallAccess() { |
| return gaXbase.getXFeatureCallAccess(); |
| } |
| |
| public ParserRule getXFeatureCallRule() { |
| return getXFeatureCallAccess().getRule(); |
| } |
| |
| //FeatureCallID: |
| // ValidID | 'extends' | 'static' | 'import' | 'extension'; |
| public XbaseGrammarAccess.FeatureCallIDElements getFeatureCallIDAccess() { |
| return gaXbase.getFeatureCallIDAccess(); |
| } |
| |
| public ParserRule getFeatureCallIDRule() { |
| return getFeatureCallIDAccess().getRule(); |
| } |
| |
| //IdOrSuper: |
| // FeatureCallID | 'super'; |
| public XbaseGrammarAccess.IdOrSuperElements getIdOrSuperAccess() { |
| return gaXbase.getIdOrSuperAccess(); |
| } |
| |
| public ParserRule getIdOrSuperRule() { |
| return getIdOrSuperAccess().getRule(); |
| } |
| |
| //XConstructorCall XExpression: |
| // {XConstructorCall} |
| // 'new' constructor=[types::JvmConstructor|QualifiedName] (=> '<' typeArguments+=JvmArgumentTypeReference (',' |
| // typeArguments+=JvmArgumentTypeReference)* '>')? (=> explicitConstructorCall?='(' (arguments+=XShortClosure |
| // | arguments+=XExpression (',' arguments+=XExpression)*)? |
| // ')')? |
| // arguments+=XClosure?; |
| public XbaseGrammarAccess.XConstructorCallElements getXConstructorCallAccess() { |
| return gaXbase.getXConstructorCallAccess(); |
| } |
| |
| public ParserRule getXConstructorCallRule() { |
| return getXConstructorCallAccess().getRule(); |
| } |
| |
| //XBooleanLiteral XExpression: |
| // {XBooleanLiteral} ('false' | isTrue?='true'); |
| public XbaseGrammarAccess.XBooleanLiteralElements getXBooleanLiteralAccess() { |
| return gaXbase.getXBooleanLiteralAccess(); |
| } |
| |
| public ParserRule getXBooleanLiteralRule() { |
| return getXBooleanLiteralAccess().getRule(); |
| } |
| |
| //XNullLiteral XExpression: |
| // {XNullLiteral} 'null'; |
| public XbaseGrammarAccess.XNullLiteralElements getXNullLiteralAccess() { |
| return gaXbase.getXNullLiteralAccess(); |
| } |
| |
| public ParserRule getXNullLiteralRule() { |
| return getXNullLiteralAccess().getRule(); |
| } |
| |
| //XNumberLiteral XExpression: |
| // {XNumberLiteral} value=Number; |
| public XbaseGrammarAccess.XNumberLiteralElements getXNumberLiteralAccess() { |
| return gaXbase.getXNumberLiteralAccess(); |
| } |
| |
| public ParserRule getXNumberLiteralRule() { |
| return getXNumberLiteralAccess().getRule(); |
| } |
| |
| //XStringLiteral XExpression: |
| // {XStringLiteral} value=STRING; |
| public XbaseGrammarAccess.XStringLiteralElements getXStringLiteralAccess() { |
| return gaXbase.getXStringLiteralAccess(); |
| } |
| |
| public ParserRule getXStringLiteralRule() { |
| return getXStringLiteralAccess().getRule(); |
| } |
| |
| //XTypeLiteral XExpression: |
| // {XTypeLiteral} 'typeof' '(' type=[types::JvmType|QualifiedName] arrayDimensions+=ArrayBrackets* ')'; |
| public XbaseGrammarAccess.XTypeLiteralElements getXTypeLiteralAccess() { |
| return gaXbase.getXTypeLiteralAccess(); |
| } |
| |
| public ParserRule getXTypeLiteralRule() { |
| return getXTypeLiteralAccess().getRule(); |
| } |
| |
| //XThrowExpression XExpression: |
| // {XThrowExpression} 'throw' expression=XExpression; |
| public XbaseGrammarAccess.XThrowExpressionElements getXThrowExpressionAccess() { |
| return gaXbase.getXThrowExpressionAccess(); |
| } |
| |
| public ParserRule getXThrowExpressionRule() { |
| return getXThrowExpressionAccess().getRule(); |
| } |
| |
| //XReturnExpression XExpression: |
| // {XReturnExpression} 'return' -> expression=XExpression?; |
| public XbaseGrammarAccess.XReturnExpressionElements getXReturnExpressionAccess() { |
| return gaXbase.getXReturnExpressionAccess(); |
| } |
| |
| public ParserRule getXReturnExpressionRule() { |
| return getXReturnExpressionAccess().getRule(); |
| } |
| |
| //XTryCatchFinallyExpression XExpression: |
| // {XTryCatchFinallyExpression} |
| // 'try' |
| // expression=XExpression (catchClauses+=XCatchClause+ (=> 'finally' finallyExpression=XExpression)? |
| // | 'finally' finallyExpression=XExpression); |
| public XbaseGrammarAccess.XTryCatchFinallyExpressionElements getXTryCatchFinallyExpressionAccess() { |
| return gaXbase.getXTryCatchFinallyExpressionAccess(); |
| } |
| |
| public ParserRule getXTryCatchFinallyExpressionRule() { |
| return getXTryCatchFinallyExpressionAccess().getRule(); |
| } |
| |
| //XSynchronizedExpression XExpression: |
| // => ({XSynchronizedExpression} |
| // 'synchronized' '(') param=XExpression ')' expression=XExpression; |
| public XbaseGrammarAccess.XSynchronizedExpressionElements getXSynchronizedExpressionAccess() { |
| return gaXbase.getXSynchronizedExpressionAccess(); |
| } |
| |
| public ParserRule getXSynchronizedExpressionRule() { |
| return getXSynchronizedExpressionAccess().getRule(); |
| } |
| |
| //XCatchClause: |
| // => 'catch' '(' declaredParam=FullJvmFormalParameter ')' expression=XExpression; |
| public XbaseGrammarAccess.XCatchClauseElements getXCatchClauseAccess() { |
| return gaXbase.getXCatchClauseAccess(); |
| } |
| |
| public ParserRule getXCatchClauseRule() { |
| return getXCatchClauseAccess().getRule(); |
| } |
| |
| //QualifiedName: |
| // ValidID (=> '.' ValidID)*; |
| public XbaseGrammarAccess.QualifiedNameElements getQualifiedNameAccess() { |
| return gaXbase.getQualifiedNameAccess(); |
| } |
| |
| public ParserRule getQualifiedNameRule() { |
| return getQualifiedNameAccess().getRule(); |
| } |
| |
| //Number hidden(): |
| // HEX | (INT | DECIMAL) ('.' (INT | DECIMAL))?; |
| public XbaseGrammarAccess.NumberElements getNumberAccess() { |
| return gaXbase.getNumberAccess(); |
| } |
| |
| public ParserRule getNumberRule() { |
| return getNumberAccess().getRule(); |
| } |
| |
| ///** |
| // * Dummy rule, for "better" downwards compatibility, since GrammarAccess generates non-static inner classes, |
| // * which makes downstream grammars break on classloading, when a rule is removed. |
| // */ StaticQualifier: |
| // (ValidID '::')+; |
| public XbaseGrammarAccess.StaticQualifierElements getStaticQualifierAccess() { |
| return gaXbase.getStaticQualifierAccess(); |
| } |
| |
| public ParserRule getStaticQualifierRule() { |
| return getStaticQualifierAccess().getRule(); |
| } |
| |
| //terminal HEX: |
| // ('0x' | '0X') ('0'..'9' | 'a'..'f' | 'A'..'F' | '_')+ ('#' (('b' | 'B') ('i' | 'I') | ('l' | 'L')))?; |
| public TerminalRule getHEXRule() { |
| return gaXbase.getHEXRule(); |
| } |
| |
| //terminal INT returns ecore::EInt: |
| // '0'..'9' ('0'..'9' | '_')*; |
| public TerminalRule getINTRule() { |
| return gaXbase.getINTRule(); |
| } |
| |
| //terminal DECIMAL: |
| // INT (('e' | 'E') ('+' | '-')? INT)? (('b' | 'B') ('i' | 'I' | 'd' | 'D') | ('l' | 'L' | 'd' | 'D' | 'f' | 'F'))?; |
| public TerminalRule getDECIMALRule() { |
| return gaXbase.getDECIMALRule(); |
| } |
| |
| //JvmTypeReference: |
| // JvmParameterizedTypeReference => ({JvmGenericArrayTypeReference.componentType=current} ArrayBrackets)* |
| // | XFunctionTypeRef; |
| public XtypeGrammarAccess.JvmTypeReferenceElements getJvmTypeReferenceAccess() { |
| return gaXtype.getJvmTypeReferenceAccess(); |
| } |
| |
| public ParserRule getJvmTypeReferenceRule() { |
| return getJvmTypeReferenceAccess().getRule(); |
| } |
| |
| //ArrayBrackets: |
| // '[' ']'; |
| public XtypeGrammarAccess.ArrayBracketsElements getArrayBracketsAccess() { |
| return gaXtype.getArrayBracketsAccess(); |
| } |
| |
| public ParserRule getArrayBracketsRule() { |
| return getArrayBracketsAccess().getRule(); |
| } |
| |
| //XFunctionTypeRef: |
| // ('(' (paramTypes+=JvmTypeReference (',' paramTypes+=JvmTypeReference)*)? ')')? '=>' returnType=JvmTypeReference; |
| public XtypeGrammarAccess.XFunctionTypeRefElements getXFunctionTypeRefAccess() { |
| return gaXtype.getXFunctionTypeRefAccess(); |
| } |
| |
| public ParserRule getXFunctionTypeRefRule() { |
| return getXFunctionTypeRefAccess().getRule(); |
| } |
| |
| //JvmParameterizedTypeReference: |
| // type=[JvmType|super::QualifiedName] (=> '<' arguments+=JvmArgumentTypeReference (',' |
| // arguments+=JvmArgumentTypeReference)* '>' (=> ({JvmInnerTypeReference.outer=current} '.') type=[JvmType|ValidID] (=> |
| // '<' arguments+=JvmArgumentTypeReference (',' arguments+=JvmArgumentTypeReference)* '>')?)*)?; |
| public XtypeGrammarAccess.JvmParameterizedTypeReferenceElements getJvmParameterizedTypeReferenceAccess() { |
| return gaXtype.getJvmParameterizedTypeReferenceAccess(); |
| } |
| |
| public ParserRule getJvmParameterizedTypeReferenceRule() { |
| return getJvmParameterizedTypeReferenceAccess().getRule(); |
| } |
| |
| //JvmArgumentTypeReference JvmTypeReference: |
| // JvmTypeReference | JvmWildcardTypeReference; |
| public XtypeGrammarAccess.JvmArgumentTypeReferenceElements getJvmArgumentTypeReferenceAccess() { |
| return gaXtype.getJvmArgumentTypeReferenceAccess(); |
| } |
| |
| public ParserRule getJvmArgumentTypeReferenceRule() { |
| return getJvmArgumentTypeReferenceAccess().getRule(); |
| } |
| |
| //JvmWildcardTypeReference: |
| // {JvmWildcardTypeReference} '?' (constraints+=JvmUpperBound constraints+=JvmUpperBoundAnded* |
| // | constraints+=JvmLowerBound constraints+=JvmLowerBoundAnded*)?; |
| public XtypeGrammarAccess.JvmWildcardTypeReferenceElements getJvmWildcardTypeReferenceAccess() { |
| return gaXtype.getJvmWildcardTypeReferenceAccess(); |
| } |
| |
| public ParserRule getJvmWildcardTypeReferenceRule() { |
| return getJvmWildcardTypeReferenceAccess().getRule(); |
| } |
| |
| //JvmUpperBound: |
| // 'extends' typeReference=JvmTypeReference; |
| public XtypeGrammarAccess.JvmUpperBoundElements getJvmUpperBoundAccess() { |
| return gaXtype.getJvmUpperBoundAccess(); |
| } |
| |
| public ParserRule getJvmUpperBoundRule() { |
| return getJvmUpperBoundAccess().getRule(); |
| } |
| |
| //JvmUpperBoundAnded JvmUpperBound: |
| // '&' typeReference=JvmTypeReference; |
| public XtypeGrammarAccess.JvmUpperBoundAndedElements getJvmUpperBoundAndedAccess() { |
| return gaXtype.getJvmUpperBoundAndedAccess(); |
| } |
| |
| public ParserRule getJvmUpperBoundAndedRule() { |
| return getJvmUpperBoundAndedAccess().getRule(); |
| } |
| |
| //JvmLowerBound: |
| // 'super' typeReference=JvmTypeReference; |
| public XtypeGrammarAccess.JvmLowerBoundElements getJvmLowerBoundAccess() { |
| return gaXtype.getJvmLowerBoundAccess(); |
| } |
| |
| public ParserRule getJvmLowerBoundRule() { |
| return getJvmLowerBoundAccess().getRule(); |
| } |
| |
| //JvmLowerBoundAnded JvmLowerBound: |
| // '&' typeReference=JvmTypeReference; |
| public XtypeGrammarAccess.JvmLowerBoundAndedElements getJvmLowerBoundAndedAccess() { |
| return gaXtype.getJvmLowerBoundAndedAccess(); |
| } |
| |
| public ParserRule getJvmLowerBoundAndedRule() { |
| return getJvmLowerBoundAndedAccess().getRule(); |
| } |
| |
| //JvmTypeParameter: |
| // name=ValidID (constraints+=JvmUpperBound constraints+=JvmUpperBoundAnded*)?; |
| public XtypeGrammarAccess.JvmTypeParameterElements getJvmTypeParameterAccess() { |
| return gaXtype.getJvmTypeParameterAccess(); |
| } |
| |
| public ParserRule getJvmTypeParameterRule() { |
| return getJvmTypeParameterAccess().getRule(); |
| } |
| |
| //QualifiedNameWithWildcard: |
| // super::QualifiedName '.' '*'; |
| public XtypeGrammarAccess.QualifiedNameWithWildcardElements getQualifiedNameWithWildcardAccess() { |
| return gaXtype.getQualifiedNameWithWildcardAccess(); |
| } |
| |
| public ParserRule getQualifiedNameWithWildcardRule() { |
| return getQualifiedNameWithWildcardAccess().getRule(); |
| } |
| |
| //ValidID: |
| // ID; |
| public XtypeGrammarAccess.ValidIDElements getValidIDAccess() { |
| return gaXtype.getValidIDAccess(); |
| } |
| |
| public ParserRule getValidIDRule() { |
| return getValidIDAccess().getRule(); |
| } |
| |
| //XImportSection: |
| // importDeclarations+=super::XImportDeclaration+; |
| public XtypeGrammarAccess.XImportSectionElements getXImportSectionAccess() { |
| return gaXtype.getXImportSectionAccess(); |
| } |
| |
| public ParserRule getXImportSectionRule() { |
| return getXImportSectionAccess().getRule(); |
| } |
| |
| //QualifiedNameInStaticImport: |
| // (ValidID '.')+; |
| public XtypeGrammarAccess.QualifiedNameInStaticImportElements getQualifiedNameInStaticImportAccess() { |
| return gaXtype.getQualifiedNameInStaticImportAccess(); |
| } |
| |
| public ParserRule getQualifiedNameInStaticImportRule() { |
| return getQualifiedNameInStaticImportAccess().getRule(); |
| } |
| |
| //terminal ID: |
| // '^'? ('a'..'z' | 'A'..'Z' | '$' | '_') ('a'..'z' | 'A'..'Z' | '$' | '_' | '0'..'9')*; |
| public TerminalRule getIDRule() { |
| return gaXtype.getIDRule(); |
| } |
| |
| //terminal STRING: |
| // '"' ('\\' . | !('\\' | '"'))* '"'? | |
| // "'" ('\\' . | !('\\' | "'"))* "'"?; |
| public TerminalRule getSTRINGRule() { |
| return gaXtype.getSTRINGRule(); |
| } |
| |
| //terminal ML_COMMENT: |
| // '/*'->'*/'; |
| public TerminalRule getML_COMMENTRule() { |
| return gaXtype.getML_COMMENTRule(); |
| } |
| |
| //terminal SL_COMMENT: |
| // '//' !('\n' | '\r')* ('\r'? '\n')?; |
| public TerminalRule getSL_COMMENTRule() { |
| return gaXtype.getSL_COMMENTRule(); |
| } |
| |
| //terminal WS: |
| // ' ' | '\t' | '\r' | '\n'+; |
| public TerminalRule getWSRule() { |
| return gaXtype.getWSRule(); |
| } |
| |
| //terminal ANY_OTHER: |
| // .; |
| public TerminalRule getANY_OTHERRule() { |
| return gaXtype.getANY_OTHERRule(); |
| } |
| } |