move to CoreDSL v2.0.3

This commit is contained in:
Eyck Jentzsch 2022-05-08 13:54:27 +02:00
parent b939c3b37c
commit 65f2b42a4c
4 changed files with 45 additions and 49 deletions

View File

@ -2,49 +2,44 @@
<?pde version="3.8"?>
<target name="com.minres.coredsl.json.target" sequenceNumber="1">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/>
<unit id="org.eclipse.draw2d.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/releases/2020-06"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/modeling/emft/mwe/updates/releases/2.11.3/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.22.0/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.junit" version="4.12.0.v201504281640"/>
<unit id="org.junit.jupiter.api" version="5.6.0.v20200203-2009"/>
<unit id="org.junit.jupiter.engine" version="5.6.0.v20200203-2009"/>
<unit id="org.junit.platform.commons" version="1.6.0.v20200203-2009"/>
<unit id="org.junit.platform.engine" version="1.6.0.v20200203-2009"/>
<unit id="org.junit.platform.launcher" version="1.6.0.v20200203-2009"/>
<unit id="org.junit.platform.runner" version="1.6.0.v20200203-2009"/>
<unit id="org.opentest4j" version="1.2.0.v20190826-0900"/>
<unit id="org.objectweb.asm" version="8.0.1.v20200420-1007"/>
<unit id="org.objectweb.asm.tree" version="8.0.1.v20200420-1007"/>
<unit id="io.github.classgraph" version="4.8.35.v20190528-1517"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/2020-06"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://dist.springsource.org/release/GRECLIPSE/e4.16"/>
<unit id="org.codehaus.groovy25.feature.feature.group" version="0.0.0"/>
<unit id="org.codehaus.groovy30.feature.feature.group" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/>
<unit id="org.json" version="1.0.0.v201011060100"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/>
<unit id="org.eclipse.draw2d.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/releases/2022-03"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/modeling/emft/mwe/updates/releases/2.12.2/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.26.0/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.9.v20220111-1409"/>
<unit id="com.google.inject" version="5.0.1.v20210324-2015"/>
<unit id="javax.inject" version="1.0.0.v20091030"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.apiguardian" version="1.1.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="5.8.1.v20211018-1956"/>
<unit id="org.junit.jupiter.engine" version="5.8.1.v20211018-1956"/>
<unit id="org.junit.platform.commons" version="1.8.1.v20211018-1956"/>
<unit id="org.junit.platform.engine" version="1.8.1.v20211018-1956"/>
<unit id="org.junit.platform.launcher" version="1.8.1.v20211018-1956"/>
<unit id="org.junit.platform.runner" version="1.8.1.v20211018-1956"/>
<unit id="org.junit.platform.suite.commons" version="1.8.1.v20211018-1956"/>
<unit id="org.opentest4j" version="1.2.0.v20211018-1956"/>
<unit id="org.objectweb.asm" version="9.2.0.v20210813-1119"/>
<unit id="org.objectweb.asm.tree" version="9.2.0.v20210813-1119"/>
<unit id="io.github.classgraph" version="4.8.138.v20211212-1642"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/2022-03"/>
<unit id="org.json" version="1.0.0.v201011060100"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://minres.github.io/CoreDSL/repository/2.0/2.0.2"/>
<repository location="https://minres.github.io/CoreDSL/repository/2.0/2.0.3"/>
<unit id="com.minres.coredsl.feature.feature.group" version="0.0.0"/>
</location>
</locations>

View File

@ -12,6 +12,7 @@ Require-Bundle: com.minres.coredsl;bundle-version="2.0.0",
org.eclipse.equinox.preferences;bundle-version="3.8.0",
org.eclipse.xtend.lib;bundle-version="2.14.0",
org.eclipse.xtext;bundle-version="2.22.0",
org.eclipse.emf.mwe.utils;bundle-version="1.6.2",
org.apache.commons.logging;bundle-version="1.2.0",
org.json;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-11

View File

@ -66,10 +66,10 @@ class CoreDslJsonGenerator extends AbstractGenerator {
def Iterable<Instruction> allInstr(CoreDef core) {
val unique = newLinkedHashMap
val instrList = if (core.contributingType.size == 0)
val instrList = if (core.providedInstructionSets.size == 0)
core.instructions
else {
val instrSets = core.contributingType?.map[InstructionSet i|i.allInstructionSets].flatten
val instrSets = core.providedInstructionSets?.map[InstructionSet i|i.allInstructionSets].flatten
val seen = newLinkedHashSet
seen.addAll(instrSets)
seen.map[InstructionSet i|i.instructions].flatten
@ -97,11 +97,11 @@ class CoreDslJsonGenerator extends AbstractGenerator {
def String getBitEncoding(Encoding encoding) '''«FOR field : encoding.fields»«field.regEx»«ENDFOR»'''
def dispatch getRegEx(BitField i) '''«FOR idx : i.right.value.intValue .. i.left.value.intValue».«ENDFOR»'''
def dispatch getRegEx(BitField i) '''«FOR idx : i.startIndex.value.intValue .. i.endIndex.value.intValue».«ENDFOR»'''
def dispatch getRegEx(BitValue i) '''«i.value.toString(2)»'''
def dispatch asString(BitField i) '''«i.name»[«i.left.value.intValue»:«i.right.value.intValue»]'''
def dispatch asString(BitField i) '''«i.name»[«i.startIndex.value.intValue»:«i.endIndex.value.intValue»]'''
def dispatch asString(BitValue i) {
(i.value as BigIntegerWithRadix).toCString(2)

View File

@ -7,13 +7,13 @@
<packaging>pom</packaging>
<properties>
<xtextVersion>2.22.0</xtextVersion>
<mwe2Version>2.11.3</mwe2Version>
<xtextVersion>2.26.0</xtextVersion>
<mwe2Version>2.12.2</mwe2Version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Tycho settings -->
<tycho-version>1.7.0</tycho-version>
<tycho-version>2.6.0</tycho-version>
<!-- Define overridable properties for tycho-surefire-plugin -->
<platformSystemProperties></platformSystemProperties>
<moduleProperties></moduleProperties>