/* * generated by Xtext 2.10.0 */ package hu.bme.mit.inf.dslreasoner.application.services; import com.google.inject.Inject; import com.google.inject.Singleton; import java.util.List; import org.eclipse.xtext.Alternatives; 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.common.services.TerminalsGrammarAccess; import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder; import org.eclipse.xtext.service.GrammarProvider; @Singleton public class ApplicationConfigurationGrammarAccess extends AbstractGrammarElementFinder { public class ConfigurationScriptElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.ConfigurationScript"); private final Group cGroup = (Group)rule.eContents().get(1); private final Assignment cImportsAssignment_0 = (Assignment)cGroup.eContents().get(0); private final RuleCall cImportsImportParserRuleCall_0_0 = (RuleCall)cImportsAssignment_0.eContents().get(0); private final Assignment cCommandsAssignment_1 = (Assignment)cGroup.eContents().get(1); private final RuleCall cCommandsCommandParserRuleCall_1_0 = (RuleCall)cCommandsAssignment_1.eContents().get(0); //ConfigurationScript: // imports+=Import* // commands+=Command*; @Override public ParserRule getRule() { return rule; } //imports+=Import* commands+=Command* public Group getGroup() { return cGroup; } //imports+=Import* public Assignment getImportsAssignment_0() { return cImportsAssignment_0; } //Import public RuleCall getImportsImportParserRuleCall_0_0() { return cImportsImportParserRuleCall_0_0; } //commands+=Command* public Assignment getCommandsAssignment_1() { return cCommandsAssignment_1; } //Command public RuleCall getCommandsCommandParserRuleCall_1_0() { return cCommandsCommandParserRuleCall_1_0; } } public class CommandElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.Command"); private final RuleCall cDeclarationParserRuleCall = (RuleCall)rule.eContents().get(1); //Command: // Declaration // //| Task //; @Override public ParserRule getRule() { return rule; } //Declaration public RuleCall getDeclarationParserRuleCall() { return cDeclarationParserRuleCall; } } public class DeclarationElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.Declaration"); private final RuleCall cMetamodelDeclarationParserRuleCall = (RuleCall)rule.eContents().get(1); //Declaration: // MetamodelDeclaration // // | PartialModelDeclaration // // | GraphPatternDeclaration // // | SolverConfig //; @Override public ParserRule getRule() { return rule; } //// FileDeclaration | //MetamodelDeclaration public RuleCall getMetamodelDeclarationParserRuleCall() { return cMetamodelDeclarationParserRuleCall; } } public class ImportElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.Import"); private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); private final RuleCall cEPackageImportParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); private final RuleCall cViatraImportParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); ///////////////////////////////////////////////////// //// Imports ///////////////////////////////////////////////////// //Import: // EPackageImport | ViatraImport; @Override public ParserRule getRule() { return rule; } //EPackageImport | ViatraImport public Alternatives getAlternatives() { return cAlternatives; } //EPackageImport public RuleCall getEPackageImportParserRuleCall_0() { return cEPackageImportParserRuleCall_0; } //ViatraImport public RuleCall getViatraImportParserRuleCall_1() { return cViatraImportParserRuleCall_1; } } public class EPackageImportElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.EPackageImport"); private final Group cGroup = (Group)rule.eContents().get(1); private final Keyword cImportKeyword_0 = (Keyword)cGroup.eContents().get(0); private final Keyword cEpackageKeyword_1 = (Keyword)cGroup.eContents().get(1); private final Assignment cImportedPackageAssignment_2 = (Assignment)cGroup.eContents().get(2); private final CrossReference cImportedPackageEPackageCrossReference_2_0 = (CrossReference)cImportedPackageAssignment_2.eContents().get(0); private final RuleCall cImportedPackageEPackageSTRINGTerminalRuleCall_2_0_1 = (RuleCall)cImportedPackageEPackageCrossReference_2_0.eContents().get(1); //EPackageImport: // "import" "epackage" importedPackage=[ecore::EPackage|STRING]; @Override public ParserRule getRule() { return rule; } //"import" "epackage" importedPackage=[ecore::EPackage|STRING] public Group getGroup() { return cGroup; } //"import" public Keyword getImportKeyword_0() { return cImportKeyword_0; } //"epackage" public Keyword getEpackageKeyword_1() { return cEpackageKeyword_1; } //importedPackage=[ecore::EPackage|STRING] public Assignment getImportedPackageAssignment_2() { return cImportedPackageAssignment_2; } //[ecore::EPackage|STRING] public CrossReference getImportedPackageEPackageCrossReference_2_0() { return cImportedPackageEPackageCrossReference_2_0; } //STRING public RuleCall getImportedPackageEPackageSTRINGTerminalRuleCall_2_0_1() { return cImportedPackageEPackageSTRINGTerminalRuleCall_2_0_1; } } public class ViatraImportElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.ViatraImport"); private final Group cGroup = (Group)rule.eContents().get(1); private final Keyword cImportKeyword_0 = (Keyword)cGroup.eContents().get(0); private final Keyword cViatraKeyword_1 = (Keyword)cGroup.eContents().get(1); private final Assignment cImportedViatraAssignment_2 = (Assignment)cGroup.eContents().get(2); private final CrossReference cImportedViatraPatternModelCrossReference_2_0 = (CrossReference)cImportedViatraAssignment_2.eContents().get(0); private final RuleCall cImportedViatraPatternModelSTRINGTerminalRuleCall_2_0_1 = (RuleCall)cImportedViatraPatternModelCrossReference_2_0.eContents().get(1); //ViatraImport: // "import" "viatra" importedViatra=[viatra::PatternModel|STRING]; @Override public ParserRule getRule() { return rule; } //"import" "viatra" importedViatra=[viatra::PatternModel|STRING] public Group getGroup() { return cGroup; } //"import" public Keyword getImportKeyword_0() { return cImportKeyword_0; } //"viatra" public Keyword getViatraKeyword_1() { return cViatraKeyword_1; } //importedViatra=[viatra::PatternModel|STRING] public Assignment getImportedViatraAssignment_2() { return cImportedViatraAssignment_2; } //[viatra::PatternModel|STRING] public CrossReference getImportedViatraPatternModelCrossReference_2_0() { return cImportedViatraPatternModelCrossReference_2_0; } //STRING public RuleCall getImportedViatraPatternModelSTRINGTerminalRuleCall_2_0_1() { return cImportedViatraPatternModelSTRINGTerminalRuleCall_2_0_1; } } public class MetamodelSpecificationElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.MetamodelSpecification"); private final Group cGroup = (Group)rule.eContents().get(1); private final Keyword cLeftCurlyBracketKeyword_0 = (Keyword)cGroup.eContents().get(0); private final Assignment cEntriesAssignment_1 = (Assignment)cGroup.eContents().get(1); private final RuleCall cEntriesMetamodelEntryParserRuleCall_1_0 = (RuleCall)cEntriesAssignment_1.eContents().get(0); private final Group cGroup_2 = (Group)cGroup.eContents().get(2); private final Keyword cCommaKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0); private final Assignment cEntriesAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); private final RuleCall cEntriesMetamodelEntryParserRuleCall_2_1_0 = (RuleCall)cEntriesAssignment_2_1.eContents().get(0); private final Keyword cRightCurlyBracketKeyword_3 = (Keyword)cGroup.eContents().get(3); ///////////////////////////////////////////////////// //// Files and Folders ///////////////////////////////////////////////////// /// * //FileSpecification: path = STRING; //FileDeclaration: 'file' name = ID '=' specification = FileSpecification; // //FileReference: referred = [FileDeclaration]; //File: FileSpecification | FileReference; // * / /////////////////////////////////////////////////// //// Metamodel ///////////////////////////////////////////////////// //MetamodelSpecification: // '{' entries+=MetamodelEntry (',' entries+=MetamodelEntry)* '}'; @Override public ParserRule getRule() { return rule; } //'{' entries+=MetamodelEntry (',' entries+=MetamodelEntry)* '}' public Group getGroup() { return cGroup; } //'{' public Keyword getLeftCurlyBracketKeyword_0() { return cLeftCurlyBracketKeyword_0; } //entries+=MetamodelEntry public Assignment getEntriesAssignment_1() { return cEntriesAssignment_1; } //MetamodelEntry public RuleCall getEntriesMetamodelEntryParserRuleCall_1_0() { return cEntriesMetamodelEntryParserRuleCall_1_0; } //(',' entries+=MetamodelEntry)* public Group getGroup_2() { return cGroup_2; } //',' public Keyword getCommaKeyword_2_0() { return cCommaKeyword_2_0; } //entries+=MetamodelEntry public Assignment getEntriesAssignment_2_1() { return cEntriesAssignment_2_1; } //MetamodelEntry public RuleCall getEntriesMetamodelEntryParserRuleCall_2_1_0() { return cEntriesMetamodelEntryParserRuleCall_2_1_0; } //'}' public Keyword getRightCurlyBracketKeyword_3() { return cRightCurlyBracketKeyword_3; } } public class MetamodelEntryElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.MetamodelEntry"); private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); private final RuleCall cMetamodelElementParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); private final RuleCall cAllPackageEntryParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); //MetamodelEntry: // MetamodelElement | AllPackageEntry; @Override public ParserRule getRule() { return rule; } //MetamodelElement | AllPackageEntry public Alternatives getAlternatives() { return cAlternatives; } //MetamodelElement public RuleCall getMetamodelElementParserRuleCall_0() { return cMetamodelElementParserRuleCall_0; } //AllPackageEntry public RuleCall getAllPackageEntryParserRuleCall_1() { return cAllPackageEntryParserRuleCall_1; } } public class AllPackageEntryElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.AllPackageEntry"); private final Group cGroup = (Group)rule.eContents().get(1); private final Keyword cPackageKeyword_0 = (Keyword)cGroup.eContents().get(0); private final Assignment cPackageAssignment_1 = (Assignment)cGroup.eContents().get(1); private final CrossReference cPackageEPackageCrossReference_1_0 = (CrossReference)cPackageAssignment_1.eContents().get(0); private final RuleCall cPackageEPackageIDTerminalRuleCall_1_0_1 = (RuleCall)cPackageEPackageCrossReference_1_0.eContents().get(1); private final Group cGroup_2 = (Group)cGroup.eContents().get(2); private final Keyword cExcludingKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0); private final Keyword cLeftCurlyBracketKeyword_2_1 = (Keyword)cGroup_2.eContents().get(1); private final Assignment cExclusionAssignment_2_2 = (Assignment)cGroup_2.eContents().get(2); private final RuleCall cExclusionMetamodelElementParserRuleCall_2_2_0 = (RuleCall)cExclusionAssignment_2_2.eContents().get(0); private final Group cGroup_2_3 = (Group)cGroup_2.eContents().get(3); private final Keyword cCommaKeyword_2_3_0 = (Keyword)cGroup_2_3.eContents().get(0); private final Assignment cExclusionAssignment_2_3_1 = (Assignment)cGroup_2_3.eContents().get(1); private final RuleCall cExclusionMetamodelElementParserRuleCall_2_3_1_0 = (RuleCall)cExclusionAssignment_2_3_1.eContents().get(0); private final Keyword cRightCurlyBracketKeyword_2_4 = (Keyword)cGroup_2.eContents().get(4); //AllPackageEntry: // "package" package=[ecore::EPackage] ("excluding" '{' exclusion+=MetamodelElement (',' exclusion+=MetamodelElement)* // '}')?; @Override public ParserRule getRule() { return rule; } //"package" package=[ecore::EPackage] ("excluding" '{' exclusion+=MetamodelElement (',' exclusion+=MetamodelElement)* //'}')? public Group getGroup() { return cGroup; } //"package" public Keyword getPackageKeyword_0() { return cPackageKeyword_0; } //package=[ecore::EPackage] public Assignment getPackageAssignment_1() { return cPackageAssignment_1; } //[ecore::EPackage] public CrossReference getPackageEPackageCrossReference_1_0() { return cPackageEPackageCrossReference_1_0; } //ID public RuleCall getPackageEPackageIDTerminalRuleCall_1_0_1() { return cPackageEPackageIDTerminalRuleCall_1_0_1; } //("excluding" '{' exclusion+=MetamodelElement (',' exclusion+=MetamodelElement)* '}')? public Group getGroup_2() { return cGroup_2; } //"excluding" public Keyword getExcludingKeyword_2_0() { return cExcludingKeyword_2_0; } //'{' public Keyword getLeftCurlyBracketKeyword_2_1() { return cLeftCurlyBracketKeyword_2_1; } //exclusion+=MetamodelElement public Assignment getExclusionAssignment_2_2() { return cExclusionAssignment_2_2; } //MetamodelElement public RuleCall getExclusionMetamodelElementParserRuleCall_2_2_0() { return cExclusionMetamodelElementParserRuleCall_2_2_0; } //(',' exclusion+=MetamodelElement)* public Group getGroup_2_3() { return cGroup_2_3; } //',' public Keyword getCommaKeyword_2_3_0() { return cCommaKeyword_2_3_0; } //exclusion+=MetamodelElement public Assignment getExclusionAssignment_2_3_1() { return cExclusionAssignment_2_3_1; } //MetamodelElement public RuleCall getExclusionMetamodelElementParserRuleCall_2_3_1_0() { return cExclusionMetamodelElementParserRuleCall_2_3_1_0; } //'}' public Keyword getRightCurlyBracketKeyword_2_4() { return cRightCurlyBracketKeyword_2_4; } } public class MetamodelElementElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.MetamodelElement"); private final Group cGroup = (Group)rule.eContents().get(1); private final Group cGroup_0 = (Group)cGroup.eContents().get(0); private final Assignment cPackageAssignment_0_0 = (Assignment)cGroup_0.eContents().get(0); private final CrossReference cPackageEPackageCrossReference_0_0_0 = (CrossReference)cPackageAssignment_0_0.eContents().get(0); private final RuleCall cPackageEPackageIDTerminalRuleCall_0_0_0_1 = (RuleCall)cPackageEPackageCrossReference_0_0_0.eContents().get(1); private final Keyword cColonColonKeyword_0_1 = (Keyword)cGroup_0.eContents().get(1); private final Assignment cClassifierAssignment_1 = (Assignment)cGroup.eContents().get(1); private final CrossReference cClassifierEClassifierCrossReference_1_0 = (CrossReference)cClassifierAssignment_1.eContents().get(0); private final RuleCall cClassifierEClassifierIDTerminalRuleCall_1_0_1 = (RuleCall)cClassifierEClassifierCrossReference_1_0.eContents().get(1); private final Group cGroup_2 = (Group)cGroup.eContents().get(2); private final Keyword cFullStopKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0); private final Assignment cFeatureAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); private final CrossReference cFeatureENamedElementCrossReference_2_1_0 = (CrossReference)cFeatureAssignment_2_1.eContents().get(0); private final RuleCall cFeatureENamedElementIDTerminalRuleCall_2_1_0_1 = (RuleCall)cFeatureENamedElementCrossReference_2_1_0.eContents().get(1); //MetamodelElement: // (package=[ecore::EPackage] '::')? classifier=[ecore::EClassifier] ('.' feature=[ecore::ENamedElement])?; @Override public ParserRule getRule() { return rule; } //(package=[ecore::EPackage] '::')? classifier=[ecore::EClassifier] ('.' feature=[ecore::ENamedElement])? public Group getGroup() { return cGroup; } //(package=[ecore::EPackage] '::')? public Group getGroup_0() { return cGroup_0; } //package=[ecore::EPackage] public Assignment getPackageAssignment_0_0() { return cPackageAssignment_0_0; } //[ecore::EPackage] public CrossReference getPackageEPackageCrossReference_0_0_0() { return cPackageEPackageCrossReference_0_0_0; } //ID public RuleCall getPackageEPackageIDTerminalRuleCall_0_0_0_1() { return cPackageEPackageIDTerminalRuleCall_0_0_0_1; } //'::' public Keyword getColonColonKeyword_0_1() { return cColonColonKeyword_0_1; } //classifier=[ecore::EClassifier] public Assignment getClassifierAssignment_1() { return cClassifierAssignment_1; } //[ecore::EClassifier] public CrossReference getClassifierEClassifierCrossReference_1_0() { return cClassifierEClassifierCrossReference_1_0; } //ID public RuleCall getClassifierEClassifierIDTerminalRuleCall_1_0_1() { return cClassifierEClassifierIDTerminalRuleCall_1_0_1; } //('.' feature=[ecore::ENamedElement])? public Group getGroup_2() { return cGroup_2; } //'.' public Keyword getFullStopKeyword_2_0() { return cFullStopKeyword_2_0; } //feature=[ecore::ENamedElement] public Assignment getFeatureAssignment_2_1() { return cFeatureAssignment_2_1; } //[ecore::ENamedElement] public CrossReference getFeatureENamedElementCrossReference_2_1_0() { return cFeatureENamedElementCrossReference_2_1_0; } //ID public RuleCall getFeatureENamedElementIDTerminalRuleCall_2_1_0_1() { return cFeatureENamedElementIDTerminalRuleCall_2_1_0_1; } } public class MetamodelDeclarationElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.MetamodelDeclaration"); private final Group cGroup = (Group)rule.eContents().get(1); private final Keyword cMetamodelKeyword_0 = (Keyword)cGroup.eContents().get(0); private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); private final Assignment cSpecificationAssignment_2 = (Assignment)cGroup.eContents().get(2); private final RuleCall cSpecificationMetamodelSpecificationParserRuleCall_2_0 = (RuleCall)cSpecificationAssignment_2.eContents().get(0); //MetamodelDeclaration: // 'metamodel' name=ID specification=MetamodelSpecification; @Override public ParserRule getRule() { return rule; } //'metamodel' name=ID specification=MetamodelSpecification public Group getGroup() { return cGroup; } //'metamodel' public Keyword getMetamodelKeyword_0() { return cMetamodelKeyword_0; } //name=ID public Assignment getNameAssignment_1() { return cNameAssignment_1; } //ID public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; } //specification=MetamodelSpecification public Assignment getSpecificationAssignment_2() { return cSpecificationAssignment_2; } //MetamodelSpecification public RuleCall getSpecificationMetamodelSpecificationParserRuleCall_2_0() { return cSpecificationMetamodelSpecificationParserRuleCall_2_0; } } public class MetamodelReferenceElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.MetamodelReference"); private final Assignment cReferredAssignment = (Assignment)rule.eContents().get(1); private final CrossReference cReferredMetamodelDeclarationCrossReference_0 = (CrossReference)cReferredAssignment.eContents().get(0); private final RuleCall cReferredMetamodelDeclarationIDTerminalRuleCall_0_1 = (RuleCall)cReferredMetamodelDeclarationCrossReference_0.eContents().get(1); //MetamodelReference: // referred=[MetamodelDeclaration]; @Override public ParserRule getRule() { return rule; } //referred=[MetamodelDeclaration] public Assignment getReferredAssignment() { return cReferredAssignment; } //[MetamodelDeclaration] public CrossReference getReferredMetamodelDeclarationCrossReference_0() { return cReferredMetamodelDeclarationCrossReference_0; } //ID public RuleCall getReferredMetamodelDeclarationIDTerminalRuleCall_0_1() { return cReferredMetamodelDeclarationIDTerminalRuleCall_0_1; } } public class MetamodelElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration.Metamodel"); private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); private final RuleCall cMetamodelReferenceParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); private final RuleCall cMetamodelSpecificationParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); //Metamodel: // MetamodelReference | MetamodelSpecification; @Override public ParserRule getRule() { return rule; } //MetamodelReference | MetamodelSpecification public Alternatives getAlternatives() { return cAlternatives; } //MetamodelReference public RuleCall getMetamodelReferenceParserRuleCall_0() { return cMetamodelReferenceParserRuleCall_0; } //MetamodelSpecification public RuleCall getMetamodelSpecificationParserRuleCall_1() { return cMetamodelSpecificationParserRuleCall_1; } } private final ConfigurationScriptElements pConfigurationScript; private final CommandElements pCommand; private final DeclarationElements pDeclaration; private final ImportElements pImport; private final EPackageImportElements pEPackageImport; private final ViatraImportElements pViatraImport; private final MetamodelSpecificationElements pMetamodelSpecification; private final MetamodelEntryElements pMetamodelEntry; private final AllPackageEntryElements pAllPackageEntry; private final MetamodelElementElements pMetamodelElement; private final MetamodelDeclarationElements pMetamodelDeclaration; private final MetamodelReferenceElements pMetamodelReference; private final MetamodelElements pMetamodel; private final Grammar grammar; private final TerminalsGrammarAccess gaTerminals; @Inject public ApplicationConfigurationGrammarAccess(GrammarProvider grammarProvider, TerminalsGrammarAccess gaTerminals) { this.grammar = internalFindGrammar(grammarProvider); this.gaTerminals = gaTerminals; this.pConfigurationScript = new ConfigurationScriptElements(); this.pCommand = new CommandElements(); this.pDeclaration = new DeclarationElements(); this.pImport = new ImportElements(); this.pEPackageImport = new EPackageImportElements(); this.pViatraImport = new ViatraImportElements(); this.pMetamodelSpecification = new MetamodelSpecificationElements(); this.pMetamodelEntry = new MetamodelEntryElements(); this.pAllPackageEntry = new AllPackageEntryElements(); this.pMetamodelElement = new MetamodelElementElements(); this.pMetamodelDeclaration = new MetamodelDeclarationElements(); this.pMetamodelReference = new MetamodelReferenceElements(); this.pMetamodel = new MetamodelElements(); } protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("hu.bme.mit.inf.dslreasoner.application.ApplicationConfiguration".equals(grammar.getName())) { return grammar; } List grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; } @Override public Grammar getGrammar() { return grammar; } public TerminalsGrammarAccess getTerminalsGrammarAccess() { return gaTerminals; } //ConfigurationScript: // imports+=Import* // commands+=Command*; public ConfigurationScriptElements getConfigurationScriptAccess() { return pConfigurationScript; } public ParserRule getConfigurationScriptRule() { return getConfigurationScriptAccess().getRule(); } //Command: // Declaration // //| Task //; public CommandElements getCommandAccess() { return pCommand; } public ParserRule getCommandRule() { return getCommandAccess().getRule(); } //Declaration: // MetamodelDeclaration // // | PartialModelDeclaration // // | GraphPatternDeclaration // // | SolverConfig //; public DeclarationElements getDeclarationAccess() { return pDeclaration; } public ParserRule getDeclarationRule() { return getDeclarationAccess().getRule(); } ///////////////////////////////////////////////////// //// Imports ///////////////////////////////////////////////////// //Import: // EPackageImport | ViatraImport; public ImportElements getImportAccess() { return pImport; } public ParserRule getImportRule() { return getImportAccess().getRule(); } //EPackageImport: // "import" "epackage" importedPackage=[ecore::EPackage|STRING]; public EPackageImportElements getEPackageImportAccess() { return pEPackageImport; } public ParserRule getEPackageImportRule() { return getEPackageImportAccess().getRule(); } //ViatraImport: // "import" "viatra" importedViatra=[viatra::PatternModel|STRING]; public ViatraImportElements getViatraImportAccess() { return pViatraImport; } public ParserRule getViatraImportRule() { return getViatraImportAccess().getRule(); } ///////////////////////////////////////////////////// //// Files and Folders ///////////////////////////////////////////////////// /// * //FileSpecification: path = STRING; //FileDeclaration: 'file' name = ID '=' specification = FileSpecification; // //FileReference: referred = [FileDeclaration]; //File: FileSpecification | FileReference; // * / /////////////////////////////////////////////////// //// Metamodel ///////////////////////////////////////////////////// //MetamodelSpecification: // '{' entries+=MetamodelEntry (',' entries+=MetamodelEntry)* '}'; public MetamodelSpecificationElements getMetamodelSpecificationAccess() { return pMetamodelSpecification; } public ParserRule getMetamodelSpecificationRule() { return getMetamodelSpecificationAccess().getRule(); } //MetamodelEntry: // MetamodelElement | AllPackageEntry; public MetamodelEntryElements getMetamodelEntryAccess() { return pMetamodelEntry; } public ParserRule getMetamodelEntryRule() { return getMetamodelEntryAccess().getRule(); } //AllPackageEntry: // "package" package=[ecore::EPackage] ("excluding" '{' exclusion+=MetamodelElement (',' exclusion+=MetamodelElement)* // '}')?; public AllPackageEntryElements getAllPackageEntryAccess() { return pAllPackageEntry; } public ParserRule getAllPackageEntryRule() { return getAllPackageEntryAccess().getRule(); } //MetamodelElement: // (package=[ecore::EPackage] '::')? classifier=[ecore::EClassifier] ('.' feature=[ecore::ENamedElement])?; public MetamodelElementElements getMetamodelElementAccess() { return pMetamodelElement; } public ParserRule getMetamodelElementRule() { return getMetamodelElementAccess().getRule(); } //MetamodelDeclaration: // 'metamodel' name=ID specification=MetamodelSpecification; public MetamodelDeclarationElements getMetamodelDeclarationAccess() { return pMetamodelDeclaration; } public ParserRule getMetamodelDeclarationRule() { return getMetamodelDeclarationAccess().getRule(); } //MetamodelReference: // referred=[MetamodelDeclaration]; public MetamodelReferenceElements getMetamodelReferenceAccess() { return pMetamodelReference; } public ParserRule getMetamodelReferenceRule() { return getMetamodelReferenceAccess().getRule(); } //Metamodel: // MetamodelReference | MetamodelSpecification; public MetamodelElements getMetamodelAccess() { return pMetamodel; } public ParserRule getMetamodelRule() { return getMetamodelAccess().getRule(); } //terminal ID: // '^'? ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*; public TerminalRule getIDRule() { return gaTerminals.getIDRule(); } //terminal INT returns ecore::EInt: // '0'..'9'+; public TerminalRule getINTRule() { return gaTerminals.getINTRule(); } //terminal STRING: // '"' ('\\' . | !('\\' | '"'))* '"' | "'" ('\\' . | !('\\' | "'"))* "'"; public TerminalRule getSTRINGRule() { return gaTerminals.getSTRINGRule(); } //terminal ML_COMMENT: // '/ *'->'* /'; public TerminalRule getML_COMMENTRule() { return gaTerminals.getML_COMMENTRule(); } //terminal SL_COMMENT: // '//' !('\n' | '\r')* ('\r'? '\n')?; public TerminalRule getSL_COMMENTRule() { return gaTerminals.getSL_COMMENTRule(); } //terminal WS: // ' ' | '\t' | '\r' | '\n'+; public TerminalRule getWSRule() { return gaTerminals.getWSRule(); } //terminal ANY_OTHER: // .; public TerminalRule getANY_OTHERRule() { return gaTerminals.getANY_OTHERRule(); } }