From 7f7f934fe6ad11df96906d009eec68583fd46660 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 5 Feb 2019 23:54:03 +0100 Subject: [Stochastic] Fault tree transformation langauge --- .../.classpath | 9 + .../.gitignore | 1 + ...ftLanguage (cft) Language Infrastructure.launch | 18 + .../.project | 34 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 31 + .../build.properties | 20 + .../model/generated/CftLanguage.ecore | 84 + .../model/generated/CftLanguage.genmodel | 74 + .../plugin.xml | 10 + .../AbstractCftLanguageRuntimeModule.java | 208 ++ .../faulttree/components/CftLanguage.xtextbin | Bin 0 -> 5070 bytes .../CftLanguageStandaloneSetupGenerated.java | 42 + .../faulttree/components/cftLanguage/AndGate.java | 19 + .../components/cftLanguage/Assignment.java | 106 + .../cftLanguage/BasicEventDefinition.java | 51 + .../components/cftLanguage/CftLanguageFactory.java | 197 ++ .../components/cftLanguage/CftLanguagePackage.java | 1746 ++++++++++ .../faulttree/components/cftLanguage/CftModel.java | 105 + .../cftLanguage/ComponentDefinition.java | 105 + .../components/cftLanguage/ComponentInstance.java | 51 + .../components/cftLanguage/EventDeclaration.java | 52 + .../components/cftLanguage/EventDefinition.java | 19 + .../components/cftLanguage/EventReference.java | 79 + .../components/cftLanguage/GateDefinition.java | 42 + .../components/cftLanguage/ImportDeclaration.java | 52 + .../components/cftLanguage/InputEvent.java | 51 + .../components/cftLanguage/LookupDefinition.java | 69 + .../components/cftLanguage/MappingDefinition.java | 161 + .../components/cftLanguage/MappingParameter.java | 52 + .../faulttree/components/cftLanguage/OrGate.java | 19 + .../cftLanguage/TransformationDefinition.java | 71 + .../faulttree/components/cftLanguage/Variable.java | 52 + .../components/cftLanguage/impl/AndGateImpl.java | 41 + .../cftLanguage/impl/AssignmentImpl.java | 343 ++ .../cftLanguage/impl/BasicEventDefinitionImpl.java | 179 + .../cftLanguage/impl/CftLanguageFactoryImpl.java | 330 ++ .../cftLanguage/impl/CftLanguagePackageImpl.java | 999 ++++++ .../components/cftLanguage/impl/CftModelImpl.java | 324 ++ .../cftLanguage/impl/ComponentDefinitionImpl.java | 323 ++ .../cftLanguage/impl/ComponentInstanceImpl.java | 175 + .../cftLanguage/impl/EventDeclarationImpl.java | 180 + .../cftLanguage/impl/EventDefinitionImpl.java | 41 + .../cftLanguage/impl/EventReferenceImpl.java | 244 ++ .../cftLanguage/impl/GateDefinitionImpl.java | 147 + .../cftLanguage/impl/ImportDeclarationImpl.java | 180 + .../cftLanguage/impl/InputEventImpl.java | 179 + .../cftLanguage/impl/LookupDefinitionImpl.java | 220 ++ .../cftLanguage/impl/MappingDefinitionImpl.java | 467 +++ .../cftLanguage/impl/MappingParameterImpl.java | 180 + .../components/cftLanguage/impl/OrGateImpl.java | 41 + .../impl/TransformationDefinitionImpl.java | 244 ++ .../components/cftLanguage/impl/VariableImpl.java | 180 + .../util/CftLanguageAdapterFactory.java | 473 +++ .../cftLanguage/util/CftLanguageSwitch.java | 525 +++ .../antlr/CftLanguageAntlrTokenFileProvider.java | 16 + .../components/parser/antlr/CftLanguageParser.java | 40 + .../parser/antlr/internal/InternalCftLanguage.g | 1332 ++++++++ .../antlr/internal/InternalCftLanguage.tokens | 60 + .../antlr/internal/InternalCftLanguageLexer.java | 1876 +++++++++++ .../antlr/internal/InternalCftLanguageParser.java | 3449 ++++++++++++++++++++ .../scoping/AbstractCftLanguageScopeProvider.java | 9 + .../serializer/CftLanguageSemanticSequencer.java | 315 ++ .../serializer/CftLanguageSyntacticSequencer.java | 242 ++ .../services/CftLanguageGrammarAccess.java | 1189 +++++++ .../validation/AbstractCftLanguageValidator.java | 19 + .../CftLanguageConfigurableIssueCodesProvider.java | 22 + .../faulttree/components/CftLanguage.xtext | 82 + .../components/CftLanguageRuntimeModule.xtend | 33 + .../components/CftLanguageStandaloneSetup.xtend | 15 + .../faulttree/components/GenerateCftLanguage.mwe2 | 46 + .../generator/CftLanguageGenerator.xtend | 25 + .../naming/CftLanguageQualifiedNameProvider.xtend | 27 + .../components/naming/PackageNameProvider.xtend | 30 + ...eImportedNamespaceAwareLocalScopeProvider.xtend | 45 + .../scoping/CftLanguageScopeProvider.xtend | 138 + .../validation/CftLanguageValidator.xtend | 25 + .../components/.CftLanguageRuntimeModule.xtendbin | Bin 0 -> 3218 bytes .../.CftLanguageStandaloneSetup.xtendbin | Bin 0 -> 2015 bytes .../dslreasoner/faulttree/components/.gitignore | 2 + .../components/CftLanguageRuntimeModule.java | 37 + .../components/CftLanguageStandaloneSetup.java | 16 + .../generator/.CftLanguageGenerator.xtendbin | Bin 0 -> 2365 bytes .../faulttree/components/generator/.gitignore | 1 + .../components/generator/CftLanguageGenerator.java | 21 + .../.CftLanguageQualifiedNameProvider.xtendbin | Bin 0 -> 3678 bytes .../naming/.PackageNameProvider.xtendbin | Bin 0 -> 3283 bytes .../faulttree/components/naming/.gitignore | 2 + .../naming/CftLanguageQualifiedNameProvider.java | 35 + .../components/naming/PackageNameProvider.java | 46 + ...portedNamespaceAwareLocalScopeProvider.xtendbin | Bin 0 -> 4651 bytes .../scoping/.CftLanguageScopeProvider.xtendbin | Bin 0 -> 9017 bytes .../faulttree/components/scoping/.gitignore | 4 + ...geImportedNamespaceAwareLocalScopeProvider.java | 63 + .../scoping/CftLanguageScopeProvider.java | 248 ++ .../validation/.CftLanguageValidator.xtendbin | Bin 0 -> 1760 bytes .../faulttree/components/validation/.gitignore | 1 + .../validation/CftLanguageValidator.java | 15 + 99 files changed, 19180 insertions(+) create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.classpath create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.gitignore create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.launch/Generate CftLanguage (cft) Language Infrastructure.launch create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.project create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.settings/org.eclipse.core.resources.prefs create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.settings/org.eclipse.jdt.core.prefs create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/META-INF/MANIFEST.MF create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/build.properties create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/model/generated/CftLanguage.ecore create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/model/generated/CftLanguage.genmodel create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/plugin.xml create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/AbstractCftLanguageRuntimeModule.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetupGenerated.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/AndGate.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/Assignment.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/BasicEventDefinition.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftLanguageFactory.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftLanguagePackage.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftModel.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ComponentDefinition.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ComponentInstance.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventDeclaration.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventDefinition.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventReference.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/GateDefinition.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ImportDeclaration.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/InputEvent.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/LookupDefinition.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/MappingDefinition.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/MappingParameter.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/OrGate.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/TransformationDefinition.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/Variable.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/AndGateImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/AssignmentImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/BasicEventDefinitionImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftLanguageFactoryImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftLanguagePackageImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftModelImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ComponentDefinitionImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ComponentInstanceImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventDeclarationImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventDefinitionImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventReferenceImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/GateDefinitionImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ImportDeclarationImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/InputEventImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/LookupDefinitionImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/MappingDefinitionImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/MappingParameterImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/OrGateImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/TransformationDefinitionImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/VariableImpl.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/util/CftLanguageAdapterFactory.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/util/CftLanguageSwitch.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/CftLanguageAntlrTokenFileProvider.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/CftLanguageParser.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.tokens create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageLexer.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageParser.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/AbstractCftLanguageScopeProvider.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSyntacticSequencer.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/AbstractCftLanguageValidator.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageConfigurableIssueCodesProvider.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.xtend create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.xtend create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/GenerateCftLanguage.mwe2 create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.xtend create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.xtend create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.xtend create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.xtend create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.xtend create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.java (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components') diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.classpath b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.classpath new file mode 100644 index 00000000..9081d4f7 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.launch/Generate CftLanguage (cft) Language Infrastructure.launch b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.launch/Generate CftLanguage (cft) Language Infrastructure.launch new file mode 100644 index 00000000..25217aa6 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.launch/Generate CftLanguage (cft) Language Infrastructure.launch @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.project b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.project new file mode 100644 index 00000000..eb054def --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.project @@ -0,0 +1,34 @@ + + + hu.bme.mit.inf.dslreasoner.faulttree.components + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.settings/org.eclipse.core.resources.prefs b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.settings/org.eclipse.jdt.core.prefs b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/META-INF/MANIFEST.MF b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/META-INF/MANIFEST.MF new file mode 100644 index 00000000..66be4b49 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/META-INF/MANIFEST.MF @@ -0,0 +1,31 @@ +Manifest-Version: 1.0 +Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.faulttree.components +Bundle-ManifestVersion: 2 +Bundle-Name: hu.bme.mit.inf.dslreasoner.faulttree.components +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.faulttree.components; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.xtext, + org.eclipse.xtext.xbase, + org.eclipse.equinox.common;bundle-version="3.5.0", + org.eclipse.viatra.query.patternlanguage.emf, + org.eclipse.emf.ecore, + org.eclipse.xtext.xbase.lib;bundle-version="2.14.0", + org.eclipse.xtext.util, + org.eclipse.emf.common, + org.eclipse.xtend.lib;bundle-version="2.14.0", + org.antlr.runtime;bundle-version="[3.2.0,3.2.1)" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: hu.bme.mit.inf.dslreasoner.faulttree.components, + hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage, + hu.bme.mit.inf.dslreasoner.faulttree.components.serializer, + hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.util, + hu.bme.mit.inf.dslreasoner.faulttree.components.scoping, + hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr.internal, + hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl, + hu.bme.mit.inf.dslreasoner.faulttree.components.generator, + hu.bme.mit.inf.dslreasoner.faulttree.components.validation, + hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr, + hu.bme.mit.inf.dslreasoner.faulttree.components.services +Import-Package: org.apache.log4j diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/build.properties b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/build.properties new file mode 100644 index 00000000..18d540bf --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/build.properties @@ -0,0 +1,20 @@ +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = model/generated/,\ + .,\ + META-INF/,\ + plugin.xml +bin.excludes = **/*.mwe2,\ + **/*.xtend +additional.bundles = org.eclipse.xtext.xbase,\ + org.eclipse.xtext.common.types,\ + org.eclipse.xtext.xtext.generator,\ + org.eclipse.emf.codegen.ecore,\ + org.eclipse.emf.mwe.utils,\ + org.eclipse.emf.mwe2.launch,\ + org.eclipse.emf.mwe2.lib,\ + org.objectweb.asm,\ + org.apache.commons.logging,\ + org.apache.log4j,\ + com.ibm.icu diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/model/generated/CftLanguage.ecore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/model/generated/CftLanguage.ecore new file mode 100644 index 00000000..a86e503e --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/model/generated/CftLanguage.ecore @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/model/generated/CftLanguage.genmodel b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/model/generated/CftLanguage.genmodel new file mode 100644 index 00000000..c2208adc --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/model/generated/CftLanguage.genmodel @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/plugin.xml b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/plugin.xml new file mode 100644 index 00000000..698af7de --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/plugin.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/AbstractCftLanguageRuntimeModule.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/AbstractCftLanguageRuntimeModule.java new file mode 100644 index 00000000..bdec0d5b --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/AbstractCftLanguageRuntimeModule.java @@ -0,0 +1,208 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components; + +import com.google.inject.Binder; +import com.google.inject.Provider; +import com.google.inject.name.Names; +import hu.bme.mit.inf.dslreasoner.faulttree.components.generator.CftLanguageGenerator; +import hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr.CftLanguageAntlrTokenFileProvider; +import hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr.CftLanguageParser; +import hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr.internal.InternalCftLanguageLexer; +import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.CftLanguageScopeProvider; +import hu.bme.mit.inf.dslreasoner.faulttree.components.serializer.CftLanguageSemanticSequencer; +import hu.bme.mit.inf.dslreasoner.faulttree.components.serializer.CftLanguageSyntacticSequencer; +import hu.bme.mit.inf.dslreasoner.faulttree.components.services.CftLanguageGrammarAccess; +import hu.bme.mit.inf.dslreasoner.faulttree.components.validation.CftLanguageConfigurableIssueCodesProvider; +import hu.bme.mit.inf.dslreasoner.faulttree.components.validation.CftLanguageValidator; +import java.util.Properties; +import org.eclipse.xtext.Constants; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.generator.IGenerator2; +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.IQualifiedNameProvider; +import org.eclipse.xtext.parser.IParser; +import org.eclipse.xtext.parser.ITokenToStringConverter; +import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider; +import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter; +import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; +import org.eclipse.xtext.parser.antlr.ITokenDefProvider; +import org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper; +import org.eclipse.xtext.parser.antlr.Lexer; +import org.eclipse.xtext.parser.antlr.LexerBindings; +import org.eclipse.xtext.parser.antlr.LexerProvider; +import org.eclipse.xtext.parser.antlr.UnorderedGroupHelper; +import org.eclipse.xtext.resource.IContainer; +import org.eclipse.xtext.resource.IResourceDescriptions; +import org.eclipse.xtext.resource.containers.IAllContainersState; +import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider; +import org.eclipse.xtext.resource.containers.StateBasedContainerManager; +import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider; +import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; +import org.eclipse.xtext.scoping.IGlobalScopeProvider; +import org.eclipse.xtext.scoping.IScopeProvider; +import org.eclipse.xtext.scoping.IgnoreCaseLinking; +import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; +import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider; +import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider; +import org.eclipse.xtext.serializer.ISerializer; +import org.eclipse.xtext.serializer.impl.Serializer; +import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer; +import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer; +import org.eclipse.xtext.service.DefaultRuntimeModule; +import org.eclipse.xtext.service.SingletonBinding; +import org.eclipse.xtext.validation.ConfigurableIssueCodesProvider; + +/** + * Manual modifications go to {@link CftLanguageRuntimeModule}. + */ +@SuppressWarnings("all") +public abstract class AbstractCftLanguageRuntimeModule extends DefaultRuntimeModule { + + protected Properties properties = null; + + @Override + public void configure(Binder binder) { + properties = tryBindProperties(binder, "hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.properties"); + super.configure(binder); + } + + public void configureLanguageName(Binder binder) { + binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage"); + } + + public void configureFileExtensions(Binder binder) { + if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null) + binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("cft"); + } + + // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 + public ClassLoader bindClassLoaderToInstance() { + return getClass().getClassLoader(); + } + + // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 + public Class bindIGrammarAccess() { + return CftLanguageGrammarAccess.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISemanticSequencer() { + return CftLanguageSemanticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISyntacticSequencer() { + return CftLanguageSyntacticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISerializer() { + return Serializer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIParser() { + return CftLanguageParser.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenToStringConverter() { + return AntlrTokenToStringConverter.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIAntlrTokenFileProvider() { + return CftLanguageAntlrTokenFileProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindLexer() { + return InternalCftLanguageLexer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenDefProvider() { + return AntlrTokenDefProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Provider provideInternalCftLanguageLexer() { + return LexerProvider.create(InternalCftLanguageLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public void configureRuntimeLexer(Binder binder) { + binder.bind(Lexer.class) + .annotatedWith(Names.named(LexerBindings.RUNTIME)) + .to(InternalCftLanguageLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIUnorderedGroupHelper() { + return UnorderedGroupHelper.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 + @SingletonBinding(eager=true) + public Class bindCftLanguageValidator() { + return CftLanguageValidator.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 + public Class bindConfigurableIssueCodesProvider() { + return CftLanguageConfigurableIssueCodesProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public Class bindIScopeProvider() { + return CftLanguageScopeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public void configureIScopeProviderDelegate(Binder binder) { + binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public Class bindIGlobalScopeProvider() { + return DefaultGlobalScopeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public void configureIgnoreCaseLinking(Binder binder) { + binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false); + } + + // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 + public Class bindIQualifiedNameProvider() { + return DefaultDeclarativeQualifiedNameProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIContainer$Manager() { + return StateBasedContainerManager.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIAllContainersState$Provider() { + return ResourceSetBasedAllContainersStateProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public void configureIResourceDescriptions(Binder binder) { + binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public void configureIResourceDescriptionsPersisted(Binder binder) { + binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 + public Class bindIGenerator2() { + return CftLanguageGenerator.class; + } + +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin new file mode 100644 index 00000000..b39c9074 Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin differ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetupGenerated.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetupGenerated.java new file mode 100644 index 00000000..75f38b14 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetupGenerated.java @@ -0,0 +1,42 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.xtext.ISetup; +import org.eclipse.xtext.common.TerminalsStandaloneSetup; +import org.eclipse.xtext.resource.IResourceFactory; +import org.eclipse.xtext.resource.IResourceServiceProvider; + +@SuppressWarnings("all") +public class CftLanguageStandaloneSetupGenerated implements ISetup { + + @Override + public Injector createInjectorAndDoEMFRegistration() { + TerminalsStandaloneSetup.doSetup(); + + Injector injector = createInjector(); + register(injector); + return injector; + } + + public Injector createInjector() { + return Guice.createInjector(new CftLanguageRuntimeModule()); + } + + public void register(Injector injector) { + if (!EPackage.Registry.INSTANCE.containsKey("http://www.bme.hu/mit/inf/dslreasoner/faulttree/components/CftLanguage")) { + EPackage.Registry.INSTANCE.put("http://www.bme.hu/mit/inf/dslreasoner/faulttree/components/CftLanguage", CftLanguagePackage.eINSTANCE); + } + IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); + IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); + + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("cft", resourceFactory); + IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("cft", serviceProvider); + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/AndGate.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/AndGate.java new file mode 100644 index 00000000..6d197233 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/AndGate.java @@ -0,0 +1,19 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + + +/** + * + * A representation of the model object 'And Gate'. + * + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getAndGate() + * @model + * @generated + */ +public interface AndGate extends GateDefinition +{ +} // AndGate diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/Assignment.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/Assignment.java new file mode 100644 index 00000000..13c9d6c2 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/Assignment.java @@ -0,0 +1,106 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Assignment'. + * + * + *

+ * The following features are supported: + *

+ * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getAssignment() + * @model + * @generated + */ +public interface Assignment extends EObject +{ + /** + * Returns the value of the 'Input' containment reference. + * + *

+ * If the meaning of the 'Input' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Input' containment reference. + * @see #setInput(EventReference) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getAssignment_Input() + * @model containment="true" + * @generated + */ + EventReference getInput(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment#getInput Input}' containment reference. + * + * + * @param value the new value of the 'Input' containment reference. + * @see #getInput() + * @generated + */ + void setInput(EventReference value); + + /** + * Returns the value of the 'Multiple' attribute. + * + *

+ * If the meaning of the 'Multiple' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Multiple' attribute. + * @see #setMultiple(boolean) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getAssignment_Multiple() + * @model + * @generated + */ + boolean isMultiple(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment#isMultiple Multiple}' attribute. + * + * + * @param value the new value of the 'Multiple' attribute. + * @see #isMultiple() + * @generated + */ + void setMultiple(boolean value); + + /** + * Returns the value of the 'Output' containment reference. + * + *

+ * If the meaning of the 'Output' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Output' containment reference. + * @see #setOutput(EventReference) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getAssignment_Output() + * @model containment="true" + * @generated + */ + EventReference getOutput(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment#getOutput Output}' containment reference. + * + * + * @param value the new value of the 'Output' containment reference. + * @see #getOutput() + * @generated + */ + void setOutput(EventReference value); + +} // Assignment diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/BasicEventDefinition.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/BasicEventDefinition.java new file mode 100644 index 00000000..9a564a57 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/BasicEventDefinition.java @@ -0,0 +1,51 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + + +/** + * + * A representation of the model object 'Basic Event Definition'. + * + * + *

+ * The following features are supported: + *

+ * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getBasicEventDefinition() + * @model + * @generated + */ +public interface BasicEventDefinition extends EventDefinition +{ + /** + * Returns the value of the 'Rate' attribute. + * + *

+ * If the meaning of the 'Rate' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Rate' attribute. + * @see #setRate(double) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getBasicEventDefinition_Rate() + * @model + * @generated + */ + double getRate(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition#getRate Rate}' attribute. + * + * + * @param value the new value of the 'Rate' attribute. + * @see #getRate() + * @generated + */ + void setRate(double value); + +} // BasicEventDefinition diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftLanguageFactory.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftLanguageFactory.java new file mode 100644 index 00000000..07c5786f --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftLanguageFactory.java @@ -0,0 +1,197 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage + * @generated + */ +public interface CftLanguageFactory extends EFactory +{ + /** + * The singleton instance of the factory. + * + * + * @generated + */ + CftLanguageFactory eINSTANCE = hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguageFactoryImpl.init(); + + /** + * Returns a new object of class 'Cft Model'. + * + * + * @return a new object of class 'Cft Model'. + * @generated + */ + CftModel createCftModel(); + + /** + * Returns a new object of class 'Import Declaration'. + * + * + * @return a new object of class 'Import Declaration'. + * @generated + */ + ImportDeclaration createImportDeclaration(); + + /** + * Returns a new object of class 'Component Definition'. + * + * + * @return a new object of class 'Component Definition'. + * @generated + */ + ComponentDefinition createComponentDefinition(); + + /** + * Returns a new object of class 'Event Declaration'. + * + * + * @return a new object of class 'Event Declaration'. + * @generated + */ + EventDeclaration createEventDeclaration(); + + /** + * Returns a new object of class 'Input Event'. + * + * + * @return a new object of class 'Input Event'. + * @generated + */ + InputEvent createInputEvent(); + + /** + * Returns a new object of class 'Event Definition'. + * + * + * @return a new object of class 'Event Definition'. + * @generated + */ + EventDefinition createEventDefinition(); + + /** + * Returns a new object of class 'Basic Event Definition'. + * + * + * @return a new object of class 'Basic Event Definition'. + * @generated + */ + BasicEventDefinition createBasicEventDefinition(); + + /** + * Returns a new object of class 'Gate Definition'. + * + * + * @return a new object of class 'Gate Definition'. + * @generated + */ + GateDefinition createGateDefinition(); + + /** + * Returns a new object of class 'And Gate'. + * + * + * @return a new object of class 'And Gate'. + * @generated + */ + AndGate createAndGate(); + + /** + * Returns a new object of class 'Or Gate'. + * + * + * @return a new object of class 'Or Gate'. + * @generated + */ + OrGate createOrGate(); + + /** + * Returns a new object of class 'Transformation Definition'. + * + * + * @return a new object of class 'Transformation Definition'. + * @generated + */ + TransformationDefinition createTransformationDefinition(); + + /** + * Returns a new object of class 'Mapping Definition'. + * + * + * @return a new object of class 'Mapping Definition'. + * @generated + */ + MappingDefinition createMappingDefinition(); + + /** + * Returns a new object of class 'Mapping Parameter'. + * + * + * @return a new object of class 'Mapping Parameter'. + * @generated + */ + MappingParameter createMappingParameter(); + + /** + * Returns a new object of class 'Lookup Definition'. + * + * + * @return a new object of class 'Lookup Definition'. + * @generated + */ + LookupDefinition createLookupDefinition(); + + /** + * Returns a new object of class 'Variable'. + * + * + * @return a new object of class 'Variable'. + * @generated + */ + Variable createVariable(); + + /** + * Returns a new object of class 'Assignment'. + * + * + * @return a new object of class 'Assignment'. + * @generated + */ + Assignment createAssignment(); + + /** + * Returns a new object of class 'Event Reference'. + * + * + * @return a new object of class 'Event Reference'. + * @generated + */ + EventReference createEventReference(); + + /** + * Returns a new object of class 'Component Instance'. + * + * + * @return a new object of class 'Component Instance'. + * @generated + */ + ComponentInstance createComponentInstance(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + CftLanguagePackage getCftLanguagePackage(); + +} //CftLanguageFactory diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftLanguagePackage.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftLanguagePackage.java new file mode 100644 index 00000000..405a8691 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftLanguagePackage.java @@ -0,0 +1,1746 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguageFactory + * @model kind="package" + * @generated + */ +public interface CftLanguagePackage extends EPackage +{ + /** + * The package name. + * + * + * @generated + */ + String eNAME = "cftLanguage"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.bme.hu/mit/inf/dslreasoner/faulttree/components/CftLanguage"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "cftLanguage"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + CftLanguagePackage eINSTANCE = hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl.init(); + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftModelImpl Cft Model}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftModelImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getCftModel() + * @generated + */ + int CFT_MODEL = 0; + + /** + * The feature id for the 'Package Name' attribute. + * + * + * @generated + * @ordered + */ + int CFT_MODEL__PACKAGE_NAME = 0; + + /** + * The feature id for the 'Imports' containment reference list. + * + * + * @generated + * @ordered + */ + int CFT_MODEL__IMPORTS = 1; + + /** + * The feature id for the 'Component Definitions' containment reference list. + * + * + * @generated + * @ordered + */ + int CFT_MODEL__COMPONENT_DEFINITIONS = 2; + + /** + * The feature id for the 'Transformation Definitions' containment reference list. + * + * + * @generated + * @ordered + */ + int CFT_MODEL__TRANSFORMATION_DEFINITIONS = 3; + + /** + * The number of structural features of the 'Cft Model' class. + * + * + * @generated + * @ordered + */ + int CFT_MODEL_FEATURE_COUNT = 4; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ImportDeclarationImpl Import Declaration}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ImportDeclarationImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getImportDeclaration() + * @generated + */ + int IMPORT_DECLARATION = 1; + + /** + * The feature id for the 'Imported Namespace' attribute. + * + * + * @generated + * @ordered + */ + int IMPORT_DECLARATION__IMPORTED_NAMESPACE = 0; + + /** + * The number of structural features of the 'Import Declaration' class. + * + * + * @generated + * @ordered + */ + int IMPORT_DECLARATION_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentDefinitionImpl Component Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getComponentDefinition() + * @generated + */ + int COMPONENT_DEFINITION = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_DEFINITION__NAME = 0; + + /** + * The feature id for the 'Input Events' containment reference list. + * + * + * @generated + * @ordered + */ + int COMPONENT_DEFINITION__INPUT_EVENTS = 1; + + /** + * The feature id for the 'Output Events' reference list. + * + * + * @generated + * @ordered + */ + int COMPONENT_DEFINITION__OUTPUT_EVENTS = 2; + + /** + * The feature id for the 'Event Definitions' containment reference list. + * + * + * @generated + * @ordered + */ + int COMPONENT_DEFINITION__EVENT_DEFINITIONS = 3; + + /** + * The number of structural features of the 'Component Definition' class. + * + * + * @generated + * @ordered + */ + int COMPONENT_DEFINITION_FEATURE_COUNT = 4; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventDeclarationImpl Event Declaration}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventDeclarationImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getEventDeclaration() + * @generated + */ + int EVENT_DECLARATION = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int EVENT_DECLARATION__NAME = 0; + + /** + * The number of structural features of the 'Event Declaration' class. + * + * + * @generated + * @ordered + */ + int EVENT_DECLARATION_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.InputEventImpl Input Event}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.InputEventImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getInputEvent() + * @generated + */ + int INPUT_EVENT = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int INPUT_EVENT__NAME = EVENT_DECLARATION__NAME; + + /** + * The feature id for the 'Multiple' attribute. + * + * + * @generated + * @ordered + */ + int INPUT_EVENT__MULTIPLE = EVENT_DECLARATION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Input Event' class. + * + * + * @generated + * @ordered + */ + int INPUT_EVENT_FEATURE_COUNT = EVENT_DECLARATION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventDefinitionImpl Event Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getEventDefinition() + * @generated + */ + int EVENT_DEFINITION = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int EVENT_DEFINITION__NAME = EVENT_DECLARATION__NAME; + + /** + * The number of structural features of the 'Event Definition' class. + * + * + * @generated + * @ordered + */ + int EVENT_DEFINITION_FEATURE_COUNT = EVENT_DECLARATION_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.BasicEventDefinitionImpl Basic Event Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.BasicEventDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getBasicEventDefinition() + * @generated + */ + int BASIC_EVENT_DEFINITION = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_EVENT_DEFINITION__NAME = EVENT_DEFINITION__NAME; + + /** + * The feature id for the 'Rate' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_EVENT_DEFINITION__RATE = EVENT_DEFINITION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Basic Event Definition' class. + * + * + * @generated + * @ordered + */ + int BASIC_EVENT_DEFINITION_FEATURE_COUNT = EVENT_DEFINITION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.GateDefinitionImpl Gate Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.GateDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getGateDefinition() + * @generated + */ + int GATE_DEFINITION = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int GATE_DEFINITION__NAME = EVENT_DEFINITION__NAME; + + /** + * The feature id for the 'Input Events' reference list. + * + * + * @generated + * @ordered + */ + int GATE_DEFINITION__INPUT_EVENTS = EVENT_DEFINITION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gate Definition' class. + * + * + * @generated + * @ordered + */ + int GATE_DEFINITION_FEATURE_COUNT = EVENT_DEFINITION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AndGateImpl And Gate}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AndGateImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getAndGate() + * @generated + */ + int AND_GATE = 8; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int AND_GATE__NAME = GATE_DEFINITION__NAME; + + /** + * The feature id for the 'Input Events' reference list. + * + * + * @generated + * @ordered + */ + int AND_GATE__INPUT_EVENTS = GATE_DEFINITION__INPUT_EVENTS; + + /** + * The number of structural features of the 'And Gate' class. + * + * + * @generated + * @ordered + */ + int AND_GATE_FEATURE_COUNT = GATE_DEFINITION_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.OrGateImpl Or Gate}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.OrGateImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getOrGate() + * @generated + */ + int OR_GATE = 9; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int OR_GATE__NAME = GATE_DEFINITION__NAME; + + /** + * The feature id for the 'Input Events' reference list. + * + * + * @generated + * @ordered + */ + int OR_GATE__INPUT_EVENTS = GATE_DEFINITION__INPUT_EVENTS; + + /** + * The number of structural features of the 'Or Gate' class. + * + * + * @generated + * @ordered + */ + int OR_GATE_FEATURE_COUNT = GATE_DEFINITION_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.TransformationDefinitionImpl Transformation Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.TransformationDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getTransformationDefinition() + * @generated + */ + int TRANSFORMATION_DEFINITION = 10; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int TRANSFORMATION_DEFINITION__NAME = 0; + + /** + * The feature id for the 'Mapping Definitions' containment reference list. + * + * + * @generated + * @ordered + */ + int TRANSFORMATION_DEFINITION__MAPPING_DEFINITIONS = 1; + + /** + * The number of structural features of the 'Transformation Definition' class. + * + * + * @generated + * @ordered + */ + int TRANSFORMATION_DEFINITION_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl Mapping Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getMappingDefinition() + * @generated + */ + int MAPPING_DEFINITION = 11; + + /** + * The feature id for the 'Top Level' attribute. + * + * + * @generated + * @ordered + */ + int MAPPING_DEFINITION__TOP_LEVEL = 0; + + /** + * The feature id for the 'Pattern' reference. + * + * + * @generated + * @ordered + */ + int MAPPING_DEFINITION__PATTERN = 1; + + /** + * The feature id for the 'Parameters' containment reference list. + * + * + * @generated + * @ordered + */ + int MAPPING_DEFINITION__PARAMETERS = 2; + + /** + * The feature id for the 'Component Instance' containment reference. + * + * + * @generated + * @ordered + */ + int MAPPING_DEFINITION__COMPONENT_INSTANCE = 3; + + /** + * The feature id for the 'Lookup Definitions' containment reference list. + * + * + * @generated + * @ordered + */ + int MAPPING_DEFINITION__LOOKUP_DEFINITIONS = 4; + + /** + * The feature id for the 'Assignments' containment reference list. + * + * + * @generated + * @ordered + */ + int MAPPING_DEFINITION__ASSIGNMENTS = 5; + + /** + * The number of structural features of the 'Mapping Definition' class. + * + * + * @generated + * @ordered + */ + int MAPPING_DEFINITION_FEATURE_COUNT = 6; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingParameterImpl Mapping Parameter}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingParameterImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getMappingParameter() + * @generated + */ + int MAPPING_PARAMETER = 12; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MAPPING_PARAMETER__NAME = 0; + + /** + * The number of structural features of the 'Mapping Parameter' class. + * + * + * @generated + * @ordered + */ + int MAPPING_PARAMETER_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.VariableImpl Variable}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.VariableImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getVariable() + * @generated + */ + int VARIABLE = 14; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int VARIABLE__NAME = 0; + + /** + * The number of structural features of the 'Variable' class. + * + * + * @generated + * @ordered + */ + int VARIABLE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.LookupDefinitionImpl Lookup Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.LookupDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getLookupDefinition() + * @generated + */ + int LOOKUP_DEFINITION = 13; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int LOOKUP_DEFINITION__NAME = VARIABLE__NAME; + + /** + * The feature id for the 'Mapping' reference. + * + * + * @generated + * @ordered + */ + int LOOKUP_DEFINITION__MAPPING = VARIABLE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Arguments' reference list. + * + * + * @generated + * @ordered + */ + int LOOKUP_DEFINITION__ARGUMENTS = VARIABLE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Lookup Definition' class. + * + * + * @generated + * @ordered + */ + int LOOKUP_DEFINITION_FEATURE_COUNT = VARIABLE_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AssignmentImpl Assignment}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AssignmentImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getAssignment() + * @generated + */ + int ASSIGNMENT = 15; + + /** + * The feature id for the 'Input' containment reference. + * + * + * @generated + * @ordered + */ + int ASSIGNMENT__INPUT = 0; + + /** + * The feature id for the 'Multiple' attribute. + * + * + * @generated + * @ordered + */ + int ASSIGNMENT__MULTIPLE = 1; + + /** + * The feature id for the 'Output' containment reference. + * + * + * @generated + * @ordered + */ + int ASSIGNMENT__OUTPUT = 2; + + /** + * The number of structural features of the 'Assignment' class. + * + * + * @generated + * @ordered + */ + int ASSIGNMENT_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventReferenceImpl Event Reference}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventReferenceImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getEventReference() + * @generated + */ + int EVENT_REFERENCE = 16; + + /** + * The feature id for the 'Component' reference. + * + * + * @generated + * @ordered + */ + int EVENT_REFERENCE__COMPONENT = 0; + + /** + * The feature id for the 'Event' reference. + * + * + * @generated + * @ordered + */ + int EVENT_REFERENCE__EVENT = 1; + + /** + * The number of structural features of the 'Event Reference' class. + * + * + * @generated + * @ordered + */ + int EVENT_REFERENCE_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentInstanceImpl Component Instance}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentInstanceImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getComponentInstance() + * @generated + */ + int COMPONENT_INSTANCE = 17; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_INSTANCE__NAME = VARIABLE__NAME; + + /** + * The feature id for the 'Component Type' reference. + * + * + * @generated + * @ordered + */ + int COMPONENT_INSTANCE__COMPONENT_TYPE = VARIABLE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Component Instance' class. + * + * + * @generated + * @ordered + */ + int COMPONENT_INSTANCE_FEATURE_COUNT = VARIABLE_FEATURE_COUNT + 1; + + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel Cft Model}'. + * + * + * @return the meta object for class 'Cft Model'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel + * @generated + */ + EClass getCftModel(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel#getPackageName Package Name}'. + * + * + * @return the meta object for the attribute 'Package Name'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel#getPackageName() + * @see #getCftModel() + * @generated + */ + EAttribute getCftModel_PackageName(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel#getImports Imports}'. + * + * + * @return the meta object for the containment reference list 'Imports'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel#getImports() + * @see #getCftModel() + * @generated + */ + EReference getCftModel_Imports(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel#getComponentDefinitions Component Definitions}'. + * + * + * @return the meta object for the containment reference list 'Component Definitions'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel#getComponentDefinitions() + * @see #getCftModel() + * @generated + */ + EReference getCftModel_ComponentDefinitions(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel#getTransformationDefinitions Transformation Definitions}'. + * + * + * @return the meta object for the containment reference list 'Transformation Definitions'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel#getTransformationDefinitions() + * @see #getCftModel() + * @generated + */ + EReference getCftModel_TransformationDefinitions(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration Import Declaration}'. + * + * + * @return the meta object for class 'Import Declaration'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration + * @generated + */ + EClass getImportDeclaration(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration#getImportedNamespace Imported Namespace}'. + * + * + * @return the meta object for the attribute 'Imported Namespace'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration#getImportedNamespace() + * @see #getImportDeclaration() + * @generated + */ + EAttribute getImportDeclaration_ImportedNamespace(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition Component Definition}'. + * + * + * @return the meta object for class 'Component Definition'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition + * @generated + */ + EClass getComponentDefinition(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getName() + * @see #getComponentDefinition() + * @generated + */ + EAttribute getComponentDefinition_Name(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getInputEvents Input Events}'. + * + * + * @return the meta object for the containment reference list 'Input Events'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getInputEvents() + * @see #getComponentDefinition() + * @generated + */ + EReference getComponentDefinition_InputEvents(); + + /** + * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getOutputEvents Output Events}'. + * + * + * @return the meta object for the reference list 'Output Events'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getOutputEvents() + * @see #getComponentDefinition() + * @generated + */ + EReference getComponentDefinition_OutputEvents(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getEventDefinitions Event Definitions}'. + * + * + * @return the meta object for the containment reference list 'Event Definitions'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getEventDefinitions() + * @see #getComponentDefinition() + * @generated + */ + EReference getComponentDefinition_EventDefinitions(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration Event Declaration}'. + * + * + * @return the meta object for class 'Event Declaration'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration + * @generated + */ + EClass getEventDeclaration(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration#getName() + * @see #getEventDeclaration() + * @generated + */ + EAttribute getEventDeclaration_Name(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent Input Event}'. + * + * + * @return the meta object for class 'Input Event'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent + * @generated + */ + EClass getInputEvent(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent#isMultiple Multiple}'. + * + * + * @return the meta object for the attribute 'Multiple'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent#isMultiple() + * @see #getInputEvent() + * @generated + */ + EAttribute getInputEvent_Multiple(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDefinition Event Definition}'. + * + * + * @return the meta object for class 'Event Definition'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDefinition + * @generated + */ + EClass getEventDefinition(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition Basic Event Definition}'. + * + * + * @return the meta object for class 'Basic Event Definition'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition + * @generated + */ + EClass getBasicEventDefinition(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition#getRate Rate}'. + * + * + * @return the meta object for the attribute 'Rate'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition#getRate() + * @see #getBasicEventDefinition() + * @generated + */ + EAttribute getBasicEventDefinition_Rate(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.GateDefinition Gate Definition}'. + * + * + * @return the meta object for class 'Gate Definition'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.GateDefinition + * @generated + */ + EClass getGateDefinition(); + + /** + * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.GateDefinition#getInputEvents Input Events}'. + * + * + * @return the meta object for the reference list 'Input Events'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.GateDefinition#getInputEvents() + * @see #getGateDefinition() + * @generated + */ + EReference getGateDefinition_InputEvents(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.AndGate And Gate}'. + * + * + * @return the meta object for class 'And Gate'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.AndGate + * @generated + */ + EClass getAndGate(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.OrGate Or Gate}'. + * + * + * @return the meta object for class 'Or Gate'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.OrGate + * @generated + */ + EClass getOrGate(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition Transformation Definition}'. + * + * + * @return the meta object for class 'Transformation Definition'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition + * @generated + */ + EClass getTransformationDefinition(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition#getName() + * @see #getTransformationDefinition() + * @generated + */ + EAttribute getTransformationDefinition_Name(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition#getMappingDefinitions Mapping Definitions}'. + * + * + * @return the meta object for the containment reference list 'Mapping Definitions'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition#getMappingDefinitions() + * @see #getTransformationDefinition() + * @generated + */ + EReference getTransformationDefinition_MappingDefinitions(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition Mapping Definition}'. + * + * + * @return the meta object for class 'Mapping Definition'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition + * @generated + */ + EClass getMappingDefinition(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#isTopLevel Top Level}'. + * + * + * @return the meta object for the attribute 'Top Level'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#isTopLevel() + * @see #getMappingDefinition() + * @generated + */ + EAttribute getMappingDefinition_TopLevel(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getPattern Pattern}'. + * + * + * @return the meta object for the reference 'Pattern'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getPattern() + * @see #getMappingDefinition() + * @generated + */ + EReference getMappingDefinition_Pattern(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getParameters Parameters}'. + * + * + * @return the meta object for the containment reference list 'Parameters'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getParameters() + * @see #getMappingDefinition() + * @generated + */ + EReference getMappingDefinition_Parameters(); + + /** + * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getComponentInstance Component Instance}'. + * + * + * @return the meta object for the containment reference 'Component Instance'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getComponentInstance() + * @see #getMappingDefinition() + * @generated + */ + EReference getMappingDefinition_ComponentInstance(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getLookupDefinitions Lookup Definitions}'. + * + * + * @return the meta object for the containment reference list 'Lookup Definitions'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getLookupDefinitions() + * @see #getMappingDefinition() + * @generated + */ + EReference getMappingDefinition_LookupDefinitions(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getAssignments Assignments}'. + * + * + * @return the meta object for the containment reference list 'Assignments'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getAssignments() + * @see #getMappingDefinition() + * @generated + */ + EReference getMappingDefinition_Assignments(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter Mapping Parameter}'. + * + * + * @return the meta object for class 'Mapping Parameter'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter + * @generated + */ + EClass getMappingParameter(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter#getName() + * @see #getMappingParameter() + * @generated + */ + EAttribute getMappingParameter_Name(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition Lookup Definition}'. + * + * + * @return the meta object for class 'Lookup Definition'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition + * @generated + */ + EClass getLookupDefinition(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition#getMapping Mapping}'. + * + * + * @return the meta object for the reference 'Mapping'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition#getMapping() + * @see #getLookupDefinition() + * @generated + */ + EReference getLookupDefinition_Mapping(); + + /** + * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition#getArguments Arguments}'. + * + * + * @return the meta object for the reference list 'Arguments'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition#getArguments() + * @see #getLookupDefinition() + * @generated + */ + EReference getLookupDefinition_Arguments(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable Variable}'. + * + * + * @return the meta object for class 'Variable'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable + * @generated + */ + EClass getVariable(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable#getName() + * @see #getVariable() + * @generated + */ + EAttribute getVariable_Name(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment Assignment}'. + * + * + * @return the meta object for class 'Assignment'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment + * @generated + */ + EClass getAssignment(); + + /** + * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment#getInput Input}'. + * + * + * @return the meta object for the containment reference 'Input'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment#getInput() + * @see #getAssignment() + * @generated + */ + EReference getAssignment_Input(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment#isMultiple Multiple}'. + * + * + * @return the meta object for the attribute 'Multiple'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment#isMultiple() + * @see #getAssignment() + * @generated + */ + EAttribute getAssignment_Multiple(); + + /** + * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment#getOutput Output}'. + * + * + * @return the meta object for the containment reference 'Output'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment#getOutput() + * @see #getAssignment() + * @generated + */ + EReference getAssignment_Output(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference Event Reference}'. + * + * + * @return the meta object for class 'Event Reference'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference + * @generated + */ + EClass getEventReference(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference#getComponent Component}'. + * + * + * @return the meta object for the reference 'Component'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference#getComponent() + * @see #getEventReference() + * @generated + */ + EReference getEventReference_Component(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference#getEvent Event}'. + * + * + * @return the meta object for the reference 'Event'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference#getEvent() + * @see #getEventReference() + * @generated + */ + EReference getEventReference_Event(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance Component Instance}'. + * + * + * @return the meta object for class 'Component Instance'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance + * @generated + */ + EClass getComponentInstance(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance#getComponentType Component Type}'. + * + * + * @return the meta object for the reference 'Component Type'. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance#getComponentType() + * @see #getComponentInstance() + * @generated + */ + EReference getComponentInstance_ComponentType(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + CftLanguageFactory getCftLanguageFactory(); + + /** + * + * Defines literals for the meta objects that represent + * + * + * @generated + */ + interface Literals + { + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftModelImpl Cft Model}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftModelImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getCftModel() + * @generated + */ + EClass CFT_MODEL = eINSTANCE.getCftModel(); + + /** + * The meta object literal for the 'Package Name' attribute feature. + * + * + * @generated + */ + EAttribute CFT_MODEL__PACKAGE_NAME = eINSTANCE.getCftModel_PackageName(); + + /** + * The meta object literal for the 'Imports' containment reference list feature. + * + * + * @generated + */ + EReference CFT_MODEL__IMPORTS = eINSTANCE.getCftModel_Imports(); + + /** + * The meta object literal for the 'Component Definitions' containment reference list feature. + * + * + * @generated + */ + EReference CFT_MODEL__COMPONENT_DEFINITIONS = eINSTANCE.getCftModel_ComponentDefinitions(); + + /** + * The meta object literal for the 'Transformation Definitions' containment reference list feature. + * + * + * @generated + */ + EReference CFT_MODEL__TRANSFORMATION_DEFINITIONS = eINSTANCE.getCftModel_TransformationDefinitions(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ImportDeclarationImpl Import Declaration}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ImportDeclarationImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getImportDeclaration() + * @generated + */ + EClass IMPORT_DECLARATION = eINSTANCE.getImportDeclaration(); + + /** + * The meta object literal for the 'Imported Namespace' attribute feature. + * + * + * @generated + */ + EAttribute IMPORT_DECLARATION__IMPORTED_NAMESPACE = eINSTANCE.getImportDeclaration_ImportedNamespace(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentDefinitionImpl Component Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getComponentDefinition() + * @generated + */ + EClass COMPONENT_DEFINITION = eINSTANCE.getComponentDefinition(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute COMPONENT_DEFINITION__NAME = eINSTANCE.getComponentDefinition_Name(); + + /** + * The meta object literal for the 'Input Events' containment reference list feature. + * + * + * @generated + */ + EReference COMPONENT_DEFINITION__INPUT_EVENTS = eINSTANCE.getComponentDefinition_InputEvents(); + + /** + * The meta object literal for the 'Output Events' reference list feature. + * + * + * @generated + */ + EReference COMPONENT_DEFINITION__OUTPUT_EVENTS = eINSTANCE.getComponentDefinition_OutputEvents(); + + /** + * The meta object literal for the 'Event Definitions' containment reference list feature. + * + * + * @generated + */ + EReference COMPONENT_DEFINITION__EVENT_DEFINITIONS = eINSTANCE.getComponentDefinition_EventDefinitions(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventDeclarationImpl Event Declaration}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventDeclarationImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getEventDeclaration() + * @generated + */ + EClass EVENT_DECLARATION = eINSTANCE.getEventDeclaration(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute EVENT_DECLARATION__NAME = eINSTANCE.getEventDeclaration_Name(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.InputEventImpl Input Event}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.InputEventImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getInputEvent() + * @generated + */ + EClass INPUT_EVENT = eINSTANCE.getInputEvent(); + + /** + * The meta object literal for the 'Multiple' attribute feature. + * + * + * @generated + */ + EAttribute INPUT_EVENT__MULTIPLE = eINSTANCE.getInputEvent_Multiple(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventDefinitionImpl Event Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getEventDefinition() + * @generated + */ + EClass EVENT_DEFINITION = eINSTANCE.getEventDefinition(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.BasicEventDefinitionImpl Basic Event Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.BasicEventDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getBasicEventDefinition() + * @generated + */ + EClass BASIC_EVENT_DEFINITION = eINSTANCE.getBasicEventDefinition(); + + /** + * The meta object literal for the 'Rate' attribute feature. + * + * + * @generated + */ + EAttribute BASIC_EVENT_DEFINITION__RATE = eINSTANCE.getBasicEventDefinition_Rate(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.GateDefinitionImpl Gate Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.GateDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getGateDefinition() + * @generated + */ + EClass GATE_DEFINITION = eINSTANCE.getGateDefinition(); + + /** + * The meta object literal for the 'Input Events' reference list feature. + * + * + * @generated + */ + EReference GATE_DEFINITION__INPUT_EVENTS = eINSTANCE.getGateDefinition_InputEvents(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AndGateImpl And Gate}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AndGateImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getAndGate() + * @generated + */ + EClass AND_GATE = eINSTANCE.getAndGate(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.OrGateImpl Or Gate}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.OrGateImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getOrGate() + * @generated + */ + EClass OR_GATE = eINSTANCE.getOrGate(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.TransformationDefinitionImpl Transformation Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.TransformationDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getTransformationDefinition() + * @generated + */ + EClass TRANSFORMATION_DEFINITION = eINSTANCE.getTransformationDefinition(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute TRANSFORMATION_DEFINITION__NAME = eINSTANCE.getTransformationDefinition_Name(); + + /** + * The meta object literal for the 'Mapping Definitions' containment reference list feature. + * + * + * @generated + */ + EReference TRANSFORMATION_DEFINITION__MAPPING_DEFINITIONS = eINSTANCE.getTransformationDefinition_MappingDefinitions(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl Mapping Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getMappingDefinition() + * @generated + */ + EClass MAPPING_DEFINITION = eINSTANCE.getMappingDefinition(); + + /** + * The meta object literal for the 'Top Level' attribute feature. + * + * + * @generated + */ + EAttribute MAPPING_DEFINITION__TOP_LEVEL = eINSTANCE.getMappingDefinition_TopLevel(); + + /** + * The meta object literal for the 'Pattern' reference feature. + * + * + * @generated + */ + EReference MAPPING_DEFINITION__PATTERN = eINSTANCE.getMappingDefinition_Pattern(); + + /** + * The meta object literal for the 'Parameters' containment reference list feature. + * + * + * @generated + */ + EReference MAPPING_DEFINITION__PARAMETERS = eINSTANCE.getMappingDefinition_Parameters(); + + /** + * The meta object literal for the 'Component Instance' containment reference feature. + * + * + * @generated + */ + EReference MAPPING_DEFINITION__COMPONENT_INSTANCE = eINSTANCE.getMappingDefinition_ComponentInstance(); + + /** + * The meta object literal for the 'Lookup Definitions' containment reference list feature. + * + * + * @generated + */ + EReference MAPPING_DEFINITION__LOOKUP_DEFINITIONS = eINSTANCE.getMappingDefinition_LookupDefinitions(); + + /** + * The meta object literal for the 'Assignments' containment reference list feature. + * + * + * @generated + */ + EReference MAPPING_DEFINITION__ASSIGNMENTS = eINSTANCE.getMappingDefinition_Assignments(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingParameterImpl Mapping Parameter}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingParameterImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getMappingParameter() + * @generated + */ + EClass MAPPING_PARAMETER = eINSTANCE.getMappingParameter(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute MAPPING_PARAMETER__NAME = eINSTANCE.getMappingParameter_Name(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.LookupDefinitionImpl Lookup Definition}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.LookupDefinitionImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getLookupDefinition() + * @generated + */ + EClass LOOKUP_DEFINITION = eINSTANCE.getLookupDefinition(); + + /** + * The meta object literal for the 'Mapping' reference feature. + * + * + * @generated + */ + EReference LOOKUP_DEFINITION__MAPPING = eINSTANCE.getLookupDefinition_Mapping(); + + /** + * The meta object literal for the 'Arguments' reference list feature. + * + * + * @generated + */ + EReference LOOKUP_DEFINITION__ARGUMENTS = eINSTANCE.getLookupDefinition_Arguments(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.VariableImpl Variable}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.VariableImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getVariable() + * @generated + */ + EClass VARIABLE = eINSTANCE.getVariable(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute VARIABLE__NAME = eINSTANCE.getVariable_Name(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AssignmentImpl Assignment}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AssignmentImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getAssignment() + * @generated + */ + EClass ASSIGNMENT = eINSTANCE.getAssignment(); + + /** + * The meta object literal for the 'Input' containment reference feature. + * + * + * @generated + */ + EReference ASSIGNMENT__INPUT = eINSTANCE.getAssignment_Input(); + + /** + * The meta object literal for the 'Multiple' attribute feature. + * + * + * @generated + */ + EAttribute ASSIGNMENT__MULTIPLE = eINSTANCE.getAssignment_Multiple(); + + /** + * The meta object literal for the 'Output' containment reference feature. + * + * + * @generated + */ + EReference ASSIGNMENT__OUTPUT = eINSTANCE.getAssignment_Output(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventReferenceImpl Event Reference}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventReferenceImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getEventReference() + * @generated + */ + EClass EVENT_REFERENCE = eINSTANCE.getEventReference(); + + /** + * The meta object literal for the 'Component' reference feature. + * + * + * @generated + */ + EReference EVENT_REFERENCE__COMPONENT = eINSTANCE.getEventReference_Component(); + + /** + * The meta object literal for the 'Event' reference feature. + * + * + * @generated + */ + EReference EVENT_REFERENCE__EVENT = eINSTANCE.getEventReference_Event(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentInstanceImpl Component Instance}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentInstanceImpl + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftLanguagePackageImpl#getComponentInstance() + * @generated + */ + EClass COMPONENT_INSTANCE = eINSTANCE.getComponentInstance(); + + /** + * The meta object literal for the 'Component Type' reference feature. + * + * + * @generated + */ + EReference COMPONENT_INSTANCE__COMPONENT_TYPE = eINSTANCE.getComponentInstance_ComponentType(); + + } + +} //CftLanguagePackage diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftModel.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftModel.java new file mode 100644 index 00000000..5291e747 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/CftModel.java @@ -0,0 +1,105 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Cft Model'. + * + * + *

+ * The following features are supported: + *

+ * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getCftModel() + * @model + * @generated + */ +public interface CftModel extends EObject +{ + /** + * Returns the value of the 'Package Name' attribute. + * + *

+ * If the meaning of the 'Package Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Package Name' attribute. + * @see #setPackageName(String) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getCftModel_PackageName() + * @model + * @generated + */ + String getPackageName(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel#getPackageName Package Name}' attribute. + * + * + * @param value the new value of the 'Package Name' attribute. + * @see #getPackageName() + * @generated + */ + void setPackageName(String value); + + /** + * Returns the value of the 'Imports' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration}. + * + *

+ * If the meaning of the 'Imports' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Imports' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getCftModel_Imports() + * @model containment="true" + * @generated + */ + EList getImports(); + + /** + * Returns the value of the 'Component Definitions' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition}. + * + *

+ * If the meaning of the 'Component Definitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Component Definitions' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getCftModel_ComponentDefinitions() + * @model containment="true" + * @generated + */ + EList getComponentDefinitions(); + + /** + * Returns the value of the 'Transformation Definitions' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition}. + * + *

+ * If the meaning of the 'Transformation Definitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Transformation Definitions' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getCftModel_TransformationDefinitions() + * @model containment="true" + * @generated + */ + EList getTransformationDefinitions(); + +} // CftModel diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ComponentDefinition.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ComponentDefinition.java new file mode 100644 index 00000000..dae78e7e --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ComponentDefinition.java @@ -0,0 +1,105 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Component Definition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getName Name}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getInputEvents Input Events}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getOutputEvents Output Events}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getEventDefinitions Event Definitions}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getComponentDefinition() + * @model + * @generated + */ +public interface ComponentDefinition extends EObject +{ + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getComponentDefinition_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Input Events' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent}. + * + *

+ * If the meaning of the 'Input Events' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Input Events' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getComponentDefinition_InputEvents() + * @model containment="true" + * @generated + */ + EList getInputEvents(); + + /** + * Returns the value of the 'Output Events' reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration}. + * + *

+ * If the meaning of the 'Output Events' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Output Events' reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getComponentDefinition_OutputEvents() + * @model + * @generated + */ + EList getOutputEvents(); + + /** + * Returns the value of the 'Event Definitions' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDefinition}. + * + *

+ * If the meaning of the 'Event Definitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Event Definitions' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getComponentDefinition_EventDefinitions() + * @model containment="true" + * @generated + */ + EList getEventDefinitions(); + +} // ComponentDefinition diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ComponentInstance.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ComponentInstance.java new file mode 100644 index 00000000..f9f0f57b --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ComponentInstance.java @@ -0,0 +1,51 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + + +/** + * + * A representation of the model object 'Component Instance'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance#getComponentType Component Type}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getComponentInstance() + * @model + * @generated + */ +public interface ComponentInstance extends Variable +{ + /** + * Returns the value of the 'Component Type' reference. + * + *

+ * If the meaning of the 'Component Type' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Component Type' reference. + * @see #setComponentType(ComponentDefinition) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getComponentInstance_ComponentType() + * @model + * @generated + */ + ComponentDefinition getComponentType(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance#getComponentType Component Type}' reference. + * + * + * @param value the new value of the 'Component Type' reference. + * @see #getComponentType() + * @generated + */ + void setComponentType(ComponentDefinition value); + +} // ComponentInstance diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventDeclaration.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventDeclaration.java new file mode 100644 index 00000000..c03c117e --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventDeclaration.java @@ -0,0 +1,52 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Event Declaration'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration#getName Name}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getEventDeclaration() + * @model + * @generated + */ +public interface EventDeclaration extends EObject +{ + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getEventDeclaration_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // EventDeclaration diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventDefinition.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventDefinition.java new file mode 100644 index 00000000..0d4f7f95 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventDefinition.java @@ -0,0 +1,19 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + + +/** + * + * A representation of the model object 'Event Definition'. + * + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getEventDefinition() + * @model + * @generated + */ +public interface EventDefinition extends EventDeclaration +{ +} // EventDefinition diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventReference.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventReference.java new file mode 100644 index 00000000..b351b185 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/EventReference.java @@ -0,0 +1,79 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Event Reference'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference#getComponent Component}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference#getEvent Event}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getEventReference() + * @model + * @generated + */ +public interface EventReference extends EObject +{ + /** + * Returns the value of the 'Component' reference. + * + *

+ * If the meaning of the 'Component' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Component' reference. + * @see #setComponent(Variable) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getEventReference_Component() + * @model + * @generated + */ + Variable getComponent(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference#getComponent Component}' reference. + * + * + * @param value the new value of the 'Component' reference. + * @see #getComponent() + * @generated + */ + void setComponent(Variable value); + + /** + * Returns the value of the 'Event' reference. + * + *

+ * If the meaning of the 'Event' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Event' reference. + * @see #setEvent(EventDeclaration) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getEventReference_Event() + * @model + * @generated + */ + EventDeclaration getEvent(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference#getEvent Event}' reference. + * + * + * @param value the new value of the 'Event' reference. + * @see #getEvent() + * @generated + */ + void setEvent(EventDeclaration value); + +} // EventReference diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/GateDefinition.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/GateDefinition.java new file mode 100644 index 00000000..3020f2ca --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/GateDefinition.java @@ -0,0 +1,42 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Gate Definition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.GateDefinition#getInputEvents Input Events}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getGateDefinition() + * @model + * @generated + */ +public interface GateDefinition extends EventDefinition +{ + /** + * Returns the value of the 'Input Events' reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration}. + * + *

+ * If the meaning of the 'Input Events' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Input Events' reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getGateDefinition_InputEvents() + * @model + * @generated + */ + EList getInputEvents(); + +} // GateDefinition diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ImportDeclaration.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ImportDeclaration.java new file mode 100644 index 00000000..bcb36395 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/ImportDeclaration.java @@ -0,0 +1,52 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Import Declaration'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration#getImportedNamespace Imported Namespace}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getImportDeclaration() + * @model + * @generated + */ +public interface ImportDeclaration extends EObject +{ + /** + * Returns the value of the 'Imported Namespace' attribute. + * + *

+ * If the meaning of the 'Imported Namespace' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Imported Namespace' attribute. + * @see #setImportedNamespace(String) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getImportDeclaration_ImportedNamespace() + * @model + * @generated + */ + String getImportedNamespace(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration#getImportedNamespace Imported Namespace}' attribute. + * + * + * @param value the new value of the 'Imported Namespace' attribute. + * @see #getImportedNamespace() + * @generated + */ + void setImportedNamespace(String value); + +} // ImportDeclaration diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/InputEvent.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/InputEvent.java new file mode 100644 index 00000000..4269fa10 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/InputEvent.java @@ -0,0 +1,51 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + + +/** + * + * A representation of the model object 'Input Event'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent#isMultiple Multiple}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getInputEvent() + * @model + * @generated + */ +public interface InputEvent extends EventDeclaration +{ + /** + * Returns the value of the 'Multiple' attribute. + * + *

+ * If the meaning of the 'Multiple' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Multiple' attribute. + * @see #setMultiple(boolean) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getInputEvent_Multiple() + * @model + * @generated + */ + boolean isMultiple(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent#isMultiple Multiple}' attribute. + * + * + * @param value the new value of the 'Multiple' attribute. + * @see #isMultiple() + * @generated + */ + void setMultiple(boolean value); + +} // InputEvent diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/LookupDefinition.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/LookupDefinition.java new file mode 100644 index 00000000..f0ad3519 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/LookupDefinition.java @@ -0,0 +1,69 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Lookup Definition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition#getMapping Mapping}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition#getArguments Arguments}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getLookupDefinition() + * @model + * @generated + */ +public interface LookupDefinition extends Variable +{ + /** + * Returns the value of the 'Mapping' reference. + * + *

+ * If the meaning of the 'Mapping' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Mapping' reference. + * @see #setMapping(MappingDefinition) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getLookupDefinition_Mapping() + * @model + * @generated + */ + MappingDefinition getMapping(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition#getMapping Mapping}' reference. + * + * + * @param value the new value of the 'Mapping' reference. + * @see #getMapping() + * @generated + */ + void setMapping(MappingDefinition value); + + /** + * Returns the value of the 'Arguments' reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter}. + * + *

+ * If the meaning of the 'Arguments' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Arguments' reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getLookupDefinition_Arguments() + * @model + * @generated + */ + EList getArguments(); + +} // LookupDefinition diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/MappingDefinition.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/MappingDefinition.java new file mode 100644 index 00000000..14c539b4 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/MappingDefinition.java @@ -0,0 +1,161 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.viatra.query.patternlanguage.emf.vql.Pattern; + +/** + * + * A representation of the model object 'Mapping Definition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#isTopLevel Top Level}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getPattern Pattern}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getParameters Parameters}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getComponentInstance Component Instance}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getLookupDefinitions Lookup Definitions}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getAssignments Assignments}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getMappingDefinition() + * @model + * @generated + */ +public interface MappingDefinition extends EObject +{ + /** + * Returns the value of the 'Top Level' attribute. + * + *

+ * If the meaning of the 'Top Level' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Top Level' attribute. + * @see #setTopLevel(boolean) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getMappingDefinition_TopLevel() + * @model + * @generated + */ + boolean isTopLevel(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#isTopLevel Top Level}' attribute. + * + * + * @param value the new value of the 'Top Level' attribute. + * @see #isTopLevel() + * @generated + */ + void setTopLevel(boolean value); + + /** + * Returns the value of the 'Pattern' reference. + * + *

+ * If the meaning of the 'Pattern' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Pattern' reference. + * @see #setPattern(Pattern) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getMappingDefinition_Pattern() + * @model + * @generated + */ + Pattern getPattern(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getPattern Pattern}' reference. + * + * + * @param value the new value of the 'Pattern' reference. + * @see #getPattern() + * @generated + */ + void setPattern(Pattern value); + + /** + * Returns the value of the 'Parameters' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter}. + * + *

+ * If the meaning of the 'Parameters' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Parameters' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getMappingDefinition_Parameters() + * @model containment="true" + * @generated + */ + EList getParameters(); + + /** + * Returns the value of the 'Component Instance' containment reference. + * + *

+ * If the meaning of the 'Component Instance' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Component Instance' containment reference. + * @see #setComponentInstance(ComponentInstance) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getMappingDefinition_ComponentInstance() + * @model containment="true" + * @generated + */ + ComponentInstance getComponentInstance(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition#getComponentInstance Component Instance}' containment reference. + * + * + * @param value the new value of the 'Component Instance' containment reference. + * @see #getComponentInstance() + * @generated + */ + void setComponentInstance(ComponentInstance value); + + /** + * Returns the value of the 'Lookup Definitions' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition}. + * + *

+ * If the meaning of the 'Lookup Definitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Lookup Definitions' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getMappingDefinition_LookupDefinitions() + * @model containment="true" + * @generated + */ + EList getLookupDefinitions(); + + /** + * Returns the value of the 'Assignments' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment}. + * + *

+ * If the meaning of the 'Assignments' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Assignments' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getMappingDefinition_Assignments() + * @model containment="true" + * @generated + */ + EList getAssignments(); + +} // MappingDefinition diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/MappingParameter.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/MappingParameter.java new file mode 100644 index 00000000..5fc3c006 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/MappingParameter.java @@ -0,0 +1,52 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Mapping Parameter'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter#getName Name}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getMappingParameter() + * @model + * @generated + */ +public interface MappingParameter extends EObject +{ + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getMappingParameter_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // MappingParameter diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/OrGate.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/OrGate.java new file mode 100644 index 00000000..44a2bc07 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/OrGate.java @@ -0,0 +1,19 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + + +/** + * + * A representation of the model object 'Or Gate'. + * + * + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getOrGate() + * @model + * @generated + */ +public interface OrGate extends GateDefinition +{ +} // OrGate diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/TransformationDefinition.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/TransformationDefinition.java new file mode 100644 index 00000000..1412e725 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/TransformationDefinition.java @@ -0,0 +1,71 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Transformation Definition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition#getName Name}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition#getMappingDefinitions Mapping Definitions}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getTransformationDefinition() + * @model + * @generated + */ +public interface TransformationDefinition extends EObject +{ + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getTransformationDefinition_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Mapping Definitions' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition}. + * + *

+ * If the meaning of the 'Mapping Definitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Mapping Definitions' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getTransformationDefinition_MappingDefinitions() + * @model containment="true" + * @generated + */ + EList getMappingDefinitions(); + +} // TransformationDefinition diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/Variable.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/Variable.java new file mode 100644 index 00000000..d49749da --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/Variable.java @@ -0,0 +1,52 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Variable'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable#getName Name}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getVariable() + * @model + * @generated + */ +public interface Variable extends EObject +{ + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#getVariable_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // Variable diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/AndGateImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/AndGateImpl.java new file mode 100644 index 00000000..d38a9fcd --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/AndGateImpl.java @@ -0,0 +1,41 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.AndGate; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'And Gate'. + * + * + * @generated + */ +public class AndGateImpl extends GateDefinitionImpl implements AndGate +{ + /** + * + * + * @generated + */ + protected AndGateImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.AND_GATE; + } + +} //AndGateImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/AssignmentImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/AssignmentImpl.java new file mode 100644 index 00000000..0b37cdbb --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/AssignmentImpl.java @@ -0,0 +1,343 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Assignment'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AssignmentImpl#getInput Input}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AssignmentImpl#isMultiple Multiple}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.AssignmentImpl#getOutput Output}
  • + *
+ * + * @generated + */ +public class AssignmentImpl extends MinimalEObjectImpl.Container implements Assignment +{ + /** + * The cached value of the '{@link #getInput() Input}' containment reference. + * + * + * @see #getInput() + * @generated + * @ordered + */ + protected EventReference input; + + /** + * The default value of the '{@link #isMultiple() Multiple}' attribute. + * + * + * @see #isMultiple() + * @generated + * @ordered + */ + protected static final boolean MULTIPLE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isMultiple() Multiple}' attribute. + * + * + * @see #isMultiple() + * @generated + * @ordered + */ + protected boolean multiple = MULTIPLE_EDEFAULT; + + /** + * The cached value of the '{@link #getOutput() Output}' containment reference. + * + * + * @see #getOutput() + * @generated + * @ordered + */ + protected EventReference output; + + /** + * + * + * @generated + */ + protected AssignmentImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.ASSIGNMENT; + } + + /** + * + * + * @generated + */ + @Override + public EventReference getInput() + { + return input; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetInput(EventReference newInput, NotificationChain msgs) + { + EventReference oldInput = input; + input = newInput; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CftLanguagePackage.ASSIGNMENT__INPUT, oldInput, newInput); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setInput(EventReference newInput) + { + if (newInput != input) + { + NotificationChain msgs = null; + if (input != null) + msgs = ((InternalEObject)input).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CftLanguagePackage.ASSIGNMENT__INPUT, null, msgs); + if (newInput != null) + msgs = ((InternalEObject)newInput).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CftLanguagePackage.ASSIGNMENT__INPUT, null, msgs); + msgs = basicSetInput(newInput, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.ASSIGNMENT__INPUT, newInput, newInput)); + } + + /** + * + * + * @generated + */ + @Override + public boolean isMultiple() + { + return multiple; + } + + /** + * + * + * @generated + */ + @Override + public void setMultiple(boolean newMultiple) + { + boolean oldMultiple = multiple; + multiple = newMultiple; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.ASSIGNMENT__MULTIPLE, oldMultiple, multiple)); + } + + /** + * + * + * @generated + */ + @Override + public EventReference getOutput() + { + return output; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetOutput(EventReference newOutput, NotificationChain msgs) + { + EventReference oldOutput = output; + output = newOutput; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CftLanguagePackage.ASSIGNMENT__OUTPUT, oldOutput, newOutput); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setOutput(EventReference newOutput) + { + if (newOutput != output) + { + NotificationChain msgs = null; + if (output != null) + msgs = ((InternalEObject)output).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CftLanguagePackage.ASSIGNMENT__OUTPUT, null, msgs); + if (newOutput != null) + msgs = ((InternalEObject)newOutput).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CftLanguagePackage.ASSIGNMENT__OUTPUT, null, msgs); + msgs = basicSetOutput(newOutput, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.ASSIGNMENT__OUTPUT, newOutput, newOutput)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case CftLanguagePackage.ASSIGNMENT__INPUT: + return basicSetInput(null, msgs); + case CftLanguagePackage.ASSIGNMENT__OUTPUT: + return basicSetOutput(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.ASSIGNMENT__INPUT: + return getInput(); + case CftLanguagePackage.ASSIGNMENT__MULTIPLE: + return isMultiple(); + case CftLanguagePackage.ASSIGNMENT__OUTPUT: + return getOutput(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.ASSIGNMENT__INPUT: + setInput((EventReference)newValue); + return; + case CftLanguagePackage.ASSIGNMENT__MULTIPLE: + setMultiple((Boolean)newValue); + return; + case CftLanguagePackage.ASSIGNMENT__OUTPUT: + setOutput((EventReference)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.ASSIGNMENT__INPUT: + setInput((EventReference)null); + return; + case CftLanguagePackage.ASSIGNMENT__MULTIPLE: + setMultiple(MULTIPLE_EDEFAULT); + return; + case CftLanguagePackage.ASSIGNMENT__OUTPUT: + setOutput((EventReference)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.ASSIGNMENT__INPUT: + return input != null; + case CftLanguagePackage.ASSIGNMENT__MULTIPLE: + return multiple != MULTIPLE_EDEFAULT; + case CftLanguagePackage.ASSIGNMENT__OUTPUT: + return output != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (multiple: "); + result.append(multiple); + result.append(')'); + return result.toString(); + } + +} //AssignmentImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/BasicEventDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/BasicEventDefinitionImpl.java new file mode 100644 index 00000000..34c865c3 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/BasicEventDefinitionImpl.java @@ -0,0 +1,179 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Basic Event Definition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.BasicEventDefinitionImpl#getRate Rate}
  • + *
+ * + * @generated + */ +public class BasicEventDefinitionImpl extends EventDefinitionImpl implements BasicEventDefinition +{ + /** + * The default value of the '{@link #getRate() Rate}' attribute. + * + * + * @see #getRate() + * @generated + * @ordered + */ + protected static final double RATE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getRate() Rate}' attribute. + * + * + * @see #getRate() + * @generated + * @ordered + */ + protected double rate = RATE_EDEFAULT; + + /** + * + * + * @generated + */ + protected BasicEventDefinitionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.BASIC_EVENT_DEFINITION; + } + + /** + * + * + * @generated + */ + @Override + public double getRate() + { + return rate; + } + + /** + * + * + * @generated + */ + @Override + public void setRate(double newRate) + { + double oldRate = rate; + rate = newRate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.BASIC_EVENT_DEFINITION__RATE, oldRate, rate)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.BASIC_EVENT_DEFINITION__RATE: + return getRate(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.BASIC_EVENT_DEFINITION__RATE: + setRate((Double)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.BASIC_EVENT_DEFINITION__RATE: + setRate(RATE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.BASIC_EVENT_DEFINITION__RATE: + return rate != RATE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (rate: "); + result.append(rate); + result.append(')'); + return result.toString(); + } + +} //BasicEventDefinitionImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftLanguageFactoryImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftLanguageFactoryImpl.java new file mode 100644 index 00000000..04b066b2 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftLanguageFactoryImpl.java @@ -0,0 +1,330 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CftLanguageFactoryImpl extends EFactoryImpl implements CftLanguageFactory +{ + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static CftLanguageFactory init() + { + try + { + CftLanguageFactory theCftLanguageFactory = (CftLanguageFactory)EPackage.Registry.INSTANCE.getEFactory(CftLanguagePackage.eNS_URI); + if (theCftLanguageFactory != null) + { + return theCftLanguageFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new CftLanguageFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public CftLanguageFactoryImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case CftLanguagePackage.CFT_MODEL: return createCftModel(); + case CftLanguagePackage.IMPORT_DECLARATION: return createImportDeclaration(); + case CftLanguagePackage.COMPONENT_DEFINITION: return createComponentDefinition(); + case CftLanguagePackage.EVENT_DECLARATION: return createEventDeclaration(); + case CftLanguagePackage.INPUT_EVENT: return createInputEvent(); + case CftLanguagePackage.EVENT_DEFINITION: return createEventDefinition(); + case CftLanguagePackage.BASIC_EVENT_DEFINITION: return createBasicEventDefinition(); + case CftLanguagePackage.GATE_DEFINITION: return createGateDefinition(); + case CftLanguagePackage.AND_GATE: return createAndGate(); + case CftLanguagePackage.OR_GATE: return createOrGate(); + case CftLanguagePackage.TRANSFORMATION_DEFINITION: return createTransformationDefinition(); + case CftLanguagePackage.MAPPING_DEFINITION: return createMappingDefinition(); + case CftLanguagePackage.MAPPING_PARAMETER: return createMappingParameter(); + case CftLanguagePackage.LOOKUP_DEFINITION: return createLookupDefinition(); + case CftLanguagePackage.VARIABLE: return createVariable(); + case CftLanguagePackage.ASSIGNMENT: return createAssignment(); + case CftLanguagePackage.EVENT_REFERENCE: return createEventReference(); + case CftLanguagePackage.COMPONENT_INSTANCE: return createComponentInstance(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public CftModel createCftModel() + { + CftModelImpl cftModel = new CftModelImpl(); + return cftModel; + } + + /** + * + * + * @generated + */ + @Override + public ImportDeclaration createImportDeclaration() + { + ImportDeclarationImpl importDeclaration = new ImportDeclarationImpl(); + return importDeclaration; + } + + /** + * + * + * @generated + */ + @Override + public ComponentDefinition createComponentDefinition() + { + ComponentDefinitionImpl componentDefinition = new ComponentDefinitionImpl(); + return componentDefinition; + } + + /** + * + * + * @generated + */ + @Override + public EventDeclaration createEventDeclaration() + { + EventDeclarationImpl eventDeclaration = new EventDeclarationImpl(); + return eventDeclaration; + } + + /** + * + * + * @generated + */ + @Override + public InputEvent createInputEvent() + { + InputEventImpl inputEvent = new InputEventImpl(); + return inputEvent; + } + + /** + * + * + * @generated + */ + @Override + public EventDefinition createEventDefinition() + { + EventDefinitionImpl eventDefinition = new EventDefinitionImpl(); + return eventDefinition; + } + + /** + * + * + * @generated + */ + @Override + public BasicEventDefinition createBasicEventDefinition() + { + BasicEventDefinitionImpl basicEventDefinition = new BasicEventDefinitionImpl(); + return basicEventDefinition; + } + + /** + * + * + * @generated + */ + @Override + public GateDefinition createGateDefinition() + { + GateDefinitionImpl gateDefinition = new GateDefinitionImpl(); + return gateDefinition; + } + + /** + * + * + * @generated + */ + @Override + public AndGate createAndGate() + { + AndGateImpl andGate = new AndGateImpl(); + return andGate; + } + + /** + * + * + * @generated + */ + @Override + public OrGate createOrGate() + { + OrGateImpl orGate = new OrGateImpl(); + return orGate; + } + + /** + * + * + * @generated + */ + @Override + public TransformationDefinition createTransformationDefinition() + { + TransformationDefinitionImpl transformationDefinition = new TransformationDefinitionImpl(); + return transformationDefinition; + } + + /** + * + * + * @generated + */ + @Override + public MappingDefinition createMappingDefinition() + { + MappingDefinitionImpl mappingDefinition = new MappingDefinitionImpl(); + return mappingDefinition; + } + + /** + * + * + * @generated + */ + @Override + public MappingParameter createMappingParameter() + { + MappingParameterImpl mappingParameter = new MappingParameterImpl(); + return mappingParameter; + } + + /** + * + * + * @generated + */ + @Override + public LookupDefinition createLookupDefinition() + { + LookupDefinitionImpl lookupDefinition = new LookupDefinitionImpl(); + return lookupDefinition; + } + + /** + * + * + * @generated + */ + @Override + public Variable createVariable() + { + VariableImpl variable = new VariableImpl(); + return variable; + } + + /** + * + * + * @generated + */ + @Override + public Assignment createAssignment() + { + AssignmentImpl assignment = new AssignmentImpl(); + return assignment; + } + + /** + * + * + * @generated + */ + @Override + public EventReference createEventReference() + { + EventReferenceImpl eventReference = new EventReferenceImpl(); + return eventReference; + } + + /** + * + * + * @generated + */ + @Override + public ComponentInstance createComponentInstance() + { + ComponentInstanceImpl componentInstance = new ComponentInstanceImpl(); + return componentInstance; + } + + /** + * + * + * @generated + */ + @Override + public CftLanguagePackage getCftLanguagePackage() + { + return (CftLanguagePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static CftLanguagePackage getPackage() + { + return CftLanguagePackage.eINSTANCE; + } + +} //CftLanguageFactoryImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftLanguagePackageImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftLanguagePackageImpl.java new file mode 100644 index 00000000..95520ab8 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftLanguagePackageImpl.java @@ -0,0 +1,999 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.AndGate; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguageFactory; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.GateDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.OrGate; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.viatra.query.patternlanguage.emf.vql.PatternLanguagePackage; + +import org.eclipse.xtext.common.types.TypesPackage; + +import org.eclipse.xtext.xbase.XbasePackage; + +import org.eclipse.xtext.xtype.XtypePackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class CftLanguagePackageImpl extends EPackageImpl implements CftLanguagePackage +{ + /** + * + * + * @generated + */ + private EClass cftModelEClass = null; + + /** + * + * + * @generated + */ + private EClass importDeclarationEClass = null; + + /** + * + * + * @generated + */ + private EClass componentDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass eventDeclarationEClass = null; + + /** + * + * + * @generated + */ + private EClass inputEventEClass = null; + + /** + * + * + * @generated + */ + private EClass eventDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass basicEventDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass gateDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass andGateEClass = null; + + /** + * + * + * @generated + */ + private EClass orGateEClass = null; + + /** + * + * + * @generated + */ + private EClass transformationDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass mappingDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass mappingParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass lookupDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass variableEClass = null; + + /** + * + * + * @generated + */ + private EClass assignmentEClass = null; + + /** + * + * + * @generated + */ + private EClass eventReferenceEClass = null; + + /** + * + * + * @generated + */ + private EClass componentInstanceEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage#eNS_URI + * @see #init() + * @generated + */ + private CftLanguagePackageImpl() + { + super(eNS_URI, CftLanguageFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link CftLanguagePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CftLanguagePackage init() + { + if (isInited) return (CftLanguagePackage)EPackage.Registry.INSTANCE.getEPackage(CftLanguagePackage.eNS_URI); + + // Obtain or create and register package + Object registeredCftLanguagePackage = EPackage.Registry.INSTANCE.get(eNS_URI); + CftLanguagePackageImpl theCftLanguagePackage = registeredCftLanguagePackage instanceof CftLanguagePackageImpl ? (CftLanguagePackageImpl)registeredCftLanguagePackage : new CftLanguagePackageImpl(); + + isInited = true; + + // Initialize simple dependencies + EcorePackage.eINSTANCE.eClass(); + PatternLanguagePackage.eINSTANCE.eClass(); + XtypePackage.eINSTANCE.eClass(); + TypesPackage.eINSTANCE.eClass(); + XbasePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theCftLanguagePackage.createPackageContents(); + + // Initialize created meta-data + theCftLanguagePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCftLanguagePackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CftLanguagePackage.eNS_URI, theCftLanguagePackage); + return theCftLanguagePackage; + } + + /** + * + * + * @generated + */ + @Override + public EClass getCftModel() + { + return cftModelEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getCftModel_PackageName() + { + return (EAttribute)cftModelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCftModel_Imports() + { + return (EReference)cftModelEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCftModel_ComponentDefinitions() + { + return (EReference)cftModelEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCftModel_TransformationDefinitions() + { + return (EReference)cftModelEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override + public EClass getImportDeclaration() + { + return importDeclarationEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getImportDeclaration_ImportedNamespace() + { + return (EAttribute)importDeclarationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getComponentDefinition() + { + return componentDefinitionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getComponentDefinition_Name() + { + return (EAttribute)componentDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getComponentDefinition_InputEvents() + { + return (EReference)componentDefinitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getComponentDefinition_OutputEvents() + { + return (EReference)componentDefinitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EReference getComponentDefinition_EventDefinitions() + { + return (EReference)componentDefinitionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override + public EClass getEventDeclaration() + { + return eventDeclarationEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getEventDeclaration_Name() + { + return (EAttribute)eventDeclarationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getInputEvent() + { + return inputEventEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getInputEvent_Multiple() + { + return (EAttribute)inputEventEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getEventDefinition() + { + return eventDefinitionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getBasicEventDefinition() + { + return basicEventDefinitionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getBasicEventDefinition_Rate() + { + return (EAttribute)basicEventDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getGateDefinition() + { + return gateDefinitionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getGateDefinition_InputEvents() + { + return (EReference)gateDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getAndGate() + { + return andGateEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getOrGate() + { + return orGateEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getTransformationDefinition() + { + return transformationDefinitionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getTransformationDefinition_Name() + { + return (EAttribute)transformationDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getTransformationDefinition_MappingDefinitions() + { + return (EReference)transformationDefinitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getMappingDefinition() + { + return mappingDefinitionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getMappingDefinition_TopLevel() + { + return (EAttribute)mappingDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getMappingDefinition_Pattern() + { + return (EReference)mappingDefinitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getMappingDefinition_Parameters() + { + return (EReference)mappingDefinitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EReference getMappingDefinition_ComponentInstance() + { + return (EReference)mappingDefinitionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override + public EReference getMappingDefinition_LookupDefinitions() + { + return (EReference)mappingDefinitionEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + @Override + public EReference getMappingDefinition_Assignments() + { + return (EReference)mappingDefinitionEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + @Override + public EClass getMappingParameter() + { + return mappingParameterEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getMappingParameter_Name() + { + return (EAttribute)mappingParameterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getLookupDefinition() + { + return lookupDefinitionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getLookupDefinition_Mapping() + { + return (EReference)lookupDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getLookupDefinition_Arguments() + { + return (EReference)lookupDefinitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getVariable() + { + return variableEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getVariable_Name() + { + return (EAttribute)variableEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getAssignment() + { + return assignmentEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getAssignment_Input() + { + return (EReference)assignmentEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getAssignment_Multiple() + { + return (EAttribute)assignmentEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getAssignment_Output() + { + return (EReference)assignmentEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EClass getEventReference() + { + return eventReferenceEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getEventReference_Component() + { + return (EReference)eventReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getEventReference_Event() + { + return (EReference)eventReferenceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getComponentInstance() + { + return componentInstanceEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getComponentInstance_ComponentType() + { + return (EReference)componentInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public CftLanguageFactory getCftLanguageFactory() + { + return (CftLanguageFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cftModelEClass = createEClass(CFT_MODEL); + createEAttribute(cftModelEClass, CFT_MODEL__PACKAGE_NAME); + createEReference(cftModelEClass, CFT_MODEL__IMPORTS); + createEReference(cftModelEClass, CFT_MODEL__COMPONENT_DEFINITIONS); + createEReference(cftModelEClass, CFT_MODEL__TRANSFORMATION_DEFINITIONS); + + importDeclarationEClass = createEClass(IMPORT_DECLARATION); + createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__IMPORTED_NAMESPACE); + + componentDefinitionEClass = createEClass(COMPONENT_DEFINITION); + createEAttribute(componentDefinitionEClass, COMPONENT_DEFINITION__NAME); + createEReference(componentDefinitionEClass, COMPONENT_DEFINITION__INPUT_EVENTS); + createEReference(componentDefinitionEClass, COMPONENT_DEFINITION__OUTPUT_EVENTS); + createEReference(componentDefinitionEClass, COMPONENT_DEFINITION__EVENT_DEFINITIONS); + + eventDeclarationEClass = createEClass(EVENT_DECLARATION); + createEAttribute(eventDeclarationEClass, EVENT_DECLARATION__NAME); + + inputEventEClass = createEClass(INPUT_EVENT); + createEAttribute(inputEventEClass, INPUT_EVENT__MULTIPLE); + + eventDefinitionEClass = createEClass(EVENT_DEFINITION); + + basicEventDefinitionEClass = createEClass(BASIC_EVENT_DEFINITION); + createEAttribute(basicEventDefinitionEClass, BASIC_EVENT_DEFINITION__RATE); + + gateDefinitionEClass = createEClass(GATE_DEFINITION); + createEReference(gateDefinitionEClass, GATE_DEFINITION__INPUT_EVENTS); + + andGateEClass = createEClass(AND_GATE); + + orGateEClass = createEClass(OR_GATE); + + transformationDefinitionEClass = createEClass(TRANSFORMATION_DEFINITION); + createEAttribute(transformationDefinitionEClass, TRANSFORMATION_DEFINITION__NAME); + createEReference(transformationDefinitionEClass, TRANSFORMATION_DEFINITION__MAPPING_DEFINITIONS); + + mappingDefinitionEClass = createEClass(MAPPING_DEFINITION); + createEAttribute(mappingDefinitionEClass, MAPPING_DEFINITION__TOP_LEVEL); + createEReference(mappingDefinitionEClass, MAPPING_DEFINITION__PATTERN); + createEReference(mappingDefinitionEClass, MAPPING_DEFINITION__PARAMETERS); + createEReference(mappingDefinitionEClass, MAPPING_DEFINITION__COMPONENT_INSTANCE); + createEReference(mappingDefinitionEClass, MAPPING_DEFINITION__LOOKUP_DEFINITIONS); + createEReference(mappingDefinitionEClass, MAPPING_DEFINITION__ASSIGNMENTS); + + mappingParameterEClass = createEClass(MAPPING_PARAMETER); + createEAttribute(mappingParameterEClass, MAPPING_PARAMETER__NAME); + + lookupDefinitionEClass = createEClass(LOOKUP_DEFINITION); + createEReference(lookupDefinitionEClass, LOOKUP_DEFINITION__MAPPING); + createEReference(lookupDefinitionEClass, LOOKUP_DEFINITION__ARGUMENTS); + + variableEClass = createEClass(VARIABLE); + createEAttribute(variableEClass, VARIABLE__NAME); + + assignmentEClass = createEClass(ASSIGNMENT); + createEReference(assignmentEClass, ASSIGNMENT__INPUT); + createEAttribute(assignmentEClass, ASSIGNMENT__MULTIPLE); + createEReference(assignmentEClass, ASSIGNMENT__OUTPUT); + + eventReferenceEClass = createEClass(EVENT_REFERENCE); + createEReference(eventReferenceEClass, EVENT_REFERENCE__COMPONENT); + createEReference(eventReferenceEClass, EVENT_REFERENCE__EVENT); + + componentInstanceEClass = createEClass(COMPONENT_INSTANCE); + createEReference(componentInstanceEClass, COMPONENT_INSTANCE__COMPONENT_TYPE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + PatternLanguagePackage thePatternLanguagePackage = (PatternLanguagePackage)EPackage.Registry.INSTANCE.getEPackage(PatternLanguagePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + inputEventEClass.getESuperTypes().add(this.getEventDeclaration()); + eventDefinitionEClass.getESuperTypes().add(this.getEventDeclaration()); + basicEventDefinitionEClass.getESuperTypes().add(this.getEventDefinition()); + gateDefinitionEClass.getESuperTypes().add(this.getEventDefinition()); + andGateEClass.getESuperTypes().add(this.getGateDefinition()); + orGateEClass.getESuperTypes().add(this.getGateDefinition()); + lookupDefinitionEClass.getESuperTypes().add(this.getVariable()); + componentInstanceEClass.getESuperTypes().add(this.getVariable()); + + // Initialize classes and features; add operations and parameters + initEClass(cftModelEClass, CftModel.class, "CftModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCftModel_PackageName(), theEcorePackage.getEString(), "packageName", null, 0, 1, CftModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCftModel_Imports(), this.getImportDeclaration(), null, "imports", null, 0, -1, CftModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCftModel_ComponentDefinitions(), this.getComponentDefinition(), null, "componentDefinitions", null, 0, -1, CftModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCftModel_TransformationDefinitions(), this.getTransformationDefinition(), null, "transformationDefinitions", null, 0, -1, CftModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(importDeclarationEClass, ImportDeclaration.class, "ImportDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getImportDeclaration_ImportedNamespace(), theEcorePackage.getEString(), "importedNamespace", null, 0, 1, ImportDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(componentDefinitionEClass, ComponentDefinition.class, "ComponentDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getComponentDefinition_Name(), theEcorePackage.getEString(), "name", null, 0, 1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getComponentDefinition_InputEvents(), this.getInputEvent(), null, "inputEvents", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getComponentDefinition_OutputEvents(), this.getEventDeclaration(), null, "outputEvents", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getComponentDefinition_EventDefinitions(), this.getEventDefinition(), null, "eventDefinitions", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eventDeclarationEClass, EventDeclaration.class, "EventDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getEventDeclaration_Name(), theEcorePackage.getEString(), "name", null, 0, 1, EventDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(inputEventEClass, InputEvent.class, "InputEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getInputEvent_Multiple(), theEcorePackage.getEBoolean(), "multiple", null, 0, 1, InputEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eventDefinitionEClass, EventDefinition.class, "EventDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(basicEventDefinitionEClass, BasicEventDefinition.class, "BasicEventDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getBasicEventDefinition_Rate(), theEcorePackage.getEDouble(), "rate", null, 0, 1, BasicEventDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(gateDefinitionEClass, GateDefinition.class, "GateDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGateDefinition_InputEvents(), this.getEventDeclaration(), null, "inputEvents", null, 0, -1, GateDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(andGateEClass, AndGate.class, "AndGate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(orGateEClass, OrGate.class, "OrGate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(transformationDefinitionEClass, TransformationDefinition.class, "TransformationDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTransformationDefinition_Name(), theEcorePackage.getEString(), "name", null, 0, 1, TransformationDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getTransformationDefinition_MappingDefinitions(), this.getMappingDefinition(), null, "mappingDefinitions", null, 0, -1, TransformationDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(mappingDefinitionEClass, MappingDefinition.class, "MappingDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getMappingDefinition_TopLevel(), theEcorePackage.getEBoolean(), "topLevel", null, 0, 1, MappingDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getMappingDefinition_Pattern(), thePatternLanguagePackage.getPattern(), null, "pattern", null, 0, 1, MappingDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getMappingDefinition_Parameters(), this.getMappingParameter(), null, "parameters", null, 0, -1, MappingDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getMappingDefinition_ComponentInstance(), this.getComponentInstance(), null, "componentInstance", null, 0, 1, MappingDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getMappingDefinition_LookupDefinitions(), this.getLookupDefinition(), null, "lookupDefinitions", null, 0, -1, MappingDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getMappingDefinition_Assignments(), this.getAssignment(), null, "assignments", null, 0, -1, MappingDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(mappingParameterEClass, MappingParameter.class, "MappingParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getMappingParameter_Name(), theEcorePackage.getEString(), "name", null, 0, 1, MappingParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(lookupDefinitionEClass, LookupDefinition.class, "LookupDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getLookupDefinition_Mapping(), this.getMappingDefinition(), null, "mapping", null, 0, 1, LookupDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLookupDefinition_Arguments(), this.getMappingParameter(), null, "arguments", null, 0, -1, LookupDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(variableEClass, Variable.class, "Variable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVariable_Name(), theEcorePackage.getEString(), "name", null, 0, 1, Variable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(assignmentEClass, Assignment.class, "Assignment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAssignment_Input(), this.getEventReference(), null, "input", null, 0, 1, Assignment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAssignment_Multiple(), theEcorePackage.getEBoolean(), "multiple", null, 0, 1, Assignment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAssignment_Output(), this.getEventReference(), null, "output", null, 0, 1, Assignment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eventReferenceEClass, EventReference.class, "EventReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getEventReference_Component(), this.getVariable(), null, "component", null, 0, 1, EventReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getEventReference_Event(), this.getEventDeclaration(), null, "event", null, 0, 1, EventReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(componentInstanceEClass, ComponentInstance.class, "ComponentInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getComponentInstance_ComponentType(), this.getComponentDefinition(), null, "componentType", null, 0, 1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //CftLanguagePackageImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftModelImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftModelImpl.java new file mode 100644 index 00000000..b51f54ab --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/CftModelImpl.java @@ -0,0 +1,324 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Cft Model'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftModelImpl#getPackageName Package Name}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftModelImpl#getImports Imports}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftModelImpl#getComponentDefinitions Component Definitions}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.CftModelImpl#getTransformationDefinitions Transformation Definitions}
  • + *
+ * + * @generated + */ +public class CftModelImpl extends MinimalEObjectImpl.Container implements CftModel +{ + /** + * The default value of the '{@link #getPackageName() Package Name}' attribute. + * + * + * @see #getPackageName() + * @generated + * @ordered + */ + protected static final String PACKAGE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPackageName() Package Name}' attribute. + * + * + * @see #getPackageName() + * @generated + * @ordered + */ + protected String packageName = PACKAGE_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getImports() Imports}' containment reference list. + * + * + * @see #getImports() + * @generated + * @ordered + */ + protected EList imports; + + /** + * The cached value of the '{@link #getComponentDefinitions() Component Definitions}' containment reference list. + * + * + * @see #getComponentDefinitions() + * @generated + * @ordered + */ + protected EList componentDefinitions; + + /** + * The cached value of the '{@link #getTransformationDefinitions() Transformation Definitions}' containment reference list. + * + * + * @see #getTransformationDefinitions() + * @generated + * @ordered + */ + protected EList transformationDefinitions; + + /** + * + * + * @generated + */ + protected CftModelImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.CFT_MODEL; + } + + /** + * + * + * @generated + */ + @Override + public String getPackageName() + { + return packageName; + } + + /** + * + * + * @generated + */ + @Override + public void setPackageName(String newPackageName) + { + String oldPackageName = packageName; + packageName = newPackageName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.CFT_MODEL__PACKAGE_NAME, oldPackageName, packageName)); + } + + /** + * + * + * @generated + */ + @Override + public EList getImports() + { + if (imports == null) + { + imports = new EObjectContainmentEList(ImportDeclaration.class, this, CftLanguagePackage.CFT_MODEL__IMPORTS); + } + return imports; + } + + /** + * + * + * @generated + */ + @Override + public EList getComponentDefinitions() + { + if (componentDefinitions == null) + { + componentDefinitions = new EObjectContainmentEList(ComponentDefinition.class, this, CftLanguagePackage.CFT_MODEL__COMPONENT_DEFINITIONS); + } + return componentDefinitions; + } + + /** + * + * + * @generated + */ + @Override + public EList getTransformationDefinitions() + { + if (transformationDefinitions == null) + { + transformationDefinitions = new EObjectContainmentEList(TransformationDefinition.class, this, CftLanguagePackage.CFT_MODEL__TRANSFORMATION_DEFINITIONS); + } + return transformationDefinitions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case CftLanguagePackage.CFT_MODEL__IMPORTS: + return ((InternalEList)getImports()).basicRemove(otherEnd, msgs); + case CftLanguagePackage.CFT_MODEL__COMPONENT_DEFINITIONS: + return ((InternalEList)getComponentDefinitions()).basicRemove(otherEnd, msgs); + case CftLanguagePackage.CFT_MODEL__TRANSFORMATION_DEFINITIONS: + return ((InternalEList)getTransformationDefinitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.CFT_MODEL__PACKAGE_NAME: + return getPackageName(); + case CftLanguagePackage.CFT_MODEL__IMPORTS: + return getImports(); + case CftLanguagePackage.CFT_MODEL__COMPONENT_DEFINITIONS: + return getComponentDefinitions(); + case CftLanguagePackage.CFT_MODEL__TRANSFORMATION_DEFINITIONS: + return getTransformationDefinitions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.CFT_MODEL__PACKAGE_NAME: + setPackageName((String)newValue); + return; + case CftLanguagePackage.CFT_MODEL__IMPORTS: + getImports().clear(); + getImports().addAll((Collection)newValue); + return; + case CftLanguagePackage.CFT_MODEL__COMPONENT_DEFINITIONS: + getComponentDefinitions().clear(); + getComponentDefinitions().addAll((Collection)newValue); + return; + case CftLanguagePackage.CFT_MODEL__TRANSFORMATION_DEFINITIONS: + getTransformationDefinitions().clear(); + getTransformationDefinitions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.CFT_MODEL__PACKAGE_NAME: + setPackageName(PACKAGE_NAME_EDEFAULT); + return; + case CftLanguagePackage.CFT_MODEL__IMPORTS: + getImports().clear(); + return; + case CftLanguagePackage.CFT_MODEL__COMPONENT_DEFINITIONS: + getComponentDefinitions().clear(); + return; + case CftLanguagePackage.CFT_MODEL__TRANSFORMATION_DEFINITIONS: + getTransformationDefinitions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.CFT_MODEL__PACKAGE_NAME: + return PACKAGE_NAME_EDEFAULT == null ? packageName != null : !PACKAGE_NAME_EDEFAULT.equals(packageName); + case CftLanguagePackage.CFT_MODEL__IMPORTS: + return imports != null && !imports.isEmpty(); + case CftLanguagePackage.CFT_MODEL__COMPONENT_DEFINITIONS: + return componentDefinitions != null && !componentDefinitions.isEmpty(); + case CftLanguagePackage.CFT_MODEL__TRANSFORMATION_DEFINITIONS: + return transformationDefinitions != null && !transformationDefinitions.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (packageName: "); + result.append(packageName); + result.append(')'); + return result.toString(); + } + +} //CftModelImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ComponentDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ComponentDefinitionImpl.java new file mode 100644 index 00000000..4633d839 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ComponentDefinitionImpl.java @@ -0,0 +1,323 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Component Definition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentDefinitionImpl#getName Name}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentDefinitionImpl#getInputEvents Input Events}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentDefinitionImpl#getOutputEvents Output Events}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentDefinitionImpl#getEventDefinitions Event Definitions}
  • + *
+ * + * @generated + */ +public class ComponentDefinitionImpl extends MinimalEObjectImpl.Container implements ComponentDefinition +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getInputEvents() Input Events}' containment reference list. + * + * + * @see #getInputEvents() + * @generated + * @ordered + */ + protected EList inputEvents; + + /** + * The cached value of the '{@link #getOutputEvents() Output Events}' reference list. + * + * + * @see #getOutputEvents() + * @generated + * @ordered + */ + protected EList outputEvents; + + /** + * The cached value of the '{@link #getEventDefinitions() Event Definitions}' containment reference list. + * + * + * @see #getEventDefinitions() + * @generated + * @ordered + */ + protected EList eventDefinitions; + + /** + * + * + * @generated + */ + protected ComponentDefinitionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.COMPONENT_DEFINITION; + } + + /** + * + * + * @generated + */ + @Override + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.COMPONENT_DEFINITION__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public EList getInputEvents() + { + if (inputEvents == null) + { + inputEvents = new EObjectContainmentEList(InputEvent.class, this, CftLanguagePackage.COMPONENT_DEFINITION__INPUT_EVENTS); + } + return inputEvents; + } + + /** + * + * + * @generated + */ + @Override + public EList getOutputEvents() + { + if (outputEvents == null) + { + outputEvents = new EObjectResolvingEList(EventDeclaration.class, this, CftLanguagePackage.COMPONENT_DEFINITION__OUTPUT_EVENTS); + } + return outputEvents; + } + + /** + * + * + * @generated + */ + @Override + public EList getEventDefinitions() + { + if (eventDefinitions == null) + { + eventDefinitions = new EObjectContainmentEList(EventDefinition.class, this, CftLanguagePackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS); + } + return eventDefinitions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case CftLanguagePackage.COMPONENT_DEFINITION__INPUT_EVENTS: + return ((InternalEList)getInputEvents()).basicRemove(otherEnd, msgs); + case CftLanguagePackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: + return ((InternalEList)getEventDefinitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.COMPONENT_DEFINITION__NAME: + return getName(); + case CftLanguagePackage.COMPONENT_DEFINITION__INPUT_EVENTS: + return getInputEvents(); + case CftLanguagePackage.COMPONENT_DEFINITION__OUTPUT_EVENTS: + return getOutputEvents(); + case CftLanguagePackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: + return getEventDefinitions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.COMPONENT_DEFINITION__NAME: + setName((String)newValue); + return; + case CftLanguagePackage.COMPONENT_DEFINITION__INPUT_EVENTS: + getInputEvents().clear(); + getInputEvents().addAll((Collection)newValue); + return; + case CftLanguagePackage.COMPONENT_DEFINITION__OUTPUT_EVENTS: + getOutputEvents().clear(); + getOutputEvents().addAll((Collection)newValue); + return; + case CftLanguagePackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: + getEventDefinitions().clear(); + getEventDefinitions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.COMPONENT_DEFINITION__NAME: + setName(NAME_EDEFAULT); + return; + case CftLanguagePackage.COMPONENT_DEFINITION__INPUT_EVENTS: + getInputEvents().clear(); + return; + case CftLanguagePackage.COMPONENT_DEFINITION__OUTPUT_EVENTS: + getOutputEvents().clear(); + return; + case CftLanguagePackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: + getEventDefinitions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.COMPONENT_DEFINITION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CftLanguagePackage.COMPONENT_DEFINITION__INPUT_EVENTS: + return inputEvents != null && !inputEvents.isEmpty(); + case CftLanguagePackage.COMPONENT_DEFINITION__OUTPUT_EVENTS: + return outputEvents != null && !outputEvents.isEmpty(); + case CftLanguagePackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: + return eventDefinitions != null && !eventDefinitions.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ComponentDefinitionImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ComponentInstanceImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ComponentInstanceImpl.java new file mode 100644 index 00000000..5966e55c --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ComponentInstanceImpl.java @@ -0,0 +1,175 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Component Instance'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ComponentInstanceImpl#getComponentType Component Type}
  • + *
+ * + * @generated + */ +public class ComponentInstanceImpl extends VariableImpl implements ComponentInstance +{ + /** + * The cached value of the '{@link #getComponentType() Component Type}' reference. + * + * + * @see #getComponentType() + * @generated + * @ordered + */ + protected ComponentDefinition componentType; + + /** + * + * + * @generated + */ + protected ComponentInstanceImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.COMPONENT_INSTANCE; + } + + /** + * + * + * @generated + */ + @Override + public ComponentDefinition getComponentType() + { + if (componentType != null && componentType.eIsProxy()) + { + InternalEObject oldComponentType = (InternalEObject)componentType; + componentType = (ComponentDefinition)eResolveProxy(oldComponentType); + if (componentType != oldComponentType) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftLanguagePackage.COMPONENT_INSTANCE__COMPONENT_TYPE, oldComponentType, componentType)); + } + } + return componentType; + } + + /** + * + * + * @generated + */ + public ComponentDefinition basicGetComponentType() + { + return componentType; + } + + /** + * + * + * @generated + */ + @Override + public void setComponentType(ComponentDefinition newComponentType) + { + ComponentDefinition oldComponentType = componentType; + componentType = newComponentType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.COMPONENT_INSTANCE__COMPONENT_TYPE, oldComponentType, componentType)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.COMPONENT_INSTANCE__COMPONENT_TYPE: + if (resolve) return getComponentType(); + return basicGetComponentType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.COMPONENT_INSTANCE__COMPONENT_TYPE: + setComponentType((ComponentDefinition)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.COMPONENT_INSTANCE__COMPONENT_TYPE: + setComponentType((ComponentDefinition)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.COMPONENT_INSTANCE__COMPONENT_TYPE: + return componentType != null; + } + return super.eIsSet(featureID); + } + +} //ComponentInstanceImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventDeclarationImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventDeclarationImpl.java new file mode 100644 index 00000000..c9964c20 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventDeclarationImpl.java @@ -0,0 +1,180 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Event Declaration'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventDeclarationImpl#getName Name}
  • + *
+ * + * @generated + */ +public class EventDeclarationImpl extends MinimalEObjectImpl.Container implements EventDeclaration +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected EventDeclarationImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.EVENT_DECLARATION; + } + + /** + * + * + * @generated + */ + @Override + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.EVENT_DECLARATION__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.EVENT_DECLARATION__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.EVENT_DECLARATION__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.EVENT_DECLARATION__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.EVENT_DECLARATION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //EventDeclarationImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventDefinitionImpl.java new file mode 100644 index 00000000..0c03504b --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventDefinitionImpl.java @@ -0,0 +1,41 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDefinition; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Event Definition'. + * + * + * @generated + */ +public class EventDefinitionImpl extends EventDeclarationImpl implements EventDefinition +{ + /** + * + * + * @generated + */ + protected EventDefinitionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.EVENT_DEFINITION; + } + +} //EventDefinitionImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventReferenceImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventReferenceImpl.java new file mode 100644 index 00000000..f10ae8a2 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/EventReferenceImpl.java @@ -0,0 +1,244 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Event Reference'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventReferenceImpl#getComponent Component}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.EventReferenceImpl#getEvent Event}
  • + *
+ * + * @generated + */ +public class EventReferenceImpl extends MinimalEObjectImpl.Container implements EventReference +{ + /** + * The cached value of the '{@link #getComponent() Component}' reference. + * + * + * @see #getComponent() + * @generated + * @ordered + */ + protected Variable component; + + /** + * The cached value of the '{@link #getEvent() Event}' reference. + * + * + * @see #getEvent() + * @generated + * @ordered + */ + protected EventDeclaration event; + + /** + * + * + * @generated + */ + protected EventReferenceImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.EVENT_REFERENCE; + } + + /** + * + * + * @generated + */ + @Override + public Variable getComponent() + { + if (component != null && component.eIsProxy()) + { + InternalEObject oldComponent = (InternalEObject)component; + component = (Variable)eResolveProxy(oldComponent); + if (component != oldComponent) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftLanguagePackage.EVENT_REFERENCE__COMPONENT, oldComponent, component)); + } + } + return component; + } + + /** + * + * + * @generated + */ + public Variable basicGetComponent() + { + return component; + } + + /** + * + * + * @generated + */ + @Override + public void setComponent(Variable newComponent) + { + Variable oldComponent = component; + component = newComponent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.EVENT_REFERENCE__COMPONENT, oldComponent, component)); + } + + /** + * + * + * @generated + */ + @Override + public EventDeclaration getEvent() + { + if (event != null && event.eIsProxy()) + { + InternalEObject oldEvent = (InternalEObject)event; + event = (EventDeclaration)eResolveProxy(oldEvent); + if (event != oldEvent) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftLanguagePackage.EVENT_REFERENCE__EVENT, oldEvent, event)); + } + } + return event; + } + + /** + * + * + * @generated + */ + public EventDeclaration basicGetEvent() + { + return event; + } + + /** + * + * + * @generated + */ + @Override + public void setEvent(EventDeclaration newEvent) + { + EventDeclaration oldEvent = event; + event = newEvent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.EVENT_REFERENCE__EVENT, oldEvent, event)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.EVENT_REFERENCE__COMPONENT: + if (resolve) return getComponent(); + return basicGetComponent(); + case CftLanguagePackage.EVENT_REFERENCE__EVENT: + if (resolve) return getEvent(); + return basicGetEvent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.EVENT_REFERENCE__COMPONENT: + setComponent((Variable)newValue); + return; + case CftLanguagePackage.EVENT_REFERENCE__EVENT: + setEvent((EventDeclaration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.EVENT_REFERENCE__COMPONENT: + setComponent((Variable)null); + return; + case CftLanguagePackage.EVENT_REFERENCE__EVENT: + setEvent((EventDeclaration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.EVENT_REFERENCE__COMPONENT: + return component != null; + case CftLanguagePackage.EVENT_REFERENCE__EVENT: + return event != null; + } + return super.eIsSet(featureID); + } + +} //EventReferenceImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/GateDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/GateDefinitionImpl.java new file mode 100644 index 00000000..76b12fc2 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/GateDefinitionImpl.java @@ -0,0 +1,147 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.GateDefinition; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +/** + * + * An implementation of the model object 'Gate Definition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.GateDefinitionImpl#getInputEvents Input Events}
  • + *
+ * + * @generated + */ +public class GateDefinitionImpl extends EventDefinitionImpl implements GateDefinition +{ + /** + * The cached value of the '{@link #getInputEvents() Input Events}' reference list. + * + * + * @see #getInputEvents() + * @generated + * @ordered + */ + protected EList inputEvents; + + /** + * + * + * @generated + */ + protected GateDefinitionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.GATE_DEFINITION; + } + + /** + * + * + * @generated + */ + @Override + public EList getInputEvents() + { + if (inputEvents == null) + { + inputEvents = new EObjectResolvingEList(EventDeclaration.class, this, CftLanguagePackage.GATE_DEFINITION__INPUT_EVENTS); + } + return inputEvents; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.GATE_DEFINITION__INPUT_EVENTS: + return getInputEvents(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.GATE_DEFINITION__INPUT_EVENTS: + getInputEvents().clear(); + getInputEvents().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.GATE_DEFINITION__INPUT_EVENTS: + getInputEvents().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.GATE_DEFINITION__INPUT_EVENTS: + return inputEvents != null && !inputEvents.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //GateDefinitionImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ImportDeclarationImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ImportDeclarationImpl.java new file mode 100644 index 00000000..f4e45535 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/ImportDeclarationImpl.java @@ -0,0 +1,180 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Import Declaration'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.ImportDeclarationImpl#getImportedNamespace Imported Namespace}
  • + *
+ * + * @generated + */ +public class ImportDeclarationImpl extends MinimalEObjectImpl.Container implements ImportDeclaration +{ + /** + * The default value of the '{@link #getImportedNamespace() Imported Namespace}' attribute. + * + * + * @see #getImportedNamespace() + * @generated + * @ordered + */ + protected static final String IMPORTED_NAMESPACE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getImportedNamespace() Imported Namespace}' attribute. + * + * + * @see #getImportedNamespace() + * @generated + * @ordered + */ + protected String importedNamespace = IMPORTED_NAMESPACE_EDEFAULT; + + /** + * + * + * @generated + */ + protected ImportDeclarationImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.IMPORT_DECLARATION; + } + + /** + * + * + * @generated + */ + @Override + public String getImportedNamespace() + { + return importedNamespace; + } + + /** + * + * + * @generated + */ + @Override + public void setImportedNamespace(String newImportedNamespace) + { + String oldImportedNamespace = importedNamespace; + importedNamespace = newImportedNamespace; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.IMPORT_DECLARATION__IMPORTED_NAMESPACE, oldImportedNamespace, importedNamespace)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.IMPORT_DECLARATION__IMPORTED_NAMESPACE: + return getImportedNamespace(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.IMPORT_DECLARATION__IMPORTED_NAMESPACE: + setImportedNamespace((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.IMPORT_DECLARATION__IMPORTED_NAMESPACE: + setImportedNamespace(IMPORTED_NAMESPACE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.IMPORT_DECLARATION__IMPORTED_NAMESPACE: + return IMPORTED_NAMESPACE_EDEFAULT == null ? importedNamespace != null : !IMPORTED_NAMESPACE_EDEFAULT.equals(importedNamespace); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (importedNamespace: "); + result.append(importedNamespace); + result.append(')'); + return result.toString(); + } + +} //ImportDeclarationImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/InputEventImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/InputEventImpl.java new file mode 100644 index 00000000..edb03bdc --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/InputEventImpl.java @@ -0,0 +1,179 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Input Event'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.InputEventImpl#isMultiple Multiple}
  • + *
+ * + * @generated + */ +public class InputEventImpl extends EventDeclarationImpl implements InputEvent +{ + /** + * The default value of the '{@link #isMultiple() Multiple}' attribute. + * + * + * @see #isMultiple() + * @generated + * @ordered + */ + protected static final boolean MULTIPLE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isMultiple() Multiple}' attribute. + * + * + * @see #isMultiple() + * @generated + * @ordered + */ + protected boolean multiple = MULTIPLE_EDEFAULT; + + /** + * + * + * @generated + */ + protected InputEventImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.INPUT_EVENT; + } + + /** + * + * + * @generated + */ + @Override + public boolean isMultiple() + { + return multiple; + } + + /** + * + * + * @generated + */ + @Override + public void setMultiple(boolean newMultiple) + { + boolean oldMultiple = multiple; + multiple = newMultiple; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.INPUT_EVENT__MULTIPLE, oldMultiple, multiple)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.INPUT_EVENT__MULTIPLE: + return isMultiple(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.INPUT_EVENT__MULTIPLE: + setMultiple((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.INPUT_EVENT__MULTIPLE: + setMultiple(MULTIPLE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.INPUT_EVENT__MULTIPLE: + return multiple != MULTIPLE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (multiple: "); + result.append(multiple); + result.append(')'); + return result.toString(); + } + +} //InputEventImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/LookupDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/LookupDefinitionImpl.java new file mode 100644 index 00000000..f4877855 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/LookupDefinitionImpl.java @@ -0,0 +1,220 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +/** + * + * An implementation of the model object 'Lookup Definition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.LookupDefinitionImpl#getMapping Mapping}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.LookupDefinitionImpl#getArguments Arguments}
  • + *
+ * + * @generated + */ +public class LookupDefinitionImpl extends VariableImpl implements LookupDefinition +{ + /** + * The cached value of the '{@link #getMapping() Mapping}' reference. + * + * + * @see #getMapping() + * @generated + * @ordered + */ + protected MappingDefinition mapping; + + /** + * The cached value of the '{@link #getArguments() Arguments}' reference list. + * + * + * @see #getArguments() + * @generated + * @ordered + */ + protected EList arguments; + + /** + * + * + * @generated + */ + protected LookupDefinitionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.LOOKUP_DEFINITION; + } + + /** + * + * + * @generated + */ + @Override + public MappingDefinition getMapping() + { + if (mapping != null && mapping.eIsProxy()) + { + InternalEObject oldMapping = (InternalEObject)mapping; + mapping = (MappingDefinition)eResolveProxy(oldMapping); + if (mapping != oldMapping) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftLanguagePackage.LOOKUP_DEFINITION__MAPPING, oldMapping, mapping)); + } + } + return mapping; + } + + /** + * + * + * @generated + */ + public MappingDefinition basicGetMapping() + { + return mapping; + } + + /** + * + * + * @generated + */ + @Override + public void setMapping(MappingDefinition newMapping) + { + MappingDefinition oldMapping = mapping; + mapping = newMapping; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.LOOKUP_DEFINITION__MAPPING, oldMapping, mapping)); + } + + /** + * + * + * @generated + */ + @Override + public EList getArguments() + { + if (arguments == null) + { + arguments = new EObjectResolvingEList(MappingParameter.class, this, CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS); + } + return arguments; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.LOOKUP_DEFINITION__MAPPING: + if (resolve) return getMapping(); + return basicGetMapping(); + case CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS: + return getArguments(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.LOOKUP_DEFINITION__MAPPING: + setMapping((MappingDefinition)newValue); + return; + case CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS: + getArguments().clear(); + getArguments().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.LOOKUP_DEFINITION__MAPPING: + setMapping((MappingDefinition)null); + return; + case CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS: + getArguments().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.LOOKUP_DEFINITION__MAPPING: + return mapping != null; + case CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS: + return arguments != null && !arguments.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //LookupDefinitionImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/MappingDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/MappingDefinitionImpl.java new file mode 100644 index 00000000..d92dd935 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/MappingDefinitionImpl.java @@ -0,0 +1,467 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.viatra.query.patternlanguage.emf.vql.Pattern; + +/** + * + * An implementation of the model object 'Mapping Definition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl#isTopLevel Top Level}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl#getPattern Pattern}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl#getParameters Parameters}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl#getComponentInstance Component Instance}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl#getLookupDefinitions Lookup Definitions}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl#getAssignments Assignments}
  • + *
+ * + * @generated + */ +public class MappingDefinitionImpl extends MinimalEObjectImpl.Container implements MappingDefinition +{ + /** + * The default value of the '{@link #isTopLevel() Top Level}' attribute. + * + * + * @see #isTopLevel() + * @generated + * @ordered + */ + protected static final boolean TOP_LEVEL_EDEFAULT = false; + + /** + * The cached value of the '{@link #isTopLevel() Top Level}' attribute. + * + * + * @see #isTopLevel() + * @generated + * @ordered + */ + protected boolean topLevel = TOP_LEVEL_EDEFAULT; + + /** + * The cached value of the '{@link #getPattern() Pattern}' reference. + * + * + * @see #getPattern() + * @generated + * @ordered + */ + protected Pattern pattern; + + /** + * The cached value of the '{@link #getParameters() Parameters}' containment reference list. + * + * + * @see #getParameters() + * @generated + * @ordered + */ + protected EList parameters; + + /** + * The cached value of the '{@link #getComponentInstance() Component Instance}' containment reference. + * + * + * @see #getComponentInstance() + * @generated + * @ordered + */ + protected ComponentInstance componentInstance; + + /** + * The cached value of the '{@link #getLookupDefinitions() Lookup Definitions}' containment reference list. + * + * + * @see #getLookupDefinitions() + * @generated + * @ordered + */ + protected EList lookupDefinitions; + + /** + * The cached value of the '{@link #getAssignments() Assignments}' containment reference list. + * + * + * @see #getAssignments() + * @generated + * @ordered + */ + protected EList assignments; + + /** + * + * + * @generated + */ + protected MappingDefinitionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.MAPPING_DEFINITION; + } + + /** + * + * + * @generated + */ + @Override + public boolean isTopLevel() + { + return topLevel; + } + + /** + * + * + * @generated + */ + @Override + public void setTopLevel(boolean newTopLevel) + { + boolean oldTopLevel = topLevel; + topLevel = newTopLevel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.MAPPING_DEFINITION__TOP_LEVEL, oldTopLevel, topLevel)); + } + + /** + * + * + * @generated + */ + @Override + public Pattern getPattern() + { + if (pattern != null && pattern.eIsProxy()) + { + InternalEObject oldPattern = (InternalEObject)pattern; + pattern = (Pattern)eResolveProxy(oldPattern); + if (pattern != oldPattern) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftLanguagePackage.MAPPING_DEFINITION__PATTERN, oldPattern, pattern)); + } + } + return pattern; + } + + /** + * + * + * @generated + */ + public Pattern basicGetPattern() + { + return pattern; + } + + /** + * + * + * @generated + */ + @Override + public void setPattern(Pattern newPattern) + { + Pattern oldPattern = pattern; + pattern = newPattern; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.MAPPING_DEFINITION__PATTERN, oldPattern, pattern)); + } + + /** + * + * + * @generated + */ + @Override + public EList getParameters() + { + if (parameters == null) + { + parameters = new EObjectContainmentEList(MappingParameter.class, this, CftLanguagePackage.MAPPING_DEFINITION__PARAMETERS); + } + return parameters; + } + + /** + * + * + * @generated + */ + @Override + public ComponentInstance getComponentInstance() + { + return componentInstance; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetComponentInstance(ComponentInstance newComponentInstance, NotificationChain msgs) + { + ComponentInstance oldComponentInstance = componentInstance; + componentInstance = newComponentInstance; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CftLanguagePackage.MAPPING_DEFINITION__COMPONENT_INSTANCE, oldComponentInstance, newComponentInstance); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setComponentInstance(ComponentInstance newComponentInstance) + { + if (newComponentInstance != componentInstance) + { + NotificationChain msgs = null; + if (componentInstance != null) + msgs = ((InternalEObject)componentInstance).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CftLanguagePackage.MAPPING_DEFINITION__COMPONENT_INSTANCE, null, msgs); + if (newComponentInstance != null) + msgs = ((InternalEObject)newComponentInstance).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CftLanguagePackage.MAPPING_DEFINITION__COMPONENT_INSTANCE, null, msgs); + msgs = basicSetComponentInstance(newComponentInstance, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.MAPPING_DEFINITION__COMPONENT_INSTANCE, newComponentInstance, newComponentInstance)); + } + + /** + * + * + * @generated + */ + @Override + public EList getLookupDefinitions() + { + if (lookupDefinitions == null) + { + lookupDefinitions = new EObjectContainmentEList(LookupDefinition.class, this, CftLanguagePackage.MAPPING_DEFINITION__LOOKUP_DEFINITIONS); + } + return lookupDefinitions; + } + + /** + * + * + * @generated + */ + @Override + public EList getAssignments() + { + if (assignments == null) + { + assignments = new EObjectContainmentEList(Assignment.class, this, CftLanguagePackage.MAPPING_DEFINITION__ASSIGNMENTS); + } + return assignments; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case CftLanguagePackage.MAPPING_DEFINITION__PARAMETERS: + return ((InternalEList)getParameters()).basicRemove(otherEnd, msgs); + case CftLanguagePackage.MAPPING_DEFINITION__COMPONENT_INSTANCE: + return basicSetComponentInstance(null, msgs); + case CftLanguagePackage.MAPPING_DEFINITION__LOOKUP_DEFINITIONS: + return ((InternalEList)getLookupDefinitions()).basicRemove(otherEnd, msgs); + case CftLanguagePackage.MAPPING_DEFINITION__ASSIGNMENTS: + return ((InternalEList)getAssignments()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.MAPPING_DEFINITION__TOP_LEVEL: + return isTopLevel(); + case CftLanguagePackage.MAPPING_DEFINITION__PATTERN: + if (resolve) return getPattern(); + return basicGetPattern(); + case CftLanguagePackage.MAPPING_DEFINITION__PARAMETERS: + return getParameters(); + case CftLanguagePackage.MAPPING_DEFINITION__COMPONENT_INSTANCE: + return getComponentInstance(); + case CftLanguagePackage.MAPPING_DEFINITION__LOOKUP_DEFINITIONS: + return getLookupDefinitions(); + case CftLanguagePackage.MAPPING_DEFINITION__ASSIGNMENTS: + return getAssignments(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.MAPPING_DEFINITION__TOP_LEVEL: + setTopLevel((Boolean)newValue); + return; + case CftLanguagePackage.MAPPING_DEFINITION__PATTERN: + setPattern((Pattern)newValue); + return; + case CftLanguagePackage.MAPPING_DEFINITION__PARAMETERS: + getParameters().clear(); + getParameters().addAll((Collection)newValue); + return; + case CftLanguagePackage.MAPPING_DEFINITION__COMPONENT_INSTANCE: + setComponentInstance((ComponentInstance)newValue); + return; + case CftLanguagePackage.MAPPING_DEFINITION__LOOKUP_DEFINITIONS: + getLookupDefinitions().clear(); + getLookupDefinitions().addAll((Collection)newValue); + return; + case CftLanguagePackage.MAPPING_DEFINITION__ASSIGNMENTS: + getAssignments().clear(); + getAssignments().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.MAPPING_DEFINITION__TOP_LEVEL: + setTopLevel(TOP_LEVEL_EDEFAULT); + return; + case CftLanguagePackage.MAPPING_DEFINITION__PATTERN: + setPattern((Pattern)null); + return; + case CftLanguagePackage.MAPPING_DEFINITION__PARAMETERS: + getParameters().clear(); + return; + case CftLanguagePackage.MAPPING_DEFINITION__COMPONENT_INSTANCE: + setComponentInstance((ComponentInstance)null); + return; + case CftLanguagePackage.MAPPING_DEFINITION__LOOKUP_DEFINITIONS: + getLookupDefinitions().clear(); + return; + case CftLanguagePackage.MAPPING_DEFINITION__ASSIGNMENTS: + getAssignments().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.MAPPING_DEFINITION__TOP_LEVEL: + return topLevel != TOP_LEVEL_EDEFAULT; + case CftLanguagePackage.MAPPING_DEFINITION__PATTERN: + return pattern != null; + case CftLanguagePackage.MAPPING_DEFINITION__PARAMETERS: + return parameters != null && !parameters.isEmpty(); + case CftLanguagePackage.MAPPING_DEFINITION__COMPONENT_INSTANCE: + return componentInstance != null; + case CftLanguagePackage.MAPPING_DEFINITION__LOOKUP_DEFINITIONS: + return lookupDefinitions != null && !lookupDefinitions.isEmpty(); + case CftLanguagePackage.MAPPING_DEFINITION__ASSIGNMENTS: + return assignments != null && !assignments.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (topLevel: "); + result.append(topLevel); + result.append(')'); + return result.toString(); + } + +} //MappingDefinitionImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/MappingParameterImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/MappingParameterImpl.java new file mode 100644 index 00000000..9d0ee701 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/MappingParameterImpl.java @@ -0,0 +1,180 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Mapping Parameter'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingParameterImpl#getName Name}
  • + *
+ * + * @generated + */ +public class MappingParameterImpl extends MinimalEObjectImpl.Container implements MappingParameter +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected MappingParameterImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.MAPPING_PARAMETER; + } + + /** + * + * + * @generated + */ + @Override + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.MAPPING_PARAMETER__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.MAPPING_PARAMETER__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.MAPPING_PARAMETER__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.MAPPING_PARAMETER__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.MAPPING_PARAMETER__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //MappingParameterImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/OrGateImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/OrGateImpl.java new file mode 100644 index 00000000..eaaf1686 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/OrGateImpl.java @@ -0,0 +1,41 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.OrGate; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Or Gate'. + * + * + * @generated + */ +public class OrGateImpl extends GateDefinitionImpl implements OrGate +{ + /** + * + * + * @generated + */ + protected OrGateImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.OR_GATE; + } + +} //OrGateImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/TransformationDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/TransformationDefinitionImpl.java new file mode 100644 index 00000000..89e89b0f --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/TransformationDefinitionImpl.java @@ -0,0 +1,244 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Transformation Definition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.TransformationDefinitionImpl#getName Name}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.TransformationDefinitionImpl#getMappingDefinitions Mapping Definitions}
  • + *
+ * + * @generated + */ +public class TransformationDefinitionImpl extends MinimalEObjectImpl.Container implements TransformationDefinition +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getMappingDefinitions() Mapping Definitions}' containment reference list. + * + * + * @see #getMappingDefinitions() + * @generated + * @ordered + */ + protected EList mappingDefinitions; + + /** + * + * + * @generated + */ + protected TransformationDefinitionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.TRANSFORMATION_DEFINITION; + } + + /** + * + * + * @generated + */ + @Override + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.TRANSFORMATION_DEFINITION__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public EList getMappingDefinitions() + { + if (mappingDefinitions == null) + { + mappingDefinitions = new EObjectContainmentEList(MappingDefinition.class, this, CftLanguagePackage.TRANSFORMATION_DEFINITION__MAPPING_DEFINITIONS); + } + return mappingDefinitions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case CftLanguagePackage.TRANSFORMATION_DEFINITION__MAPPING_DEFINITIONS: + return ((InternalEList)getMappingDefinitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.TRANSFORMATION_DEFINITION__NAME: + return getName(); + case CftLanguagePackage.TRANSFORMATION_DEFINITION__MAPPING_DEFINITIONS: + return getMappingDefinitions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.TRANSFORMATION_DEFINITION__NAME: + setName((String)newValue); + return; + case CftLanguagePackage.TRANSFORMATION_DEFINITION__MAPPING_DEFINITIONS: + getMappingDefinitions().clear(); + getMappingDefinitions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.TRANSFORMATION_DEFINITION__NAME: + setName(NAME_EDEFAULT); + return; + case CftLanguagePackage.TRANSFORMATION_DEFINITION__MAPPING_DEFINITIONS: + getMappingDefinitions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.TRANSFORMATION_DEFINITION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CftLanguagePackage.TRANSFORMATION_DEFINITION__MAPPING_DEFINITIONS: + return mappingDefinitions != null && !mappingDefinitions.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //TransformationDefinitionImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/VariableImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/VariableImpl.java new file mode 100644 index 00000000..3c7d1ccb --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/VariableImpl.java @@ -0,0 +1,180 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Variable'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.VariableImpl#getName Name}
  • + *
+ * + * @generated + */ +public class VariableImpl extends MinimalEObjectImpl.Container implements Variable +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected VariableImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CftLanguagePackage.Literals.VARIABLE; + } + + /** + * + * + * @generated + */ + @Override + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.VARIABLE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case CftLanguagePackage.VARIABLE__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case CftLanguagePackage.VARIABLE__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.VARIABLE__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case CftLanguagePackage.VARIABLE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //VariableImpl diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/util/CftLanguageAdapterFactory.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/util/CftLanguageAdapterFactory.java new file mode 100644 index 00000000..035b1191 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/util/CftLanguageAdapterFactory.java @@ -0,0 +1,473 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.util; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage + * @generated + */ +public class CftLanguageAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. + * + * + * @generated + */ + protected static CftLanguagePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public CftLanguageAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = CftLanguagePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) + { + if (object == modelPackage) + { + return true; + } + if (object instanceof EObject) + { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected CftLanguageSwitch modelSwitch = + new CftLanguageSwitch() + { + @Override + public Adapter caseCftModel(CftModel object) + { + return createCftModelAdapter(); + } + @Override + public Adapter caseImportDeclaration(ImportDeclaration object) + { + return createImportDeclarationAdapter(); + } + @Override + public Adapter caseComponentDefinition(ComponentDefinition object) + { + return createComponentDefinitionAdapter(); + } + @Override + public Adapter caseEventDeclaration(EventDeclaration object) + { + return createEventDeclarationAdapter(); + } + @Override + public Adapter caseInputEvent(InputEvent object) + { + return createInputEventAdapter(); + } + @Override + public Adapter caseEventDefinition(EventDefinition object) + { + return createEventDefinitionAdapter(); + } + @Override + public Adapter caseBasicEventDefinition(BasicEventDefinition object) + { + return createBasicEventDefinitionAdapter(); + } + @Override + public Adapter caseGateDefinition(GateDefinition object) + { + return createGateDefinitionAdapter(); + } + @Override + public Adapter caseAndGate(AndGate object) + { + return createAndGateAdapter(); + } + @Override + public Adapter caseOrGate(OrGate object) + { + return createOrGateAdapter(); + } + @Override + public Adapter caseTransformationDefinition(TransformationDefinition object) + { + return createTransformationDefinitionAdapter(); + } + @Override + public Adapter caseMappingDefinition(MappingDefinition object) + { + return createMappingDefinitionAdapter(); + } + @Override + public Adapter caseMappingParameter(MappingParameter object) + { + return createMappingParameterAdapter(); + } + @Override + public Adapter caseLookupDefinition(LookupDefinition object) + { + return createLookupDefinitionAdapter(); + } + @Override + public Adapter caseVariable(Variable object) + { + return createVariableAdapter(); + } + @Override + public Adapter caseAssignment(Assignment object) + { + return createAssignmentAdapter(); + } + @Override + public Adapter caseEventReference(EventReference object) + { + return createEventReferenceAdapter(); + } + @Override + public Adapter caseComponentInstance(ComponentInstance object) + { + return createComponentInstanceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) + { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) + { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel Cft Model}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel + * @generated + */ + public Adapter createCftModelAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration Import Declaration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration + * @generated + */ + public Adapter createImportDeclarationAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition Component Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition + * @generated + */ + public Adapter createComponentDefinitionAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration Event Declaration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration + * @generated + */ + public Adapter createEventDeclarationAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent Input Event}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent + * @generated + */ + public Adapter createInputEventAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDefinition Event Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDefinition + * @generated + */ + public Adapter createEventDefinitionAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition Basic Event Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition + * @generated + */ + public Adapter createBasicEventDefinitionAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.GateDefinition Gate Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.GateDefinition + * @generated + */ + public Adapter createGateDefinitionAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.AndGate And Gate}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.AndGate + * @generated + */ + public Adapter createAndGateAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.OrGate Or Gate}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.OrGate + * @generated + */ + public Adapter createOrGateAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition Transformation Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition + * @generated + */ + public Adapter createTransformationDefinitionAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition Mapping Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition + * @generated + */ + public Adapter createMappingDefinitionAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter Mapping Parameter}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter + * @generated + */ + public Adapter createMappingParameterAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition Lookup Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition + * @generated + */ + public Adapter createLookupDefinitionAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable Variable}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable + * @generated + */ + public Adapter createVariableAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment Assignment}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment + * @generated + */ + public Adapter createAssignmentAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference Event Reference}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference + * @generated + */ + public Adapter createEventReferenceAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance Component Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance + * @generated + */ + public Adapter createComponentInstanceAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() + { + return null; + } + +} //CftLanguageAdapterFactory diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/util/CftLanguageSwitch.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/util/CftLanguageSwitch.java new file mode 100644 index 00000000..29266601 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/util/CftLanguageSwitch.java @@ -0,0 +1,525 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.util; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage + * @generated + */ +public class CftLanguageSwitch extends Switch +{ + /** + * The cached model package + * + * + * @generated + */ + protected static CftLanguagePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public CftLanguageSwitch() + { + if (modelPackage == null) + { + modelPackage = CftLanguagePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) + { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) + { + switch (classifierID) + { + case CftLanguagePackage.CFT_MODEL: + { + CftModel cftModel = (CftModel)theEObject; + T result = caseCftModel(cftModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.IMPORT_DECLARATION: + { + ImportDeclaration importDeclaration = (ImportDeclaration)theEObject; + T result = caseImportDeclaration(importDeclaration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.COMPONENT_DEFINITION: + { + ComponentDefinition componentDefinition = (ComponentDefinition)theEObject; + T result = caseComponentDefinition(componentDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.EVENT_DECLARATION: + { + EventDeclaration eventDeclaration = (EventDeclaration)theEObject; + T result = caseEventDeclaration(eventDeclaration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.INPUT_EVENT: + { + InputEvent inputEvent = (InputEvent)theEObject; + T result = caseInputEvent(inputEvent); + if (result == null) result = caseEventDeclaration(inputEvent); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.EVENT_DEFINITION: + { + EventDefinition eventDefinition = (EventDefinition)theEObject; + T result = caseEventDefinition(eventDefinition); + if (result == null) result = caseEventDeclaration(eventDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.BASIC_EVENT_DEFINITION: + { + BasicEventDefinition basicEventDefinition = (BasicEventDefinition)theEObject; + T result = caseBasicEventDefinition(basicEventDefinition); + if (result == null) result = caseEventDefinition(basicEventDefinition); + if (result == null) result = caseEventDeclaration(basicEventDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.GATE_DEFINITION: + { + GateDefinition gateDefinition = (GateDefinition)theEObject; + T result = caseGateDefinition(gateDefinition); + if (result == null) result = caseEventDefinition(gateDefinition); + if (result == null) result = caseEventDeclaration(gateDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.AND_GATE: + { + AndGate andGate = (AndGate)theEObject; + T result = caseAndGate(andGate); + if (result == null) result = caseGateDefinition(andGate); + if (result == null) result = caseEventDefinition(andGate); + if (result == null) result = caseEventDeclaration(andGate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.OR_GATE: + { + OrGate orGate = (OrGate)theEObject; + T result = caseOrGate(orGate); + if (result == null) result = caseGateDefinition(orGate); + if (result == null) result = caseEventDefinition(orGate); + if (result == null) result = caseEventDeclaration(orGate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.TRANSFORMATION_DEFINITION: + { + TransformationDefinition transformationDefinition = (TransformationDefinition)theEObject; + T result = caseTransformationDefinition(transformationDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.MAPPING_DEFINITION: + { + MappingDefinition mappingDefinition = (MappingDefinition)theEObject; + T result = caseMappingDefinition(mappingDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.MAPPING_PARAMETER: + { + MappingParameter mappingParameter = (MappingParameter)theEObject; + T result = caseMappingParameter(mappingParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.LOOKUP_DEFINITION: + { + LookupDefinition lookupDefinition = (LookupDefinition)theEObject; + T result = caseLookupDefinition(lookupDefinition); + if (result == null) result = caseVariable(lookupDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.VARIABLE: + { + Variable variable = (Variable)theEObject; + T result = caseVariable(variable); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.ASSIGNMENT: + { + Assignment assignment = (Assignment)theEObject; + T result = caseAssignment(assignment); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.EVENT_REFERENCE: + { + EventReference eventReference = (EventReference)theEObject; + T result = caseEventReference(eventReference); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CftLanguagePackage.COMPONENT_INSTANCE: + { + ComponentInstance componentInstance = (ComponentInstance)theEObject; + T result = caseComponentInstance(componentInstance); + if (result == null) result = caseVariable(componentInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Cft Model'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cft Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCftModel(CftModel object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Import Declaration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Import Declaration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseImportDeclaration(ImportDeclaration object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Component Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Component Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseComponentDefinition(ComponentDefinition object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Event Declaration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Event Declaration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEventDeclaration(EventDeclaration object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Input Event'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Input Event'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInputEvent(InputEvent object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Event Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Event Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEventDefinition(EventDefinition object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Basic Event Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Basic Event Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBasicEventDefinition(BasicEventDefinition object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gate Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gate Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGateDefinition(GateDefinition object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'And Gate'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'And Gate'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAndGate(AndGate object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Or Gate'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Or Gate'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOrGate(OrGate object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Transformation Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Transformation Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTransformationDefinition(TransformationDefinition object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Mapping Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Mapping Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMappingDefinition(MappingDefinition object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Mapping Parameter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Mapping Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMappingParameter(MappingParameter object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Lookup Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Lookup Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLookupDefinition(LookupDefinition object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Variable'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Variable'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVariable(Variable object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Assignment'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Assignment'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssignment(Assignment object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Event Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Event Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEventReference(EventReference object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Component Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Component Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseComponentInstance(ComponentInstance object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) + { + return null; + } + +} //CftLanguageSwitch diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/CftLanguageAntlrTokenFileProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/CftLanguageAntlrTokenFileProvider.java new file mode 100644 index 00000000..14a64042 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/CftLanguageAntlrTokenFileProvider.java @@ -0,0 +1,16 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr; + +import java.io.InputStream; +import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; + +public class CftLanguageAntlrTokenFileProvider implements IAntlrTokenFileProvider { + + @Override + public InputStream getAntlrTokenFile() { + ClassLoader classLoader = getClass().getClassLoader(); + return classLoader.getResourceAsStream("hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.tokens"); + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/CftLanguageParser.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/CftLanguageParser.java new file mode 100644 index 00000000..602ea50d --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/CftLanguageParser.java @@ -0,0 +1,40 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr; + +import com.google.inject.Inject; +import hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr.internal.InternalCftLanguageParser; +import hu.bme.mit.inf.dslreasoner.faulttree.components.services.CftLanguageGrammarAccess; +import org.eclipse.xtext.parser.antlr.AbstractAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; + +public class CftLanguageParser extends AbstractAntlrParser { + + @Inject + private CftLanguageGrammarAccess grammarAccess; + + @Override + protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { + tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); + } + + + @Override + protected InternalCftLanguageParser createParser(XtextTokenStream stream) { + return new InternalCftLanguageParser(stream, getGrammarAccess()); + } + + @Override + protected String getDefaultRuleName() { + return "CftModel"; + } + + public CftLanguageGrammarAccess getGrammarAccess() { + return this.grammarAccess; + } + + public void setGrammarAccess(CftLanguageGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g new file mode 100644 index 00000000..ff509b0a --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g @@ -0,0 +1,1332 @@ +/* + * generated by Xtext 2.16.0 + */ +grammar InternalCftLanguage; + +options { + superClass=AbstractInternalAntlrParser; +} + +@lexer::header { +package hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; +} + +@parser::header { +package hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr.internal; + +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; +import hu.bme.mit.inf.dslreasoner.faulttree.components.services.CftLanguageGrammarAccess; + +} + +@parser::members { + + private CftLanguageGrammarAccess grammarAccess; + + public InternalCftLanguageParser(TokenStream input, CftLanguageGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "CftModel"; + } + + @Override + protected CftLanguageGrammarAccess getGrammarAccess() { + return grammarAccess; + } + +} + +@rulecatch { + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } +} + +// Entry rule entryRuleCftModel +entryRuleCftModel returns [EObject current=null]: + { newCompositeNode(grammarAccess.getCftModelRule()); } + iv_ruleCftModel=ruleCftModel + { $current=$iv_ruleCftModel.current; } + EOF; + +// Rule CftModel +ruleCftModel returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='package' + { + newLeafNode(otherlv_0, grammarAccess.getCftModelAccess().getPackageKeyword_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getCftModelAccess().getPackageNameQualifiedNameParserRuleCall_1_0()); + } + lv_packageName_1_0=ruleQualifiedName + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCftModelRule()); + } + set( + $current, + "packageName", + lv_packageName_1_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.QualifiedName"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_2=';' + { + newLeafNode(otherlv_2, grammarAccess.getCftModelAccess().getSemicolonKeyword_2()); + } + )? + ( + ( + { + newCompositeNode(grammarAccess.getCftModelAccess().getImportsImportDeclarationParserRuleCall_3_0()); + } + lv_imports_3_0=ruleImportDeclaration + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCftModelRule()); + } + add( + $current, + "imports", + lv_imports_3_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ImportDeclaration"); + afterParserOrEnumRuleCall(); + } + ) + )* + ( + ( + ( + { + newCompositeNode(grammarAccess.getCftModelAccess().getComponentDefinitionsComponentDefinitionParserRuleCall_4_0_0()); + } + lv_componentDefinitions_4_0=ruleComponentDefinition + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCftModelRule()); + } + add( + $current, + "componentDefinitions", + lv_componentDefinitions_4_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ComponentDefinition"); + afterParserOrEnumRuleCall(); + } + ) + ) + | + ( + ( + { + newCompositeNode(grammarAccess.getCftModelAccess().getTransformationDefinitionsTransformationDefinitionParserRuleCall_4_1_0()); + } + lv_transformationDefinitions_5_0=ruleTransformationDefinition + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCftModelRule()); + } + add( + $current, + "transformationDefinitions", + lv_transformationDefinitions_5_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.TransformationDefinition"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) +; + +// Entry rule entryRuleImportDeclaration +entryRuleImportDeclaration returns [EObject current=null]: + { newCompositeNode(grammarAccess.getImportDeclarationRule()); } + iv_ruleImportDeclaration=ruleImportDeclaration + { $current=$iv_ruleImportDeclaration.current; } + EOF; + +// Rule ImportDeclaration +ruleImportDeclaration returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='import' + { + newLeafNode(otherlv_0, grammarAccess.getImportDeclarationAccess().getImportKeyword_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getImportDeclarationAccess().getImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_0()); + } + lv_importedNamespace_1_0=ruleQualifiedNameWithWildcard + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getImportDeclarationRule()); + } + set( + $current, + "importedNamespace", + lv_importedNamespace_1_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.QualifiedNameWithWildcard"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_2=';' + { + newLeafNode(otherlv_2, grammarAccess.getImportDeclarationAccess().getSemicolonKeyword_2()); + } + )? + ) +; + +// Entry rule entryRuleComponentDefinition +entryRuleComponentDefinition returns [EObject current=null]: + { newCompositeNode(grammarAccess.getComponentDefinitionRule()); } + iv_ruleComponentDefinition=ruleComponentDefinition + { $current=$iv_ruleComponentDefinition.current; } + EOF; + +// Rule ComponentDefinition +ruleComponentDefinition returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='cft' + { + newLeafNode(otherlv_0, grammarAccess.getComponentDefinitionAccess().getCftKeyword_0()); + } + ( + ( + lv_name_1_0=RULE_ID + { + newLeafNode(lv_name_1_0, grammarAccess.getComponentDefinitionAccess().getNameIDTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getComponentDefinitionRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_1_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + otherlv_2='{' + { + newLeafNode(otherlv_2, grammarAccess.getComponentDefinitionAccess().getLeftCurlyBracketKeyword_2()); + } + ( + ( + { + getUnorderedGroupHelper().enter(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); + } + ( + ( + ( + {getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 0)}?=>( + { + getUnorderedGroupHelper().select(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 0); + } + ({true}?=>(otherlv_4='in' + { + newLeafNode(otherlv_4, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getComponentDefinitionAccess().getInputEventsInputEventParserRuleCall_3_0_1_0()); + } + lv_inputEvents_5_0=ruleInputEvent + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getComponentDefinitionRule()); + } + add( + $current, + "inputEvents", + lv_inputEvents_5_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.InputEvent"); + afterParserOrEnumRuleCall(); + } + ) + )* + otherlv_6=';' + { + newLeafNode(otherlv_6, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2()); + } + )) + { + getUnorderedGroupHelper().returnFromSelection(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); + } + ) + )| + ( + {getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 1)}?=>( + { + getUnorderedGroupHelper().select(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 1); + } + ({true}?=>(otherlv_7='out' + { + newLeafNode(otherlv_7, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getComponentDefinitionRule()); + } + } + otherlv_8=RULE_ID + { + newLeafNode(otherlv_8, grammarAccess.getComponentDefinitionAccess().getOutputEventsEventDeclarationCrossReference_3_1_1_0()); + } + ) + )* + otherlv_9=';' + { + newLeafNode(otherlv_9, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2()); + } + )) + { + getUnorderedGroupHelper().returnFromSelection(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); + } + ) + ) + )* + ) + ) + { + getUnorderedGroupHelper().leave(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); + } + ) + ( + ( + ( + { + newCompositeNode(grammarAccess.getComponentDefinitionAccess().getEventDefinitionsEventDefinitionParserRuleCall_4_0_0()); + } + lv_eventDefinitions_10_0=ruleEventDefinition + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getComponentDefinitionRule()); + } + add( + $current, + "eventDefinitions", + lv_eventDefinitions_10_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventDefinition"); + afterParserOrEnumRuleCall(); + } + ) + ) + otherlv_11=';' + { + newLeafNode(otherlv_11, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_4_1()); + } + )* + otherlv_12='}' + { + newLeafNode(otherlv_12, grammarAccess.getComponentDefinitionAccess().getRightCurlyBracketKeyword_5()); + } + ) +; + +// Entry rule entryRuleInputEvent +entryRuleInputEvent returns [EObject current=null]: + { newCompositeNode(grammarAccess.getInputEventRule()); } + iv_ruleInputEvent=ruleInputEvent + { $current=$iv_ruleInputEvent.current; } + EOF; + +// Rule InputEvent +ruleInputEvent returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_name_0_0=RULE_ID + { + newLeafNode(lv_name_0_0, grammarAccess.getInputEventAccess().getNameIDTerminalRuleCall_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getInputEventRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + ( + ( + lv_multiple_1_0='[]' + { + newLeafNode(lv_multiple_1_0, grammarAccess.getInputEventAccess().getMultipleLeftSquareBracketRightSquareBracketKeyword_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getInputEventRule()); + } + setWithLastConsumed($current, "multiple", true, "[]"); + } + ) + )? + ) +; + +// Entry rule entryRuleEventDefinition +entryRuleEventDefinition returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEventDefinitionRule()); } + iv_ruleEventDefinition=ruleEventDefinition + { $current=$iv_ruleEventDefinition.current; } + EOF; + +// Rule EventDefinition +ruleEventDefinition returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + newCompositeNode(grammarAccess.getEventDefinitionAccess().getBasicEventDefinitionParserRuleCall_0()); + } + this_BasicEventDefinition_0=ruleBasicEventDefinition + { + $current = $this_BasicEventDefinition_0.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getEventDefinitionAccess().getGateDefinitionParserRuleCall_1()); + } + this_GateDefinition_1=ruleGateDefinition + { + $current = $this_GateDefinition_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleBasicEventDefinition +entryRuleBasicEventDefinition returns [EObject current=null]: + { newCompositeNode(grammarAccess.getBasicEventDefinitionRule()); } + iv_ruleBasicEventDefinition=ruleBasicEventDefinition + { $current=$iv_ruleBasicEventDefinition.current; } + EOF; + +// Rule BasicEventDefinition +ruleBasicEventDefinition returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_name_0_0=RULE_ID + { + newLeafNode(lv_name_0_0, grammarAccess.getBasicEventDefinitionAccess().getNameIDTerminalRuleCall_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getBasicEventDefinitionRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + otherlv_1='lambda' + { + newLeafNode(otherlv_1, grammarAccess.getBasicEventDefinitionAccess().getLambdaKeyword_1()); + } + otherlv_2='=' + { + newLeafNode(otherlv_2, grammarAccess.getBasicEventDefinitionAccess().getEqualsSignKeyword_2()); + } + ( + ( + lv_rate_3_0=RULE_DOULBE + { + newLeafNode(lv_rate_3_0, grammarAccess.getBasicEventDefinitionAccess().getRateDOULBETerminalRuleCall_3_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getBasicEventDefinitionRule()); + } + setWithLastConsumed( + $current, + "rate", + lv_rate_3_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.DOULBE"); + } + ) + ) + ) +; + +// Entry rule entryRuleGateDefinition +entryRuleGateDefinition returns [EObject current=null]: + { newCompositeNode(grammarAccess.getGateDefinitionRule()); } + iv_ruleGateDefinition=ruleGateDefinition + { $current=$iv_ruleGateDefinition.current; } + EOF; + +// Rule GateDefinition +ruleGateDefinition returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + newCompositeNode(grammarAccess.getGateDefinitionAccess().getAndGateParserRuleCall_0()); + } + this_AndGate_0=ruleAndGate + { + $current = $this_AndGate_0.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getGateDefinitionAccess().getOrGateParserRuleCall_1()); + } + this_OrGate_1=ruleOrGate + { + $current = $this_OrGate_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleAndGate +entryRuleAndGate returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAndGateRule()); } + iv_ruleAndGate=ruleAndGate + { $current=$iv_ruleAndGate.current; } + EOF; + +// Rule AndGate +ruleAndGate returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_name_0_0=RULE_ID + { + newLeafNode(lv_name_0_0, grammarAccess.getAndGateAccess().getNameIDTerminalRuleCall_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAndGateRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + otherlv_1='and' + { + newLeafNode(otherlv_1, grammarAccess.getAndGateAccess().getAndKeyword_1()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAndGateRule()); + } + } + otherlv_2=RULE_ID + { + newLeafNode(otherlv_2, grammarAccess.getAndGateAccess().getInputEventsEventDeclarationCrossReference_2_0()); + } + ) + )* + ) +; + +// Entry rule entryRuleOrGate +entryRuleOrGate returns [EObject current=null]: + { newCompositeNode(grammarAccess.getOrGateRule()); } + iv_ruleOrGate=ruleOrGate + { $current=$iv_ruleOrGate.current; } + EOF; + +// Rule OrGate +ruleOrGate returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_name_0_0=RULE_ID + { + newLeafNode(lv_name_0_0, grammarAccess.getOrGateAccess().getNameIDTerminalRuleCall_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getOrGateRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + otherlv_1='or' + { + newLeafNode(otherlv_1, grammarAccess.getOrGateAccess().getOrKeyword_1()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getOrGateRule()); + } + } + otherlv_2=RULE_ID + { + newLeafNode(otherlv_2, grammarAccess.getOrGateAccess().getInputEventsEventDeclarationCrossReference_2_0()); + } + ) + )* + ) +; + +// Entry rule entryRuleTransformationDefinition +entryRuleTransformationDefinition returns [EObject current=null]: + { newCompositeNode(grammarAccess.getTransformationDefinitionRule()); } + iv_ruleTransformationDefinition=ruleTransformationDefinition + { $current=$iv_ruleTransformationDefinition.current; } + EOF; + +// Rule TransformationDefinition +ruleTransformationDefinition returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='transformation' + { + newLeafNode(otherlv_0, grammarAccess.getTransformationDefinitionAccess().getTransformationKeyword_0()); + } + ( + ( + lv_name_1_0=RULE_ID + { + newLeafNode(lv_name_1_0, grammarAccess.getTransformationDefinitionAccess().getNameIDTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getTransformationDefinitionRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_1_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + otherlv_2='{' + { + newLeafNode(otherlv_2, grammarAccess.getTransformationDefinitionAccess().getLeftCurlyBracketKeyword_2()); + } + ( + ( + { + newCompositeNode(grammarAccess.getTransformationDefinitionAccess().getMappingDefinitionsMappingDefinitionParserRuleCall_3_0()); + } + lv_mappingDefinitions_3_0=ruleMappingDefinition + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getTransformationDefinitionRule()); + } + add( + $current, + "mappingDefinitions", + lv_mappingDefinitions_3_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingDefinition"); + afterParserOrEnumRuleCall(); + } + ) + )* + otherlv_4='}' + { + newLeafNode(otherlv_4, grammarAccess.getTransformationDefinitionAccess().getRightCurlyBracketKeyword_4()); + } + ) +; + +// Entry rule entryRuleMappingDefinition +entryRuleMappingDefinition returns [EObject current=null]: + { newCompositeNode(grammarAccess.getMappingDefinitionRule()); } + iv_ruleMappingDefinition=ruleMappingDefinition + { $current=$iv_ruleMappingDefinition.current; } + EOF; + +// Rule MappingDefinition +ruleMappingDefinition returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_topLevel_0_0='toplevel' + { + newLeafNode(lv_topLevel_0_0, grammarAccess.getMappingDefinitionAccess().getTopLevelToplevelKeyword_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getMappingDefinitionRule()); + } + setWithLastConsumed($current, "topLevel", true, "toplevel"); + } + ) + )? + otherlv_1='mapping' + { + newLeafNode(otherlv_1, grammarAccess.getMappingDefinitionAccess().getMappingKeyword_1()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getMappingDefinitionRule()); + } + } + { + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getPatternPatternCrossReference_2_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + otherlv_3='(' + { + newLeafNode(otherlv_3, grammarAccess.getMappingDefinitionAccess().getLeftParenthesisKeyword_3()); + } + ( + ( + { + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getParametersMappingParameterParserRuleCall_4_0()); + } + lv_parameters_4_0=ruleMappingParameter + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + add( + $current, + "parameters", + lv_parameters_4_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingParameter"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_5=',' + { + newLeafNode(otherlv_5, grammarAccess.getMappingDefinitionAccess().getCommaKeyword_5_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getParametersMappingParameterParserRuleCall_5_1_0()); + } + lv_parameters_6_0=ruleMappingParameter + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + add( + $current, + "parameters", + lv_parameters_6_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingParameter"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + otherlv_7=')' + { + newLeafNode(otherlv_7, grammarAccess.getMappingDefinitionAccess().getRightParenthesisKeyword_6()); + } + ( + ( + { + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getComponentInstanceComponentInstanceParserRuleCall_7_0()); + } + lv_componentInstance_8_0=ruleComponentInstance + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + set( + $current, + "componentInstance", + lv_componentInstance_8_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ComponentInstance"); + afterParserOrEnumRuleCall(); + } + ) + )? + ( + otherlv_9='{' + { + newLeafNode(otherlv_9, grammarAccess.getMappingDefinitionAccess().getLeftCurlyBracketKeyword_8_0()); + } + ( + ( + ( + ( + { + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getLookupDefinitionsLookupDefinitionParserRuleCall_8_1_0_0_0()); + } + lv_lookupDefinitions_10_0=ruleLookupDefinition + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + add( + $current, + "lookupDefinitions", + lv_lookupDefinitions_10_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.LookupDefinition"); + afterParserOrEnumRuleCall(); + } + ) + ) + | + ( + ( + { + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getAssignmentsAssignmentParserRuleCall_8_1_0_1_0()); + } + lv_assignments_11_0=ruleAssignment + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + add( + $current, + "assignments", + lv_assignments_11_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.Assignment"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) + otherlv_12=';' + { + newLeafNode(otherlv_12, grammarAccess.getMappingDefinitionAccess().getSemicolonKeyword_8_1_1()); + } + )* + otherlv_13='}' + { + newLeafNode(otherlv_13, grammarAccess.getMappingDefinitionAccess().getRightCurlyBracketKeyword_8_2()); + } + )? + ) +; + +// Entry rule entryRuleMappingParameter +entryRuleMappingParameter returns [EObject current=null]: + { newCompositeNode(grammarAccess.getMappingParameterRule()); } + iv_ruleMappingParameter=ruleMappingParameter + { $current=$iv_ruleMappingParameter.current; } + EOF; + +// Rule MappingParameter +ruleMappingParameter returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + lv_name_0_0=RULE_ID + { + newLeafNode(lv_name_0_0, grammarAccess.getMappingParameterAccess().getNameIDTerminalRuleCall_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getMappingParameterRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) +; + +// Entry rule entryRuleLookupDefinition +entryRuleLookupDefinition returns [EObject current=null]: + { newCompositeNode(grammarAccess.getLookupDefinitionRule()); } + iv_ruleLookupDefinition=ruleLookupDefinition + { $current=$iv_ruleLookupDefinition.current; } + EOF; + +// Rule LookupDefinition +ruleLookupDefinition returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='lookup' + { + newLeafNode(otherlv_0, grammarAccess.getLookupDefinitionAccess().getLookupKeyword_0()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLookupDefinitionRule()); + } + } + otherlv_1=RULE_ID + { + newLeafNode(otherlv_1, grammarAccess.getLookupDefinitionAccess().getMappingMappingDefinitionCrossReference_1_0()); + } + ) + ) + otherlv_2='(' + { + newLeafNode(otherlv_2, grammarAccess.getLookupDefinitionAccess().getLeftParenthesisKeyword_2()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLookupDefinitionRule()); + } + } + otherlv_3=RULE_ID + { + newLeafNode(otherlv_3, grammarAccess.getLookupDefinitionAccess().getArgumentsMappingParameterCrossReference_3_0()); + } + ) + ) + ( + otherlv_4=',' + { + newLeafNode(otherlv_4, grammarAccess.getLookupDefinitionAccess().getCommaKeyword_4_0()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLookupDefinitionRule()); + } + } + otherlv_5=RULE_ID + { + newLeafNode(otherlv_5, grammarAccess.getLookupDefinitionAccess().getArgumentsMappingParameterCrossReference_4_1_0()); + } + ) + ) + )* + otherlv_6=')' + { + newLeafNode(otherlv_6, grammarAccess.getLookupDefinitionAccess().getRightParenthesisKeyword_5()); + } + otherlv_7='as' + { + newLeafNode(otherlv_7, grammarAccess.getLookupDefinitionAccess().getAsKeyword_6()); + } + ( + ( + lv_name_8_0=RULE_ID + { + newLeafNode(lv_name_8_0, grammarAccess.getLookupDefinitionAccess().getNameIDTerminalRuleCall_7_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLookupDefinitionRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_8_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + ) +; + +// Entry rule entryRuleAssignment +entryRuleAssignment returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAssignmentRule()); } + iv_ruleAssignment=ruleAssignment + { $current=$iv_ruleAssignment.current; } + EOF; + +// Rule Assignment +ruleAssignment returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getAssignmentAccess().getInputEventReferenceParserRuleCall_0_0()); + } + lv_input_0_0=ruleEventReference + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAssignmentRule()); + } + set( + $current, + "input", + lv_input_0_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventReference"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + ( + lv_multiple_1_0='+=' + { + newLeafNode(lv_multiple_1_0, grammarAccess.getAssignmentAccess().getMultiplePlusSignEqualsSignKeyword_1_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAssignmentRule()); + } + setWithLastConsumed($current, "multiple", true, "+="); + } + ) + ) + | + otherlv_2=':=' + { + newLeafNode(otherlv_2, grammarAccess.getAssignmentAccess().getColonEqualsSignKeyword_1_1()); + } + ) + ( + ( + { + newCompositeNode(grammarAccess.getAssignmentAccess().getOutputEventReferenceParserRuleCall_2_0()); + } + lv_output_3_0=ruleEventReference + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAssignmentRule()); + } + set( + $current, + "output", + lv_output_3_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventReference"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleEventReference +entryRuleEventReference returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEventReferenceRule()); } + iv_ruleEventReference=ruleEventReference + { $current=$iv_ruleEventReference.current; } + EOF; + +// Rule EventReference +ruleEventReference returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getEventReferenceRule()); + } + } + otherlv_0=RULE_ID + { + newLeafNode(otherlv_0, grammarAccess.getEventReferenceAccess().getComponentVariableCrossReference_0_0()); + } + ) + ) + otherlv_1='.' + { + newLeafNode(otherlv_1, grammarAccess.getEventReferenceAccess().getFullStopKeyword_1()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getEventReferenceRule()); + } + } + otherlv_2=RULE_ID + { + newLeafNode(otherlv_2, grammarAccess.getEventReferenceAccess().getEventEventDeclarationCrossReference_2_0()); + } + ) + ) + ) +; + +// Entry rule entryRuleComponentInstance +entryRuleComponentInstance returns [EObject current=null]: + { newCompositeNode(grammarAccess.getComponentInstanceRule()); } + iv_ruleComponentInstance=ruleComponentInstance + { $current=$iv_ruleComponentInstance.current; } + EOF; + +// Rule ComponentInstance +ruleComponentInstance returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='=>' + { + newLeafNode(otherlv_0, grammarAccess.getComponentInstanceAccess().getEqualsSignGreaterThanSignKeyword_0()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getComponentInstanceRule()); + } + } + { + newCompositeNode(grammarAccess.getComponentInstanceAccess().getComponentTypeComponentDefinitionCrossReference_1_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + lv_name_2_0=RULE_ID + { + newLeafNode(lv_name_2_0, grammarAccess.getComponentInstanceAccess().getNameIDTerminalRuleCall_2_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getComponentInstanceRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_2_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + )? + ) +; + +// Entry rule entryRuleQualifiedName +entryRuleQualifiedName returns [String current=null]: + { newCompositeNode(grammarAccess.getQualifiedNameRule()); } + iv_ruleQualifiedName=ruleQualifiedName + { $current=$iv_ruleQualifiedName.current.getText(); } + EOF; + +// Rule QualifiedName +ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_ID_0=RULE_ID + { + $current.merge(this_ID_0); + } + { + newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); + } + ( + kw='.' + { + $current.merge(kw); + newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getFullStopKeyword_1_0()); + } + this_ID_2=RULE_ID + { + $current.merge(this_ID_2); + } + { + newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); + } + )* + ) +; + +// Entry rule entryRuleQualifiedNameWithWildcard +entryRuleQualifiedNameWithWildcard returns [String current=null]: + { newCompositeNode(grammarAccess.getQualifiedNameWithWildcardRule()); } + iv_ruleQualifiedNameWithWildcard=ruleQualifiedNameWithWildcard + { $current=$iv_ruleQualifiedNameWithWildcard.current.getText(); } + EOF; + +// Rule QualifiedNameWithWildcard +ruleQualifiedNameWithWildcard returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + newCompositeNode(grammarAccess.getQualifiedNameWithWildcardAccess().getQualifiedNameParserRuleCall_0()); + } + this_QualifiedName_0=ruleQualifiedName + { + $current.merge(this_QualifiedName_0); + } + { + afterParserOrEnumRuleCall(); + } + ( + kw='.' + { + $current.merge(kw); + newLeafNode(kw, grammarAccess.getQualifiedNameWithWildcardAccess().getFullStopKeyword_1_0()); + } + kw='*' + { + $current.merge(kw); + newLeafNode(kw, grammarAccess.getQualifiedNameWithWildcardAccess().getAsteriskKeyword_1_1()); + } + )? + ) +; + +RULE_DOULBE : ('0'..'9')+ ('.' ('0'..'9')+|('.' ('0'..'9')+)? ('e'|'E') ('+'|'-')? ('0'..'9')+); + +RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; + +RULE_INT : ('0'..'9')+; + +RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); + +RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; + +RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; + +RULE_WS : (' '|'\t'|'\r'|'\n')+; + +RULE_ANY_OTHER : .; diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.tokens b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.tokens new file mode 100644 index 00000000..1c8b296f --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.tokens @@ -0,0 +1,60 @@ +'('=28 +')'=30 +'*'=37 +'+='=33 +','=29 +'.'=35 +':='=34 +';'=13 +'='=22 +'=>'=36 +'[]'=20 +'and'=23 +'as'=32 +'cft'=15 +'import'=14 +'in'=17 +'lambda'=21 +'lookup'=31 +'mapping'=27 +'or'=24 +'out'=18 +'package'=12 +'toplevel'=26 +'transformation'=25 +'{'=16 +'}'=19 +RULE_ANY_OTHER=11 +RULE_DOULBE=5 +RULE_ID=4 +RULE_INT=6 +RULE_ML_COMMENT=8 +RULE_SL_COMMENT=9 +RULE_STRING=7 +RULE_WS=10 +T__12=12 +T__13=13 +T__14=14 +T__15=15 +T__16=16 +T__17=17 +T__18=18 +T__19=19 +T__20=20 +T__21=21 +T__22=22 +T__23=23 +T__24=24 +T__25=25 +T__26=26 +T__27=27 +T__28=28 +T__29=29 +T__30=30 +T__31=31 +T__32=32 +T__33=33 +T__34=34 +T__35=35 +T__36=36 +T__37=37 diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageLexer.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageLexer.java new file mode 100644 index 00000000..22a96234 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageLexer.java @@ -0,0 +1,1876 @@ +package hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalCftLanguageLexer extends Lexer { + public static final int RULE_STRING=7; + public static final int RULE_SL_COMMENT=9; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__37=37; + public static final int T__16=16; + public static final int T__17=17; + public static final int T__18=18; + public static final int T__33=33; + public static final int T__12=12; + public static final int T__34=34; + public static final int T__13=13; + public static final int T__35=35; + public static final int T__14=14; + public static final int T__36=36; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_ID=4; + public static final int RULE_WS=10; + public static final int RULE_DOULBE=5; + public static final int RULE_ANY_OTHER=11; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=6; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=8; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + public InternalCftLanguageLexer() {;} + public InternalCftLanguageLexer(CharStream input) { + this(input, new RecognizerSharedState()); + } + public InternalCftLanguageLexer(CharStream input, RecognizerSharedState state) { + super(input,state); + + } + public String getGrammarFileName() { return "InternalCftLanguage.g"; } + + // $ANTLR start "T__12" + public final void mT__12() throws RecognitionException { + try { + int _type = T__12; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:11:7: ( 'package' ) + // InternalCftLanguage.g:11:9: 'package' + { + match("package"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__12" + + // $ANTLR start "T__13" + public final void mT__13() throws RecognitionException { + try { + int _type = T__13; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:12:7: ( ';' ) + // InternalCftLanguage.g:12:9: ';' + { + match(';'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__13" + + // $ANTLR start "T__14" + public final void mT__14() throws RecognitionException { + try { + int _type = T__14; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:13:7: ( 'import' ) + // InternalCftLanguage.g:13:9: 'import' + { + match("import"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__14" + + // $ANTLR start "T__15" + public final void mT__15() throws RecognitionException { + try { + int _type = T__15; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:14:7: ( 'cft' ) + // InternalCftLanguage.g:14:9: 'cft' + { + match("cft"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__15" + + // $ANTLR start "T__16" + public final void mT__16() throws RecognitionException { + try { + int _type = T__16; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:15:7: ( '{' ) + // InternalCftLanguage.g:15:9: '{' + { + match('{'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__16" + + // $ANTLR start "T__17" + public final void mT__17() throws RecognitionException { + try { + int _type = T__17; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:16:7: ( 'in' ) + // InternalCftLanguage.g:16:9: 'in' + { + match("in"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__17" + + // $ANTLR start "T__18" + public final void mT__18() throws RecognitionException { + try { + int _type = T__18; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:17:7: ( 'out' ) + // InternalCftLanguage.g:17:9: 'out' + { + match("out"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__18" + + // $ANTLR start "T__19" + public final void mT__19() throws RecognitionException { + try { + int _type = T__19; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:18:7: ( '}' ) + // InternalCftLanguage.g:18:9: '}' + { + match('}'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__19" + + // $ANTLR start "T__20" + public final void mT__20() throws RecognitionException { + try { + int _type = T__20; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:19:7: ( '[]' ) + // InternalCftLanguage.g:19:9: '[]' + { + match("[]"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__20" + + // $ANTLR start "T__21" + public final void mT__21() throws RecognitionException { + try { + int _type = T__21; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:20:7: ( 'lambda' ) + // InternalCftLanguage.g:20:9: 'lambda' + { + match("lambda"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__21" + + // $ANTLR start "T__22" + public final void mT__22() throws RecognitionException { + try { + int _type = T__22; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:21:7: ( '=' ) + // InternalCftLanguage.g:21:9: '=' + { + match('='); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__22" + + // $ANTLR start "T__23" + public final void mT__23() throws RecognitionException { + try { + int _type = T__23; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:22:7: ( 'and' ) + // InternalCftLanguage.g:22:9: 'and' + { + match("and"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__23" + + // $ANTLR start "T__24" + public final void mT__24() throws RecognitionException { + try { + int _type = T__24; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:23:7: ( 'or' ) + // InternalCftLanguage.g:23:9: 'or' + { + match("or"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__24" + + // $ANTLR start "T__25" + public final void mT__25() throws RecognitionException { + try { + int _type = T__25; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:24:7: ( 'transformation' ) + // InternalCftLanguage.g:24:9: 'transformation' + { + match("transformation"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__25" + + // $ANTLR start "T__26" + public final void mT__26() throws RecognitionException { + try { + int _type = T__26; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:25:7: ( 'toplevel' ) + // InternalCftLanguage.g:25:9: 'toplevel' + { + match("toplevel"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__26" + + // $ANTLR start "T__27" + public final void mT__27() throws RecognitionException { + try { + int _type = T__27; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:26:7: ( 'mapping' ) + // InternalCftLanguage.g:26:9: 'mapping' + { + match("mapping"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__27" + + // $ANTLR start "T__28" + public final void mT__28() throws RecognitionException { + try { + int _type = T__28; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:27:7: ( '(' ) + // InternalCftLanguage.g:27:9: '(' + { + match('('); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__28" + + // $ANTLR start "T__29" + public final void mT__29() throws RecognitionException { + try { + int _type = T__29; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:28:7: ( ',' ) + // InternalCftLanguage.g:28:9: ',' + { + match(','); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__29" + + // $ANTLR start "T__30" + public final void mT__30() throws RecognitionException { + try { + int _type = T__30; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:29:7: ( ')' ) + // InternalCftLanguage.g:29:9: ')' + { + match(')'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__30" + + // $ANTLR start "T__31" + public final void mT__31() throws RecognitionException { + try { + int _type = T__31; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:30:7: ( 'lookup' ) + // InternalCftLanguage.g:30:9: 'lookup' + { + match("lookup"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__31" + + // $ANTLR start "T__32" + public final void mT__32() throws RecognitionException { + try { + int _type = T__32; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:31:7: ( 'as' ) + // InternalCftLanguage.g:31:9: 'as' + { + match("as"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__32" + + // $ANTLR start "T__33" + public final void mT__33() throws RecognitionException { + try { + int _type = T__33; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:32:7: ( '+=' ) + // InternalCftLanguage.g:32:9: '+=' + { + match("+="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__33" + + // $ANTLR start "T__34" + public final void mT__34() throws RecognitionException { + try { + int _type = T__34; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:33:7: ( ':=' ) + // InternalCftLanguage.g:33:9: ':=' + { + match(":="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__34" + + // $ANTLR start "T__35" + public final void mT__35() throws RecognitionException { + try { + int _type = T__35; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:34:7: ( '.' ) + // InternalCftLanguage.g:34:9: '.' + { + match('.'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__35" + + // $ANTLR start "T__36" + public final void mT__36() throws RecognitionException { + try { + int _type = T__36; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:35:7: ( '=>' ) + // InternalCftLanguage.g:35:9: '=>' + { + match("=>"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__36" + + // $ANTLR start "T__37" + public final void mT__37() throws RecognitionException { + try { + int _type = T__37; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:36:7: ( '*' ) + // InternalCftLanguage.g:36:9: '*' + { + match('*'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__37" + + // $ANTLR start "RULE_DOULBE" + public final void mRULE_DOULBE() throws RecognitionException { + try { + int _type = RULE_DOULBE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:1318:13: ( ( '0' .. '9' )+ ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ) ) + // InternalCftLanguage.g:1318:15: ( '0' .. '9' )+ ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ) + { + // InternalCftLanguage.g:1318:15: ( '0' .. '9' )+ + int cnt1=0; + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( ((LA1_0>='0' && LA1_0<='9')) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // InternalCftLanguage.g:1318:16: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt1 >= 1 ) break loop1; + EarlyExitException eee = + new EarlyExitException(1, input); + throw eee; + } + cnt1++; + } while (true); + + // InternalCftLanguage.g:1318:27: ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ) + int alt7=2; + alt7 = dfa7.predict(input); + switch (alt7) { + case 1 : + // InternalCftLanguage.g:1318:28: '.' ( '0' .. '9' )+ + { + match('.'); + // InternalCftLanguage.g:1318:32: ( '0' .. '9' )+ + int cnt2=0; + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( ((LA2_0>='0' && LA2_0<='9')) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // InternalCftLanguage.g:1318:33: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt2 >= 1 ) break loop2; + EarlyExitException eee = + new EarlyExitException(2, input); + throw eee; + } + cnt2++; + } while (true); + + + } + break; + case 2 : + // InternalCftLanguage.g:1318:44: ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ + { + // InternalCftLanguage.g:1318:44: ( '.' ( '0' .. '9' )+ )? + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0=='.') ) { + alt4=1; + } + switch (alt4) { + case 1 : + // InternalCftLanguage.g:1318:45: '.' ( '0' .. '9' )+ + { + match('.'); + // InternalCftLanguage.g:1318:49: ( '0' .. '9' )+ + int cnt3=0; + loop3: + do { + int alt3=2; + int LA3_0 = input.LA(1); + + if ( ((LA3_0>='0' && LA3_0<='9')) ) { + alt3=1; + } + + + switch (alt3) { + case 1 : + // InternalCftLanguage.g:1318:50: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt3 >= 1 ) break loop3; + EarlyExitException eee = + new EarlyExitException(3, input); + throw eee; + } + cnt3++; + } while (true); + + + } + break; + + } + + if ( input.LA(1)=='E'||input.LA(1)=='e' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // InternalCftLanguage.g:1318:73: ( '+' | '-' )? + int alt5=2; + int LA5_0 = input.LA(1); + + if ( (LA5_0=='+'||LA5_0=='-') ) { + alt5=1; + } + switch (alt5) { + case 1 : + // InternalCftLanguage.g: + { + if ( input.LA(1)=='+'||input.LA(1)=='-' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + } + + // InternalCftLanguage.g:1318:84: ( '0' .. '9' )+ + int cnt6=0; + loop6: + do { + int alt6=2; + int LA6_0 = input.LA(1); + + if ( ((LA6_0>='0' && LA6_0<='9')) ) { + alt6=1; + } + + + switch (alt6) { + case 1 : + // InternalCftLanguage.g:1318:85: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt6 >= 1 ) break loop6; + EarlyExitException eee = + new EarlyExitException(6, input); + throw eee; + } + cnt6++; + } while (true); + + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DOULBE" + + // $ANTLR start "RULE_ID" + public final void mRULE_ID() throws RecognitionException { + try { + int _type = RULE_ID; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:1320:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // InternalCftLanguage.g:1320:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + { + // InternalCftLanguage.g:1320:11: ( '^' )? + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0=='^') ) { + alt8=1; + } + switch (alt8) { + case 1 : + // InternalCftLanguage.g:1320:11: '^' + { + match('^'); + + } + break; + + } + + if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // InternalCftLanguage.g:1320:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + loop9: + do { + int alt9=2; + int LA9_0 = input.LA(1); + + if ( ((LA9_0>='0' && LA9_0<='9')||(LA9_0>='A' && LA9_0<='Z')||LA9_0=='_'||(LA9_0>='a' && LA9_0<='z')) ) { + alt9=1; + } + + + switch (alt9) { + case 1 : + // InternalCftLanguage.g: + { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop9; + } + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ID" + + // $ANTLR start "RULE_INT" + public final void mRULE_INT() throws RecognitionException { + try { + int _type = RULE_INT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:1322:10: ( ( '0' .. '9' )+ ) + // InternalCftLanguage.g:1322:12: ( '0' .. '9' )+ + { + // InternalCftLanguage.g:1322:12: ( '0' .. '9' )+ + int cnt10=0; + loop10: + do { + int alt10=2; + int LA10_0 = input.LA(1); + + if ( ((LA10_0>='0' && LA10_0<='9')) ) { + alt10=1; + } + + + switch (alt10) { + case 1 : + // InternalCftLanguage.g:1322:13: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt10 >= 1 ) break loop10; + EarlyExitException eee = + new EarlyExitException(10, input); + throw eee; + } + cnt10++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_INT" + + // $ANTLR start "RULE_STRING" + public final void mRULE_STRING() throws RecognitionException { + try { + int _type = RULE_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:1324:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // InternalCftLanguage.g:1324:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + { + // InternalCftLanguage.g:1324:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + int alt13=2; + int LA13_0 = input.LA(1); + + if ( (LA13_0=='\"') ) { + alt13=1; + } + else if ( (LA13_0=='\'') ) { + alt13=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 13, 0, input); + + throw nvae; + } + switch (alt13) { + case 1 : + // InternalCftLanguage.g:1324:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + { + match('\"'); + // InternalCftLanguage.g:1324:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + loop11: + do { + int alt11=3; + int LA11_0 = input.LA(1); + + if ( (LA11_0=='\\') ) { + alt11=1; + } + else if ( ((LA11_0>='\u0000' && LA11_0<='!')||(LA11_0>='#' && LA11_0<='[')||(LA11_0>=']' && LA11_0<='\uFFFF')) ) { + alt11=2; + } + + + switch (alt11) { + case 1 : + // InternalCftLanguage.g:1324:21: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalCftLanguage.g:1324:28: ~ ( ( '\\\\' | '\"' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop11; + } + } while (true); + + match('\"'); + + } + break; + case 2 : + // InternalCftLanguage.g:1324:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + { + match('\''); + // InternalCftLanguage.g:1324:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + loop12: + do { + int alt12=3; + int LA12_0 = input.LA(1); + + if ( (LA12_0=='\\') ) { + alt12=1; + } + else if ( ((LA12_0>='\u0000' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='[')||(LA12_0>=']' && LA12_0<='\uFFFF')) ) { + alt12=2; + } + + + switch (alt12) { + case 1 : + // InternalCftLanguage.g:1324:54: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalCftLanguage.g:1324:61: ~ ( ( '\\\\' | '\\'' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop12; + } + } while (true); + + match('\''); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STRING" + + // $ANTLR start "RULE_ML_COMMENT" + public final void mRULE_ML_COMMENT() throws RecognitionException { + try { + int _type = RULE_ML_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:1326:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // InternalCftLanguage.g:1326:19: '/*' ( options {greedy=false; } : . )* '*/' + { + match("/*"); + + // InternalCftLanguage.g:1326:24: ( options {greedy=false; } : . )* + loop14: + do { + int alt14=2; + int LA14_0 = input.LA(1); + + if ( (LA14_0=='*') ) { + int LA14_1 = input.LA(2); + + if ( (LA14_1=='/') ) { + alt14=2; + } + else if ( ((LA14_1>='\u0000' && LA14_1<='.')||(LA14_1>='0' && LA14_1<='\uFFFF')) ) { + alt14=1; + } + + + } + else if ( ((LA14_0>='\u0000' && LA14_0<=')')||(LA14_0>='+' && LA14_0<='\uFFFF')) ) { + alt14=1; + } + + + switch (alt14) { + case 1 : + // InternalCftLanguage.g:1326:52: . + { + matchAny(); + + } + break; + + default : + break loop14; + } + } while (true); + + match("*/"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ML_COMMENT" + + // $ANTLR start "RULE_SL_COMMENT" + public final void mRULE_SL_COMMENT() throws RecognitionException { + try { + int _type = RULE_SL_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:1328:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // InternalCftLanguage.g:1328:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + { + match("//"); + + // InternalCftLanguage.g:1328:24: (~ ( ( '\\n' | '\\r' ) ) )* + loop15: + do { + int alt15=2; + int LA15_0 = input.LA(1); + + if ( ((LA15_0>='\u0000' && LA15_0<='\t')||(LA15_0>='\u000B' && LA15_0<='\f')||(LA15_0>='\u000E' && LA15_0<='\uFFFF')) ) { + alt15=1; + } + + + switch (alt15) { + case 1 : + // InternalCftLanguage.g:1328:24: ~ ( ( '\\n' | '\\r' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop15; + } + } while (true); + + // InternalCftLanguage.g:1328:40: ( ( '\\r' )? '\\n' )? + int alt17=2; + int LA17_0 = input.LA(1); + + if ( (LA17_0=='\n'||LA17_0=='\r') ) { + alt17=1; + } + switch (alt17) { + case 1 : + // InternalCftLanguage.g:1328:41: ( '\\r' )? '\\n' + { + // InternalCftLanguage.g:1328:41: ( '\\r' )? + int alt16=2; + int LA16_0 = input.LA(1); + + if ( (LA16_0=='\r') ) { + alt16=1; + } + switch (alt16) { + case 1 : + // InternalCftLanguage.g:1328:41: '\\r' + { + match('\r'); + + } + break; + + } + + match('\n'); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SL_COMMENT" + + // $ANTLR start "RULE_WS" + public final void mRULE_WS() throws RecognitionException { + try { + int _type = RULE_WS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:1330:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) + // InternalCftLanguage.g:1330:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + { + // InternalCftLanguage.g:1330:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + int cnt18=0; + loop18: + do { + int alt18=2; + int LA18_0 = input.LA(1); + + if ( ((LA18_0>='\t' && LA18_0<='\n')||LA18_0=='\r'||LA18_0==' ') ) { + alt18=1; + } + + + switch (alt18) { + case 1 : + // InternalCftLanguage.g: + { + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + if ( cnt18 >= 1 ) break loop18; + EarlyExitException eee = + new EarlyExitException(18, input); + throw eee; + } + cnt18++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WS" + + // $ANTLR start "RULE_ANY_OTHER" + public final void mRULE_ANY_OTHER() throws RecognitionException { + try { + int _type = RULE_ANY_OTHER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalCftLanguage.g:1332:16: ( . ) + // InternalCftLanguage.g:1332:18: . + { + matchAny(); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ANY_OTHER" + + public void mTokens() throws RecognitionException { + // InternalCftLanguage.g:1:8: ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | RULE_DOULBE | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER ) + int alt19=34; + alt19 = dfa19.predict(input); + switch (alt19) { + case 1 : + // InternalCftLanguage.g:1:10: T__12 + { + mT__12(); + + } + break; + case 2 : + // InternalCftLanguage.g:1:16: T__13 + { + mT__13(); + + } + break; + case 3 : + // InternalCftLanguage.g:1:22: T__14 + { + mT__14(); + + } + break; + case 4 : + // InternalCftLanguage.g:1:28: T__15 + { + mT__15(); + + } + break; + case 5 : + // InternalCftLanguage.g:1:34: T__16 + { + mT__16(); + + } + break; + case 6 : + // InternalCftLanguage.g:1:40: T__17 + { + mT__17(); + + } + break; + case 7 : + // InternalCftLanguage.g:1:46: T__18 + { + mT__18(); + + } + break; + case 8 : + // InternalCftLanguage.g:1:52: T__19 + { + mT__19(); + + } + break; + case 9 : + // InternalCftLanguage.g:1:58: T__20 + { + mT__20(); + + } + break; + case 10 : + // InternalCftLanguage.g:1:64: T__21 + { + mT__21(); + + } + break; + case 11 : + // InternalCftLanguage.g:1:70: T__22 + { + mT__22(); + + } + break; + case 12 : + // InternalCftLanguage.g:1:76: T__23 + { + mT__23(); + + } + break; + case 13 : + // InternalCftLanguage.g:1:82: T__24 + { + mT__24(); + + } + break; + case 14 : + // InternalCftLanguage.g:1:88: T__25 + { + mT__25(); + + } + break; + case 15 : + // InternalCftLanguage.g:1:94: T__26 + { + mT__26(); + + } + break; + case 16 : + // InternalCftLanguage.g:1:100: T__27 + { + mT__27(); + + } + break; + case 17 : + // InternalCftLanguage.g:1:106: T__28 + { + mT__28(); + + } + break; + case 18 : + // InternalCftLanguage.g:1:112: T__29 + { + mT__29(); + + } + break; + case 19 : + // InternalCftLanguage.g:1:118: T__30 + { + mT__30(); + + } + break; + case 20 : + // InternalCftLanguage.g:1:124: T__31 + { + mT__31(); + + } + break; + case 21 : + // InternalCftLanguage.g:1:130: T__32 + { + mT__32(); + + } + break; + case 22 : + // InternalCftLanguage.g:1:136: T__33 + { + mT__33(); + + } + break; + case 23 : + // InternalCftLanguage.g:1:142: T__34 + { + mT__34(); + + } + break; + case 24 : + // InternalCftLanguage.g:1:148: T__35 + { + mT__35(); + + } + break; + case 25 : + // InternalCftLanguage.g:1:154: T__36 + { + mT__36(); + + } + break; + case 26 : + // InternalCftLanguage.g:1:160: T__37 + { + mT__37(); + + } + break; + case 27 : + // InternalCftLanguage.g:1:166: RULE_DOULBE + { + mRULE_DOULBE(); + + } + break; + case 28 : + // InternalCftLanguage.g:1:178: RULE_ID + { + mRULE_ID(); + + } + break; + case 29 : + // InternalCftLanguage.g:1:186: RULE_INT + { + mRULE_INT(); + + } + break; + case 30 : + // InternalCftLanguage.g:1:195: RULE_STRING + { + mRULE_STRING(); + + } + break; + case 31 : + // InternalCftLanguage.g:1:207: RULE_ML_COMMENT + { + mRULE_ML_COMMENT(); + + } + break; + case 32 : + // InternalCftLanguage.g:1:223: RULE_SL_COMMENT + { + mRULE_SL_COMMENT(); + + } + break; + case 33 : + // InternalCftLanguage.g:1:239: RULE_WS + { + mRULE_WS(); + + } + break; + case 34 : + // InternalCftLanguage.g:1:247: RULE_ANY_OTHER + { + mRULE_ANY_OTHER(); + + } + break; + + } + + } + + + protected DFA7 dfa7 = new DFA7(this); + protected DFA19 dfa19 = new DFA19(this); + static final String DFA7_eotS = + "\3\uffff\1\4\1\uffff"; + static final String DFA7_eofS = + "\5\uffff"; + static final String DFA7_minS = + "\1\56\1\60\1\uffff\1\60\1\uffff"; + static final String DFA7_maxS = + "\1\145\1\71\1\uffff\1\145\1\uffff"; + static final String DFA7_acceptS = + "\2\uffff\1\2\1\uffff\1\1"; + static final String DFA7_specialS = + "\5\uffff}>"; + static final String[] DFA7_transitionS = { + "\1\1\26\uffff\1\2\37\uffff\1\2", + "\12\3", + "", + "\12\3\13\uffff\1\2\37\uffff\1\2", + "" + }; + + static final short[] DFA7_eot = DFA.unpackEncodedString(DFA7_eotS); + static final short[] DFA7_eof = DFA.unpackEncodedString(DFA7_eofS); + static final char[] DFA7_min = DFA.unpackEncodedStringToUnsignedChars(DFA7_minS); + static final char[] DFA7_max = DFA.unpackEncodedStringToUnsignedChars(DFA7_maxS); + static final short[] DFA7_accept = DFA.unpackEncodedString(DFA7_acceptS); + static final short[] DFA7_special = DFA.unpackEncodedString(DFA7_specialS); + static final short[][] DFA7_transition; + + static { + int numStates = DFA7_transitionS.length; + DFA7_transition = new short[numStates][]; + for (int i=0; i"; + static final String[] DFA19_transitionS = { + "\11\34\2\33\2\34\1\33\22\34\1\33\1\34\1\30\4\34\1\31\1\16\1\20\1\24\1\21\1\17\1\34\1\23\1\32\12\25\1\22\1\2\1\34\1\12\3\34\32\27\1\10\2\34\1\26\1\27\1\34\1\13\1\27\1\4\5\27\1\3\2\27\1\11\1\15\1\27\1\6\1\1\3\27\1\14\6\27\1\5\1\34\1\7\uff82\34", + "\1\35", + "", + "\1\40\1\41", + "\1\42", + "", + "\1\45\2\uffff\1\44", + "", + "\1\47", + "\1\50\15\uffff\1\51", + "\1\52", + "\1\54\4\uffff\1\55", + "\1\57\2\uffff\1\56", + "\1\60", + "", + "", + "", + "\1\64", + "\1\65", + "", + "", + "\1\70\1\uffff\12\71\13\uffff\1\70\37\uffff\1\70", + "\32\36\4\uffff\1\36\1\uffff\32\36", + "", + "\0\73", + "\0\73", + "\1\74\4\uffff\1\75", + "", + "", + "\1\77", + "", + "", + "\1\100", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "\1\102", + "", + "\1\103", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "", + "", + "\1\105", + "\1\106", + "", + "", + "\1\107", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "\1\111", + "\1\112", + "\1\113", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\70\1\uffff\12\71\13\uffff\1\70\37\uffff\1\70", + "", + "", + "", + "", + "", + "\1\114", + "\1\115", + "", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "", + "\1\120", + "\1\121", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "", + "\1\123", + "\1\124", + "\1\125", + "\1\126", + "\1\127", + "", + "", + "\1\130", + "\1\131", + "", + "\1\132", + "\1\133", + "\1\134", + "\1\135", + "\1\136", + "\1\137", + "\1\140", + "\1\141", + "\1\142", + "\1\143", + "\1\144", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "\1\150", + "\1\151", + "\1\152", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "", + "", + "", + "\1\154", + "\1\155", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "", + "\1\157", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "", + "\1\161", + "", + "\1\162", + "\1\163", + "\1\164", + "\1\165", + "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36", + "" + }; + + static final short[] DFA19_eot = DFA.unpackEncodedString(DFA19_eotS); + static final short[] DFA19_eof = DFA.unpackEncodedString(DFA19_eofS); + static final char[] DFA19_min = DFA.unpackEncodedStringToUnsignedChars(DFA19_minS); + static final char[] DFA19_max = DFA.unpackEncodedStringToUnsignedChars(DFA19_maxS); + static final short[] DFA19_accept = DFA.unpackEncodedString(DFA19_acceptS); + static final short[] DFA19_special = DFA.unpackEncodedString(DFA19_specialS); + static final short[][] DFA19_transition; + + static { + int numStates = DFA19_transitionS.length; + DFA19_transition = new short[numStates][]; + for (int i=0; i='0' && LA19_0<='9')) ) {s = 21;} + + else if ( (LA19_0=='^') ) {s = 22;} + + else if ( ((LA19_0>='A' && LA19_0<='Z')||LA19_0=='_'||LA19_0=='b'||(LA19_0>='d' && LA19_0<='h')||(LA19_0>='j' && LA19_0<='k')||LA19_0=='n'||(LA19_0>='q' && LA19_0<='s')||(LA19_0>='u' && LA19_0<='z')) ) {s = 23;} + + else if ( (LA19_0=='\"') ) {s = 24;} + + else if ( (LA19_0=='\'') ) {s = 25;} + + else if ( (LA19_0=='/') ) {s = 26;} + + else if ( ((LA19_0>='\t' && LA19_0<='\n')||LA19_0=='\r'||LA19_0==' ') ) {s = 27;} + + else if ( ((LA19_0>='\u0000' && LA19_0<='\b')||(LA19_0>='\u000B' && LA19_0<='\f')||(LA19_0>='\u000E' && LA19_0<='\u001F')||LA19_0=='!'||(LA19_0>='#' && LA19_0<='&')||LA19_0=='-'||LA19_0=='<'||(LA19_0>='>' && LA19_0<='@')||(LA19_0>='\\' && LA19_0<=']')||LA19_0=='`'||LA19_0=='|'||(LA19_0>='~' && LA19_0<='\uFFFF')) ) {s = 28;} + + if ( s>=0 ) return s; + break; + case 1 : + int LA19_25 = input.LA(1); + + s = -1; + if ( ((LA19_25>='\u0000' && LA19_25<='\uFFFF')) ) {s = 59;} + + else s = 28; + + if ( s>=0 ) return s; + break; + case 2 : + int LA19_24 = input.LA(1); + + s = -1; + if ( ((LA19_24>='\u0000' && LA19_24<='\uFFFF')) ) {s = 59;} + + else s = 28; + + if ( s>=0 ) return s; + break; + } + NoViableAltException nvae = + new NoViableAltException(getDescription(), 19, _s, input); + error(nvae); + throw nvae; + } + } + + +} \ No newline at end of file diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageParser.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageParser.java new file mode 100644 index 00000000..29c15563 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageParser.java @@ -0,0 +1,3449 @@ +package hu.bme.mit.inf.dslreasoner.faulttree.components.parser.antlr.internal; + +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; +import hu.bme.mit.inf.dslreasoner.faulttree.components.services.CftLanguageGrammarAccess; + + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalCftLanguageParser extends AbstractInternalAntlrParser { + public static final String[] tokenNames = new String[] { + "", "", "", "", "RULE_ID", "RULE_DOULBE", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'package'", "';'", "'import'", "'cft'", "'{'", "'in'", "'out'", "'}'", "'[]'", "'lambda'", "'='", "'and'", "'or'", "'transformation'", "'toplevel'", "'mapping'", "'('", "','", "')'", "'lookup'", "'as'", "'+='", "':='", "'.'", "'=>'", "'*'" + }; + public static final int RULE_STRING=7; + public static final int RULE_SL_COMMENT=9; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__37=37; + public static final int T__16=16; + public static final int T__17=17; + public static final int T__18=18; + public static final int T__33=33; + public static final int T__12=12; + public static final int T__34=34; + public static final int T__13=13; + public static final int T__35=35; + public static final int T__14=14; + public static final int T__36=36; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_ID=4; + public static final int RULE_WS=10; + public static final int RULE_DOULBE=5; + public static final int RULE_ANY_OTHER=11; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=6; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=8; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + + public InternalCftLanguageParser(TokenStream input) { + this(input, new RecognizerSharedState()); + } + public InternalCftLanguageParser(TokenStream input, RecognizerSharedState state) { + super(input, state); + + } + + + public String[] getTokenNames() { return InternalCftLanguageParser.tokenNames; } + public String getGrammarFileName() { return "InternalCftLanguage.g"; } + + + + private CftLanguageGrammarAccess grammarAccess; + + public InternalCftLanguageParser(TokenStream input, CftLanguageGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "CftModel"; + } + + @Override + protected CftLanguageGrammarAccess getGrammarAccess() { + return grammarAccess; + } + + + + + // $ANTLR start "entryRuleCftModel" + // InternalCftLanguage.g:64:1: entryRuleCftModel returns [EObject current=null] : iv_ruleCftModel= ruleCftModel EOF ; + public final EObject entryRuleCftModel() throws RecognitionException { + EObject current = null; + + EObject iv_ruleCftModel = null; + + + try { + // InternalCftLanguage.g:64:49: (iv_ruleCftModel= ruleCftModel EOF ) + // InternalCftLanguage.g:65:2: iv_ruleCftModel= ruleCftModel EOF + { + newCompositeNode(grammarAccess.getCftModelRule()); + pushFollow(FOLLOW_1); + iv_ruleCftModel=ruleCftModel(); + + state._fsp--; + + current =iv_ruleCftModel; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleCftModel" + + + // $ANTLR start "ruleCftModel" + // InternalCftLanguage.g:71:1: ruleCftModel returns [EObject current=null] : (otherlv_0= 'package' ( (lv_packageName_1_0= ruleQualifiedName ) ) (otherlv_2= ';' )? ( (lv_imports_3_0= ruleImportDeclaration ) )* ( ( (lv_componentDefinitions_4_0= ruleComponentDefinition ) ) | ( (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) ) )* ) ; + public final EObject ruleCftModel() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token otherlv_2=null; + AntlrDatatypeRuleToken lv_packageName_1_0 = null; + + EObject lv_imports_3_0 = null; + + EObject lv_componentDefinitions_4_0 = null; + + EObject lv_transformationDefinitions_5_0 = null; + + + + enterRule(); + + try { + // InternalCftLanguage.g:77:2: ( (otherlv_0= 'package' ( (lv_packageName_1_0= ruleQualifiedName ) ) (otherlv_2= ';' )? ( (lv_imports_3_0= ruleImportDeclaration ) )* ( ( (lv_componentDefinitions_4_0= ruleComponentDefinition ) ) | ( (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) ) )* ) ) + // InternalCftLanguage.g:78:2: (otherlv_0= 'package' ( (lv_packageName_1_0= ruleQualifiedName ) ) (otherlv_2= ';' )? ( (lv_imports_3_0= ruleImportDeclaration ) )* ( ( (lv_componentDefinitions_4_0= ruleComponentDefinition ) ) | ( (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) ) )* ) + { + // InternalCftLanguage.g:78:2: (otherlv_0= 'package' ( (lv_packageName_1_0= ruleQualifiedName ) ) (otherlv_2= ';' )? ( (lv_imports_3_0= ruleImportDeclaration ) )* ( ( (lv_componentDefinitions_4_0= ruleComponentDefinition ) ) | ( (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) ) )* ) + // InternalCftLanguage.g:79:3: otherlv_0= 'package' ( (lv_packageName_1_0= ruleQualifiedName ) ) (otherlv_2= ';' )? ( (lv_imports_3_0= ruleImportDeclaration ) )* ( ( (lv_componentDefinitions_4_0= ruleComponentDefinition ) ) | ( (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) ) )* + { + otherlv_0=(Token)match(input,12,FOLLOW_3); + + newLeafNode(otherlv_0, grammarAccess.getCftModelAccess().getPackageKeyword_0()); + + // InternalCftLanguage.g:83:3: ( (lv_packageName_1_0= ruleQualifiedName ) ) + // InternalCftLanguage.g:84:4: (lv_packageName_1_0= ruleQualifiedName ) + { + // InternalCftLanguage.g:84:4: (lv_packageName_1_0= ruleQualifiedName ) + // InternalCftLanguage.g:85:5: lv_packageName_1_0= ruleQualifiedName + { + + newCompositeNode(grammarAccess.getCftModelAccess().getPackageNameQualifiedNameParserRuleCall_1_0()); + + pushFollow(FOLLOW_4); + lv_packageName_1_0=ruleQualifiedName(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCftModelRule()); + } + set( + current, + "packageName", + lv_packageName_1_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.QualifiedName"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalCftLanguage.g:102:3: (otherlv_2= ';' )? + int alt1=2; + int LA1_0 = input.LA(1); + + if ( (LA1_0==13) ) { + alt1=1; + } + switch (alt1) { + case 1 : + // InternalCftLanguage.g:103:4: otherlv_2= ';' + { + otherlv_2=(Token)match(input,13,FOLLOW_5); + + newLeafNode(otherlv_2, grammarAccess.getCftModelAccess().getSemicolonKeyword_2()); + + + } + break; + + } + + // InternalCftLanguage.g:108:3: ( (lv_imports_3_0= ruleImportDeclaration ) )* + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( (LA2_0==14) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // InternalCftLanguage.g:109:4: (lv_imports_3_0= ruleImportDeclaration ) + { + // InternalCftLanguage.g:109:4: (lv_imports_3_0= ruleImportDeclaration ) + // InternalCftLanguage.g:110:5: lv_imports_3_0= ruleImportDeclaration + { + + newCompositeNode(grammarAccess.getCftModelAccess().getImportsImportDeclarationParserRuleCall_3_0()); + + pushFollow(FOLLOW_5); + lv_imports_3_0=ruleImportDeclaration(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCftModelRule()); + } + add( + current, + "imports", + lv_imports_3_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ImportDeclaration"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + default : + break loop2; + } + } while (true); + + // InternalCftLanguage.g:127:3: ( ( (lv_componentDefinitions_4_0= ruleComponentDefinition ) ) | ( (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) ) )* + loop3: + do { + int alt3=3; + int LA3_0 = input.LA(1); + + if ( (LA3_0==15) ) { + alt3=1; + } + else if ( (LA3_0==25) ) { + alt3=2; + } + + + switch (alt3) { + case 1 : + // InternalCftLanguage.g:128:4: ( (lv_componentDefinitions_4_0= ruleComponentDefinition ) ) + { + // InternalCftLanguage.g:128:4: ( (lv_componentDefinitions_4_0= ruleComponentDefinition ) ) + // InternalCftLanguage.g:129:5: (lv_componentDefinitions_4_0= ruleComponentDefinition ) + { + // InternalCftLanguage.g:129:5: (lv_componentDefinitions_4_0= ruleComponentDefinition ) + // InternalCftLanguage.g:130:6: lv_componentDefinitions_4_0= ruleComponentDefinition + { + + newCompositeNode(grammarAccess.getCftModelAccess().getComponentDefinitionsComponentDefinitionParserRuleCall_4_0_0()); + + pushFollow(FOLLOW_6); + lv_componentDefinitions_4_0=ruleComponentDefinition(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCftModelRule()); + } + add( + current, + "componentDefinitions", + lv_componentDefinitions_4_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ComponentDefinition"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + case 2 : + // InternalCftLanguage.g:148:4: ( (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) ) + { + // InternalCftLanguage.g:148:4: ( (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) ) + // InternalCftLanguage.g:149:5: (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) + { + // InternalCftLanguage.g:149:5: (lv_transformationDefinitions_5_0= ruleTransformationDefinition ) + // InternalCftLanguage.g:150:6: lv_transformationDefinitions_5_0= ruleTransformationDefinition + { + + newCompositeNode(grammarAccess.getCftModelAccess().getTransformationDefinitionsTransformationDefinitionParserRuleCall_4_1_0()); + + pushFollow(FOLLOW_6); + lv_transformationDefinitions_5_0=ruleTransformationDefinition(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCftModelRule()); + } + add( + current, + "transformationDefinitions", + lv_transformationDefinitions_5_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.TransformationDefinition"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop3; + } + } while (true); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleCftModel" + + + // $ANTLR start "entryRuleImportDeclaration" + // InternalCftLanguage.g:172:1: entryRuleImportDeclaration returns [EObject current=null] : iv_ruleImportDeclaration= ruleImportDeclaration EOF ; + public final EObject entryRuleImportDeclaration() throws RecognitionException { + EObject current = null; + + EObject iv_ruleImportDeclaration = null; + + + try { + // InternalCftLanguage.g:172:58: (iv_ruleImportDeclaration= ruleImportDeclaration EOF ) + // InternalCftLanguage.g:173:2: iv_ruleImportDeclaration= ruleImportDeclaration EOF + { + newCompositeNode(grammarAccess.getImportDeclarationRule()); + pushFollow(FOLLOW_1); + iv_ruleImportDeclaration=ruleImportDeclaration(); + + state._fsp--; + + current =iv_ruleImportDeclaration; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleImportDeclaration" + + + // $ANTLR start "ruleImportDeclaration" + // InternalCftLanguage.g:179:1: ruleImportDeclaration returns [EObject current=null] : (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) ) (otherlv_2= ';' )? ) ; + public final EObject ruleImportDeclaration() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token otherlv_2=null; + AntlrDatatypeRuleToken lv_importedNamespace_1_0 = null; + + + + enterRule(); + + try { + // InternalCftLanguage.g:185:2: ( (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) ) (otherlv_2= ';' )? ) ) + // InternalCftLanguage.g:186:2: (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) ) (otherlv_2= ';' )? ) + { + // InternalCftLanguage.g:186:2: (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) ) (otherlv_2= ';' )? ) + // InternalCftLanguage.g:187:3: otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) ) (otherlv_2= ';' )? + { + otherlv_0=(Token)match(input,14,FOLLOW_3); + + newLeafNode(otherlv_0, grammarAccess.getImportDeclarationAccess().getImportKeyword_0()); + + // InternalCftLanguage.g:191:3: ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) ) + // InternalCftLanguage.g:192:4: (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) + { + // InternalCftLanguage.g:192:4: (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) + // InternalCftLanguage.g:193:5: lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard + { + + newCompositeNode(grammarAccess.getImportDeclarationAccess().getImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_0()); + + pushFollow(FOLLOW_7); + lv_importedNamespace_1_0=ruleQualifiedNameWithWildcard(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getImportDeclarationRule()); + } + set( + current, + "importedNamespace", + lv_importedNamespace_1_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.QualifiedNameWithWildcard"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalCftLanguage.g:210:3: (otherlv_2= ';' )? + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0==13) ) { + alt4=1; + } + switch (alt4) { + case 1 : + // InternalCftLanguage.g:211:4: otherlv_2= ';' + { + otherlv_2=(Token)match(input,13,FOLLOW_2); + + newLeafNode(otherlv_2, grammarAccess.getImportDeclarationAccess().getSemicolonKeyword_2()); + + + } + break; + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleImportDeclaration" + + + // $ANTLR start "entryRuleComponentDefinition" + // InternalCftLanguage.g:220:1: entryRuleComponentDefinition returns [EObject current=null] : iv_ruleComponentDefinition= ruleComponentDefinition EOF ; + public final EObject entryRuleComponentDefinition() throws RecognitionException { + EObject current = null; + + EObject iv_ruleComponentDefinition = null; + + + try { + // InternalCftLanguage.g:220:60: (iv_ruleComponentDefinition= ruleComponentDefinition EOF ) + // InternalCftLanguage.g:221:2: iv_ruleComponentDefinition= ruleComponentDefinition EOF + { + newCompositeNode(grammarAccess.getComponentDefinitionRule()); + pushFollow(FOLLOW_1); + iv_ruleComponentDefinition=ruleComponentDefinition(); + + state._fsp--; + + current =iv_ruleComponentDefinition; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleComponentDefinition" + + + // $ANTLR start "ruleComponentDefinition" + // InternalCftLanguage.g:227:1: ruleComponentDefinition returns [EObject current=null] : (otherlv_0= 'cft' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) ) ) ( ( (lv_eventDefinitions_10_0= ruleEventDefinition ) ) otherlv_11= ';' )* otherlv_12= '}' ) ; + public final EObject ruleComponentDefinition() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_name_1_0=null; + Token otherlv_2=null; + Token otherlv_4=null; + Token otherlv_6=null; + Token otherlv_7=null; + Token otherlv_8=null; + Token otherlv_9=null; + Token otherlv_11=null; + Token otherlv_12=null; + EObject lv_inputEvents_5_0 = null; + + EObject lv_eventDefinitions_10_0 = null; + + + + enterRule(); + + try { + // InternalCftLanguage.g:233:2: ( (otherlv_0= 'cft' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) ) ) ( ( (lv_eventDefinitions_10_0= ruleEventDefinition ) ) otherlv_11= ';' )* otherlv_12= '}' ) ) + // InternalCftLanguage.g:234:2: (otherlv_0= 'cft' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) ) ) ( ( (lv_eventDefinitions_10_0= ruleEventDefinition ) ) otherlv_11= ';' )* otherlv_12= '}' ) + { + // InternalCftLanguage.g:234:2: (otherlv_0= 'cft' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) ) ) ( ( (lv_eventDefinitions_10_0= ruleEventDefinition ) ) otherlv_11= ';' )* otherlv_12= '}' ) + // InternalCftLanguage.g:235:3: otherlv_0= 'cft' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) ) ) ( ( (lv_eventDefinitions_10_0= ruleEventDefinition ) ) otherlv_11= ';' )* otherlv_12= '}' + { + otherlv_0=(Token)match(input,15,FOLLOW_3); + + newLeafNode(otherlv_0, grammarAccess.getComponentDefinitionAccess().getCftKeyword_0()); + + // InternalCftLanguage.g:239:3: ( (lv_name_1_0= RULE_ID ) ) + // InternalCftLanguage.g:240:4: (lv_name_1_0= RULE_ID ) + { + // InternalCftLanguage.g:240:4: (lv_name_1_0= RULE_ID ) + // InternalCftLanguage.g:241:5: lv_name_1_0= RULE_ID + { + lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_8); + + newLeafNode(lv_name_1_0, grammarAccess.getComponentDefinitionAccess().getNameIDTerminalRuleCall_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getComponentDefinitionRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_1_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + otherlv_2=(Token)match(input,16,FOLLOW_9); + + newLeafNode(otherlv_2, grammarAccess.getComponentDefinitionAccess().getLeftCurlyBracketKeyword_2()); + + // InternalCftLanguage.g:261:3: ( ( ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) ) ) + // InternalCftLanguage.g:262:4: ( ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) ) + { + // InternalCftLanguage.g:262:4: ( ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) ) + // InternalCftLanguage.g:263:5: ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) + { + + getUnorderedGroupHelper().enter(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); + + // InternalCftLanguage.g:266:5: ( ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* ) + // InternalCftLanguage.g:267:6: ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* + { + // InternalCftLanguage.g:267:6: ( ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) )* + loop7: + do { + int alt7=3; + int LA7_0 = input.LA(1); + + if ( LA7_0 == 17 && getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 0) ) { + alt7=1; + } + else if ( LA7_0 == 18 && getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 1) ) { + alt7=2; + } + + + switch (alt7) { + case 1 : + // InternalCftLanguage.g:268:4: ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) + { + // InternalCftLanguage.g:268:4: ({...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) ) + // InternalCftLanguage.g:269:5: {...}? => ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) + { + if ( ! getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 0) ) { + throw new FailedPredicateException(input, "ruleComponentDefinition", "getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 0)"); + } + // InternalCftLanguage.g:269:116: ( ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) ) + // InternalCftLanguage.g:270:6: ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) + { + + getUnorderedGroupHelper().select(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 0); + + // InternalCftLanguage.g:273:9: ({...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) ) + // InternalCftLanguage.g:273:10: {...}? => (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) + { + if ( !((true)) ) { + throw new FailedPredicateException(input, "ruleComponentDefinition", "true"); + } + // InternalCftLanguage.g:273:19: (otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' ) + // InternalCftLanguage.g:273:20: otherlv_4= 'in' ( (lv_inputEvents_5_0= ruleInputEvent ) )* otherlv_6= ';' + { + otherlv_4=(Token)match(input,17,FOLLOW_10); + + newLeafNode(otherlv_4, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()); + + // InternalCftLanguage.g:277:9: ( (lv_inputEvents_5_0= ruleInputEvent ) )* + loop5: + do { + int alt5=2; + int LA5_0 = input.LA(1); + + if ( (LA5_0==RULE_ID) ) { + alt5=1; + } + + + switch (alt5) { + case 1 : + // InternalCftLanguage.g:278:10: (lv_inputEvents_5_0= ruleInputEvent ) + { + // InternalCftLanguage.g:278:10: (lv_inputEvents_5_0= ruleInputEvent ) + // InternalCftLanguage.g:279:11: lv_inputEvents_5_0= ruleInputEvent + { + + newCompositeNode(grammarAccess.getComponentDefinitionAccess().getInputEventsInputEventParserRuleCall_3_0_1_0()); + + pushFollow(FOLLOW_10); + lv_inputEvents_5_0=ruleInputEvent(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getComponentDefinitionRule()); + } + add( + current, + "inputEvents", + lv_inputEvents_5_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.InputEvent"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + default : + break loop5; + } + } while (true); + + otherlv_6=(Token)match(input,13,FOLLOW_9); + + newLeafNode(otherlv_6, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2()); + + + } + + + } + + + getUnorderedGroupHelper().returnFromSelection(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); + + + } + + + } + + + } + break; + case 2 : + // InternalCftLanguage.g:306:4: ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) + { + // InternalCftLanguage.g:306:4: ({...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) ) + // InternalCftLanguage.g:307:5: {...}? => ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) + { + if ( ! getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 1) ) { + throw new FailedPredicateException(input, "ruleComponentDefinition", "getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 1)"); + } + // InternalCftLanguage.g:307:116: ( ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) ) + // InternalCftLanguage.g:308:6: ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) + { + + getUnorderedGroupHelper().select(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 1); + + // InternalCftLanguage.g:311:9: ({...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) ) + // InternalCftLanguage.g:311:10: {...}? => (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) + { + if ( !((true)) ) { + throw new FailedPredicateException(input, "ruleComponentDefinition", "true"); + } + // InternalCftLanguage.g:311:19: (otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' ) + // InternalCftLanguage.g:311:20: otherlv_7= 'out' ( (otherlv_8= RULE_ID ) )* otherlv_9= ';' + { + otherlv_7=(Token)match(input,18,FOLLOW_10); + + newLeafNode(otherlv_7, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()); + + // InternalCftLanguage.g:315:9: ( (otherlv_8= RULE_ID ) )* + loop6: + do { + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0==RULE_ID) ) { + alt6=1; + } + + + switch (alt6) { + case 1 : + // InternalCftLanguage.g:316:10: (otherlv_8= RULE_ID ) + { + // InternalCftLanguage.g:316:10: (otherlv_8= RULE_ID ) + // InternalCftLanguage.g:317:11: otherlv_8= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getComponentDefinitionRule()); + } + + otherlv_8=(Token)match(input,RULE_ID,FOLLOW_10); + + newLeafNode(otherlv_8, grammarAccess.getComponentDefinitionAccess().getOutputEventsEventDeclarationCrossReference_3_1_1_0()); + + + } + + + } + break; + + default : + break loop6; + } + } while (true); + + otherlv_9=(Token)match(input,13,FOLLOW_9); + + newLeafNode(otherlv_9, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2()); + + + } + + + } + + + getUnorderedGroupHelper().returnFromSelection(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); + + + } + + + } + + + } + break; + + default : + break loop7; + } + } while (true); + + + } + + + } + + + getUnorderedGroupHelper().leave(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); + + + } + + // InternalCftLanguage.g:345:3: ( ( (lv_eventDefinitions_10_0= ruleEventDefinition ) ) otherlv_11= ';' )* + loop8: + do { + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0==RULE_ID) ) { + alt8=1; + } + + + switch (alt8) { + case 1 : + // InternalCftLanguage.g:346:4: ( (lv_eventDefinitions_10_0= ruleEventDefinition ) ) otherlv_11= ';' + { + // InternalCftLanguage.g:346:4: ( (lv_eventDefinitions_10_0= ruleEventDefinition ) ) + // InternalCftLanguage.g:347:5: (lv_eventDefinitions_10_0= ruleEventDefinition ) + { + // InternalCftLanguage.g:347:5: (lv_eventDefinitions_10_0= ruleEventDefinition ) + // InternalCftLanguage.g:348:6: lv_eventDefinitions_10_0= ruleEventDefinition + { + + newCompositeNode(grammarAccess.getComponentDefinitionAccess().getEventDefinitionsEventDefinitionParserRuleCall_4_0_0()); + + pushFollow(FOLLOW_11); + lv_eventDefinitions_10_0=ruleEventDefinition(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getComponentDefinitionRule()); + } + add( + current, + "eventDefinitions", + lv_eventDefinitions_10_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventDefinition"); + afterParserOrEnumRuleCall(); + + + } + + + } + + otherlv_11=(Token)match(input,13,FOLLOW_12); + + newLeafNode(otherlv_11, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_4_1()); + + + } + break; + + default : + break loop8; + } + } while (true); + + otherlv_12=(Token)match(input,19,FOLLOW_2); + + newLeafNode(otherlv_12, grammarAccess.getComponentDefinitionAccess().getRightCurlyBracketKeyword_5()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleComponentDefinition" + + + // $ANTLR start "entryRuleInputEvent" + // InternalCftLanguage.g:378:1: entryRuleInputEvent returns [EObject current=null] : iv_ruleInputEvent= ruleInputEvent EOF ; + public final EObject entryRuleInputEvent() throws RecognitionException { + EObject current = null; + + EObject iv_ruleInputEvent = null; + + + try { + // InternalCftLanguage.g:378:51: (iv_ruleInputEvent= ruleInputEvent EOF ) + // InternalCftLanguage.g:379:2: iv_ruleInputEvent= ruleInputEvent EOF + { + newCompositeNode(grammarAccess.getInputEventRule()); + pushFollow(FOLLOW_1); + iv_ruleInputEvent=ruleInputEvent(); + + state._fsp--; + + current =iv_ruleInputEvent; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleInputEvent" + + + // $ANTLR start "ruleInputEvent" + // InternalCftLanguage.g:385:1: ruleInputEvent returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_multiple_1_0= '[]' ) )? ) ; + public final EObject ruleInputEvent() throws RecognitionException { + EObject current = null; + + Token lv_name_0_0=null; + Token lv_multiple_1_0=null; + + + enterRule(); + + try { + // InternalCftLanguage.g:391:2: ( ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_multiple_1_0= '[]' ) )? ) ) + // InternalCftLanguage.g:392:2: ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_multiple_1_0= '[]' ) )? ) + { + // InternalCftLanguage.g:392:2: ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_multiple_1_0= '[]' ) )? ) + // InternalCftLanguage.g:393:3: ( (lv_name_0_0= RULE_ID ) ) ( (lv_multiple_1_0= '[]' ) )? + { + // InternalCftLanguage.g:393:3: ( (lv_name_0_0= RULE_ID ) ) + // InternalCftLanguage.g:394:4: (lv_name_0_0= RULE_ID ) + { + // InternalCftLanguage.g:394:4: (lv_name_0_0= RULE_ID ) + // InternalCftLanguage.g:395:5: lv_name_0_0= RULE_ID + { + lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_13); + + newLeafNode(lv_name_0_0, grammarAccess.getInputEventAccess().getNameIDTerminalRuleCall_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getInputEventRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + // InternalCftLanguage.g:411:3: ( (lv_multiple_1_0= '[]' ) )? + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0==20) ) { + alt9=1; + } + switch (alt9) { + case 1 : + // InternalCftLanguage.g:412:4: (lv_multiple_1_0= '[]' ) + { + // InternalCftLanguage.g:412:4: (lv_multiple_1_0= '[]' ) + // InternalCftLanguage.g:413:5: lv_multiple_1_0= '[]' + { + lv_multiple_1_0=(Token)match(input,20,FOLLOW_2); + + newLeafNode(lv_multiple_1_0, grammarAccess.getInputEventAccess().getMultipleLeftSquareBracketRightSquareBracketKeyword_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getInputEventRule()); + } + setWithLastConsumed(current, "multiple", true, "[]"); + + + } + + + } + break; + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleInputEvent" + + + // $ANTLR start "entryRuleEventDefinition" + // InternalCftLanguage.g:429:1: entryRuleEventDefinition returns [EObject current=null] : iv_ruleEventDefinition= ruleEventDefinition EOF ; + public final EObject entryRuleEventDefinition() throws RecognitionException { + EObject current = null; + + EObject iv_ruleEventDefinition = null; + + + try { + // InternalCftLanguage.g:429:56: (iv_ruleEventDefinition= ruleEventDefinition EOF ) + // InternalCftLanguage.g:430:2: iv_ruleEventDefinition= ruleEventDefinition EOF + { + newCompositeNode(grammarAccess.getEventDefinitionRule()); + pushFollow(FOLLOW_1); + iv_ruleEventDefinition=ruleEventDefinition(); + + state._fsp--; + + current =iv_ruleEventDefinition; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleEventDefinition" + + + // $ANTLR start "ruleEventDefinition" + // InternalCftLanguage.g:436:1: ruleEventDefinition returns [EObject current=null] : (this_BasicEventDefinition_0= ruleBasicEventDefinition | this_GateDefinition_1= ruleGateDefinition ) ; + public final EObject ruleEventDefinition() throws RecognitionException { + EObject current = null; + + EObject this_BasicEventDefinition_0 = null; + + EObject this_GateDefinition_1 = null; + + + + enterRule(); + + try { + // InternalCftLanguage.g:442:2: ( (this_BasicEventDefinition_0= ruleBasicEventDefinition | this_GateDefinition_1= ruleGateDefinition ) ) + // InternalCftLanguage.g:443:2: (this_BasicEventDefinition_0= ruleBasicEventDefinition | this_GateDefinition_1= ruleGateDefinition ) + { + // InternalCftLanguage.g:443:2: (this_BasicEventDefinition_0= ruleBasicEventDefinition | this_GateDefinition_1= ruleGateDefinition ) + int alt10=2; + int LA10_0 = input.LA(1); + + if ( (LA10_0==RULE_ID) ) { + int LA10_1 = input.LA(2); + + if ( ((LA10_1>=23 && LA10_1<=24)) ) { + alt10=2; + } + else if ( (LA10_1==21) ) { + alt10=1; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 10, 1, input); + + throw nvae; + } + } + else { + NoViableAltException nvae = + new NoViableAltException("", 10, 0, input); + + throw nvae; + } + switch (alt10) { + case 1 : + // InternalCftLanguage.g:444:3: this_BasicEventDefinition_0= ruleBasicEventDefinition + { + + newCompositeNode(grammarAccess.getEventDefinitionAccess().getBasicEventDefinitionParserRuleCall_0()); + + pushFollow(FOLLOW_2); + this_BasicEventDefinition_0=ruleBasicEventDefinition(); + + state._fsp--; + + + current = this_BasicEventDefinition_0; + afterParserOrEnumRuleCall(); + + + } + break; + case 2 : + // InternalCftLanguage.g:453:3: this_GateDefinition_1= ruleGateDefinition + { + + newCompositeNode(grammarAccess.getEventDefinitionAccess().getGateDefinitionParserRuleCall_1()); + + pushFollow(FOLLOW_2); + this_GateDefinition_1=ruleGateDefinition(); + + state._fsp--; + + + current = this_GateDefinition_1; + afterParserOrEnumRuleCall(); + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleEventDefinition" + + + // $ANTLR start "entryRuleBasicEventDefinition" + // InternalCftLanguage.g:465:1: entryRuleBasicEventDefinition returns [EObject current=null] : iv_ruleBasicEventDefinition= ruleBasicEventDefinition EOF ; + public final EObject entryRuleBasicEventDefinition() throws RecognitionException { + EObject current = null; + + EObject iv_ruleBasicEventDefinition = null; + + + try { + // InternalCftLanguage.g:465:61: (iv_ruleBasicEventDefinition= ruleBasicEventDefinition EOF ) + // InternalCftLanguage.g:466:2: iv_ruleBasicEventDefinition= ruleBasicEventDefinition EOF + { + newCompositeNode(grammarAccess.getBasicEventDefinitionRule()); + pushFollow(FOLLOW_1); + iv_ruleBasicEventDefinition=ruleBasicEventDefinition(); + + state._fsp--; + + current =iv_ruleBasicEventDefinition; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleBasicEventDefinition" + + + // $ANTLR start "ruleBasicEventDefinition" + // InternalCftLanguage.g:472:1: ruleBasicEventDefinition returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'lambda' otherlv_2= '=' ( (lv_rate_3_0= RULE_DOULBE ) ) ) ; + public final EObject ruleBasicEventDefinition() throws RecognitionException { + EObject current = null; + + Token lv_name_0_0=null; + Token otherlv_1=null; + Token otherlv_2=null; + Token lv_rate_3_0=null; + + + enterRule(); + + try { + // InternalCftLanguage.g:478:2: ( ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'lambda' otherlv_2= '=' ( (lv_rate_3_0= RULE_DOULBE ) ) ) ) + // InternalCftLanguage.g:479:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'lambda' otherlv_2= '=' ( (lv_rate_3_0= RULE_DOULBE ) ) ) + { + // InternalCftLanguage.g:479:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'lambda' otherlv_2= '=' ( (lv_rate_3_0= RULE_DOULBE ) ) ) + // InternalCftLanguage.g:480:3: ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'lambda' otherlv_2= '=' ( (lv_rate_3_0= RULE_DOULBE ) ) + { + // InternalCftLanguage.g:480:3: ( (lv_name_0_0= RULE_ID ) ) + // InternalCftLanguage.g:481:4: (lv_name_0_0= RULE_ID ) + { + // InternalCftLanguage.g:481:4: (lv_name_0_0= RULE_ID ) + // InternalCftLanguage.g:482:5: lv_name_0_0= RULE_ID + { + lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_14); + + newLeafNode(lv_name_0_0, grammarAccess.getBasicEventDefinitionAccess().getNameIDTerminalRuleCall_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getBasicEventDefinitionRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + otherlv_1=(Token)match(input,21,FOLLOW_15); + + newLeafNode(otherlv_1, grammarAccess.getBasicEventDefinitionAccess().getLambdaKeyword_1()); + + otherlv_2=(Token)match(input,22,FOLLOW_16); + + newLeafNode(otherlv_2, grammarAccess.getBasicEventDefinitionAccess().getEqualsSignKeyword_2()); + + // InternalCftLanguage.g:506:3: ( (lv_rate_3_0= RULE_DOULBE ) ) + // InternalCftLanguage.g:507:4: (lv_rate_3_0= RULE_DOULBE ) + { + // InternalCftLanguage.g:507:4: (lv_rate_3_0= RULE_DOULBE ) + // InternalCftLanguage.g:508:5: lv_rate_3_0= RULE_DOULBE + { + lv_rate_3_0=(Token)match(input,RULE_DOULBE,FOLLOW_2); + + newLeafNode(lv_rate_3_0, grammarAccess.getBasicEventDefinitionAccess().getRateDOULBETerminalRuleCall_3_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getBasicEventDefinitionRule()); + } + setWithLastConsumed( + current, + "rate", + lv_rate_3_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.DOULBE"); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleBasicEventDefinition" + + + // $ANTLR start "entryRuleGateDefinition" + // InternalCftLanguage.g:528:1: entryRuleGateDefinition returns [EObject current=null] : iv_ruleGateDefinition= ruleGateDefinition EOF ; + public final EObject entryRuleGateDefinition() throws RecognitionException { + EObject current = null; + + EObject iv_ruleGateDefinition = null; + + + try { + // InternalCftLanguage.g:528:55: (iv_ruleGateDefinition= ruleGateDefinition EOF ) + // InternalCftLanguage.g:529:2: iv_ruleGateDefinition= ruleGateDefinition EOF + { + newCompositeNode(grammarAccess.getGateDefinitionRule()); + pushFollow(FOLLOW_1); + iv_ruleGateDefinition=ruleGateDefinition(); + + state._fsp--; + + current =iv_ruleGateDefinition; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleGateDefinition" + + + // $ANTLR start "ruleGateDefinition" + // InternalCftLanguage.g:535:1: ruleGateDefinition returns [EObject current=null] : (this_AndGate_0= ruleAndGate | this_OrGate_1= ruleOrGate ) ; + public final EObject ruleGateDefinition() throws RecognitionException { + EObject current = null; + + EObject this_AndGate_0 = null; + + EObject this_OrGate_1 = null; + + + + enterRule(); + + try { + // InternalCftLanguage.g:541:2: ( (this_AndGate_0= ruleAndGate | this_OrGate_1= ruleOrGate ) ) + // InternalCftLanguage.g:542:2: (this_AndGate_0= ruleAndGate | this_OrGate_1= ruleOrGate ) + { + // InternalCftLanguage.g:542:2: (this_AndGate_0= ruleAndGate | this_OrGate_1= ruleOrGate ) + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0==RULE_ID) ) { + int LA11_1 = input.LA(2); + + if ( (LA11_1==24) ) { + alt11=2; + } + else if ( (LA11_1==23) ) { + alt11=1; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 11, 1, input); + + throw nvae; + } + } + else { + NoViableAltException nvae = + new NoViableAltException("", 11, 0, input); + + throw nvae; + } + switch (alt11) { + case 1 : + // InternalCftLanguage.g:543:3: this_AndGate_0= ruleAndGate + { + + newCompositeNode(grammarAccess.getGateDefinitionAccess().getAndGateParserRuleCall_0()); + + pushFollow(FOLLOW_2); + this_AndGate_0=ruleAndGate(); + + state._fsp--; + + + current = this_AndGate_0; + afterParserOrEnumRuleCall(); + + + } + break; + case 2 : + // InternalCftLanguage.g:552:3: this_OrGate_1= ruleOrGate + { + + newCompositeNode(grammarAccess.getGateDefinitionAccess().getOrGateParserRuleCall_1()); + + pushFollow(FOLLOW_2); + this_OrGate_1=ruleOrGate(); + + state._fsp--; + + + current = this_OrGate_1; + afterParserOrEnumRuleCall(); + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleGateDefinition" + + + // $ANTLR start "entryRuleAndGate" + // InternalCftLanguage.g:564:1: entryRuleAndGate returns [EObject current=null] : iv_ruleAndGate= ruleAndGate EOF ; + public final EObject entryRuleAndGate() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAndGate = null; + + + try { + // InternalCftLanguage.g:564:48: (iv_ruleAndGate= ruleAndGate EOF ) + // InternalCftLanguage.g:565:2: iv_ruleAndGate= ruleAndGate EOF + { + newCompositeNode(grammarAccess.getAndGateRule()); + pushFollow(FOLLOW_1); + iv_ruleAndGate=ruleAndGate(); + + state._fsp--; + + current =iv_ruleAndGate; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAndGate" + + + // $ANTLR start "ruleAndGate" + // InternalCftLanguage.g:571:1: ruleAndGate returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'and' ( (otherlv_2= RULE_ID ) )* ) ; + public final EObject ruleAndGate() throws RecognitionException { + EObject current = null; + + Token lv_name_0_0=null; + Token otherlv_1=null; + Token otherlv_2=null; + + + enterRule(); + + try { + // InternalCftLanguage.g:577:2: ( ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'and' ( (otherlv_2= RULE_ID ) )* ) ) + // InternalCftLanguage.g:578:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'and' ( (otherlv_2= RULE_ID ) )* ) + { + // InternalCftLanguage.g:578:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'and' ( (otherlv_2= RULE_ID ) )* ) + // InternalCftLanguage.g:579:3: ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'and' ( (otherlv_2= RULE_ID ) )* + { + // InternalCftLanguage.g:579:3: ( (lv_name_0_0= RULE_ID ) ) + // InternalCftLanguage.g:580:4: (lv_name_0_0= RULE_ID ) + { + // InternalCftLanguage.g:580:4: (lv_name_0_0= RULE_ID ) + // InternalCftLanguage.g:581:5: lv_name_0_0= RULE_ID + { + lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_17); + + newLeafNode(lv_name_0_0, grammarAccess.getAndGateAccess().getNameIDTerminalRuleCall_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getAndGateRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + otherlv_1=(Token)match(input,23,FOLLOW_18); + + newLeafNode(otherlv_1, grammarAccess.getAndGateAccess().getAndKeyword_1()); + + // InternalCftLanguage.g:601:3: ( (otherlv_2= RULE_ID ) )* + loop12: + do { + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0==RULE_ID) ) { + alt12=1; + } + + + switch (alt12) { + case 1 : + // InternalCftLanguage.g:602:4: (otherlv_2= RULE_ID ) + { + // InternalCftLanguage.g:602:4: (otherlv_2= RULE_ID ) + // InternalCftLanguage.g:603:5: otherlv_2= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getAndGateRule()); + } + + otherlv_2=(Token)match(input,RULE_ID,FOLLOW_18); + + newLeafNode(otherlv_2, grammarAccess.getAndGateAccess().getInputEventsEventDeclarationCrossReference_2_0()); + + + } + + + } + break; + + default : + break loop12; + } + } while (true); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAndGate" + + + // $ANTLR start "entryRuleOrGate" + // InternalCftLanguage.g:618:1: entryRuleOrGate returns [EObject current=null] : iv_ruleOrGate= ruleOrGate EOF ; + public final EObject entryRuleOrGate() throws RecognitionException { + EObject current = null; + + EObject iv_ruleOrGate = null; + + + try { + // InternalCftLanguage.g:618:47: (iv_ruleOrGate= ruleOrGate EOF ) + // InternalCftLanguage.g:619:2: iv_ruleOrGate= ruleOrGate EOF + { + newCompositeNode(grammarAccess.getOrGateRule()); + pushFollow(FOLLOW_1); + iv_ruleOrGate=ruleOrGate(); + + state._fsp--; + + current =iv_ruleOrGate; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleOrGate" + + + // $ANTLR start "ruleOrGate" + // InternalCftLanguage.g:625:1: ruleOrGate returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'or' ( (otherlv_2= RULE_ID ) )* ) ; + public final EObject ruleOrGate() throws RecognitionException { + EObject current = null; + + Token lv_name_0_0=null; + Token otherlv_1=null; + Token otherlv_2=null; + + + enterRule(); + + try { + // InternalCftLanguage.g:631:2: ( ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'or' ( (otherlv_2= RULE_ID ) )* ) ) + // InternalCftLanguage.g:632:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'or' ( (otherlv_2= RULE_ID ) )* ) + { + // InternalCftLanguage.g:632:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'or' ( (otherlv_2= RULE_ID ) )* ) + // InternalCftLanguage.g:633:3: ( (lv_name_0_0= RULE_ID ) ) otherlv_1= 'or' ( (otherlv_2= RULE_ID ) )* + { + // InternalCftLanguage.g:633:3: ( (lv_name_0_0= RULE_ID ) ) + // InternalCftLanguage.g:634:4: (lv_name_0_0= RULE_ID ) + { + // InternalCftLanguage.g:634:4: (lv_name_0_0= RULE_ID ) + // InternalCftLanguage.g:635:5: lv_name_0_0= RULE_ID + { + lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_19); + + newLeafNode(lv_name_0_0, grammarAccess.getOrGateAccess().getNameIDTerminalRuleCall_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getOrGateRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + otherlv_1=(Token)match(input,24,FOLLOW_18); + + newLeafNode(otherlv_1, grammarAccess.getOrGateAccess().getOrKeyword_1()); + + // InternalCftLanguage.g:655:3: ( (otherlv_2= RULE_ID ) )* + loop13: + do { + int alt13=2; + int LA13_0 = input.LA(1); + + if ( (LA13_0==RULE_ID) ) { + alt13=1; + } + + + switch (alt13) { + case 1 : + // InternalCftLanguage.g:656:4: (otherlv_2= RULE_ID ) + { + // InternalCftLanguage.g:656:4: (otherlv_2= RULE_ID ) + // InternalCftLanguage.g:657:5: otherlv_2= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getOrGateRule()); + } + + otherlv_2=(Token)match(input,RULE_ID,FOLLOW_18); + + newLeafNode(otherlv_2, grammarAccess.getOrGateAccess().getInputEventsEventDeclarationCrossReference_2_0()); + + + } + + + } + break; + + default : + break loop13; + } + } while (true); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleOrGate" + + + // $ANTLR start "entryRuleTransformationDefinition" + // InternalCftLanguage.g:672:1: entryRuleTransformationDefinition returns [EObject current=null] : iv_ruleTransformationDefinition= ruleTransformationDefinition EOF ; + public final EObject entryRuleTransformationDefinition() throws RecognitionException { + EObject current = null; + + EObject iv_ruleTransformationDefinition = null; + + + try { + // InternalCftLanguage.g:672:65: (iv_ruleTransformationDefinition= ruleTransformationDefinition EOF ) + // InternalCftLanguage.g:673:2: iv_ruleTransformationDefinition= ruleTransformationDefinition EOF + { + newCompositeNode(grammarAccess.getTransformationDefinitionRule()); + pushFollow(FOLLOW_1); + iv_ruleTransformationDefinition=ruleTransformationDefinition(); + + state._fsp--; + + current =iv_ruleTransformationDefinition; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleTransformationDefinition" + + + // $ANTLR start "ruleTransformationDefinition" + // InternalCftLanguage.g:679:1: ruleTransformationDefinition returns [EObject current=null] : (otherlv_0= 'transformation' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_mappingDefinitions_3_0= ruleMappingDefinition ) )* otherlv_4= '}' ) ; + public final EObject ruleTransformationDefinition() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_name_1_0=null; + Token otherlv_2=null; + Token otherlv_4=null; + EObject lv_mappingDefinitions_3_0 = null; + + + + enterRule(); + + try { + // InternalCftLanguage.g:685:2: ( (otherlv_0= 'transformation' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_mappingDefinitions_3_0= ruleMappingDefinition ) )* otherlv_4= '}' ) ) + // InternalCftLanguage.g:686:2: (otherlv_0= 'transformation' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_mappingDefinitions_3_0= ruleMappingDefinition ) )* otherlv_4= '}' ) + { + // InternalCftLanguage.g:686:2: (otherlv_0= 'transformation' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_mappingDefinitions_3_0= ruleMappingDefinition ) )* otherlv_4= '}' ) + // InternalCftLanguage.g:687:3: otherlv_0= 'transformation' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_mappingDefinitions_3_0= ruleMappingDefinition ) )* otherlv_4= '}' + { + otherlv_0=(Token)match(input,25,FOLLOW_3); + + newLeafNode(otherlv_0, grammarAccess.getTransformationDefinitionAccess().getTransformationKeyword_0()); + + // InternalCftLanguage.g:691:3: ( (lv_name_1_0= RULE_ID ) ) + // InternalCftLanguage.g:692:4: (lv_name_1_0= RULE_ID ) + { + // InternalCftLanguage.g:692:4: (lv_name_1_0= RULE_ID ) + // InternalCftLanguage.g:693:5: lv_name_1_0= RULE_ID + { + lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_8); + + newLeafNode(lv_name_1_0, grammarAccess.getTransformationDefinitionAccess().getNameIDTerminalRuleCall_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getTransformationDefinitionRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_1_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + otherlv_2=(Token)match(input,16,FOLLOW_20); + + newLeafNode(otherlv_2, grammarAccess.getTransformationDefinitionAccess().getLeftCurlyBracketKeyword_2()); + + // InternalCftLanguage.g:713:3: ( (lv_mappingDefinitions_3_0= ruleMappingDefinition ) )* + loop14: + do { + int alt14=2; + int LA14_0 = input.LA(1); + + if ( ((LA14_0>=26 && LA14_0<=27)) ) { + alt14=1; + } + + + switch (alt14) { + case 1 : + // InternalCftLanguage.g:714:4: (lv_mappingDefinitions_3_0= ruleMappingDefinition ) + { + // InternalCftLanguage.g:714:4: (lv_mappingDefinitions_3_0= ruleMappingDefinition ) + // InternalCftLanguage.g:715:5: lv_mappingDefinitions_3_0= ruleMappingDefinition + { + + newCompositeNode(grammarAccess.getTransformationDefinitionAccess().getMappingDefinitionsMappingDefinitionParserRuleCall_3_0()); + + pushFollow(FOLLOW_20); + lv_mappingDefinitions_3_0=ruleMappingDefinition(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getTransformationDefinitionRule()); + } + add( + current, + "mappingDefinitions", + lv_mappingDefinitions_3_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingDefinition"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + default : + break loop14; + } + } while (true); + + otherlv_4=(Token)match(input,19,FOLLOW_2); + + newLeafNode(otherlv_4, grammarAccess.getTransformationDefinitionAccess().getRightCurlyBracketKeyword_4()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleTransformationDefinition" + + + // $ANTLR start "entryRuleMappingDefinition" + // InternalCftLanguage.g:740:1: entryRuleMappingDefinition returns [EObject current=null] : iv_ruleMappingDefinition= ruleMappingDefinition EOF ; + public final EObject entryRuleMappingDefinition() throws RecognitionException { + EObject current = null; + + EObject iv_ruleMappingDefinition = null; + + + try { + // InternalCftLanguage.g:740:58: (iv_ruleMappingDefinition= ruleMappingDefinition EOF ) + // InternalCftLanguage.g:741:2: iv_ruleMappingDefinition= ruleMappingDefinition EOF + { + newCompositeNode(grammarAccess.getMappingDefinitionRule()); + pushFollow(FOLLOW_1); + iv_ruleMappingDefinition=ruleMappingDefinition(); + + state._fsp--; + + current =iv_ruleMappingDefinition; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleMappingDefinition" + + + // $ANTLR start "ruleMappingDefinition" + // InternalCftLanguage.g:747:1: ruleMappingDefinition returns [EObject current=null] : ( ( (lv_topLevel_0_0= 'toplevel' ) )? otherlv_1= 'mapping' ( ( ruleQualifiedName ) ) otherlv_3= '(' ( (lv_parameters_4_0= ruleMappingParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleMappingParameter ) ) )* otherlv_7= ')' ( (lv_componentInstance_8_0= ruleComponentInstance ) )? (otherlv_9= '{' ( ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) otherlv_12= ';' )* otherlv_13= '}' )? ) ; + public final EObject ruleMappingDefinition() throws RecognitionException { + EObject current = null; + + Token lv_topLevel_0_0=null; + Token otherlv_1=null; + Token otherlv_3=null; + Token otherlv_5=null; + Token otherlv_7=null; + Token otherlv_9=null; + Token otherlv_12=null; + Token otherlv_13=null; + EObject lv_parameters_4_0 = null; + + EObject lv_parameters_6_0 = null; + + EObject lv_componentInstance_8_0 = null; + + EObject lv_lookupDefinitions_10_0 = null; + + EObject lv_assignments_11_0 = null; + + + + enterRule(); + + try { + // InternalCftLanguage.g:753:2: ( ( ( (lv_topLevel_0_0= 'toplevel' ) )? otherlv_1= 'mapping' ( ( ruleQualifiedName ) ) otherlv_3= '(' ( (lv_parameters_4_0= ruleMappingParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleMappingParameter ) ) )* otherlv_7= ')' ( (lv_componentInstance_8_0= ruleComponentInstance ) )? (otherlv_9= '{' ( ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) otherlv_12= ';' )* otherlv_13= '}' )? ) ) + // InternalCftLanguage.g:754:2: ( ( (lv_topLevel_0_0= 'toplevel' ) )? otherlv_1= 'mapping' ( ( ruleQualifiedName ) ) otherlv_3= '(' ( (lv_parameters_4_0= ruleMappingParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleMappingParameter ) ) )* otherlv_7= ')' ( (lv_componentInstance_8_0= ruleComponentInstance ) )? (otherlv_9= '{' ( ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) otherlv_12= ';' )* otherlv_13= '}' )? ) + { + // InternalCftLanguage.g:754:2: ( ( (lv_topLevel_0_0= 'toplevel' ) )? otherlv_1= 'mapping' ( ( ruleQualifiedName ) ) otherlv_3= '(' ( (lv_parameters_4_0= ruleMappingParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleMappingParameter ) ) )* otherlv_7= ')' ( (lv_componentInstance_8_0= ruleComponentInstance ) )? (otherlv_9= '{' ( ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) otherlv_12= ';' )* otherlv_13= '}' )? ) + // InternalCftLanguage.g:755:3: ( (lv_topLevel_0_0= 'toplevel' ) )? otherlv_1= 'mapping' ( ( ruleQualifiedName ) ) otherlv_3= '(' ( (lv_parameters_4_0= ruleMappingParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleMappingParameter ) ) )* otherlv_7= ')' ( (lv_componentInstance_8_0= ruleComponentInstance ) )? (otherlv_9= '{' ( ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) otherlv_12= ';' )* otherlv_13= '}' )? + { + // InternalCftLanguage.g:755:3: ( (lv_topLevel_0_0= 'toplevel' ) )? + int alt15=2; + int LA15_0 = input.LA(1); + + if ( (LA15_0==26) ) { + alt15=1; + } + switch (alt15) { + case 1 : + // InternalCftLanguage.g:756:4: (lv_topLevel_0_0= 'toplevel' ) + { + // InternalCftLanguage.g:756:4: (lv_topLevel_0_0= 'toplevel' ) + // InternalCftLanguage.g:757:5: lv_topLevel_0_0= 'toplevel' + { + lv_topLevel_0_0=(Token)match(input,26,FOLLOW_21); + + newLeafNode(lv_topLevel_0_0, grammarAccess.getMappingDefinitionAccess().getTopLevelToplevelKeyword_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getMappingDefinitionRule()); + } + setWithLastConsumed(current, "topLevel", true, "toplevel"); + + + } + + + } + break; + + } + + otherlv_1=(Token)match(input,27,FOLLOW_3); + + newLeafNode(otherlv_1, grammarAccess.getMappingDefinitionAccess().getMappingKeyword_1()); + + // InternalCftLanguage.g:773:3: ( ( ruleQualifiedName ) ) + // InternalCftLanguage.g:774:4: ( ruleQualifiedName ) + { + // InternalCftLanguage.g:774:4: ( ruleQualifiedName ) + // InternalCftLanguage.g:775:5: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getMappingDefinitionRule()); + } + + + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getPatternPatternCrossReference_2_0()); + + pushFollow(FOLLOW_22); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + otherlv_3=(Token)match(input,28,FOLLOW_3); + + newLeafNode(otherlv_3, grammarAccess.getMappingDefinitionAccess().getLeftParenthesisKeyword_3()); + + // InternalCftLanguage.g:793:3: ( (lv_parameters_4_0= ruleMappingParameter ) ) + // InternalCftLanguage.g:794:4: (lv_parameters_4_0= ruleMappingParameter ) + { + // InternalCftLanguage.g:794:4: (lv_parameters_4_0= ruleMappingParameter ) + // InternalCftLanguage.g:795:5: lv_parameters_4_0= ruleMappingParameter + { + + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getParametersMappingParameterParserRuleCall_4_0()); + + pushFollow(FOLLOW_23); + lv_parameters_4_0=ruleMappingParameter(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + add( + current, + "parameters", + lv_parameters_4_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingParameter"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalCftLanguage.g:812:3: (otherlv_5= ',' ( (lv_parameters_6_0= ruleMappingParameter ) ) )* + loop16: + do { + int alt16=2; + int LA16_0 = input.LA(1); + + if ( (LA16_0==29) ) { + alt16=1; + } + + + switch (alt16) { + case 1 : + // InternalCftLanguage.g:813:4: otherlv_5= ',' ( (lv_parameters_6_0= ruleMappingParameter ) ) + { + otherlv_5=(Token)match(input,29,FOLLOW_3); + + newLeafNode(otherlv_5, grammarAccess.getMappingDefinitionAccess().getCommaKeyword_5_0()); + + // InternalCftLanguage.g:817:4: ( (lv_parameters_6_0= ruleMappingParameter ) ) + // InternalCftLanguage.g:818:5: (lv_parameters_6_0= ruleMappingParameter ) + { + // InternalCftLanguage.g:818:5: (lv_parameters_6_0= ruleMappingParameter ) + // InternalCftLanguage.g:819:6: lv_parameters_6_0= ruleMappingParameter + { + + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getParametersMappingParameterParserRuleCall_5_1_0()); + + pushFollow(FOLLOW_23); + lv_parameters_6_0=ruleMappingParameter(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + add( + current, + "parameters", + lv_parameters_6_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingParameter"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop16; + } + } while (true); + + otherlv_7=(Token)match(input,30,FOLLOW_24); + + newLeafNode(otherlv_7, grammarAccess.getMappingDefinitionAccess().getRightParenthesisKeyword_6()); + + // InternalCftLanguage.g:841:3: ( (lv_componentInstance_8_0= ruleComponentInstance ) )? + int alt17=2; + int LA17_0 = input.LA(1); + + if ( (LA17_0==36) ) { + alt17=1; + } + switch (alt17) { + case 1 : + // InternalCftLanguage.g:842:4: (lv_componentInstance_8_0= ruleComponentInstance ) + { + // InternalCftLanguage.g:842:4: (lv_componentInstance_8_0= ruleComponentInstance ) + // InternalCftLanguage.g:843:5: lv_componentInstance_8_0= ruleComponentInstance + { + + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getComponentInstanceComponentInstanceParserRuleCall_7_0()); + + pushFollow(FOLLOW_25); + lv_componentInstance_8_0=ruleComponentInstance(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + set( + current, + "componentInstance", + lv_componentInstance_8_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ComponentInstance"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + } + + // InternalCftLanguage.g:860:3: (otherlv_9= '{' ( ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) otherlv_12= ';' )* otherlv_13= '}' )? + int alt20=2; + int LA20_0 = input.LA(1); + + if ( (LA20_0==16) ) { + alt20=1; + } + switch (alt20) { + case 1 : + // InternalCftLanguage.g:861:4: otherlv_9= '{' ( ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) otherlv_12= ';' )* otherlv_13= '}' + { + otherlv_9=(Token)match(input,16,FOLLOW_26); + + newLeafNode(otherlv_9, grammarAccess.getMappingDefinitionAccess().getLeftCurlyBracketKeyword_8_0()); + + // InternalCftLanguage.g:865:4: ( ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) otherlv_12= ';' )* + loop19: + do { + int alt19=2; + int LA19_0 = input.LA(1); + + if ( (LA19_0==RULE_ID||LA19_0==31) ) { + alt19=1; + } + + + switch (alt19) { + case 1 : + // InternalCftLanguage.g:866:5: ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) otherlv_12= ';' + { + // InternalCftLanguage.g:866:5: ( ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) | ( (lv_assignments_11_0= ruleAssignment ) ) ) + int alt18=2; + int LA18_0 = input.LA(1); + + if ( (LA18_0==31) ) { + alt18=1; + } + else if ( (LA18_0==RULE_ID) ) { + alt18=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 18, 0, input); + + throw nvae; + } + switch (alt18) { + case 1 : + // InternalCftLanguage.g:867:6: ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) + { + // InternalCftLanguage.g:867:6: ( (lv_lookupDefinitions_10_0= ruleLookupDefinition ) ) + // InternalCftLanguage.g:868:7: (lv_lookupDefinitions_10_0= ruleLookupDefinition ) + { + // InternalCftLanguage.g:868:7: (lv_lookupDefinitions_10_0= ruleLookupDefinition ) + // InternalCftLanguage.g:869:8: lv_lookupDefinitions_10_0= ruleLookupDefinition + { + + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getLookupDefinitionsLookupDefinitionParserRuleCall_8_1_0_0_0()); + + pushFollow(FOLLOW_11); + lv_lookupDefinitions_10_0=ruleLookupDefinition(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + add( + current, + "lookupDefinitions", + lv_lookupDefinitions_10_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.LookupDefinition"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + case 2 : + // InternalCftLanguage.g:887:6: ( (lv_assignments_11_0= ruleAssignment ) ) + { + // InternalCftLanguage.g:887:6: ( (lv_assignments_11_0= ruleAssignment ) ) + // InternalCftLanguage.g:888:7: (lv_assignments_11_0= ruleAssignment ) + { + // InternalCftLanguage.g:888:7: (lv_assignments_11_0= ruleAssignment ) + // InternalCftLanguage.g:889:8: lv_assignments_11_0= ruleAssignment + { + + newCompositeNode(grammarAccess.getMappingDefinitionAccess().getAssignmentsAssignmentParserRuleCall_8_1_0_1_0()); + + pushFollow(FOLLOW_11); + lv_assignments_11_0=ruleAssignment(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); + } + add( + current, + "assignments", + lv_assignments_11_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.Assignment"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + } + + otherlv_12=(Token)match(input,13,FOLLOW_26); + + newLeafNode(otherlv_12, grammarAccess.getMappingDefinitionAccess().getSemicolonKeyword_8_1_1()); + + + } + break; + + default : + break loop19; + } + } while (true); + + otherlv_13=(Token)match(input,19,FOLLOW_2); + + newLeafNode(otherlv_13, grammarAccess.getMappingDefinitionAccess().getRightCurlyBracketKeyword_8_2()); + + + } + break; + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleMappingDefinition" + + + // $ANTLR start "entryRuleMappingParameter" + // InternalCftLanguage.g:921:1: entryRuleMappingParameter returns [EObject current=null] : iv_ruleMappingParameter= ruleMappingParameter EOF ; + public final EObject entryRuleMappingParameter() throws RecognitionException { + EObject current = null; + + EObject iv_ruleMappingParameter = null; + + + try { + // InternalCftLanguage.g:921:57: (iv_ruleMappingParameter= ruleMappingParameter EOF ) + // InternalCftLanguage.g:922:2: iv_ruleMappingParameter= ruleMappingParameter EOF + { + newCompositeNode(grammarAccess.getMappingParameterRule()); + pushFollow(FOLLOW_1); + iv_ruleMappingParameter=ruleMappingParameter(); + + state._fsp--; + + current =iv_ruleMappingParameter; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleMappingParameter" + + + // $ANTLR start "ruleMappingParameter" + // InternalCftLanguage.g:928:1: ruleMappingParameter returns [EObject current=null] : ( (lv_name_0_0= RULE_ID ) ) ; + public final EObject ruleMappingParameter() throws RecognitionException { + EObject current = null; + + Token lv_name_0_0=null; + + + enterRule(); + + try { + // InternalCftLanguage.g:934:2: ( ( (lv_name_0_0= RULE_ID ) ) ) + // InternalCftLanguage.g:935:2: ( (lv_name_0_0= RULE_ID ) ) + { + // InternalCftLanguage.g:935:2: ( (lv_name_0_0= RULE_ID ) ) + // InternalCftLanguage.g:936:3: (lv_name_0_0= RULE_ID ) + { + // InternalCftLanguage.g:936:3: (lv_name_0_0= RULE_ID ) + // InternalCftLanguage.g:937:4: lv_name_0_0= RULE_ID + { + lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_2); + + newLeafNode(lv_name_0_0, grammarAccess.getMappingParameterAccess().getNameIDTerminalRuleCall_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getMappingParameterRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_0_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleMappingParameter" + + + // $ANTLR start "entryRuleLookupDefinition" + // InternalCftLanguage.g:956:1: entryRuleLookupDefinition returns [EObject current=null] : iv_ruleLookupDefinition= ruleLookupDefinition EOF ; + public final EObject entryRuleLookupDefinition() throws RecognitionException { + EObject current = null; + + EObject iv_ruleLookupDefinition = null; + + + try { + // InternalCftLanguage.g:956:57: (iv_ruleLookupDefinition= ruleLookupDefinition EOF ) + // InternalCftLanguage.g:957:2: iv_ruleLookupDefinition= ruleLookupDefinition EOF + { + newCompositeNode(grammarAccess.getLookupDefinitionRule()); + pushFollow(FOLLOW_1); + iv_ruleLookupDefinition=ruleLookupDefinition(); + + state._fsp--; + + current =iv_ruleLookupDefinition; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleLookupDefinition" + + + // $ANTLR start "ruleLookupDefinition" + // InternalCftLanguage.g:963:1: ruleLookupDefinition returns [EObject current=null] : (otherlv_0= 'lookup' ( (otherlv_1= RULE_ID ) ) otherlv_2= '(' ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* otherlv_6= ')' otherlv_7= 'as' ( (lv_name_8_0= RULE_ID ) ) ) ; + public final EObject ruleLookupDefinition() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token otherlv_1=null; + Token otherlv_2=null; + Token otherlv_3=null; + Token otherlv_4=null; + Token otherlv_5=null; + Token otherlv_6=null; + Token otherlv_7=null; + Token lv_name_8_0=null; + + + enterRule(); + + try { + // InternalCftLanguage.g:969:2: ( (otherlv_0= 'lookup' ( (otherlv_1= RULE_ID ) ) otherlv_2= '(' ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* otherlv_6= ')' otherlv_7= 'as' ( (lv_name_8_0= RULE_ID ) ) ) ) + // InternalCftLanguage.g:970:2: (otherlv_0= 'lookup' ( (otherlv_1= RULE_ID ) ) otherlv_2= '(' ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* otherlv_6= ')' otherlv_7= 'as' ( (lv_name_8_0= RULE_ID ) ) ) + { + // InternalCftLanguage.g:970:2: (otherlv_0= 'lookup' ( (otherlv_1= RULE_ID ) ) otherlv_2= '(' ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* otherlv_6= ')' otherlv_7= 'as' ( (lv_name_8_0= RULE_ID ) ) ) + // InternalCftLanguage.g:971:3: otherlv_0= 'lookup' ( (otherlv_1= RULE_ID ) ) otherlv_2= '(' ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* otherlv_6= ')' otherlv_7= 'as' ( (lv_name_8_0= RULE_ID ) ) + { + otherlv_0=(Token)match(input,31,FOLLOW_3); + + newLeafNode(otherlv_0, grammarAccess.getLookupDefinitionAccess().getLookupKeyword_0()); + + // InternalCftLanguage.g:975:3: ( (otherlv_1= RULE_ID ) ) + // InternalCftLanguage.g:976:4: (otherlv_1= RULE_ID ) + { + // InternalCftLanguage.g:976:4: (otherlv_1= RULE_ID ) + // InternalCftLanguage.g:977:5: otherlv_1= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getLookupDefinitionRule()); + } + + otherlv_1=(Token)match(input,RULE_ID,FOLLOW_22); + + newLeafNode(otherlv_1, grammarAccess.getLookupDefinitionAccess().getMappingMappingDefinitionCrossReference_1_0()); + + + } + + + } + + otherlv_2=(Token)match(input,28,FOLLOW_3); + + newLeafNode(otherlv_2, grammarAccess.getLookupDefinitionAccess().getLeftParenthesisKeyword_2()); + + // InternalCftLanguage.g:992:3: ( (otherlv_3= RULE_ID ) ) + // InternalCftLanguage.g:993:4: (otherlv_3= RULE_ID ) + { + // InternalCftLanguage.g:993:4: (otherlv_3= RULE_ID ) + // InternalCftLanguage.g:994:5: otherlv_3= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getLookupDefinitionRule()); + } + + otherlv_3=(Token)match(input,RULE_ID,FOLLOW_23); + + newLeafNode(otherlv_3, grammarAccess.getLookupDefinitionAccess().getArgumentsMappingParameterCrossReference_3_0()); + + + } + + + } + + // InternalCftLanguage.g:1005:3: (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* + loop21: + do { + int alt21=2; + int LA21_0 = input.LA(1); + + if ( (LA21_0==29) ) { + alt21=1; + } + + + switch (alt21) { + case 1 : + // InternalCftLanguage.g:1006:4: otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) + { + otherlv_4=(Token)match(input,29,FOLLOW_3); + + newLeafNode(otherlv_4, grammarAccess.getLookupDefinitionAccess().getCommaKeyword_4_0()); + + // InternalCftLanguage.g:1010:4: ( (otherlv_5= RULE_ID ) ) + // InternalCftLanguage.g:1011:5: (otherlv_5= RULE_ID ) + { + // InternalCftLanguage.g:1011:5: (otherlv_5= RULE_ID ) + // InternalCftLanguage.g:1012:6: otherlv_5= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getLookupDefinitionRule()); + } + + otherlv_5=(Token)match(input,RULE_ID,FOLLOW_23); + + newLeafNode(otherlv_5, grammarAccess.getLookupDefinitionAccess().getArgumentsMappingParameterCrossReference_4_1_0()); + + + } + + + } + + + } + break; + + default : + break loop21; + } + } while (true); + + otherlv_6=(Token)match(input,30,FOLLOW_27); + + newLeafNode(otherlv_6, grammarAccess.getLookupDefinitionAccess().getRightParenthesisKeyword_5()); + + otherlv_7=(Token)match(input,32,FOLLOW_3); + + newLeafNode(otherlv_7, grammarAccess.getLookupDefinitionAccess().getAsKeyword_6()); + + // InternalCftLanguage.g:1032:3: ( (lv_name_8_0= RULE_ID ) ) + // InternalCftLanguage.g:1033:4: (lv_name_8_0= RULE_ID ) + { + // InternalCftLanguage.g:1033:4: (lv_name_8_0= RULE_ID ) + // InternalCftLanguage.g:1034:5: lv_name_8_0= RULE_ID + { + lv_name_8_0=(Token)match(input,RULE_ID,FOLLOW_2); + + newLeafNode(lv_name_8_0, grammarAccess.getLookupDefinitionAccess().getNameIDTerminalRuleCall_7_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getLookupDefinitionRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_8_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleLookupDefinition" + + + // $ANTLR start "entryRuleAssignment" + // InternalCftLanguage.g:1054:1: entryRuleAssignment returns [EObject current=null] : iv_ruleAssignment= ruleAssignment EOF ; + public final EObject entryRuleAssignment() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAssignment = null; + + + try { + // InternalCftLanguage.g:1054:51: (iv_ruleAssignment= ruleAssignment EOF ) + // InternalCftLanguage.g:1055:2: iv_ruleAssignment= ruleAssignment EOF + { + newCompositeNode(grammarAccess.getAssignmentRule()); + pushFollow(FOLLOW_1); + iv_ruleAssignment=ruleAssignment(); + + state._fsp--; + + current =iv_ruleAssignment; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAssignment" + + + // $ANTLR start "ruleAssignment" + // InternalCftLanguage.g:1061:1: ruleAssignment returns [EObject current=null] : ( ( (lv_input_0_0= ruleEventReference ) ) ( ( (lv_multiple_1_0= '+=' ) ) | otherlv_2= ':=' ) ( (lv_output_3_0= ruleEventReference ) ) ) ; + public final EObject ruleAssignment() throws RecognitionException { + EObject current = null; + + Token lv_multiple_1_0=null; + Token otherlv_2=null; + EObject lv_input_0_0 = null; + + EObject lv_output_3_0 = null; + + + + enterRule(); + + try { + // InternalCftLanguage.g:1067:2: ( ( ( (lv_input_0_0= ruleEventReference ) ) ( ( (lv_multiple_1_0= '+=' ) ) | otherlv_2= ':=' ) ( (lv_output_3_0= ruleEventReference ) ) ) ) + // InternalCftLanguage.g:1068:2: ( ( (lv_input_0_0= ruleEventReference ) ) ( ( (lv_multiple_1_0= '+=' ) ) | otherlv_2= ':=' ) ( (lv_output_3_0= ruleEventReference ) ) ) + { + // InternalCftLanguage.g:1068:2: ( ( (lv_input_0_0= ruleEventReference ) ) ( ( (lv_multiple_1_0= '+=' ) ) | otherlv_2= ':=' ) ( (lv_output_3_0= ruleEventReference ) ) ) + // InternalCftLanguage.g:1069:3: ( (lv_input_0_0= ruleEventReference ) ) ( ( (lv_multiple_1_0= '+=' ) ) | otherlv_2= ':=' ) ( (lv_output_3_0= ruleEventReference ) ) + { + // InternalCftLanguage.g:1069:3: ( (lv_input_0_0= ruleEventReference ) ) + // InternalCftLanguage.g:1070:4: (lv_input_0_0= ruleEventReference ) + { + // InternalCftLanguage.g:1070:4: (lv_input_0_0= ruleEventReference ) + // InternalCftLanguage.g:1071:5: lv_input_0_0= ruleEventReference + { + + newCompositeNode(grammarAccess.getAssignmentAccess().getInputEventReferenceParserRuleCall_0_0()); + + pushFollow(FOLLOW_28); + lv_input_0_0=ruleEventReference(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAssignmentRule()); + } + set( + current, + "input", + lv_input_0_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventReference"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalCftLanguage.g:1088:3: ( ( (lv_multiple_1_0= '+=' ) ) | otherlv_2= ':=' ) + int alt22=2; + int LA22_0 = input.LA(1); + + if ( (LA22_0==33) ) { + alt22=1; + } + else if ( (LA22_0==34) ) { + alt22=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 22, 0, input); + + throw nvae; + } + switch (alt22) { + case 1 : + // InternalCftLanguage.g:1089:4: ( (lv_multiple_1_0= '+=' ) ) + { + // InternalCftLanguage.g:1089:4: ( (lv_multiple_1_0= '+=' ) ) + // InternalCftLanguage.g:1090:5: (lv_multiple_1_0= '+=' ) + { + // InternalCftLanguage.g:1090:5: (lv_multiple_1_0= '+=' ) + // InternalCftLanguage.g:1091:6: lv_multiple_1_0= '+=' + { + lv_multiple_1_0=(Token)match(input,33,FOLLOW_29); + + newLeafNode(lv_multiple_1_0, grammarAccess.getAssignmentAccess().getMultiplePlusSignEqualsSignKeyword_1_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getAssignmentRule()); + } + setWithLastConsumed(current, "multiple", true, "+="); + + + } + + + } + + + } + break; + case 2 : + // InternalCftLanguage.g:1104:4: otherlv_2= ':=' + { + otherlv_2=(Token)match(input,34,FOLLOW_29); + + newLeafNode(otherlv_2, grammarAccess.getAssignmentAccess().getColonEqualsSignKeyword_1_1()); + + + } + break; + + } + + // InternalCftLanguage.g:1109:3: ( (lv_output_3_0= ruleEventReference ) ) + // InternalCftLanguage.g:1110:4: (lv_output_3_0= ruleEventReference ) + { + // InternalCftLanguage.g:1110:4: (lv_output_3_0= ruleEventReference ) + // InternalCftLanguage.g:1111:5: lv_output_3_0= ruleEventReference + { + + newCompositeNode(grammarAccess.getAssignmentAccess().getOutputEventReferenceParserRuleCall_2_0()); + + pushFollow(FOLLOW_2); + lv_output_3_0=ruleEventReference(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAssignmentRule()); + } + set( + current, + "output", + lv_output_3_0, + "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventReference"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAssignment" + + + // $ANTLR start "entryRuleEventReference" + // InternalCftLanguage.g:1132:1: entryRuleEventReference returns [EObject current=null] : iv_ruleEventReference= ruleEventReference EOF ; + public final EObject entryRuleEventReference() throws RecognitionException { + EObject current = null; + + EObject iv_ruleEventReference = null; + + + try { + // InternalCftLanguage.g:1132:55: (iv_ruleEventReference= ruleEventReference EOF ) + // InternalCftLanguage.g:1133:2: iv_ruleEventReference= ruleEventReference EOF + { + newCompositeNode(grammarAccess.getEventReferenceRule()); + pushFollow(FOLLOW_1); + iv_ruleEventReference=ruleEventReference(); + + state._fsp--; + + current =iv_ruleEventReference; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleEventReference" + + + // $ANTLR start "ruleEventReference" + // InternalCftLanguage.g:1139:1: ruleEventReference returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (otherlv_2= RULE_ID ) ) ) ; + public final EObject ruleEventReference() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token otherlv_1=null; + Token otherlv_2=null; + + + enterRule(); + + try { + // InternalCftLanguage.g:1145:2: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (otherlv_2= RULE_ID ) ) ) ) + // InternalCftLanguage.g:1146:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (otherlv_2= RULE_ID ) ) ) + { + // InternalCftLanguage.g:1146:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (otherlv_2= RULE_ID ) ) ) + // InternalCftLanguage.g:1147:3: ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (otherlv_2= RULE_ID ) ) + { + // InternalCftLanguage.g:1147:3: ( (otherlv_0= RULE_ID ) ) + // InternalCftLanguage.g:1148:4: (otherlv_0= RULE_ID ) + { + // InternalCftLanguage.g:1148:4: (otherlv_0= RULE_ID ) + // InternalCftLanguage.g:1149:5: otherlv_0= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getEventReferenceRule()); + } + + otherlv_0=(Token)match(input,RULE_ID,FOLLOW_30); + + newLeafNode(otherlv_0, grammarAccess.getEventReferenceAccess().getComponentVariableCrossReference_0_0()); + + + } + + + } + + otherlv_1=(Token)match(input,35,FOLLOW_3); + + newLeafNode(otherlv_1, grammarAccess.getEventReferenceAccess().getFullStopKeyword_1()); + + // InternalCftLanguage.g:1164:3: ( (otherlv_2= RULE_ID ) ) + // InternalCftLanguage.g:1165:4: (otherlv_2= RULE_ID ) + { + // InternalCftLanguage.g:1165:4: (otherlv_2= RULE_ID ) + // InternalCftLanguage.g:1166:5: otherlv_2= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getEventReferenceRule()); + } + + otherlv_2=(Token)match(input,RULE_ID,FOLLOW_2); + + newLeafNode(otherlv_2, grammarAccess.getEventReferenceAccess().getEventEventDeclarationCrossReference_2_0()); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleEventReference" + + + // $ANTLR start "entryRuleComponentInstance" + // InternalCftLanguage.g:1181:1: entryRuleComponentInstance returns [EObject current=null] : iv_ruleComponentInstance= ruleComponentInstance EOF ; + public final EObject entryRuleComponentInstance() throws RecognitionException { + EObject current = null; + + EObject iv_ruleComponentInstance = null; + + + try { + // InternalCftLanguage.g:1181:58: (iv_ruleComponentInstance= ruleComponentInstance EOF ) + // InternalCftLanguage.g:1182:2: iv_ruleComponentInstance= ruleComponentInstance EOF + { + newCompositeNode(grammarAccess.getComponentInstanceRule()); + pushFollow(FOLLOW_1); + iv_ruleComponentInstance=ruleComponentInstance(); + + state._fsp--; + + current =iv_ruleComponentInstance; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleComponentInstance" + + + // $ANTLR start "ruleComponentInstance" + // InternalCftLanguage.g:1188:1: ruleComponentInstance returns [EObject current=null] : (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )? ) ; + public final EObject ruleComponentInstance() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_name_2_0=null; + + + enterRule(); + + try { + // InternalCftLanguage.g:1194:2: ( (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )? ) ) + // InternalCftLanguage.g:1195:2: (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )? ) + { + // InternalCftLanguage.g:1195:2: (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )? ) + // InternalCftLanguage.g:1196:3: otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )? + { + otherlv_0=(Token)match(input,36,FOLLOW_3); + + newLeafNode(otherlv_0, grammarAccess.getComponentInstanceAccess().getEqualsSignGreaterThanSignKeyword_0()); + + // InternalCftLanguage.g:1200:3: ( ( ruleQualifiedName ) ) + // InternalCftLanguage.g:1201:4: ( ruleQualifiedName ) + { + // InternalCftLanguage.g:1201:4: ( ruleQualifiedName ) + // InternalCftLanguage.g:1202:5: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getComponentInstanceRule()); + } + + + newCompositeNode(grammarAccess.getComponentInstanceAccess().getComponentTypeComponentDefinitionCrossReference_1_0()); + + pushFollow(FOLLOW_18); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalCftLanguage.g:1216:3: ( (lv_name_2_0= RULE_ID ) )? + int alt23=2; + int LA23_0 = input.LA(1); + + if ( (LA23_0==RULE_ID) ) { + alt23=1; + } + switch (alt23) { + case 1 : + // InternalCftLanguage.g:1217:4: (lv_name_2_0= RULE_ID ) + { + // InternalCftLanguage.g:1217:4: (lv_name_2_0= RULE_ID ) + // InternalCftLanguage.g:1218:5: lv_name_2_0= RULE_ID + { + lv_name_2_0=(Token)match(input,RULE_ID,FOLLOW_2); + + newLeafNode(lv_name_2_0, grammarAccess.getComponentInstanceAccess().getNameIDTerminalRuleCall_2_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getComponentInstanceRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_2_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + break; + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleComponentInstance" + + + // $ANTLR start "entryRuleQualifiedName" + // InternalCftLanguage.g:1238:1: entryRuleQualifiedName returns [String current=null] : iv_ruleQualifiedName= ruleQualifiedName EOF ; + public final String entryRuleQualifiedName() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleQualifiedName = null; + + + try { + // InternalCftLanguage.g:1238:53: (iv_ruleQualifiedName= ruleQualifiedName EOF ) + // InternalCftLanguage.g:1239:2: iv_ruleQualifiedName= ruleQualifiedName EOF + { + newCompositeNode(grammarAccess.getQualifiedNameRule()); + pushFollow(FOLLOW_1); + iv_ruleQualifiedName=ruleQualifiedName(); + + state._fsp--; + + current =iv_ruleQualifiedName.getText(); + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleQualifiedName" + + + // $ANTLR start "ruleQualifiedName" + // InternalCftLanguage.g:1245:1: ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) ; + public final AntlrDatatypeRuleToken ruleQualifiedName() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_ID_0=null; + Token kw=null; + Token this_ID_2=null; + + + enterRule(); + + try { + // InternalCftLanguage.g:1251:2: ( (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) ) + // InternalCftLanguage.g:1252:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) + { + // InternalCftLanguage.g:1252:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) + // InternalCftLanguage.g:1253:3: this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* + { + this_ID_0=(Token)match(input,RULE_ID,FOLLOW_31); + + current.merge(this_ID_0); + + + newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); + + // InternalCftLanguage.g:1260:3: (kw= '.' this_ID_2= RULE_ID )* + loop24: + do { + int alt24=2; + int LA24_0 = input.LA(1); + + if ( (LA24_0==35) ) { + int LA24_2 = input.LA(2); + + if ( (LA24_2==RULE_ID) ) { + alt24=1; + } + + + } + + + switch (alt24) { + case 1 : + // InternalCftLanguage.g:1261:4: kw= '.' this_ID_2= RULE_ID + { + kw=(Token)match(input,35,FOLLOW_3); + + current.merge(kw); + newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getFullStopKeyword_1_0()); + + this_ID_2=(Token)match(input,RULE_ID,FOLLOW_31); + + current.merge(this_ID_2); + + + newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); + + + } + break; + + default : + break loop24; + } + } while (true); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleQualifiedName" + + + // $ANTLR start "entryRuleQualifiedNameWithWildcard" + // InternalCftLanguage.g:1278:1: entryRuleQualifiedNameWithWildcard returns [String current=null] : iv_ruleQualifiedNameWithWildcard= ruleQualifiedNameWithWildcard EOF ; + public final String entryRuleQualifiedNameWithWildcard() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleQualifiedNameWithWildcard = null; + + + try { + // InternalCftLanguage.g:1278:65: (iv_ruleQualifiedNameWithWildcard= ruleQualifiedNameWithWildcard EOF ) + // InternalCftLanguage.g:1279:2: iv_ruleQualifiedNameWithWildcard= ruleQualifiedNameWithWildcard EOF + { + newCompositeNode(grammarAccess.getQualifiedNameWithWildcardRule()); + pushFollow(FOLLOW_1); + iv_ruleQualifiedNameWithWildcard=ruleQualifiedNameWithWildcard(); + + state._fsp--; + + current =iv_ruleQualifiedNameWithWildcard.getText(); + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleQualifiedNameWithWildcard" + + + // $ANTLR start "ruleQualifiedNameWithWildcard" + // InternalCftLanguage.g:1285:1: ruleQualifiedNameWithWildcard returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? ) ; + public final AntlrDatatypeRuleToken ruleQualifiedNameWithWildcard() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token kw=null; + AntlrDatatypeRuleToken this_QualifiedName_0 = null; + + + + enterRule(); + + try { + // InternalCftLanguage.g:1291:2: ( (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? ) ) + // InternalCftLanguage.g:1292:2: (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? ) + { + // InternalCftLanguage.g:1292:2: (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? ) + // InternalCftLanguage.g:1293:3: this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? + { + + newCompositeNode(grammarAccess.getQualifiedNameWithWildcardAccess().getQualifiedNameParserRuleCall_0()); + + pushFollow(FOLLOW_31); + this_QualifiedName_0=ruleQualifiedName(); + + state._fsp--; + + + current.merge(this_QualifiedName_0); + + + afterParserOrEnumRuleCall(); + + // InternalCftLanguage.g:1303:3: (kw= '.' kw= '*' )? + int alt25=2; + int LA25_0 = input.LA(1); + + if ( (LA25_0==35) ) { + alt25=1; + } + switch (alt25) { + case 1 : + // InternalCftLanguage.g:1304:4: kw= '.' kw= '*' + { + kw=(Token)match(input,35,FOLLOW_32); + + current.merge(kw); + newLeafNode(kw, grammarAccess.getQualifiedNameWithWildcardAccess().getFullStopKeyword_1_0()); + + kw=(Token)match(input,37,FOLLOW_2); + + current.merge(kw); + newLeafNode(kw, grammarAccess.getQualifiedNameWithWildcardAccess().getAsteriskKeyword_1_1()); + + + } + break; + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleQualifiedNameWithWildcard" + + // Delegated rules + + + + + public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000000000010L}); + public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x000000000200E002L}); + public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x000000000200C002L}); + public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000002008002L}); + public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000002002L}); + public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000010000L}); + public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x00000000000E0010L}); + public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000002010L}); + public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000000000002000L}); + public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000080010L}); + public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000100002L}); + public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000000400000L}); + public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000000000020L}); + public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000000800000L}); + public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000000000012L}); + public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000001000000L}); + public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x000000000C080000L}); + public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000008000000L}); + public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x0000000010000000L}); + public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000000060000000L}); + public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x0000001000010002L}); + public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x0000000000010002L}); + public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000000080080010L}); + public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x0000000100000000L}); + public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0000000600000000L}); + public static final BitSet FOLLOW_29 = new BitSet(new long[]{0x0000000080000010L}); + public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x0000000800000000L}); + public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000000800000002L}); + public static final BitSet FOLLOW_32 = new BitSet(new long[]{0x0000002000000000L}); + +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/AbstractCftLanguageScopeProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/AbstractCftLanguageScopeProvider.java new file mode 100644 index 00000000..def0ebe9 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/AbstractCftLanguageScopeProvider.java @@ -0,0 +1,9 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.scoping; + +import org.eclipse.xtext.scoping.impl.DelegatingScopeProvider; + +public abstract class AbstractCftLanguageScopeProvider extends DelegatingScopeProvider { +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java new file mode 100644 index 00000000..18682f69 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java @@ -0,0 +1,315 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.serializer; + +import com.google.inject.Inject; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.AndGate; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.BasicEventDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ImportDeclaration; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.InputEvent; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.OrGate; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.services.CftLanguageGrammarAccess; +import java.util.Set; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.xtext.Action; +import org.eclipse.xtext.Parameter; +import org.eclipse.xtext.ParserRule; +import org.eclipse.xtext.serializer.ISerializationContext; +import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; +import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer; +import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient; + +@SuppressWarnings("all") +public class CftLanguageSemanticSequencer extends AbstractDelegatingSemanticSequencer { + + @Inject + private CftLanguageGrammarAccess grammarAccess; + + @Override + public void sequence(ISerializationContext context, EObject semanticObject) { + EPackage epackage = semanticObject.eClass().getEPackage(); + ParserRule rule = context.getParserRule(); + Action action = context.getAssignedAction(); + Set parameters = context.getEnabledBooleanParameters(); + if (epackage == CftLanguagePackage.eINSTANCE) + switch (semanticObject.eClass().getClassifierID()) { + case CftLanguagePackage.AND_GATE: + sequence_AndGate(context, (AndGate) semanticObject); + return; + case CftLanguagePackage.ASSIGNMENT: + sequence_Assignment(context, (Assignment) semanticObject); + return; + case CftLanguagePackage.BASIC_EVENT_DEFINITION: + sequence_BasicEventDefinition(context, (BasicEventDefinition) semanticObject); + return; + case CftLanguagePackage.CFT_MODEL: + sequence_CftModel(context, (CftModel) semanticObject); + return; + case CftLanguagePackage.COMPONENT_DEFINITION: + sequence_ComponentDefinition(context, (ComponentDefinition) semanticObject); + return; + case CftLanguagePackage.COMPONENT_INSTANCE: + sequence_ComponentInstance(context, (ComponentInstance) semanticObject); + return; + case CftLanguagePackage.EVENT_REFERENCE: + sequence_EventReference(context, (EventReference) semanticObject); + return; + case CftLanguagePackage.IMPORT_DECLARATION: + sequence_ImportDeclaration(context, (ImportDeclaration) semanticObject); + return; + case CftLanguagePackage.INPUT_EVENT: + sequence_InputEvent(context, (InputEvent) semanticObject); + return; + case CftLanguagePackage.LOOKUP_DEFINITION: + sequence_LookupDefinition(context, (LookupDefinition) semanticObject); + return; + case CftLanguagePackage.MAPPING_DEFINITION: + sequence_MappingDefinition(context, (MappingDefinition) semanticObject); + return; + case CftLanguagePackage.MAPPING_PARAMETER: + sequence_MappingParameter(context, (MappingParameter) semanticObject); + return; + case CftLanguagePackage.OR_GATE: + sequence_OrGate(context, (OrGate) semanticObject); + return; + case CftLanguagePackage.TRANSFORMATION_DEFINITION: + sequence_TransformationDefinition(context, (TransformationDefinition) semanticObject); + return; + } + if (errorAcceptor != null) + errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context)); + } + + /** + * Contexts: + * EventDeclaration returns AndGate + * EventDefinition returns AndGate + * GateDefinition returns AndGate + * AndGate returns AndGate + * + * Constraint: + * (name=ID inputEvents+=[EventDeclaration|ID]*) + */ + protected void sequence_AndGate(ISerializationContext context, AndGate semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Assignment returns Assignment + * + * Constraint: + * (input=EventReference multiple?='+='? output=EventReference) + */ + protected void sequence_Assignment(ISerializationContext context, Assignment semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * EventDeclaration returns BasicEventDefinition + * EventDefinition returns BasicEventDefinition + * BasicEventDefinition returns BasicEventDefinition + * + * Constraint: + * (name=ID rate=DOULBE) + */ + protected void sequence_BasicEventDefinition(ISerializationContext context, BasicEventDefinition semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, CftLanguagePackage.Literals.EVENT_DECLARATION__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CftLanguagePackage.Literals.EVENT_DECLARATION__NAME)); + if (transientValues.isValueTransient(semanticObject, CftLanguagePackage.Literals.BASIC_EVENT_DEFINITION__RATE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CftLanguagePackage.Literals.BASIC_EVENT_DEFINITION__RATE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getBasicEventDefinitionAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName()); + feeder.accept(grammarAccess.getBasicEventDefinitionAccess().getRateDOULBETerminalRuleCall_3_0(), semanticObject.getRate()); + feeder.finish(); + } + + + /** + * Contexts: + * CftModel returns CftModel + * + * Constraint: + * ( + * packageName=QualifiedName + * imports+=ImportDeclaration* + * (componentDefinitions+=ComponentDefinition | transformationDefinitions+=TransformationDefinition)* + * ) + */ + protected void sequence_CftModel(ISerializationContext context, CftModel semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * ComponentDefinition returns ComponentDefinition + * + * Constraint: + * (name=ID (inputEvents+=InputEvent | outputEvents+=[EventDeclaration|ID])* eventDefinitions+=EventDefinition*) + */ + protected void sequence_ComponentDefinition(ISerializationContext context, ComponentDefinition semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Variable returns ComponentInstance + * ComponentInstance returns ComponentInstance + * + * Constraint: + * (componentType=[ComponentDefinition|QualifiedName] name=ID?) + */ + protected void sequence_ComponentInstance(ISerializationContext context, ComponentInstance semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * EventReference returns EventReference + * + * Constraint: + * (component=[Variable|ID] event=[EventDeclaration|ID]) + */ + protected void sequence_EventReference(ISerializationContext context, EventReference semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, CftLanguagePackage.Literals.EVENT_REFERENCE__COMPONENT) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CftLanguagePackage.Literals.EVENT_REFERENCE__COMPONENT)); + if (transientValues.isValueTransient(semanticObject, CftLanguagePackage.Literals.EVENT_REFERENCE__EVENT) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CftLanguagePackage.Literals.EVENT_REFERENCE__EVENT)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getEventReferenceAccess().getComponentVariableIDTerminalRuleCall_0_0_1(), semanticObject.eGet(CftLanguagePackage.Literals.EVENT_REFERENCE__COMPONENT, false)); + feeder.accept(grammarAccess.getEventReferenceAccess().getEventEventDeclarationIDTerminalRuleCall_2_0_1(), semanticObject.eGet(CftLanguagePackage.Literals.EVENT_REFERENCE__EVENT, false)); + feeder.finish(); + } + + + /** + * Contexts: + * ImportDeclaration returns ImportDeclaration + * + * Constraint: + * importedNamespace=QualifiedNameWithWildcard + */ + protected void sequence_ImportDeclaration(ISerializationContext context, ImportDeclaration semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, CftLanguagePackage.Literals.IMPORT_DECLARATION__IMPORTED_NAMESPACE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CftLanguagePackage.Literals.IMPORT_DECLARATION__IMPORTED_NAMESPACE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getImportDeclarationAccess().getImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_0(), semanticObject.getImportedNamespace()); + feeder.finish(); + } + + + /** + * Contexts: + * EventDeclaration returns InputEvent + * InputEvent returns InputEvent + * + * Constraint: + * (name=ID multiple?='[]'?) + */ + protected void sequence_InputEvent(ISerializationContext context, InputEvent semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * LookupDefinition returns LookupDefinition + * Variable returns LookupDefinition + * + * Constraint: + * (mapping=[MappingDefinition|ID] arguments+=[MappingParameter|ID] arguments+=[MappingParameter|ID]* name=ID) + */ + protected void sequence_LookupDefinition(ISerializationContext context, LookupDefinition semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * MappingDefinition returns MappingDefinition + * + * Constraint: + * ( + * topLevel?='toplevel'? + * pattern=[Pattern|QualifiedName] + * parameters+=MappingParameter + * parameters+=MappingParameter* + * componentInstance=ComponentInstance? + * (lookupDefinitions+=LookupDefinition | assignments+=Assignment)* + * ) + */ + protected void sequence_MappingDefinition(ISerializationContext context, MappingDefinition semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * MappingParameter returns MappingParameter + * + * Constraint: + * name=ID + */ + protected void sequence_MappingParameter(ISerializationContext context, MappingParameter semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, CftLanguagePackage.Literals.MAPPING_PARAMETER__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CftLanguagePackage.Literals.MAPPING_PARAMETER__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getMappingParameterAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName()); + feeder.finish(); + } + + + /** + * Contexts: + * EventDeclaration returns OrGate + * EventDefinition returns OrGate + * GateDefinition returns OrGate + * OrGate returns OrGate + * + * Constraint: + * (name=ID inputEvents+=[EventDeclaration|ID]*) + */ + protected void sequence_OrGate(ISerializationContext context, OrGate semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * TransformationDefinition returns TransformationDefinition + * + * Constraint: + * (name=ID mappingDefinitions+=MappingDefinition*) + */ + protected void sequence_TransformationDefinition(ISerializationContext context, TransformationDefinition semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSyntacticSequencer.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSyntacticSequencer.java new file mode 100644 index 00000000..65b39fb2 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSyntacticSequencer.java @@ -0,0 +1,242 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.serializer; + +import com.google.inject.Inject; +import hu.bme.mit.inf.dslreasoner.faulttree.components.services.CftLanguageGrammarAccess; +import java.util.List; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.AlternativeAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.GroupAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; +import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; + +@SuppressWarnings("all") +public class CftLanguageSyntacticSequencer extends AbstractSyntacticSequencer { + + protected CftLanguageGrammarAccess grammarAccess; + protected AbstractElementAlias match_CftModel_SemicolonKeyword_2_q; + protected AbstractElementAlias match_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a__a; + protected AbstractElementAlias match_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a; + protected AbstractElementAlias match_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a__a; + protected AbstractElementAlias match_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a; + protected AbstractElementAlias match_ComponentDefinition___SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a_InKeyword_3_0_0__a; + protected AbstractElementAlias match_ComponentDefinition___SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a_OutKeyword_3_1_0__a; + protected AbstractElementAlias match_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2___or___OutKeyword_3_1_0_SemicolonKeyword_3_1_2____a; + protected AbstractElementAlias match_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2__q___InKeyword_3_0_0_SemicolonKeyword_3_0_2_OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q__p; + protected AbstractElementAlias match_ComponentDefinition_____OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q___OutKeyword_3_1_0_SemicolonKeyword_3_1_2_InKeyword_3_0_0_SemicolonKeyword_3_0_2__q__p; + protected AbstractElementAlias match_ImportDeclaration_SemicolonKeyword_2_q; + protected AbstractElementAlias match_MappingDefinition___LeftCurlyBracketKeyword_8_0_RightCurlyBracketKeyword_8_2__q; + + @Inject + protected void init(IGrammarAccess access) { + grammarAccess = (CftLanguageGrammarAccess) access; + match_CftModel_SemicolonKeyword_2_q = new TokenAlias(false, true, grammarAccess.getCftModelAccess().getSemicolonKeyword_2()); + match_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a__a = new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2()), new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2()))); + match_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a = new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2())); + match_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a__a = new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2()), new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2()))); + match_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a = new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2())); + match_ComponentDefinition___SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a_InKeyword_3_0_0__a = new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2()), new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2())), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0())); + match_ComponentDefinition___SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a_OutKeyword_3_1_0__a = new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2()), new GroupAlias(true, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2())), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0())); + match_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2___or___OutKeyword_3_1_0_SemicolonKeyword_3_1_2____a = new AlternativeAlias(true, true, new GroupAlias(false, false, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2())), new GroupAlias(false, false, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2()))); + match_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2__q___InKeyword_3_0_0_SemicolonKeyword_3_0_2_OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q__p = new GroupAlias(true, false, new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2())), new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2()))); + match_ComponentDefinition_____OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q___OutKeyword_3_1_0_SemicolonKeyword_3_1_2_InKeyword_3_0_0_SemicolonKeyword_3_0_2__q__p = new GroupAlias(true, false, new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2())), new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()), new TokenAlias(false, false, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2()))); + match_ImportDeclaration_SemicolonKeyword_2_q = new TokenAlias(false, true, grammarAccess.getImportDeclarationAccess().getSemicolonKeyword_2()); + match_MappingDefinition___LeftCurlyBracketKeyword_8_0_RightCurlyBracketKeyword_8_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getMappingDefinitionAccess().getLeftCurlyBracketKeyword_8_0()), new TokenAlias(false, false, grammarAccess.getMappingDefinitionAccess().getRightCurlyBracketKeyword_8_2())); + } + + @Override + protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { + return ""; + } + + + @Override + protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { + if (transition.getAmbiguousSyntaxes().isEmpty()) return; + List transitionNodes = collectNodes(fromNode, toNode); + for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { + List syntaxNodes = getNodesFor(transitionNodes, syntax); + if (match_CftModel_SemicolonKeyword_2_q.equals(syntax)) + emit_CftModel_SemicolonKeyword_2_q(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a__a.equals(syntax)) + emit_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a__a(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a.equals(syntax)) + emit_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a__a.equals(syntax)) + emit_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a__a(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a.equals(syntax)) + emit_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ComponentDefinition___SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a_InKeyword_3_0_0__a.equals(syntax)) + emit_ComponentDefinition___SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a_InKeyword_3_0_0__a(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ComponentDefinition___SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a_OutKeyword_3_1_0__a.equals(syntax)) + emit_ComponentDefinition___SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a_OutKeyword_3_1_0__a(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2___or___OutKeyword_3_1_0_SemicolonKeyword_3_1_2____a.equals(syntax)) + emit_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2___or___OutKeyword_3_1_0_SemicolonKeyword_3_1_2____a(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2__q___InKeyword_3_0_0_SemicolonKeyword_3_0_2_OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q__p.equals(syntax)) + emit_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2__q___InKeyword_3_0_0_SemicolonKeyword_3_0_2_OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q__p(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ComponentDefinition_____OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q___OutKeyword_3_1_0_SemicolonKeyword_3_1_2_InKeyword_3_0_0_SemicolonKeyword_3_0_2__q__p.equals(syntax)) + emit_ComponentDefinition_____OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q___OutKeyword_3_1_0_SemicolonKeyword_3_1_2_InKeyword_3_0_0_SemicolonKeyword_3_0_2__q__p(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ImportDeclaration_SemicolonKeyword_2_q.equals(syntax)) + emit_ImportDeclaration_SemicolonKeyword_2_q(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_MappingDefinition___LeftCurlyBracketKeyword_8_0_RightCurlyBracketKeyword_8_2__q.equals(syntax)) + emit_MappingDefinition___LeftCurlyBracketKeyword_8_0_RightCurlyBracketKeyword_8_2__q(semanticObject, getLastNavigableState(), syntaxNodes); + else acceptNodes(getLastNavigableState(), syntaxNodes); + } + } + + /** + * Ambiguous syntax: + * ';'? + * + * This ambiguous syntax occurs at: + * packageName=QualifiedName (ambiguity) (rule end) + * packageName=QualifiedName (ambiguity) componentDefinitions+=ComponentDefinition + * packageName=QualifiedName (ambiguity) imports+=ImportDeclaration + * packageName=QualifiedName (ambiguity) transformationDefinitions+=TransformationDefinition + */ + protected void emit_CftModel_SemicolonKeyword_2_q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * ('in' ';' ('out' ';')*)* + * + * This ambiguous syntax occurs at: + * inputEvents+=InputEvent ';' ('out' ';')* (ambiguity) '}' (rule end) + * inputEvents+=InputEvent ';' ('out' ';')* (ambiguity) eventDefinitions+=EventDefinition + */ + protected void emit_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a__a(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * ('in' ';')* + * + * This ambiguous syntax occurs at: + * inputEvents+=InputEvent ';' (ambiguity) (('out' ';')? ('out' ';' 'in' ';')?)+ 'out' outputEvents+=[EventDeclaration|ID] + * name=ID '{' (ambiguity) 'out' (';' (ambiguity) 'out')* outputEvents+=[EventDeclaration|ID] + * outputEvents+=[EventDeclaration|ID] ';' (ambiguity) ('out' ';' (ambiguity))* '}' (rule end) + * outputEvents+=[EventDeclaration|ID] ';' (ambiguity) ('out' ';' (ambiguity))* eventDefinitions+=EventDefinition + */ + protected void emit_ComponentDefinition___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * ('out' ';' ('in' ';')*)* + * + * This ambiguous syntax occurs at: + * outputEvents+=[EventDeclaration|ID] ';' ('in' ';')* (ambiguity) '}' (rule end) + * outputEvents+=[EventDeclaration|ID] ';' ('in' ';')* (ambiguity) eventDefinitions+=EventDefinition + */ + protected void emit_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a__a(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * ('out' ';')* + * + * This ambiguous syntax occurs at: + * inputEvents+=InputEvent ';' (ambiguity) ('in' ';' (ambiguity))* '}' (rule end) + * inputEvents+=InputEvent ';' (ambiguity) ('in' ';' (ambiguity))* eventDefinitions+=EventDefinition + * name=ID '{' (ambiguity) 'in' (';' (ambiguity) 'in')* inputEvents+=InputEvent + * outputEvents+=[EventDeclaration|ID] ';' (ambiguity) (('in' ';')? ('in' ';' 'out' ';')?)+ 'in' inputEvents+=InputEvent + */ + protected void emit_ComponentDefinition___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * (';' ('out' ';')* 'in')* + * + * This ambiguous syntax occurs at: + * inputEvents+=InputEvent (ambiguity) inputEvents+=InputEvent + * name=ID '{' ('out' ';')* 'in' (ambiguity) inputEvents+=InputEvent + */ + protected void emit_ComponentDefinition___SemicolonKeyword_3_0_2___OutKeyword_3_1_0_SemicolonKeyword_3_1_2__a_InKeyword_3_0_0__a(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * (';' ('in' ';')* 'out')* + * + * This ambiguous syntax occurs at: + * name=ID '{' ('in' ';')* 'out' (ambiguity) outputEvents+=[EventDeclaration|ID] + * outputEvents+=[EventDeclaration|ID] (ambiguity) outputEvents+=[EventDeclaration|ID] + */ + protected void emit_ComponentDefinition___SemicolonKeyword_3_1_2___InKeyword_3_0_0_SemicolonKeyword_3_0_2__a_OutKeyword_3_1_0__a(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * (('in' ';') | ('out' ';'))* + * + * This ambiguous syntax occurs at: + * name=ID '{' (ambiguity) '}' (rule end) + * name=ID '{' (ambiguity) eventDefinitions+=EventDefinition + */ + protected void emit_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2___or___OutKeyword_3_1_0_SemicolonKeyword_3_1_2____a(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * (('in' ';')? ('in' ';' 'out' ';')?)+ + * + * This ambiguous syntax occurs at: + * outputEvents+=[EventDeclaration|ID] ';' ('out' ';')* (ambiguity) 'in' inputEvents+=InputEvent + */ + protected void emit_ComponentDefinition_____InKeyword_3_0_0_SemicolonKeyword_3_0_2__q___InKeyword_3_0_0_SemicolonKeyword_3_0_2_OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q__p(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * (('out' ';')? ('out' ';' 'in' ';')?)+ + * + * This ambiguous syntax occurs at: + * inputEvents+=InputEvent ';' ('in' ';')* (ambiguity) 'out' outputEvents+=[EventDeclaration|ID] + */ + protected void emit_ComponentDefinition_____OutKeyword_3_1_0_SemicolonKeyword_3_1_2__q___OutKeyword_3_1_0_SemicolonKeyword_3_1_2_InKeyword_3_0_0_SemicolonKeyword_3_0_2__q__p(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * ';'? + * + * This ambiguous syntax occurs at: + * importedNamespace=QualifiedNameWithWildcard (ambiguity) (rule end) + */ + protected void emit_ImportDeclaration_SemicolonKeyword_2_q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * ('{' '}')? + * + * This ambiguous syntax occurs at: + * componentInstance=ComponentInstance (ambiguity) (rule end) + * parameters+=MappingParameter ')' (ambiguity) (rule end) + */ + protected void emit_MappingDefinition___LeftCurlyBracketKeyword_8_0_RightCurlyBracketKeyword_8_2__q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java new file mode 100644 index 00000000..1ca0cf8e --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java @@ -0,0 +1,1189 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.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.UnorderedGroup; +import org.eclipse.xtext.common.services.TerminalsGrammarAccess; +import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder; +import org.eclipse.xtext.service.GrammarProvider; + +@Singleton +public class CftLanguageGrammarAccess extends AbstractGrammarElementFinder { + + public class CftModelElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.CftModel"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cPackageKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cPackageNameAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cPackageNameQualifiedNameParserRuleCall_1_0 = (RuleCall)cPackageNameAssignment_1.eContents().get(0); + private final Keyword cSemicolonKeyword_2 = (Keyword)cGroup.eContents().get(2); + private final Assignment cImportsAssignment_3 = (Assignment)cGroup.eContents().get(3); + private final RuleCall cImportsImportDeclarationParserRuleCall_3_0 = (RuleCall)cImportsAssignment_3.eContents().get(0); + private final Alternatives cAlternatives_4 = (Alternatives)cGroup.eContents().get(4); + private final Assignment cComponentDefinitionsAssignment_4_0 = (Assignment)cAlternatives_4.eContents().get(0); + private final RuleCall cComponentDefinitionsComponentDefinitionParserRuleCall_4_0_0 = (RuleCall)cComponentDefinitionsAssignment_4_0.eContents().get(0); + private final Assignment cTransformationDefinitionsAssignment_4_1 = (Assignment)cAlternatives_4.eContents().get(1); + private final RuleCall cTransformationDefinitionsTransformationDefinitionParserRuleCall_4_1_0 = (RuleCall)cTransformationDefinitionsAssignment_4_1.eContents().get(0); + + //CftModel: + // "package" packageName=QualifiedName ";"? + // imports+=ImportDeclaration* (componentDefinitions+=ComponentDefinition | + // transformationDefinitions+=TransformationDefinition)*; + @Override public ParserRule getRule() { return rule; } + + //"package" packageName=QualifiedName ";"? imports+=ImportDeclaration* (componentDefinitions+=ComponentDefinition | + //transformationDefinitions+=TransformationDefinition)* + public Group getGroup() { return cGroup; } + + //"package" + public Keyword getPackageKeyword_0() { return cPackageKeyword_0; } + + //packageName=QualifiedName + public Assignment getPackageNameAssignment_1() { return cPackageNameAssignment_1; } + + //QualifiedName + public RuleCall getPackageNameQualifiedNameParserRuleCall_1_0() { return cPackageNameQualifiedNameParserRuleCall_1_0; } + + //";"? + public Keyword getSemicolonKeyword_2() { return cSemicolonKeyword_2; } + + //imports+=ImportDeclaration* + public Assignment getImportsAssignment_3() { return cImportsAssignment_3; } + + //ImportDeclaration + public RuleCall getImportsImportDeclarationParserRuleCall_3_0() { return cImportsImportDeclarationParserRuleCall_3_0; } + + //(componentDefinitions+=ComponentDefinition | transformationDefinitions+=TransformationDefinition)* + public Alternatives getAlternatives_4() { return cAlternatives_4; } + + //componentDefinitions+=ComponentDefinition + public Assignment getComponentDefinitionsAssignment_4_0() { return cComponentDefinitionsAssignment_4_0; } + + //ComponentDefinition + public RuleCall getComponentDefinitionsComponentDefinitionParserRuleCall_4_0_0() { return cComponentDefinitionsComponentDefinitionParserRuleCall_4_0_0; } + + //transformationDefinitions+=TransformationDefinition + public Assignment getTransformationDefinitionsAssignment_4_1() { return cTransformationDefinitionsAssignment_4_1; } + + //TransformationDefinition + public RuleCall getTransformationDefinitionsTransformationDefinitionParserRuleCall_4_1_0() { return cTransformationDefinitionsTransformationDefinitionParserRuleCall_4_1_0; } + } + public class ImportDeclarationElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ImportDeclaration"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cImportKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cImportedNamespaceAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_0 = (RuleCall)cImportedNamespaceAssignment_1.eContents().get(0); + private final Keyword cSemicolonKeyword_2 = (Keyword)cGroup.eContents().get(2); + + //ImportDeclaration: + // "import" importedNamespace=QualifiedNameWithWildcard ";"?; + @Override public ParserRule getRule() { return rule; } + + //"import" importedNamespace=QualifiedNameWithWildcard ";"? + public Group getGroup() { return cGroup; } + + //"import" + public Keyword getImportKeyword_0() { return cImportKeyword_0; } + + //importedNamespace=QualifiedNameWithWildcard + public Assignment getImportedNamespaceAssignment_1() { return cImportedNamespaceAssignment_1; } + + //QualifiedNameWithWildcard + public RuleCall getImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_0() { return cImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_0; } + + //";"? + public Keyword getSemicolonKeyword_2() { return cSemicolonKeyword_2; } + } + public class ComponentDefinitionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ComponentDefinition"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cCftKeyword_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 Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2); + private final UnorderedGroup cUnorderedGroup_3 = (UnorderedGroup)cGroup.eContents().get(3); + private final Group cGroup_3_0 = (Group)cUnorderedGroup_3.eContents().get(0); + private final Keyword cInKeyword_3_0_0 = (Keyword)cGroup_3_0.eContents().get(0); + private final Assignment cInputEventsAssignment_3_0_1 = (Assignment)cGroup_3_0.eContents().get(1); + private final RuleCall cInputEventsInputEventParserRuleCall_3_0_1_0 = (RuleCall)cInputEventsAssignment_3_0_1.eContents().get(0); + private final Keyword cSemicolonKeyword_3_0_2 = (Keyword)cGroup_3_0.eContents().get(2); + private final Group cGroup_3_1 = (Group)cUnorderedGroup_3.eContents().get(1); + private final Keyword cOutKeyword_3_1_0 = (Keyword)cGroup_3_1.eContents().get(0); + private final Assignment cOutputEventsAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1); + private final CrossReference cOutputEventsEventDeclarationCrossReference_3_1_1_0 = (CrossReference)cOutputEventsAssignment_3_1_1.eContents().get(0); + private final RuleCall cOutputEventsEventDeclarationIDTerminalRuleCall_3_1_1_0_1 = (RuleCall)cOutputEventsEventDeclarationCrossReference_3_1_1_0.eContents().get(1); + private final Keyword cSemicolonKeyword_3_1_2 = (Keyword)cGroup_3_1.eContents().get(2); + private final Group cGroup_4 = (Group)cGroup.eContents().get(4); + private final Assignment cEventDefinitionsAssignment_4_0 = (Assignment)cGroup_4.eContents().get(0); + private final RuleCall cEventDefinitionsEventDefinitionParserRuleCall_4_0_0 = (RuleCall)cEventDefinitionsAssignment_4_0.eContents().get(0); + private final Keyword cSemicolonKeyword_4_1 = (Keyword)cGroup_4.eContents().get(1); + private final Keyword cRightCurlyBracketKeyword_5 = (Keyword)cGroup.eContents().get(5); + + //ComponentDefinition: + // "cft" name=ID "{" (("in" inputEvents+=InputEvent* ";")? & ("out" outputEvents+=[EventDeclaration]* ";")?) + // (eventDefinitions+=EventDefinition ";")* + // "}"; + @Override public ParserRule getRule() { return rule; } + + //"cft" name=ID "{" (("in" inputEvents+=InputEvent* ";")? & ("out" outputEvents+=[EventDeclaration]* ";")?) + //(eventDefinitions+=EventDefinition ";")* "}" + public Group getGroup() { return cGroup; } + + //"cft" + public Keyword getCftKeyword_0() { return cCftKeyword_0; } + + //name=ID + public Assignment getNameAssignment_1() { return cNameAssignment_1; } + + //ID + public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; } + + //"{" + public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; } + + //("in" inputEvents+=InputEvent* ";")? & ("out" outputEvents+=[EventDeclaration]* ";")? + public UnorderedGroup getUnorderedGroup_3() { return cUnorderedGroup_3; } + + //("in" inputEvents+=InputEvent* ";")? + public Group getGroup_3_0() { return cGroup_3_0; } + + //"in" + public Keyword getInKeyword_3_0_0() { return cInKeyword_3_0_0; } + + //inputEvents+=InputEvent* + public Assignment getInputEventsAssignment_3_0_1() { return cInputEventsAssignment_3_0_1; } + + //InputEvent + public RuleCall getInputEventsInputEventParserRuleCall_3_0_1_0() { return cInputEventsInputEventParserRuleCall_3_0_1_0; } + + //";" + public Keyword getSemicolonKeyword_3_0_2() { return cSemicolonKeyword_3_0_2; } + + //("out" outputEvents+=[EventDeclaration]* ";")? + public Group getGroup_3_1() { return cGroup_3_1; } + + //"out" + public Keyword getOutKeyword_3_1_0() { return cOutKeyword_3_1_0; } + + //outputEvents+=[EventDeclaration]* + public Assignment getOutputEventsAssignment_3_1_1() { return cOutputEventsAssignment_3_1_1; } + + //[EventDeclaration] + public CrossReference getOutputEventsEventDeclarationCrossReference_3_1_1_0() { return cOutputEventsEventDeclarationCrossReference_3_1_1_0; } + + //ID + public RuleCall getOutputEventsEventDeclarationIDTerminalRuleCall_3_1_1_0_1() { return cOutputEventsEventDeclarationIDTerminalRuleCall_3_1_1_0_1; } + + //";" + public Keyword getSemicolonKeyword_3_1_2() { return cSemicolonKeyword_3_1_2; } + + //(eventDefinitions+=EventDefinition ";")* + public Group getGroup_4() { return cGroup_4; } + + //eventDefinitions+=EventDefinition + public Assignment getEventDefinitionsAssignment_4_0() { return cEventDefinitionsAssignment_4_0; } + + //EventDefinition + public RuleCall getEventDefinitionsEventDefinitionParserRuleCall_4_0_0() { return cEventDefinitionsEventDefinitionParserRuleCall_4_0_0; } + + //";" + public Keyword getSemicolonKeyword_4_1() { return cSemicolonKeyword_4_1; } + + //"}" + public Keyword getRightCurlyBracketKeyword_5() { return cRightCurlyBracketKeyword_5; } + } + public class EventDeclarationElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventDeclaration"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cInputEventParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cEventDefinitionParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //EventDeclaration: + // InputEvent | EventDefinition; + @Override public ParserRule getRule() { return rule; } + + //InputEvent | EventDefinition + public Alternatives getAlternatives() { return cAlternatives; } + + //InputEvent + public RuleCall getInputEventParserRuleCall_0() { return cInputEventParserRuleCall_0; } + + //EventDefinition + public RuleCall getEventDefinitionParserRuleCall_1() { return cEventDefinitionParserRuleCall_1; } + } + public class InputEventElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.InputEvent"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cNameIDTerminalRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0); + private final Assignment cMultipleAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final Keyword cMultipleLeftSquareBracketRightSquareBracketKeyword_1_0 = (Keyword)cMultipleAssignment_1.eContents().get(0); + + //InputEvent: + // name=ID multiple?="[]"?; + @Override public ParserRule getRule() { return rule; } + + //name=ID multiple?="[]"? + public Group getGroup() { return cGroup; } + + //name=ID + public Assignment getNameAssignment_0() { return cNameAssignment_0; } + + //ID + public RuleCall getNameIDTerminalRuleCall_0_0() { return cNameIDTerminalRuleCall_0_0; } + + //multiple?="[]"? + public Assignment getMultipleAssignment_1() { return cMultipleAssignment_1; } + + //"[]" + public Keyword getMultipleLeftSquareBracketRightSquareBracketKeyword_1_0() { return cMultipleLeftSquareBracketRightSquareBracketKeyword_1_0; } + } + public class EventDefinitionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventDefinition"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cBasicEventDefinitionParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cGateDefinitionParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //EventDefinition: + // BasicEventDefinition | GateDefinition; + @Override public ParserRule getRule() { return rule; } + + //BasicEventDefinition | GateDefinition + public Alternatives getAlternatives() { return cAlternatives; } + + //BasicEventDefinition + public RuleCall getBasicEventDefinitionParserRuleCall_0() { return cBasicEventDefinitionParserRuleCall_0; } + + //GateDefinition + public RuleCall getGateDefinitionParserRuleCall_1() { return cGateDefinitionParserRuleCall_1; } + } + public class BasicEventDefinitionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.BasicEventDefinition"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cNameIDTerminalRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0); + private final Keyword cLambdaKeyword_1 = (Keyword)cGroup.eContents().get(1); + private final Keyword cEqualsSignKeyword_2 = (Keyword)cGroup.eContents().get(2); + private final Assignment cRateAssignment_3 = (Assignment)cGroup.eContents().get(3); + private final RuleCall cRateDOULBETerminalRuleCall_3_0 = (RuleCall)cRateAssignment_3.eContents().get(0); + + //BasicEventDefinition: + // name=ID "lambda" "=" rate=DOULBE; + @Override public ParserRule getRule() { return rule; } + + //name=ID "lambda" "=" rate=DOULBE + public Group getGroup() { return cGroup; } + + //name=ID + public Assignment getNameAssignment_0() { return cNameAssignment_0; } + + //ID + public RuleCall getNameIDTerminalRuleCall_0_0() { return cNameIDTerminalRuleCall_0_0; } + + //"lambda" + public Keyword getLambdaKeyword_1() { return cLambdaKeyword_1; } + + //"=" + public Keyword getEqualsSignKeyword_2() { return cEqualsSignKeyword_2; } + + //rate=DOULBE + public Assignment getRateAssignment_3() { return cRateAssignment_3; } + + //DOULBE + public RuleCall getRateDOULBETerminalRuleCall_3_0() { return cRateDOULBETerminalRuleCall_3_0; } + } + public class GateDefinitionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.GateDefinition"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cAndGateParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cOrGateParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //GateDefinition: + // AndGate | OrGate; + @Override public ParserRule getRule() { return rule; } + + //AndGate | OrGate + public Alternatives getAlternatives() { return cAlternatives; } + + //AndGate + public RuleCall getAndGateParserRuleCall_0() { return cAndGateParserRuleCall_0; } + + //OrGate + public RuleCall getOrGateParserRuleCall_1() { return cOrGateParserRuleCall_1; } + } + public class AndGateElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.AndGate"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cNameIDTerminalRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0); + private final Keyword cAndKeyword_1 = (Keyword)cGroup.eContents().get(1); + private final Assignment cInputEventsAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final CrossReference cInputEventsEventDeclarationCrossReference_2_0 = (CrossReference)cInputEventsAssignment_2.eContents().get(0); + private final RuleCall cInputEventsEventDeclarationIDTerminalRuleCall_2_0_1 = (RuleCall)cInputEventsEventDeclarationCrossReference_2_0.eContents().get(1); + + //AndGate: + // name=ID "and" inputEvents+=[EventDeclaration]*; + @Override public ParserRule getRule() { return rule; } + + //name=ID "and" inputEvents+=[EventDeclaration]* + public Group getGroup() { return cGroup; } + + //name=ID + public Assignment getNameAssignment_0() { return cNameAssignment_0; } + + //ID + public RuleCall getNameIDTerminalRuleCall_0_0() { return cNameIDTerminalRuleCall_0_0; } + + //"and" + public Keyword getAndKeyword_1() { return cAndKeyword_1; } + + //inputEvents+=[EventDeclaration]* + public Assignment getInputEventsAssignment_2() { return cInputEventsAssignment_2; } + + //[EventDeclaration] + public CrossReference getInputEventsEventDeclarationCrossReference_2_0() { return cInputEventsEventDeclarationCrossReference_2_0; } + + //ID + public RuleCall getInputEventsEventDeclarationIDTerminalRuleCall_2_0_1() { return cInputEventsEventDeclarationIDTerminalRuleCall_2_0_1; } + } + public class OrGateElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.OrGate"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cNameIDTerminalRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0); + private final Keyword cOrKeyword_1 = (Keyword)cGroup.eContents().get(1); + private final Assignment cInputEventsAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final CrossReference cInputEventsEventDeclarationCrossReference_2_0 = (CrossReference)cInputEventsAssignment_2.eContents().get(0); + private final RuleCall cInputEventsEventDeclarationIDTerminalRuleCall_2_0_1 = (RuleCall)cInputEventsEventDeclarationCrossReference_2_0.eContents().get(1); + + //OrGate: + // name=ID "or" inputEvents+=[EventDeclaration]*; + @Override public ParserRule getRule() { return rule; } + + //name=ID "or" inputEvents+=[EventDeclaration]* + public Group getGroup() { return cGroup; } + + //name=ID + public Assignment getNameAssignment_0() { return cNameAssignment_0; } + + //ID + public RuleCall getNameIDTerminalRuleCall_0_0() { return cNameIDTerminalRuleCall_0_0; } + + //"or" + public Keyword getOrKeyword_1() { return cOrKeyword_1; } + + //inputEvents+=[EventDeclaration]* + public Assignment getInputEventsAssignment_2() { return cInputEventsAssignment_2; } + + //[EventDeclaration] + public CrossReference getInputEventsEventDeclarationCrossReference_2_0() { return cInputEventsEventDeclarationCrossReference_2_0; } + + //ID + public RuleCall getInputEventsEventDeclarationIDTerminalRuleCall_2_0_1() { return cInputEventsEventDeclarationIDTerminalRuleCall_2_0_1; } + } + public class TransformationDefinitionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.TransformationDefinition"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cTransformationKeyword_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 Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2); + private final Assignment cMappingDefinitionsAssignment_3 = (Assignment)cGroup.eContents().get(3); + private final RuleCall cMappingDefinitionsMappingDefinitionParserRuleCall_3_0 = (RuleCall)cMappingDefinitionsAssignment_3.eContents().get(0); + private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4); + + //TransformationDefinition: + // "transformation" name=ID "{" + // mappingDefinitions+=MappingDefinition* + // "}"; + @Override public ParserRule getRule() { return rule; } + + //"transformation" name=ID "{" mappingDefinitions+=MappingDefinition* "}" + public Group getGroup() { return cGroup; } + + //"transformation" + public Keyword getTransformationKeyword_0() { return cTransformationKeyword_0; } + + //name=ID + public Assignment getNameAssignment_1() { return cNameAssignment_1; } + + //ID + public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; } + + //"{" + public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; } + + //mappingDefinitions+=MappingDefinition* + public Assignment getMappingDefinitionsAssignment_3() { return cMappingDefinitionsAssignment_3; } + + //MappingDefinition + public RuleCall getMappingDefinitionsMappingDefinitionParserRuleCall_3_0() { return cMappingDefinitionsMappingDefinitionParserRuleCall_3_0; } + + //"}" + public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; } + } + public class MappingDefinitionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingDefinition"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cTopLevelAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final Keyword cTopLevelToplevelKeyword_0_0 = (Keyword)cTopLevelAssignment_0.eContents().get(0); + private final Keyword cMappingKeyword_1 = (Keyword)cGroup.eContents().get(1); + private final Assignment cPatternAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final CrossReference cPatternPatternCrossReference_2_0 = (CrossReference)cPatternAssignment_2.eContents().get(0); + private final RuleCall cPatternPatternQualifiedNameParserRuleCall_2_0_1 = (RuleCall)cPatternPatternCrossReference_2_0.eContents().get(1); + private final Keyword cLeftParenthesisKeyword_3 = (Keyword)cGroup.eContents().get(3); + private final Assignment cParametersAssignment_4 = (Assignment)cGroup.eContents().get(4); + private final RuleCall cParametersMappingParameterParserRuleCall_4_0 = (RuleCall)cParametersAssignment_4.eContents().get(0); + private final Group cGroup_5 = (Group)cGroup.eContents().get(5); + private final Keyword cCommaKeyword_5_0 = (Keyword)cGroup_5.eContents().get(0); + private final Assignment cParametersAssignment_5_1 = (Assignment)cGroup_5.eContents().get(1); + private final RuleCall cParametersMappingParameterParserRuleCall_5_1_0 = (RuleCall)cParametersAssignment_5_1.eContents().get(0); + private final Keyword cRightParenthesisKeyword_6 = (Keyword)cGroup.eContents().get(6); + private final Assignment cComponentInstanceAssignment_7 = (Assignment)cGroup.eContents().get(7); + private final RuleCall cComponentInstanceComponentInstanceParserRuleCall_7_0 = (RuleCall)cComponentInstanceAssignment_7.eContents().get(0); + private final Group cGroup_8 = (Group)cGroup.eContents().get(8); + private final Keyword cLeftCurlyBracketKeyword_8_0 = (Keyword)cGroup_8.eContents().get(0); + private final Group cGroup_8_1 = (Group)cGroup_8.eContents().get(1); + private final Alternatives cAlternatives_8_1_0 = (Alternatives)cGroup_8_1.eContents().get(0); + private final Assignment cLookupDefinitionsAssignment_8_1_0_0 = (Assignment)cAlternatives_8_1_0.eContents().get(0); + private final RuleCall cLookupDefinitionsLookupDefinitionParserRuleCall_8_1_0_0_0 = (RuleCall)cLookupDefinitionsAssignment_8_1_0_0.eContents().get(0); + private final Assignment cAssignmentsAssignment_8_1_0_1 = (Assignment)cAlternatives_8_1_0.eContents().get(1); + private final RuleCall cAssignmentsAssignmentParserRuleCall_8_1_0_1_0 = (RuleCall)cAssignmentsAssignment_8_1_0_1.eContents().get(0); + private final Keyword cSemicolonKeyword_8_1_1 = (Keyword)cGroup_8_1.eContents().get(1); + private final Keyword cRightCurlyBracketKeyword_8_2 = (Keyword)cGroup_8.eContents().get(2); + + //MappingDefinition: + // topLevel?="toplevel"? "mapping" pattern=[vql::Pattern|QualifiedName] + // "(" parameters+=MappingParameter ("," parameters+=MappingParameter)* ")" + // componentInstance=ComponentInstance? ("{" ((lookupDefinitions+=LookupDefinition | assignments+=Assignment) ";")* + // "}")?; + @Override public ParserRule getRule() { return rule; } + + //topLevel?="toplevel"? "mapping" pattern=[vql::Pattern|QualifiedName] "(" parameters+=MappingParameter ("," + //parameters+=MappingParameter)* ")" componentInstance=ComponentInstance? ("{" ((lookupDefinitions+=LookupDefinition | + //assignments+=Assignment) ";")* "}")? + public Group getGroup() { return cGroup; } + + //topLevel?="toplevel"? + public Assignment getTopLevelAssignment_0() { return cTopLevelAssignment_0; } + + //"toplevel" + public Keyword getTopLevelToplevelKeyword_0_0() { return cTopLevelToplevelKeyword_0_0; } + + //"mapping" + public Keyword getMappingKeyword_1() { return cMappingKeyword_1; } + + //pattern=[vql::Pattern|QualifiedName] + public Assignment getPatternAssignment_2() { return cPatternAssignment_2; } + + //[vql::Pattern|QualifiedName] + public CrossReference getPatternPatternCrossReference_2_0() { return cPatternPatternCrossReference_2_0; } + + //QualifiedName + public RuleCall getPatternPatternQualifiedNameParserRuleCall_2_0_1() { return cPatternPatternQualifiedNameParserRuleCall_2_0_1; } + + //"(" + public Keyword getLeftParenthesisKeyword_3() { return cLeftParenthesisKeyword_3; } + + //parameters+=MappingParameter + public Assignment getParametersAssignment_4() { return cParametersAssignment_4; } + + //MappingParameter + public RuleCall getParametersMappingParameterParserRuleCall_4_0() { return cParametersMappingParameterParserRuleCall_4_0; } + + //("," parameters+=MappingParameter)* + public Group getGroup_5() { return cGroup_5; } + + //"," + public Keyword getCommaKeyword_5_0() { return cCommaKeyword_5_0; } + + //parameters+=MappingParameter + public Assignment getParametersAssignment_5_1() { return cParametersAssignment_5_1; } + + //MappingParameter + public RuleCall getParametersMappingParameterParserRuleCall_5_1_0() { return cParametersMappingParameterParserRuleCall_5_1_0; } + + //")" + public Keyword getRightParenthesisKeyword_6() { return cRightParenthesisKeyword_6; } + + //componentInstance=ComponentInstance? + public Assignment getComponentInstanceAssignment_7() { return cComponentInstanceAssignment_7; } + + //ComponentInstance + public RuleCall getComponentInstanceComponentInstanceParserRuleCall_7_0() { return cComponentInstanceComponentInstanceParserRuleCall_7_0; } + + //("{" ((lookupDefinitions+=LookupDefinition | assignments+=Assignment) ";")* "}")? + public Group getGroup_8() { return cGroup_8; } + + //"{" + public Keyword getLeftCurlyBracketKeyword_8_0() { return cLeftCurlyBracketKeyword_8_0; } + + //((lookupDefinitions+=LookupDefinition | assignments+=Assignment) ";")* + public Group getGroup_8_1() { return cGroup_8_1; } + + //lookupDefinitions+=LookupDefinition | assignments+=Assignment + public Alternatives getAlternatives_8_1_0() { return cAlternatives_8_1_0; } + + //lookupDefinitions+=LookupDefinition + public Assignment getLookupDefinitionsAssignment_8_1_0_0() { return cLookupDefinitionsAssignment_8_1_0_0; } + + //LookupDefinition + public RuleCall getLookupDefinitionsLookupDefinitionParserRuleCall_8_1_0_0_0() { return cLookupDefinitionsLookupDefinitionParserRuleCall_8_1_0_0_0; } + + //assignments+=Assignment + public Assignment getAssignmentsAssignment_8_1_0_1() { return cAssignmentsAssignment_8_1_0_1; } + + //Assignment + public RuleCall getAssignmentsAssignmentParserRuleCall_8_1_0_1_0() { return cAssignmentsAssignmentParserRuleCall_8_1_0_1_0; } + + //";" + public Keyword getSemicolonKeyword_8_1_1() { return cSemicolonKeyword_8_1_1; } + + //"}" + public Keyword getRightCurlyBracketKeyword_8_2() { return cRightCurlyBracketKeyword_8_2; } + } + public class MappingParameterElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingParameter"); + private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1); + private final RuleCall cNameIDTerminalRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0); + + //MappingParameter: + // name=ID; + @Override public ParserRule getRule() { return rule; } + + //name=ID + public Assignment getNameAssignment() { return cNameAssignment; } + + //ID + public RuleCall getNameIDTerminalRuleCall_0() { return cNameIDTerminalRuleCall_0; } + } + public class LookupDefinitionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.LookupDefinition"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cLookupKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cMappingAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final CrossReference cMappingMappingDefinitionCrossReference_1_0 = (CrossReference)cMappingAssignment_1.eContents().get(0); + private final RuleCall cMappingMappingDefinitionIDTerminalRuleCall_1_0_1 = (RuleCall)cMappingMappingDefinitionCrossReference_1_0.eContents().get(1); + private final Keyword cLeftParenthesisKeyword_2 = (Keyword)cGroup.eContents().get(2); + private final Assignment cArgumentsAssignment_3 = (Assignment)cGroup.eContents().get(3); + private final CrossReference cArgumentsMappingParameterCrossReference_3_0 = (CrossReference)cArgumentsAssignment_3.eContents().get(0); + private final RuleCall cArgumentsMappingParameterIDTerminalRuleCall_3_0_1 = (RuleCall)cArgumentsMappingParameterCrossReference_3_0.eContents().get(1); + private final Group cGroup_4 = (Group)cGroup.eContents().get(4); + private final Keyword cCommaKeyword_4_0 = (Keyword)cGroup_4.eContents().get(0); + private final Assignment cArgumentsAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); + private final CrossReference cArgumentsMappingParameterCrossReference_4_1_0 = (CrossReference)cArgumentsAssignment_4_1.eContents().get(0); + private final RuleCall cArgumentsMappingParameterIDTerminalRuleCall_4_1_0_1 = (RuleCall)cArgumentsMappingParameterCrossReference_4_1_0.eContents().get(1); + private final Keyword cRightParenthesisKeyword_5 = (Keyword)cGroup.eContents().get(5); + private final Keyword cAsKeyword_6 = (Keyword)cGroup.eContents().get(6); + private final Assignment cNameAssignment_7 = (Assignment)cGroup.eContents().get(7); + private final RuleCall cNameIDTerminalRuleCall_7_0 = (RuleCall)cNameAssignment_7.eContents().get(0); + + //LookupDefinition: + // "lookup" mapping=[MappingDefinition] + // "(" arguments+=[MappingParameter] ("," arguments+=[MappingParameter])* ")" + // "as" name=ID; + @Override public ParserRule getRule() { return rule; } + + //"lookup" mapping=[MappingDefinition] "(" arguments+=[MappingParameter] ("," arguments+=[MappingParameter])* ")" "as" + //name=ID + public Group getGroup() { return cGroup; } + + //"lookup" + public Keyword getLookupKeyword_0() { return cLookupKeyword_0; } + + //mapping=[MappingDefinition] + public Assignment getMappingAssignment_1() { return cMappingAssignment_1; } + + //[MappingDefinition] + public CrossReference getMappingMappingDefinitionCrossReference_1_0() { return cMappingMappingDefinitionCrossReference_1_0; } + + //ID + public RuleCall getMappingMappingDefinitionIDTerminalRuleCall_1_0_1() { return cMappingMappingDefinitionIDTerminalRuleCall_1_0_1; } + + //"(" + public Keyword getLeftParenthesisKeyword_2() { return cLeftParenthesisKeyword_2; } + + //arguments+=[MappingParameter] + public Assignment getArgumentsAssignment_3() { return cArgumentsAssignment_3; } + + //[MappingParameter] + public CrossReference getArgumentsMappingParameterCrossReference_3_0() { return cArgumentsMappingParameterCrossReference_3_0; } + + //ID + public RuleCall getArgumentsMappingParameterIDTerminalRuleCall_3_0_1() { return cArgumentsMappingParameterIDTerminalRuleCall_3_0_1; } + + //("," arguments+=[MappingParameter])* + public Group getGroup_4() { return cGroup_4; } + + //"," + public Keyword getCommaKeyword_4_0() { return cCommaKeyword_4_0; } + + //arguments+=[MappingParameter] + public Assignment getArgumentsAssignment_4_1() { return cArgumentsAssignment_4_1; } + + //[MappingParameter] + public CrossReference getArgumentsMappingParameterCrossReference_4_1_0() { return cArgumentsMappingParameterCrossReference_4_1_0; } + + //ID + public RuleCall getArgumentsMappingParameterIDTerminalRuleCall_4_1_0_1() { return cArgumentsMappingParameterIDTerminalRuleCall_4_1_0_1; } + + //")" + public Keyword getRightParenthesisKeyword_5() { return cRightParenthesisKeyword_5; } + + //"as" + public Keyword getAsKeyword_6() { return cAsKeyword_6; } + + //name=ID + public Assignment getNameAssignment_7() { return cNameAssignment_7; } + + //ID + public RuleCall getNameIDTerminalRuleCall_7_0() { return cNameIDTerminalRuleCall_7_0; } + } + public class VariableElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.Variable"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cComponentInstanceParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cLookupDefinitionParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //Variable: + // ComponentInstance | LookupDefinition; + @Override public ParserRule getRule() { return rule; } + + //ComponentInstance | LookupDefinition + public Alternatives getAlternatives() { return cAlternatives; } + + //ComponentInstance + public RuleCall getComponentInstanceParserRuleCall_0() { return cComponentInstanceParserRuleCall_0; } + + //LookupDefinition + public RuleCall getLookupDefinitionParserRuleCall_1() { return cLookupDefinitionParserRuleCall_1; } + } + public class AssignmentElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.Assignment"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cInputAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cInputEventReferenceParserRuleCall_0_0 = (RuleCall)cInputAssignment_0.eContents().get(0); + private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1); + private final Assignment cMultipleAssignment_1_0 = (Assignment)cAlternatives_1.eContents().get(0); + private final Keyword cMultiplePlusSignEqualsSignKeyword_1_0_0 = (Keyword)cMultipleAssignment_1_0.eContents().get(0); + private final Keyword cColonEqualsSignKeyword_1_1 = (Keyword)cAlternatives_1.eContents().get(1); + private final Assignment cOutputAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cOutputEventReferenceParserRuleCall_2_0 = (RuleCall)cOutputAssignment_2.eContents().get(0); + + //Assignment: + // input=EventReference (multiple?="+=" | ":=") output=EventReference; + @Override public ParserRule getRule() { return rule; } + + //input=EventReference (multiple?="+=" | ":=") output=EventReference + public Group getGroup() { return cGroup; } + + //input=EventReference + public Assignment getInputAssignment_0() { return cInputAssignment_0; } + + //EventReference + public RuleCall getInputEventReferenceParserRuleCall_0_0() { return cInputEventReferenceParserRuleCall_0_0; } + + //multiple?="+=" | ":=" + public Alternatives getAlternatives_1() { return cAlternatives_1; } + + //multiple?="+=" + public Assignment getMultipleAssignment_1_0() { return cMultipleAssignment_1_0; } + + //"+=" + public Keyword getMultiplePlusSignEqualsSignKeyword_1_0_0() { return cMultiplePlusSignEqualsSignKeyword_1_0_0; } + + //":=" + public Keyword getColonEqualsSignKeyword_1_1() { return cColonEqualsSignKeyword_1_1; } + + //output=EventReference + public Assignment getOutputAssignment_2() { return cOutputAssignment_2; } + + //EventReference + public RuleCall getOutputEventReferenceParserRuleCall_2_0() { return cOutputEventReferenceParserRuleCall_2_0; } + } + public class EventReferenceElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventReference"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cComponentAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final CrossReference cComponentVariableCrossReference_0_0 = (CrossReference)cComponentAssignment_0.eContents().get(0); + private final RuleCall cComponentVariableIDTerminalRuleCall_0_0_1 = (RuleCall)cComponentVariableCrossReference_0_0.eContents().get(1); + private final Keyword cFullStopKeyword_1 = (Keyword)cGroup.eContents().get(1); + private final Assignment cEventAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final CrossReference cEventEventDeclarationCrossReference_2_0 = (CrossReference)cEventAssignment_2.eContents().get(0); + private final RuleCall cEventEventDeclarationIDTerminalRuleCall_2_0_1 = (RuleCall)cEventEventDeclarationCrossReference_2_0.eContents().get(1); + + //EventReference: + // component=[Variable] "." event=[EventDeclaration]; + @Override public ParserRule getRule() { return rule; } + + //component=[Variable] "." event=[EventDeclaration] + public Group getGroup() { return cGroup; } + + //component=[Variable] + public Assignment getComponentAssignment_0() { return cComponentAssignment_0; } + + //[Variable] + public CrossReference getComponentVariableCrossReference_0_0() { return cComponentVariableCrossReference_0_0; } + + //ID + public RuleCall getComponentVariableIDTerminalRuleCall_0_0_1() { return cComponentVariableIDTerminalRuleCall_0_0_1; } + + //"." + public Keyword getFullStopKeyword_1() { return cFullStopKeyword_1; } + + //event=[EventDeclaration] + public Assignment getEventAssignment_2() { return cEventAssignment_2; } + + //[EventDeclaration] + public CrossReference getEventEventDeclarationCrossReference_2_0() { return cEventEventDeclarationCrossReference_2_0; } + + //ID + public RuleCall getEventEventDeclarationIDTerminalRuleCall_2_0_1() { return cEventEventDeclarationIDTerminalRuleCall_2_0_1; } + } + public class ComponentInstanceElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ComponentInstance"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cEqualsSignGreaterThanSignKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cComponentTypeAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final CrossReference cComponentTypeComponentDefinitionCrossReference_1_0 = (CrossReference)cComponentTypeAssignment_1.eContents().get(0); + private final RuleCall cComponentTypeComponentDefinitionQualifiedNameParserRuleCall_1_0_1 = (RuleCall)cComponentTypeComponentDefinitionCrossReference_1_0.eContents().get(1); + private final Assignment cNameAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cNameIDTerminalRuleCall_2_0 = (RuleCall)cNameAssignment_2.eContents().get(0); + + //ComponentInstance: + // "=>" componentType=[ComponentDefinition|QualifiedName] name=ID?; + @Override public ParserRule getRule() { return rule; } + + //"=>" componentType=[ComponentDefinition|QualifiedName] name=ID? + public Group getGroup() { return cGroup; } + + //"=>" + public Keyword getEqualsSignGreaterThanSignKeyword_0() { return cEqualsSignGreaterThanSignKeyword_0; } + + //componentType=[ComponentDefinition|QualifiedName] + public Assignment getComponentTypeAssignment_1() { return cComponentTypeAssignment_1; } + + //[ComponentDefinition|QualifiedName] + public CrossReference getComponentTypeComponentDefinitionCrossReference_1_0() { return cComponentTypeComponentDefinitionCrossReference_1_0; } + + //QualifiedName + public RuleCall getComponentTypeComponentDefinitionQualifiedNameParserRuleCall_1_0_1() { return cComponentTypeComponentDefinitionQualifiedNameParserRuleCall_1_0_1; } + + //name=ID? + public Assignment getNameAssignment_2() { return cNameAssignment_2; } + + //ID + public RuleCall getNameIDTerminalRuleCall_2_0() { return cNameIDTerminalRuleCall_2_0; } + } + public class QualifiedNameElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.QualifiedName"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final Keyword cFullStopKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0); + private final RuleCall cIDTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); + + //QualifiedName: + // ID ("." ID)*; + @Override public ParserRule getRule() { return rule; } + + //ID ("." ID)* + public Group getGroup() { return cGroup; } + + //ID + public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; } + + //("." ID)* + public Group getGroup_1() { return cGroup_1; } + + //"." + public Keyword getFullStopKeyword_1_0() { return cFullStopKeyword_1_0; } + + //ID + public RuleCall getIDTerminalRuleCall_1_1() { return cIDTerminalRuleCall_1_1; } + } + public class QualifiedNameWithWildcardElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.QualifiedNameWithWildcard"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cQualifiedNameParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final Keyword cFullStopKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0); + private final Keyword cAsteriskKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1); + + //QualifiedNameWithWildcard: + // QualifiedName ("." "*")?; + @Override public ParserRule getRule() { return rule; } + + //QualifiedName ("." "*")? + public Group getGroup() { return cGroup; } + + //QualifiedName + public RuleCall getQualifiedNameParserRuleCall_0() { return cQualifiedNameParserRuleCall_0; } + + //("." "*")? + public Group getGroup_1() { return cGroup_1; } + + //"." + public Keyword getFullStopKeyword_1_0() { return cFullStopKeyword_1_0; } + + //"*" + public Keyword getAsteriskKeyword_1_1() { return cAsteriskKeyword_1_1; } + } + + + private final CftModelElements pCftModel; + private final ImportDeclarationElements pImportDeclaration; + private final ComponentDefinitionElements pComponentDefinition; + private final EventDeclarationElements pEventDeclaration; + private final InputEventElements pInputEvent; + private final EventDefinitionElements pEventDefinition; + private final BasicEventDefinitionElements pBasicEventDefinition; + private final GateDefinitionElements pGateDefinition; + private final AndGateElements pAndGate; + private final OrGateElements pOrGate; + private final TransformationDefinitionElements pTransformationDefinition; + private final MappingDefinitionElements pMappingDefinition; + private final MappingParameterElements pMappingParameter; + private final LookupDefinitionElements pLookupDefinition; + private final VariableElements pVariable; + private final AssignmentElements pAssignment; + private final EventReferenceElements pEventReference; + private final ComponentInstanceElements pComponentInstance; + private final QualifiedNameElements pQualifiedName; + private final QualifiedNameWithWildcardElements pQualifiedNameWithWildcard; + private final TerminalRule tDOULBE; + + private final Grammar grammar; + + private final TerminalsGrammarAccess gaTerminals; + + @Inject + public CftLanguageGrammarAccess(GrammarProvider grammarProvider, + TerminalsGrammarAccess gaTerminals) { + this.grammar = internalFindGrammar(grammarProvider); + this.gaTerminals = gaTerminals; + this.pCftModel = new CftModelElements(); + this.pImportDeclaration = new ImportDeclarationElements(); + this.pComponentDefinition = new ComponentDefinitionElements(); + this.pEventDeclaration = new EventDeclarationElements(); + this.pInputEvent = new InputEventElements(); + this.pEventDefinition = new EventDefinitionElements(); + this.pBasicEventDefinition = new BasicEventDefinitionElements(); + this.pGateDefinition = new GateDefinitionElements(); + this.pAndGate = new AndGateElements(); + this.pOrGate = new OrGateElements(); + this.pTransformationDefinition = new TransformationDefinitionElements(); + this.pMappingDefinition = new MappingDefinitionElements(); + this.pMappingParameter = new MappingParameterElements(); + this.pLookupDefinition = new LookupDefinitionElements(); + this.pVariable = new VariableElements(); + this.pAssignment = new AssignmentElements(); + this.pEventReference = new EventReferenceElements(); + this.pComponentInstance = new ComponentInstanceElements(); + this.pQualifiedName = new QualifiedNameElements(); + this.pQualifiedNameWithWildcard = new QualifiedNameWithWildcardElements(); + this.tDOULBE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.DOULBE"); + } + + protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { + Grammar grammar = grammarProvider.getGrammar(this); + while (grammar != null) { + if ("hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage".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; + } + + + //CftModel: + // "package" packageName=QualifiedName ";"? + // imports+=ImportDeclaration* (componentDefinitions+=ComponentDefinition | + // transformationDefinitions+=TransformationDefinition)*; + public CftModelElements getCftModelAccess() { + return pCftModel; + } + + public ParserRule getCftModelRule() { + return getCftModelAccess().getRule(); + } + + //ImportDeclaration: + // "import" importedNamespace=QualifiedNameWithWildcard ";"?; + public ImportDeclarationElements getImportDeclarationAccess() { + return pImportDeclaration; + } + + public ParserRule getImportDeclarationRule() { + return getImportDeclarationAccess().getRule(); + } + + //ComponentDefinition: + // "cft" name=ID "{" (("in" inputEvents+=InputEvent* ";")? & ("out" outputEvents+=[EventDeclaration]* ";")?) + // (eventDefinitions+=EventDefinition ";")* + // "}"; + public ComponentDefinitionElements getComponentDefinitionAccess() { + return pComponentDefinition; + } + + public ParserRule getComponentDefinitionRule() { + return getComponentDefinitionAccess().getRule(); + } + + //EventDeclaration: + // InputEvent | EventDefinition; + public EventDeclarationElements getEventDeclarationAccess() { + return pEventDeclaration; + } + + public ParserRule getEventDeclarationRule() { + return getEventDeclarationAccess().getRule(); + } + + //InputEvent: + // name=ID multiple?="[]"?; + public InputEventElements getInputEventAccess() { + return pInputEvent; + } + + public ParserRule getInputEventRule() { + return getInputEventAccess().getRule(); + } + + //EventDefinition: + // BasicEventDefinition | GateDefinition; + public EventDefinitionElements getEventDefinitionAccess() { + return pEventDefinition; + } + + public ParserRule getEventDefinitionRule() { + return getEventDefinitionAccess().getRule(); + } + + //BasicEventDefinition: + // name=ID "lambda" "=" rate=DOULBE; + public BasicEventDefinitionElements getBasicEventDefinitionAccess() { + return pBasicEventDefinition; + } + + public ParserRule getBasicEventDefinitionRule() { + return getBasicEventDefinitionAccess().getRule(); + } + + //GateDefinition: + // AndGate | OrGate; + public GateDefinitionElements getGateDefinitionAccess() { + return pGateDefinition; + } + + public ParserRule getGateDefinitionRule() { + return getGateDefinitionAccess().getRule(); + } + + //AndGate: + // name=ID "and" inputEvents+=[EventDeclaration]*; + public AndGateElements getAndGateAccess() { + return pAndGate; + } + + public ParserRule getAndGateRule() { + return getAndGateAccess().getRule(); + } + + //OrGate: + // name=ID "or" inputEvents+=[EventDeclaration]*; + public OrGateElements getOrGateAccess() { + return pOrGate; + } + + public ParserRule getOrGateRule() { + return getOrGateAccess().getRule(); + } + + //TransformationDefinition: + // "transformation" name=ID "{" + // mappingDefinitions+=MappingDefinition* + // "}"; + public TransformationDefinitionElements getTransformationDefinitionAccess() { + return pTransformationDefinition; + } + + public ParserRule getTransformationDefinitionRule() { + return getTransformationDefinitionAccess().getRule(); + } + + //MappingDefinition: + // topLevel?="toplevel"? "mapping" pattern=[vql::Pattern|QualifiedName] + // "(" parameters+=MappingParameter ("," parameters+=MappingParameter)* ")" + // componentInstance=ComponentInstance? ("{" ((lookupDefinitions+=LookupDefinition | assignments+=Assignment) ";")* + // "}")?; + public MappingDefinitionElements getMappingDefinitionAccess() { + return pMappingDefinition; + } + + public ParserRule getMappingDefinitionRule() { + return getMappingDefinitionAccess().getRule(); + } + + //MappingParameter: + // name=ID; + public MappingParameterElements getMappingParameterAccess() { + return pMappingParameter; + } + + public ParserRule getMappingParameterRule() { + return getMappingParameterAccess().getRule(); + } + + //LookupDefinition: + // "lookup" mapping=[MappingDefinition] + // "(" arguments+=[MappingParameter] ("," arguments+=[MappingParameter])* ")" + // "as" name=ID; + public LookupDefinitionElements getLookupDefinitionAccess() { + return pLookupDefinition; + } + + public ParserRule getLookupDefinitionRule() { + return getLookupDefinitionAccess().getRule(); + } + + //Variable: + // ComponentInstance | LookupDefinition; + public VariableElements getVariableAccess() { + return pVariable; + } + + public ParserRule getVariableRule() { + return getVariableAccess().getRule(); + } + + //Assignment: + // input=EventReference (multiple?="+=" | ":=") output=EventReference; + public AssignmentElements getAssignmentAccess() { + return pAssignment; + } + + public ParserRule getAssignmentRule() { + return getAssignmentAccess().getRule(); + } + + //EventReference: + // component=[Variable] "." event=[EventDeclaration]; + public EventReferenceElements getEventReferenceAccess() { + return pEventReference; + } + + public ParserRule getEventReferenceRule() { + return getEventReferenceAccess().getRule(); + } + + //ComponentInstance: + // "=>" componentType=[ComponentDefinition|QualifiedName] name=ID?; + public ComponentInstanceElements getComponentInstanceAccess() { + return pComponentInstance; + } + + public ParserRule getComponentInstanceRule() { + return getComponentInstanceAccess().getRule(); + } + + //QualifiedName: + // ID ("." ID)*; + public QualifiedNameElements getQualifiedNameAccess() { + return pQualifiedName; + } + + public ParserRule getQualifiedNameRule() { + return getQualifiedNameAccess().getRule(); + } + + //QualifiedNameWithWildcard: + // QualifiedName ("." "*")?; + public QualifiedNameWithWildcardElements getQualifiedNameWithWildcardAccess() { + return pQualifiedNameWithWildcard; + } + + public ParserRule getQualifiedNameWithWildcardRule() { + return getQualifiedNameWithWildcardAccess().getRule(); + } + + //terminal DOULBE returns ecore::EDouble: + // '0'..'9'+ ("." '0'..'9'+ | ("." '0'..'9'+)? ("e" | "E") ("+" | "-")? '0'..'9'+); + public TerminalRule getDOULBERule() { + return tDOULBE; + } + + //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(); + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/AbstractCftLanguageValidator.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/AbstractCftLanguageValidator.java new file mode 100644 index 00000000..a0c1efe7 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/AbstractCftLanguageValidator.java @@ -0,0 +1,19 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.validation; + +import java.util.ArrayList; +import java.util.List; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.xtext.validation.AbstractDeclarativeValidator; + +public abstract class AbstractCftLanguageValidator extends AbstractDeclarativeValidator { + + @Override + protected List getEPackages() { + List result = new ArrayList(); + result.add(hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage.eINSTANCE); + return result; + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageConfigurableIssueCodesProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageConfigurableIssueCodesProvider.java new file mode 100644 index 00000000..642dcb1d --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageConfigurableIssueCodesProvider.java @@ -0,0 +1,22 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.validation; + +import org.eclipse.xtext.preferences.PreferenceKey; +import org.eclipse.xtext.util.IAcceptor; +import org.eclipse.xtext.validation.ConfigurableIssueCodesProvider; +import org.eclipse.xtext.validation.SeverityConverter; + +@SuppressWarnings("restriction") +public class CftLanguageConfigurableIssueCodesProvider extends ConfigurableIssueCodesProvider { + protected static final String ISSUE_CODE_PREFIX = "hu.bme.mit.inf.dslreasoner.faulttree.components."; + + public static final String DEPRECATED_MODEL_PART = ISSUE_CODE_PREFIX + "deprecatedModelPart"; + + @Override + protected void initialize(IAcceptor acceptor) { + super.initialize(acceptor); + acceptor.accept(create(DEPRECATED_MODEL_PART, SeverityConverter.SEVERITY_WARNING)); + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext new file mode 100644 index 00000000..3d82413f --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext @@ -0,0 +1,82 @@ +grammar hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage with org.eclipse.xtext.common.Terminals + +import "http://www.eclipse.org/emf/2002/Ecore" as ecore +import "http://www.eclipse.org/viatra/query/patternlanguage/emf/PatternLanguage" as vql + +generate cftLanguage "http://www.bme.hu/mit/inf/dslreasoner/faulttree/components/CftLanguage" + +CftModel: + "package" packageName=QualifiedName ";"? + imports+=ImportDeclaration* + (componentDefinitions+=ComponentDefinition | transformationDefinitions+=TransformationDefinition)*; + +ImportDeclaration: + "import" importedNamespace=QualifiedNameWithWildcard ";"?; + +ComponentDefinition: + "cft" name=ID "{" + (("in" inputEvents+=InputEvent* ";")? & ("out" outputEvents+=[EventDeclaration]* ";")?) + (eventDefinitions+=EventDefinition ";")* + "}"; + +EventDeclaration: + InputEvent | EventDefinition; + +InputEvent: + name=ID multiple?="[]"?; + +EventDefinition: + BasicEventDefinition | GateDefinition; + +BasicEventDefinition: + name=ID "lambda" "=" rate=DOULBE; + +GateDefinition: + AndGate | OrGate; + +AndGate: + name=ID "and" inputEvents+=[EventDeclaration]*; + +OrGate: + name=ID "or" inputEvents+=[EventDeclaration]*; + +TransformationDefinition: + "transformation" name=ID "{" + mappingDefinitions+=MappingDefinition* + "}"; + +MappingDefinition: + topLevel?="toplevel"? "mapping" pattern=[vql::Pattern|QualifiedName] + "(" parameters+=MappingParameter ("," parameters+=MappingParameter)* ")" + (componentInstance=ComponentInstance)? ("{" + ((lookupDefinitions+=LookupDefinition | assignments+=Assignment) ";")* + "}")?; + +MappingParameter: + name=ID; + +LookupDefinition: + "lookup" mapping=[MappingDefinition] + "(" arguments+=[MappingParameter] ("," arguments+=[MappingParameter])* ")" + "as" name=ID; + +Variable: + ComponentInstance | LookupDefinition; + +Assignment: + input=EventReference (multiple?="+=" | ":=") output=EventReference; + +EventReference: + component=[Variable] "." event=[EventDeclaration]; + +ComponentInstance: + "=>" componentType=[ComponentDefinition|QualifiedName] name=ID?; + +QualifiedName returns ecore::EString: + ID ("." ID)*; + +QualifiedNameWithWildcard returns ecore::EString: + QualifiedName ("." "*")?; + +terminal DOULBE returns ecore::EDouble: + ('0'..'9')+ ("." ('0'..'9')+ | ("." ('0'..'9')+)? ("e" | "E") ("+" | "-")? ('0'..'9')+); diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.xtend new file mode 100644 index 00000000..f780591d --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.xtend @@ -0,0 +1,33 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components + +import com.google.inject.Binder +import com.google.inject.name.Names +import hu.bme.mit.inf.dslreasoner.faulttree.components.naming.CftLanguageQualifiedNameProvider +import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.CftLanguageImportedNamespaceAwareLocalScopeProvider +import org.eclipse.xtext.scoping.IScopeProvider +import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider +import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider + +/** + * Use this class to register components to be used at runtime / without the Equinox extension registry. + */ +class CftLanguageRuntimeModule extends AbstractCftLanguageRuntimeModule { + + override bindIGlobalScopeProvider() { + DefaultGlobalScopeProvider + } + + override configureIScopeProviderDelegate(Binder binder) { + binder.bind(IScopeProvider).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to( + CftLanguageImportedNamespaceAwareLocalScopeProvider) + } + + + override bindIQualifiedNameProvider() { + CftLanguageQualifiedNameProvider + } + +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.xtend new file mode 100644 index 00000000..7ec57980 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.xtend @@ -0,0 +1,15 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components + + +/** + * Initialization support for running Xtext languages without Equinox extension registry. + */ +class CftLanguageStandaloneSetup extends CftLanguageStandaloneSetupGenerated { + + def static void doSetup() { + new CftLanguageStandaloneSetup().createInjectorAndDoEMFRegistration() + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/GenerateCftLanguage.mwe2 b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/GenerateCftLanguage.mwe2 new file mode 100644 index 00000000..fa383404 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/GenerateCftLanguage.mwe2 @@ -0,0 +1,46 @@ +module hu.bme.mit.inf.dslreasoner.faulttree.components.GenerateCftLanguage + +import org.eclipse.xtext.xtext.generator.* +import org.eclipse.xtext.xtext.generator.model.project.* + +var rootPath = ".." + +Workflow { + + component = XtextGenerator { + configuration = { + project = StandardProjectConfig { + baseName = "hu.bme.mit.inf.dslreasoner.faulttree.components" + rootPath = rootPath + eclipsePlugin = { + enabled = true + } + createEclipseMetaData = true + } + code = { + encoding = "UTF-8" + lineDelimiter = "\n" + fileHeader = "/*\n * generated by Xtext \${version}\n */" + } + } + language = StandardLanguage { + name = "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage" + fileExtensions = "cft" + + referencedResource = "platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel" + referencedResource = "platform:/resource/org.eclipse.viatra.query.patternlanguage.emf/model/PatternLanguage.genmodel" + + serializer = { + generateStub = false + } + validator = { + // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" + // Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage + generateDeprecationValidation = true + } + junitSupport = { + junitVersion = "5" + } + } + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.xtend new file mode 100644 index 00000000..d7ebace4 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.xtend @@ -0,0 +1,25 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.generator + +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.xtext.generator.AbstractGenerator +import org.eclipse.xtext.generator.IFileSystemAccess2 +import org.eclipse.xtext.generator.IGeneratorContext + +/** + * Generates code from your model files on save. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation + */ +class CftLanguageGenerator extends AbstractGenerator { + + override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { +// fsa.generateFile('greetings.txt', 'People to greet: ' + +// resource.allContents +// .filter(Greeting) +// .map[name] +// .join(', ')) + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.xtend new file mode 100644 index 00000000..eb96901c --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.xtend @@ -0,0 +1,27 @@ +package hu.bme.mit.inf.dslreasoner.faulttree.components.naming + +import com.google.inject.Inject +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition +import org.eclipse.emf.ecore.EObject +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider + +class CftLanguageQualifiedNameProvider extends DefaultDeclarativeQualifiedNameProvider { + @Inject PackageNameProvider packageNameProvider + + def qualifiedName(ComponentDefinition componentDefinition) { + computePackageQualifiedName(componentDefinition, componentDefinition.name) + } + + def qualifiedName(TransformationDefinition transformationDefinition) { + computePackageQualifiedName(transformationDefinition, transformationDefinition.name) + } + + private def computePackageQualifiedName(EObject eObj, String name) { + if (name === null) { + return null + } + val packageQualifier = packageNameProvider.getPackageName(eObj) + packageQualifier.append(name) + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.xtend new file mode 100644 index 00000000..a05c8138 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.xtend @@ -0,0 +1,30 @@ +package hu.bme.mit.inf.dslreasoner.faulttree.components.naming + +import com.google.inject.Inject +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel +import org.eclipse.emf.ecore.EObject +import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor +import org.eclipse.xtext.EcoreUtil2 +import org.eclipse.xtext.naming.IQualifiedNameConverter +import org.eclipse.xtext.naming.QualifiedName + +class PackageNameProvider { + val IQualifiedNameConverter qualifiedNameConverter + + @FinalFieldsConstructor + @Inject + new() { + } + + def getPackageName(EObject eObj) { + if (eObj === null) { + return QualifiedName.EMPTY + } + val pacakgeName = EcoreUtil2.getContainerOfType(eObj, CftModel)?.packageName + if (pacakgeName.isNullOrEmpty) { + QualifiedName.EMPTY + } else { + qualifiedNameConverter.toQualifiedName(pacakgeName) + } + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend new file mode 100644 index 00000000..39a6e5a5 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend @@ -0,0 +1,45 @@ +package hu.bme.mit.inf.dslreasoner.faulttree.components.scoping + +import com.google.inject.Inject +import com.google.inject.Singleton +import hu.bme.mit.inf.dslreasoner.faulttree.components.naming.PackageNameProvider +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.EReference +import org.eclipse.xtext.naming.IQualifiedNameConverter +import org.eclipse.xtext.naming.IQualifiedNameProvider +import org.eclipse.xtext.scoping.ICaseInsensitivityHelper +import org.eclipse.xtext.scoping.IGlobalScopeProvider +import org.eclipse.xtext.scoping.IScope +import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider + +@Singleton +class CftLanguageImportedNamespaceAwareLocalScopeProvider extends ImportedNamespaceAwareLocalScopeProvider { + @Inject PackageNameProvider packageNameProvider + + @Inject + new() { + } + + new(IGlobalScopeProvider globalScopeProvider, IQualifiedNameProvider qualifiedNameProvider, + IQualifiedNameConverter qualifiedNameConverter, ICaseInsensitivityHelper caseInsensitivityHelper) { + super(globalScopeProvider, qualifiedNameProvider, qualifiedNameConverter, caseInsensitivityHelper) + packageNameProvider = new PackageNameProvider(qualifiedNameConverter) + } + + override protected internalGetImportedNamespaceResolvers(EObject context, boolean ignoreCase) { + val resolvers = super.internalGetImportedNamespaceResolvers(context, ignoreCase) + val packageName = packageNameProvider.getPackageName(context) + if (!packageName.empty) { + val packageNormalizer = doCreateImportNormalizer(packageName, true, ignoreCase) + resolvers.add(0, packageNormalizer) + } + resolvers + } + + def createImportNormalizedScope(IScope elements, EObject context, EReference reference) { + val ignoreCase = isIgnoreCase(reference) + val type = reference.EReferenceType + val namespaceResolvers = getImportedNamespaceResolvers(context, ignoreCase) + createImportScope(elements, namespaceResolvers, null, type, ignoreCase) + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.xtend new file mode 100644 index 00000000..ab708087 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.xtend @@ -0,0 +1,138 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.scoping + +import com.google.common.collect.Lists +import com.google.inject.Inject +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable +import org.eclipse.emf.common.notify.Notifier +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.EReference +import org.eclipse.xtext.EcoreUtil2 +import org.eclipse.xtext.resource.EObjectDescription +import org.eclipse.xtext.resource.IResourceDescriptions +import org.eclipse.xtext.resource.IResourceDescriptionsProvider +import org.eclipse.xtext.scoping.IScope +import org.eclipse.xtext.scoping.Scopes +import org.eclipse.xtext.scoping.impl.SimpleScope + +import static hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage.Literals.* + +/** + * This class contains custom scoping description. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping + * on how and when to use it. + */ +class CftLanguageScopeProvider extends AbstractCftLanguageScopeProvider { + public static val SINGLETON_VARIABLE_PREFIX = "_" + + @Inject IResourceDescriptionsProvider resourceDescriptionsProvider + @Inject CftLanguageImportedNamespaceAwareLocalScopeProvider importedNamespaceProvider + + override getScope(EObject context, EReference reference) { + switch (reference) { + case LOOKUP_DEFINITION__MAPPING: + getRuleDefinitionsScope(context, reference) + case LOOKUP_DEFINITION__ARGUMENTS: + getMappingParametersScope(context) + case EVENT_REFERENCE__COMPONENT: + getComponentInstancesScope(context) + case EVENT_REFERENCE__EVENT: + getEventDeclarationsScope(context) + default: + super.getScope(context, reference) + } + } + + protected def getRuleDefinitionsScope(EObject context, EReference referece) { + val transformationDefinition = EcoreUtil2.getContainerOfType(context, TransformationDefinition) + if (transformationDefinition === null) { + return IScope.NULLSCOPE + } + val resourceDescriptions = getResourceDescriptions(transformationDefinition) + val mappingDefinitionDescriptions = toMappingDefinitionDescriptions(resourceDescriptions, + transformationDefinition.mappingDefinitions) + val ruleDefinitionsScope = new SimpleScope(IScope.NULLSCOPE, mappingDefinitionDescriptions) + importedNamespaceProvider.createImportNormalizedScope(ruleDefinitionsScope, context, referece) + } + + protected def toMappingDefinitionDescriptions(IResourceDescriptions resourceDescriptions, + Iterable ruleDefinitions) { + val mappingDefinitionDescriptions = Lists.newArrayListWithExpectedSize(ruleDefinitions.size) + for (ruleDefinition : ruleDefinitions) { + val pattern = ruleDefinition?.pattern + if (pattern !== null) { + val patternName = resourceDescriptions.getExportedObjectsByObject(pattern).head?.qualifiedName + if (patternName !== null) { + mappingDefinitionDescriptions += EObjectDescription.create(patternName, ruleDefinition) + } + } + + } + mappingDefinitionDescriptions + } + + private def getResourceDescriptions(Notifier notifier) { + val resourceSet = EcoreUtil2.getResourceSet(notifier) + if (resourceSet === null) { + new IResourceDescriptions.NullImpl + } else { + resourceDescriptionsProvider.getResourceDescriptions(resourceSet) + } + } + + protected def getMappingParametersScope(EObject context) { + val mappingDefinition = EcoreUtil2.getContainerOfType(context, MappingDefinition) + if (mappingDefinition === null) { + return IScope.NULLSCOPE + } + val variables = mappingDefinition.parameters.filter [ + !name.startsWith(SINGLETON_VARIABLE_PREFIX) + ] + Scopes.scopeFor(variables) + } + + protected def getComponentInstancesScope(EObject context) { + val mappingDefinition = EcoreUtil2.getContainerOfType(context, MappingDefinition) + if (mappingDefinition === null) { + return IScope.NULLSCOPE + } + val componentInstances = newArrayList + componentInstances.addAll(mappingDefinition.lookupDefinitions) + if (mappingDefinition.componentInstance !== null) { + componentInstances += mappingDefinition.componentInstance + } + Scopes.scopeFor(componentInstances) + } + + protected def getEventDeclarationsScope(EObject context) { + val variable = EcoreUtil2.getContainerOfType(context, EventReference)?.component + val events = switch (variable) { + ComponentInstance: + variable.componentType?.allEventDeclarations + LookupDefinition: + variable.mapping?.componentInstance?.componentType?.allEventDeclarations + default: + null + } + if (events === null) { + return IScope.NULLSCOPE + } + Scopes.scopeFor(events) + } + + private def getAllEventDeclarations(ComponentDefinition componentDefinition) { + val eventDeclarations = newArrayList + eventDeclarations.addAll(componentDefinition.inputEvents) + eventDeclarations.addAll(componentDefinition.eventDefinitions) + eventDeclarations + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.xtend new file mode 100644 index 00000000..f1da10bb --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.xtend @@ -0,0 +1,25 @@ +/* + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.validation + + +/** + * This class contains custom validation rules. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation + */ +class CftLanguageValidator extends AbstractCftLanguageValidator { + +// public static val INVALID_NAME = 'invalidName' +// +// @Check +// def checkGreetingStartsWithCapital(Greeting greeting) { +// if (!Character.isUpperCase(greeting.name.charAt(0))) { +// warning('Name should start with a capital', +// CftLanguagePackage.Literals.GREETING__NAME, +// INVALID_NAME) +// } +// } + +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin new file mode 100644 index 00000000..5f61bd34 Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin differ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin new file mode 100644 index 00000000..deb1eee6 Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin differ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore new file mode 100644 index 00000000..b3125e3f --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore @@ -0,0 +1,2 @@ +/.CftLanguageRuntimeModule.java._trace +/.CftLanguageStandaloneSetup.java._trace diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.java new file mode 100644 index 00000000..c63cd33c --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.java @@ -0,0 +1,37 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components; + +import com.google.inject.Binder; +import com.google.inject.name.Names; +import hu.bme.mit.inf.dslreasoner.faulttree.components.AbstractCftLanguageRuntimeModule; +import hu.bme.mit.inf.dslreasoner.faulttree.components.naming.CftLanguageQualifiedNameProvider; +import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.CftLanguageImportedNamespaceAwareLocalScopeProvider; +import org.eclipse.xtext.naming.IQualifiedNameProvider; +import org.eclipse.xtext.scoping.IGlobalScopeProvider; +import org.eclipse.xtext.scoping.IScopeProvider; +import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; +import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider; + +/** + * Use this class to register components to be used at runtime / without the Equinox extension registry. + */ +@SuppressWarnings("all") +public class CftLanguageRuntimeModule extends AbstractCftLanguageRuntimeModule { + @Override + public Class bindIGlobalScopeProvider() { + return DefaultGlobalScopeProvider.class; + } + + @Override + public void configureIScopeProviderDelegate(final Binder binder) { + binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to( + CftLanguageImportedNamespaceAwareLocalScopeProvider.class); + } + + @Override + public Class bindIQualifiedNameProvider() { + return CftLanguageQualifiedNameProvider.class; + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.java new file mode 100644 index 00000000..3eed418e --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.java @@ -0,0 +1,16 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguageStandaloneSetupGenerated; + +/** + * Initialization support for running Xtext languages without Equinox extension registry. + */ +@SuppressWarnings("all") +public class CftLanguageStandaloneSetup extends CftLanguageStandaloneSetupGenerated { + public static void doSetup() { + new CftLanguageStandaloneSetup().createInjectorAndDoEMFRegistration(); + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin new file mode 100644 index 00000000..a974921d Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin differ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore new file mode 100644 index 00000000..c1d8820b --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore @@ -0,0 +1 @@ +/.CftLanguageGenerator.java._trace diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.java new file mode 100644 index 00000000..8dddfb2e --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.java @@ -0,0 +1,21 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.generator; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.xtext.generator.AbstractGenerator; +import org.eclipse.xtext.generator.IFileSystemAccess2; +import org.eclipse.xtext.generator.IGeneratorContext; + +/** + * Generates code from your model files on save. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation + */ +@SuppressWarnings("all") +public class CftLanguageGenerator extends AbstractGenerator { + @Override + public void doGenerate(final Resource resource, final IFileSystemAccess2 fsa, final IGeneratorContext context) { + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin new file mode 100644 index 00000000..73ada4f1 Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin differ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin new file mode 100644 index 00000000..6f4eaae7 Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin differ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore new file mode 100644 index 00000000..b982f16c --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore @@ -0,0 +1,2 @@ +/.CftLanguageQualifiedNameProvider.java._trace +/.PackageNameProvider.java._trace diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.java new file mode 100644 index 00000000..4e0607dd --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.java @@ -0,0 +1,35 @@ +package hu.bme.mit.inf.dslreasoner.faulttree.components.naming; + +import com.google.inject.Inject; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.naming.PackageNameProvider; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.QualifiedName; + +@SuppressWarnings("all") +public class CftLanguageQualifiedNameProvider extends DefaultDeclarativeQualifiedNameProvider { + @Inject + private PackageNameProvider packageNameProvider; + + public QualifiedName qualifiedName(final ComponentDefinition componentDefinition) { + return this.computePackageQualifiedName(componentDefinition, componentDefinition.getName()); + } + + public QualifiedName qualifiedName(final TransformationDefinition transformationDefinition) { + return this.computePackageQualifiedName(transformationDefinition, transformationDefinition.getName()); + } + + private QualifiedName computePackageQualifiedName(final EObject eObj, final String name) { + QualifiedName _xblockexpression = null; + { + if ((name == null)) { + return null; + } + final QualifiedName packageQualifier = this.packageNameProvider.getPackageName(eObj); + _xblockexpression = packageQualifier.append(name); + } + return _xblockexpression; + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.java new file mode 100644 index 00000000..5841dc75 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.java @@ -0,0 +1,46 @@ +package hu.bme.mit.inf.dslreasoner.faulttree.components.naming; + +import com.google.inject.Inject; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor; +import org.eclipse.xtext.EcoreUtil2; +import org.eclipse.xtext.naming.IQualifiedNameConverter; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.xtext.xbase.lib.StringExtensions; + +@SuppressWarnings("all") +public class PackageNameProvider { + private final IQualifiedNameConverter qualifiedNameConverter; + + @FinalFieldsConstructor + @Inject + public PackageNameProvider(final IQualifiedNameConverter qualifiedNameConverter) { + super(); + this.qualifiedNameConverter = qualifiedNameConverter; + } + + public QualifiedName getPackageName(final EObject eObj) { + QualifiedName _xblockexpression = null; + { + if ((eObj == null)) { + return QualifiedName.EMPTY; + } + CftModel _containerOfType = EcoreUtil2.getContainerOfType(eObj, CftModel.class); + String _packageName = null; + if (_containerOfType!=null) { + _packageName=_containerOfType.getPackageName(); + } + final String pacakgeName = _packageName; + QualifiedName _xifexpression = null; + boolean _isNullOrEmpty = StringExtensions.isNullOrEmpty(pacakgeName); + if (_isNullOrEmpty) { + _xifexpression = QualifiedName.EMPTY; + } else { + _xifexpression = this.qualifiedNameConverter.toQualifiedName(pacakgeName); + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin new file mode 100644 index 00000000..4a0036bd Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin differ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin new file mode 100644 index 00000000..722c0e58 Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin differ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore new file mode 100644 index 00000000..75285868 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore @@ -0,0 +1,4 @@ +/.CftLanguageScopeProvider.java._trace +/.CftLanguageImportedNamespaceAwareScopeProvider.java._trace +/.CftLanguageImportedNamespaceAwareScopeLocalProvider.java._trace +/.CftLanguageImportedNamespaceAwareLocalScopeProvider.java._trace diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java new file mode 100644 index 00000000..d90fe787 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java @@ -0,0 +1,63 @@ +package hu.bme.mit.inf.dslreasoner.faulttree.components.scoping; + +import com.google.inject.Inject; +import com.google.inject.Singleton; +import hu.bme.mit.inf.dslreasoner.faulttree.components.naming.PackageNameProvider; +import java.util.List; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.xtext.naming.IQualifiedNameConverter; +import org.eclipse.xtext.naming.IQualifiedNameProvider; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.xtext.scoping.ICaseInsensitivityHelper; +import org.eclipse.xtext.scoping.IGlobalScopeProvider; +import org.eclipse.xtext.scoping.IScope; +import org.eclipse.xtext.scoping.impl.ImportNormalizer; +import org.eclipse.xtext.scoping.impl.ImportScope; +import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider; + +@Singleton +@SuppressWarnings("all") +public class CftLanguageImportedNamespaceAwareLocalScopeProvider extends ImportedNamespaceAwareLocalScopeProvider { + @Inject + private PackageNameProvider packageNameProvider; + + @Inject + public CftLanguageImportedNamespaceAwareLocalScopeProvider() { + } + + public CftLanguageImportedNamespaceAwareLocalScopeProvider(final IGlobalScopeProvider globalScopeProvider, final IQualifiedNameProvider qualifiedNameProvider, final IQualifiedNameConverter qualifiedNameConverter, final ICaseInsensitivityHelper caseInsensitivityHelper) { + super(globalScopeProvider, qualifiedNameProvider, qualifiedNameConverter, caseInsensitivityHelper); + PackageNameProvider _packageNameProvider = new PackageNameProvider(qualifiedNameConverter); + this.packageNameProvider = _packageNameProvider; + } + + @Override + protected List internalGetImportedNamespaceResolvers(final EObject context, final boolean ignoreCase) { + List _xblockexpression = null; + { + final List resolvers = super.internalGetImportedNamespaceResolvers(context, ignoreCase); + final QualifiedName packageName = this.packageNameProvider.getPackageName(context); + boolean _isEmpty = packageName.isEmpty(); + boolean _not = (!_isEmpty); + if (_not) { + final ImportNormalizer packageNormalizer = this.doCreateImportNormalizer(packageName, true, ignoreCase); + resolvers.add(0, packageNormalizer); + } + _xblockexpression = resolvers; + } + return _xblockexpression; + } + + public ImportScope createImportNormalizedScope(final IScope elements, final EObject context, final EReference reference) { + ImportScope _xblockexpression = null; + { + final boolean ignoreCase = this.isIgnoreCase(reference); + final EClass type = reference.getEReferenceType(); + final List namespaceResolvers = this.getImportedNamespaceResolvers(context, ignoreCase); + _xblockexpression = this.createImportScope(elements, namespaceResolvers, null, type, ignoreCase); + } + return _xblockexpression; + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java new file mode 100644 index 00000000..0149c8d1 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java @@ -0,0 +1,248 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.scoping; + +import com.google.common.base.Objects; +import com.google.common.collect.Lists; +import com.google.inject.Inject; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventDeclaration; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; +import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable; +import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.AbstractCftLanguageScopeProvider; +import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.CftLanguageImportedNamespaceAwareLocalScopeProvider; +import java.util.ArrayList; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.viatra.query.patternlanguage.emf.vql.Pattern; +import org.eclipse.xtext.EcoreUtil2; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.xtext.resource.EObjectDescription; +import org.eclipse.xtext.resource.IEObjectDescription; +import org.eclipse.xtext.resource.IResourceDescriptions; +import org.eclipse.xtext.resource.IResourceDescriptionsProvider; +import org.eclipse.xtext.scoping.IScope; +import org.eclipse.xtext.scoping.Scopes; +import org.eclipse.xtext.scoping.impl.ImportScope; +import org.eclipse.xtext.scoping.impl.SimpleScope; +import org.eclipse.xtext.xbase.lib.CollectionLiterals; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; + +/** + * This class contains custom scoping description. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping + * on how and when to use it. + */ +@SuppressWarnings("all") +public class CftLanguageScopeProvider extends AbstractCftLanguageScopeProvider { + public static final String SINGLETON_VARIABLE_PREFIX = "_"; + + @Inject + private IResourceDescriptionsProvider resourceDescriptionsProvider; + + @Inject + private CftLanguageImportedNamespaceAwareLocalScopeProvider importedNamespaceProvider; + + @Override + public IScope getScope(final EObject context, final EReference reference) { + IScope _switchResult = null; + boolean _matched = false; + if (Objects.equal(reference, CftLanguagePackage.Literals.LOOKUP_DEFINITION__MAPPING)) { + _matched=true; + _switchResult = this.getRuleDefinitionsScope(context, reference); + } + if (!_matched) { + if (Objects.equal(reference, CftLanguagePackage.Literals.LOOKUP_DEFINITION__ARGUMENTS)) { + _matched=true; + _switchResult = this.getMappingParametersScope(context); + } + } + if (!_matched) { + if (Objects.equal(reference, CftLanguagePackage.Literals.EVENT_REFERENCE__COMPONENT)) { + _matched=true; + _switchResult = this.getComponentInstancesScope(context); + } + } + if (!_matched) { + if (Objects.equal(reference, CftLanguagePackage.Literals.EVENT_REFERENCE__EVENT)) { + _matched=true; + _switchResult = this.getEventDeclarationsScope(context); + } + } + if (!_matched) { + _switchResult = super.getScope(context, reference); + } + return _switchResult; + } + + protected IScope getRuleDefinitionsScope(final EObject context, final EReference referece) { + ImportScope _xblockexpression = null; + { + final TransformationDefinition transformationDefinition = EcoreUtil2.getContainerOfType(context, TransformationDefinition.class); + if ((transformationDefinition == null)) { + return IScope.NULLSCOPE; + } + final IResourceDescriptions resourceDescriptions = this.getResourceDescriptions(transformationDefinition); + final ArrayList mappingDefinitionDescriptions = this.toMappingDefinitionDescriptions(resourceDescriptions, + transformationDefinition.getMappingDefinitions()); + final SimpleScope ruleDefinitionsScope = new SimpleScope(IScope.NULLSCOPE, mappingDefinitionDescriptions); + _xblockexpression = this.importedNamespaceProvider.createImportNormalizedScope(ruleDefinitionsScope, context, referece); + } + return _xblockexpression; + } + + protected ArrayList toMappingDefinitionDescriptions(final IResourceDescriptions resourceDescriptions, final Iterable ruleDefinitions) { + ArrayList _xblockexpression = null; + { + final ArrayList mappingDefinitionDescriptions = Lists.newArrayListWithExpectedSize(IterableExtensions.size(ruleDefinitions)); + for (final MappingDefinition ruleDefinition : ruleDefinitions) { + { + Pattern _pattern = null; + if (ruleDefinition!=null) { + _pattern=ruleDefinition.getPattern(); + } + final Pattern pattern = _pattern; + if ((pattern != null)) { + IEObjectDescription _head = IterableExtensions.head(resourceDescriptions.getExportedObjectsByObject(pattern)); + QualifiedName _qualifiedName = null; + if (_head!=null) { + _qualifiedName=_head.getQualifiedName(); + } + final QualifiedName patternName = _qualifiedName; + if ((patternName != null)) { + IEObjectDescription _create = EObjectDescription.create(patternName, ruleDefinition); + mappingDefinitionDescriptions.add(_create); + } + } + } + } + _xblockexpression = mappingDefinitionDescriptions; + } + return _xblockexpression; + } + + private IResourceDescriptions getResourceDescriptions(final Notifier notifier) { + IResourceDescriptions _xblockexpression = null; + { + final ResourceSet resourceSet = EcoreUtil2.getResourceSet(notifier); + IResourceDescriptions _xifexpression = null; + if ((resourceSet == null)) { + _xifexpression = new IResourceDescriptions.NullImpl(); + } else { + _xifexpression = this.resourceDescriptionsProvider.getResourceDescriptions(resourceSet); + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + } + + protected IScope getMappingParametersScope(final EObject context) { + IScope _xblockexpression = null; + { + final MappingDefinition mappingDefinition = EcoreUtil2.getContainerOfType(context, MappingDefinition.class); + if ((mappingDefinition == null)) { + return IScope.NULLSCOPE; + } + final Function1 _function = (MappingParameter it) -> { + boolean _startsWith = it.getName().startsWith(CftLanguageScopeProvider.SINGLETON_VARIABLE_PREFIX); + return Boolean.valueOf((!_startsWith)); + }; + final Iterable variables = IterableExtensions.filter(mappingDefinition.getParameters(), _function); + _xblockexpression = Scopes.scopeFor(variables); + } + return _xblockexpression; + } + + protected IScope getComponentInstancesScope(final EObject context) { + IScope _xblockexpression = null; + { + final MappingDefinition mappingDefinition = EcoreUtil2.getContainerOfType(context, MappingDefinition.class); + if ((mappingDefinition == null)) { + return IScope.NULLSCOPE; + } + final ArrayList componentInstances = CollectionLiterals.newArrayList(); + componentInstances.addAll(mappingDefinition.getLookupDefinitions()); + ComponentInstance _componentInstance = mappingDefinition.getComponentInstance(); + boolean _tripleNotEquals = (_componentInstance != null); + if (_tripleNotEquals) { + ComponentInstance _componentInstance_1 = mappingDefinition.getComponentInstance(); + componentInstances.add(_componentInstance_1); + } + _xblockexpression = Scopes.scopeFor(componentInstances); + } + return _xblockexpression; + } + + protected IScope getEventDeclarationsScope(final EObject context) { + IScope _xblockexpression = null; + { + EventReference _containerOfType = EcoreUtil2.getContainerOfType(context, EventReference.class); + Variable _component = null; + if (_containerOfType!=null) { + _component=_containerOfType.getComponent(); + } + final Variable variable = _component; + ArrayList _switchResult = null; + boolean _matched = false; + if (variable instanceof ComponentInstance) { + _matched=true; + ComponentDefinition _componentType = ((ComponentInstance)variable).getComponentType(); + ArrayList _allEventDeclarations = null; + if (_componentType!=null) { + _allEventDeclarations=this.getAllEventDeclarations(_componentType); + } + _switchResult = _allEventDeclarations; + } + if (!_matched) { + if (variable instanceof LookupDefinition) { + _matched=true; + MappingDefinition _mapping = ((LookupDefinition)variable).getMapping(); + ComponentInstance _componentInstance = null; + if (_mapping!=null) { + _componentInstance=_mapping.getComponentInstance(); + } + ComponentDefinition _componentType = null; + if (_componentInstance!=null) { + _componentType=_componentInstance.getComponentType(); + } + ArrayList _allEventDeclarations = null; + if (_componentType!=null) { + _allEventDeclarations=this.getAllEventDeclarations(_componentType); + } + _switchResult = _allEventDeclarations; + } + } + if (!_matched) { + _switchResult = null; + } + final ArrayList events = _switchResult; + if ((events == null)) { + return IScope.NULLSCOPE; + } + _xblockexpression = Scopes.scopeFor(events); + } + return _xblockexpression; + } + + private ArrayList getAllEventDeclarations(final ComponentDefinition componentDefinition) { + ArrayList _xblockexpression = null; + { + final ArrayList eventDeclarations = CollectionLiterals.newArrayList(); + eventDeclarations.addAll(componentDefinition.getInputEvents()); + eventDeclarations.addAll(componentDefinition.getEventDefinitions()); + _xblockexpression = eventDeclarations; + } + return _xblockexpression; + } +} diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin new file mode 100644 index 00000000..c978854b Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin differ diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore new file mode 100644 index 00000000..9065804d --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore @@ -0,0 +1 @@ +/.CftLanguageValidator.java._trace diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.java new file mode 100644 index 00000000..758d29f4 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.java @@ -0,0 +1,15 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.faulttree.components.validation; + +import hu.bme.mit.inf.dslreasoner.faulttree.components.validation.AbstractCftLanguageValidator; + +/** + * This class contains custom validation rules. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation + */ +@SuppressWarnings("all") +public class CftLanguageValidator extends AbstractCftLanguageValidator { +} -- cgit v1.2.3-54-g00ecf