mirror of
https://github.com/Minres/RDL-Editor.git
synced 2025-07-01 13:33:27 +02:00
Changed grammar and added code generator
* changed the grammar to ease code generation * added a code generator and a standalone setup to generate SystemC code using SC-Components lib
This commit is contained in:
@ -8,8 +8,8 @@
|
||||
eType="#//ComponentDefinition" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="enumDefinitions" upperBound="-1"
|
||||
eType="#//EnumDefinition" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="namedInstantiations" upperBound="-1"
|
||||
eType="#//NamedInstantiation" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="instantiations" upperBound="-1"
|
||||
eType="#//Instantiation" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="propertyAssignments" upperBound="-1"
|
||||
eType="#//PropertyAssignment" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="propertyDefinitions" upperBound="-1"
|
||||
@ -56,14 +56,12 @@
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="componentDefinitions" upperBound="-1"
|
||||
eType="#//ComponentDefinition" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="namedInstantiations" upperBound="-1"
|
||||
eType="#//NamedInstantiation" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="instantiations" upperBound="-1"
|
||||
eType="#//Instantiation" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="propertyAssignments" upperBound="-1"
|
||||
eType="#//PropertyAssignment" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="enumDefinitions" upperBound="-1"
|
||||
eType="#//EnumDefinition" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="immediateInstantiation"
|
||||
eType="#//ImmediateInstantiation" containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EEnum" name="ComponentDefinitionType">
|
||||
<eLiterals name="SIGNAL" literal="signal"/>
|
||||
@ -72,16 +70,13 @@
|
||||
<eLiterals name="REG" value="3" literal="reg"/>
|
||||
<eLiterals name="FIELD" value="4" literal="field"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="NamedInstantiation">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="external" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="internal" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Instantiation">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="instanceType" eType="#//EnumInstanceType"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="alias" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="component" eType="#//ComponentDefinition"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="componentInstances" upperBound="-1"
|
||||
eType="#//ComponentInstance" containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="ImmediateInstantiation">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="external" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="componentRef" eType="#//ComponentDefinition"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="component" eType="#//ComponentDefinition"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="componentInstances" upperBound="-1"
|
||||
eType="#//ComponentInstance" containment="true"/>
|
||||
</eClassifiers>
|
||||
@ -94,8 +89,8 @@
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="addrMod" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Range">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="start" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="end" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="left" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="right" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="PropertyAssignment"/>
|
||||
@ -272,4 +267,8 @@
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="EnumInstanceType">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="EXTERNAL" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="INTERNAL" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
</ecore:EPackage>
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="generated by Xtext 2.12.0" modelDirectory="/com.minres.rdl/src-gen"
|
||||
modelPluginID="com.minres.rdl" forceOverwrite="true" modelName="RDL" updateClasspath="false"
|
||||
rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" complianceLevel="6.0"
|
||||
copyrightFields="false" runtimeVersion="2.12">
|
||||
copyrightFields="false" runtimeVersion="2.13">
|
||||
<genPackages prefix="Rdl" basePackage="com.minres.rdl" disposableProviderFactory="true"
|
||||
fileExtensions="rdl" ecorePackage="RDL.ecore#/">
|
||||
<genEnums typeSafeEnumCompatible="false" ecoreEnum="RDL.ecore#//PropertyTypeName">
|
||||
@ -136,7 +136,7 @@
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Root/includes"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Root/componentDefinitions"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Root/enumDefinitions"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Root/namedInstantiations"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Root/instantiations"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Root/propertyAssignments"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Root/propertyDefinitions"/>
|
||||
</genClasses>
|
||||
@ -159,21 +159,16 @@
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//ComponentDefinition/type"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//ComponentDefinition/name"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//ComponentDefinition/componentDefinitions"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//ComponentDefinition/namedInstantiations"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//ComponentDefinition/instantiations"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//ComponentDefinition/propertyAssignments"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//ComponentDefinition/enumDefinitions"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//ComponentDefinition/immediateInstantiation"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="RDL.ecore#//NamedInstantiation">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//NamedInstantiation/external"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//NamedInstantiation/internal"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//NamedInstantiation/alias"/>
|
||||
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference RDL.ecore#//NamedInstantiation/component"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//NamedInstantiation/componentInstances"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="RDL.ecore#//ImmediateInstantiation">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//ImmediateInstantiation/external"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//ImmediateInstantiation/componentInstances"/>
|
||||
<genClasses ecoreClass="RDL.ecore#//Instantiation">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Instantiation/instanceType"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//Instantiation/alias"/>
|
||||
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference RDL.ecore#//Instantiation/componentRef"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Instantiation/component"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//Instantiation/componentInstances"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="RDL.ecore#//ComponentInstance">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RDL.ecore#//ComponentInstance/range"/>
|
||||
@ -183,8 +178,8 @@
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//ComponentInstance/addrMod"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="RDL.ecore#//Range">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//Range/start"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//Range/end"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//Range/left"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//Range/right"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//Range/size"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="RDL.ecore#//PropertyAssignment"/>
|
||||
@ -246,5 +241,9 @@
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//EnumProperty/name"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//EnumProperty/value"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="RDL.ecore#//EnumInstanceType">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//EnumInstanceType/EXTERNAL"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute RDL.ecore#//EnumInstanceType/INTERNAL"/>
|
||||
</genClasses>
|
||||
</genPackages>
|
||||
</genmodel:GenModel>
|
||||
|
Reference in New Issue
Block a user