diff --git a/.github/workflows/regress.yml b/.github/workflows/regress.yml index 106df495a9..06f5fdd82e 100755 --- a/.github/workflows/regress.yml +++ b/.github/workflows/regress.yml @@ -260,3 +260,63 @@ jobs: uses: ./.github/workflows/deploy.yml with: dry-run: true + java-tests: + name: Java (Xtext) tests + runs-on: ubuntu-latest + defaults: + run: + working-directory: tools/eclipse/dev/org.xtext.udb.parent + steps: + - uses: actions/checkout@v4 + - name: Setup Temurin JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + cache: maven + - name: Build & test (whole reactor) + working-directory: tools/eclipse/dev/org.xtext.udb.parent + env: + MAVEN_OPTS: "-Djdk.xml.maxGeneralEntitySizeLimit=0 -Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.entityExpansionLimit=0" + run: mvn -B -U -Dheadless=true verify + - name: Archive surefire reports (always) + if: always() + uses: actions/upload-artifact@v4 + with: + name: surefire-reports + path: | + **/target/surefire-reports/*.xml + **/target/surefire-reports/*.txt + vscode-tests: + name: VS Code Mocha tests + runs-on: ubuntu-latest + needs: java-tests + defaults: + run: + working-directory: udb-vscode + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: udb-vscode/package-lock.json + - name: Setup Temurin JDK 21 (for LS) + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + - name: Install deps + run: npm ci + - name: Compile + run: npm run compile + - name: Run VS Code tests + run: xvfb-run -a npm test + - name: Archive VS Code test logs (always) + if: always() + uses: actions/upload-artifact@v4 + with: + name: vscode-test-logs + path: | + udb-vscode/.vscode-test/**/* + udb-vscode/out/test/**/* diff --git a/tools/eclipse/.gitignore b/tools/eclipse/.gitignore index e74ebd8179..e8addffd3f 100644 --- a/tools/eclipse/.gitignore +++ b/tools/eclipse/.gitignore @@ -21,3 +21,20 @@ local.properties generated/ src-gen/ xtend-gen/ + +# Added by HMC team +target/ +build/ +.gradle/ +# bin/ was already ignored above + +node_modules/ + +udb-vscode/out/ +udb-vscode/.vscode-test/ + +udb-vscode/.vscode/* +!udb-vscode/.vscode/launch.json +!udb-vscode/.vscode/tasks.json + +udb-vscode/server/ diff --git a/tools/eclipse/dev/REUSE.toml b/tools/eclipse/dev/REUSE.toml new file mode 100644 index 0000000000..522abdec19 --- /dev/null +++ b/tools/eclipse/dev/REUSE.toml @@ -0,0 +1,7 @@ +version = 1 + +[[annotations]] +path = "**" +precedence = "closest" +SPDX-FileCopyrightText = "HMC Qualcomm Clinic Team (Isabel Godoy, Nina Luo, Brayden Mendoza, Lughnasa Miller, Madeline Seifert, Ben Wiedermann)" +SPDX-License-Identifier = "CC0-1.0" diff --git a/tools/eclipse/dev/org.riscv.idl.ide/META-INF/MANIFEST.MF b/tools/eclipse/dev/org.riscv.idl.ide/META-INF/MANIFEST.MF deleted file mode 100644 index 8960246389..0000000000 --- a/tools/eclipse/dev/org.riscv.idl.ide/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Automatic-Module-Name: org.riscv.idl.ide -Bundle-ManifestVersion: 2 -Bundle-Name: org.riscv.idl.ide -Bundle-Vendor: My Company -Bundle-Version: 1.0.0.qualifier -Bundle-SymbolicName: org.riscv.idl.ide; singleton:=true -Bundle-ActivationPolicy: lazy -Require-Bundle: org.riscv.idl, - org.eclipse.xtext.ide, - org.eclipse.xtext.xbase.ide, - org.antlr.runtime;bundle-version="[3.2.0,3.2.1)" -Bundle-RequiredExecutionEnvironment: JavaSE-21 -Export-Package: org.riscv.idl.ide.contentassist.antlr, - org.riscv.idl.ide.contentassist.antlr.internal diff --git a/tools/eclipse/dev/org.riscv.idl.tests/.gitignore b/tools/eclipse/dev/org.riscv.idl.tests/.gitignore deleted file mode 100644 index e75a396d4b..0000000000 --- a/tools/eclipse/dev/org.riscv.idl.tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/test-bin/ diff --git a/tools/eclipse/dev/org.riscv.idl.tests/src/org/riscv/idl/tests/IdlParsingTest.xtend b/tools/eclipse/dev/org.riscv.idl.tests/src/org/riscv/idl/tests/IdlParsingTest.xtend deleted file mode 100644 index b78ff5a1b9..0000000000 --- a/tools/eclipse/dev/org.riscv.idl.tests/src/org/riscv/idl/tests/IdlParsingTest.xtend +++ /dev/null @@ -1,30 +0,0 @@ -/* - * generated by Xtext 2.39.0 - */ -package org.riscv.idl.tests - -import com.google.inject.Inject -import org.eclipse.xtext.testing.InjectWith -import org.eclipse.xtext.testing.extensions.InjectionExtension -import org.eclipse.xtext.testing.util.ParseHelper -import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.^extension.ExtendWith -import org.riscv.idl.idl.Model - -@ExtendWith(InjectionExtension) -@InjectWith(IdlInjectorProvider) -class IdlParsingTest { - @Inject - ParseHelper parseHelper - - @Test - def void loadModel() { - val result = parseHelper.parse(''' - Hello Xtext! - ''') - Assertions.assertNotNull(result) - val errors = result.eResource.errors - Assertions.assertTrue(errors.isEmpty, '''Unexpected errors: «errors.join(", ")»''') - } -} diff --git a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlInjectorProvider$1.class b/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlInjectorProvider$1.class deleted file mode 100644 index 49e5e16aa0..0000000000 Binary files a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlInjectorProvider$1.class and /dev/null differ diff --git a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlInjectorProvider$2.class b/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlInjectorProvider$2.class deleted file mode 100644 index 6c0e0077fc..0000000000 Binary files a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlInjectorProvider$2.class and /dev/null differ diff --git a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlInjectorProvider.class b/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlInjectorProvider.class deleted file mode 100644 index 8ab5439681..0000000000 Binary files a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlInjectorProvider.class and /dev/null differ diff --git a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlParsingTest.class b/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlParsingTest.class deleted file mode 100644 index 94ba8e4886..0000000000 Binary files a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlParsingTest.class and /dev/null differ diff --git a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlParsingTest.xtend b/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlParsingTest.xtend deleted file mode 100644 index b78ff5a1b9..0000000000 --- a/tools/eclipse/dev/org.riscv.idl.tests/test-bin/org/riscv/idl/tests/IdlParsingTest.xtend +++ /dev/null @@ -1,30 +0,0 @@ -/* - * generated by Xtext 2.39.0 - */ -package org.riscv.idl.tests - -import com.google.inject.Inject -import org.eclipse.xtext.testing.InjectWith -import org.eclipse.xtext.testing.extensions.InjectionExtension -import org.eclipse.xtext.testing.util.ParseHelper -import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.^extension.ExtendWith -import org.riscv.idl.idl.Model - -@ExtendWith(InjectionExtension) -@InjectWith(IdlInjectorProvider) -class IdlParsingTest { - @Inject - ParseHelper parseHelper - - @Test - def void loadModel() { - val result = parseHelper.parse(''' - Hello Xtext! - ''') - Assertions.assertNotNull(result) - val errors = result.eResource.errors - Assertions.assertTrue(errors.isEmpty, '''Unexpected errors: «errors.join(", ")»''') - } -} diff --git a/tools/eclipse/dev/org.riscv.idl.ui.tests/test-bin/org/riscv/idl/ui/tests/IdlUiInjectorProvider.class b/tools/eclipse/dev/org.riscv.idl.ui.tests/test-bin/org/riscv/idl/ui/tests/IdlUiInjectorProvider.class deleted file mode 100644 index dfe7b80e39..0000000000 Binary files a/tools/eclipse/dev/org.riscv.idl.ui.tests/test-bin/org/riscv/idl/ui/tests/IdlUiInjectorProvider.class and /dev/null differ diff --git a/tools/eclipse/dev/org.riscv.idl.ui/META-INF/MANIFEST.MF b/tools/eclipse/dev/org.riscv.idl.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 66ea90ce75..0000000000 --- a/tools/eclipse/dev/org.riscv.idl.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,27 +0,0 @@ -Manifest-Version: 1.0 -Automatic-Module-Name: org.riscv.idl.ui -Bundle-ManifestVersion: 2 -Bundle-Name: org.riscv.idl.ui -Bundle-Vendor: My Company -Bundle-Version: 1.0.0.qualifier -Bundle-SymbolicName: org.riscv.idl.ui; singleton:=true -Bundle-ActivationPolicy: lazy -Require-Bundle: org.riscv.idl, - org.riscv.idl.ide, - org.eclipse.xtext.ui, - org.eclipse.xtext.ui.shared, - org.eclipse.xtext.ui.codetemplates.ui, - org.eclipse.ui.editors;bundle-version="3.14.300", - org.eclipse.ui.ide;bundle-version="3.18.500", - org.eclipse.ui, - org.eclipse.compare, - org.eclipse.xtext.builder, - org.eclipse.xtext.xbase.ui, - org.eclipse.jdt.debug.ui, - org.eclipse.xtext.common.types.ui -Import-Package: org.apache.log4j -Bundle-RequiredExecutionEnvironment: JavaSE-21 -Export-Package: org.riscv.idl.ui.contentassist, - org.riscv.idl.ui.internal, - org.riscv.idl.ui.quickfix -Bundle-Activator: org.riscv.idl.ui.internal.IdlActivator diff --git a/tools/eclipse/dev/org.riscv.idl.ui/plugin.xml_gen b/tools/eclipse/dev/org.riscv.idl.ui/plugin.xml_gen deleted file mode 100644 index d51da39b10..0000000000 --- a/tools/eclipse/dev/org.riscv.idl.ui/plugin.xml_gen +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/eclipse/dev/org.riscv.idl/META-INF/MANIFEST.MF b/tools/eclipse/dev/org.riscv.idl/META-INF/MANIFEST.MF deleted file mode 100644 index 523397c6cf..0000000000 --- a/tools/eclipse/dev/org.riscv.idl/META-INF/MANIFEST.MF +++ /dev/null @@ -1,31 +0,0 @@ -Manifest-Version: 1.0 -Automatic-Module-Name: org.riscv.idl -Bundle-ManifestVersion: 2 -Bundle-Name: org.riscv.idl -Bundle-Vendor: My Company -Bundle-Version: 1.0.0.qualifier -Bundle-SymbolicName: org.riscv.idl; singleton:=true -Bundle-ActivationPolicy: lazy -Require-Bundle: org.eclipse.xtext, - org.eclipse.xtext.xbase, - org.eclipse.equinox.common;bundle-version="3.19.0", - org.eclipse.emf.ecore, - org.eclipse.xtext.xbase.lib;bundle-version="2.39.0", - org.eclipse.emf.common, - org.antlr.runtime;bundle-version="[3.2.0,3.2.1)", - org.eclipse.xtext.common.types, - org.objectweb.asm;bundle-version="[9.8.0,9.9.0)";resolution:=optional -Bundle-RequiredExecutionEnvironment: JavaSE-21 -Export-Package: org.riscv.idl, - org.riscv.idl.parser.antlr.internal, - org.riscv.idl.idl.impl, - org.riscv.idl.validation, - org.riscv.idl.serializer, - org.riscv.idl.idl, - org.riscv.idl.idl.util, - org.riscv.idl.services, - org.riscv.idl.scoping, - org.riscv.idl.parser.antlr, - org.riscv.idl.generator, - org.riscv.idl.jvmmodel -Import-Package: org.apache.log4j diff --git a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/Idl.xtext b/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/Idl.xtext deleted file mode 100644 index c22f5b4da5..0000000000 --- a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/Idl.xtext +++ /dev/null @@ -1,18 +0,0 @@ -//grammar org.riscv.idl.Idl with org.eclipse.xtext.xbase.Xbase -grammar org.riscv.idl.Idl with org.eclipse.xtext.common.Terminals -//import "http://www.eclipse.org/emf/2002/Ecore" as ecore - -generate idl "http://www.riscv.org/idl/Idl" - -Model: - csrs += Csr*; - -Csr: - 'csr' name=ID - description=STRING - address=STRING - reset_value=STRING - ';'; - -//terminal IDLHEX returns ecore::EInt: -// ('0x'|'0X') ('0'..'9'|'a'..'f'|'A'..'F'|'_')+; diff --git a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/IdlRuntimeModule.java b/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/IdlRuntimeModule.java deleted file mode 100644 index 556aa262ef..0000000000 --- a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/IdlRuntimeModule.java +++ /dev/null @@ -1,11 +0,0 @@ -/* - * generated by Xtext 2.39.0 - */ -package org.riscv.idl; - - -/** - * Use this class to register components to be used at runtime / without the Equinox extension registry. - */ -public class IdlRuntimeModule extends AbstractIdlRuntimeModule { -} diff --git a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/jvmmodel/IdlJvmModelInferrer.xtend b/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/jvmmodel/IdlJvmModelInferrer.xtend deleted file mode 100644 index c776c4f089..0000000000 --- a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/jvmmodel/IdlJvmModelInferrer.xtend +++ /dev/null @@ -1,62 +0,0 @@ -/* - * generated by Xtext 2.39.0 - */ -package org.riscv.idl.jvmmodel - -import com.google.inject.Inject -import org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer -import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor -import org.eclipse.xtext.xbase.jvmmodel.JvmTypesBuilder -import org.riscv.idl.idl.Model - -/** - *

Infers a JVM model from the source model.

- * - *

The JVM model should contain all elements that would appear in the Java code - * which is generated from the source model. Other models link against the JVM model rather than the source model.

- */ -class IdlJvmModelInferrer extends AbstractModelInferrer { - - /** - * convenience API to build and initialize JVM types and their members. - */ - @Inject extension JvmTypesBuilder - - /** - * The dispatch method {@code infer} is called for each instance of the - * given element's type that is contained in a resource. - * - * @param element - * the model to create one or more - * {@link org.eclipse.xtext.common.types.JvmDeclaredType declared - * types} from. - * @param acceptor - * each created - * {@link org.eclipse.xtext.common.types.JvmDeclaredType type} - * without a container should be passed to the acceptor in order - * get attached to the current resource. The acceptor's - * {@link IJvmDeclaredTypeAcceptor#accept(org.eclipse.xtext.common.types.JvmDeclaredType) - * accept(..)} method takes the constructed empty type for the - * pre-indexing phase. This one is further initialized in the - * indexing phase using the lambda you pass as the last argument. - * @param isPreIndexingPhase - * whether the method is called in a pre-indexing phase, i.e. - * when the global index is not yet fully updated. You must not - * rely on linking using the index if isPreIndexingPhase is - * true. - */ - def dispatch void infer(Model element, IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase) { - // Here you explain how your model is mapped to Java elements, by writing the actual translation code. - - // An implementation for the initial hello world example could look like this: -// acceptor.accept(element.toClass("my.company.greeting.MyGreetings")) [ -// for (greeting : element.greetings) { -// members += greeting.toMethod("hello" + greeting.name, typeRef(String)) [ -// body = ''' -// return "Hello «greeting.name»"; -// ''' -// ] -// } -// ] - } -} diff --git a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/validation/IdlValidator.java b/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/validation/IdlValidator.java deleted file mode 100644 index 05d0492c5c..0000000000 --- a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/validation/IdlValidator.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * generated by Xtext 2.39.0 - */ -package org.riscv.idl.validation; - - -/** - * This class contains custom validation rules. - * - * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation - */ -public class IdlValidator extends AbstractIdlValidator { - -// public static final String INVALID_NAME = "invalidName"; -// -// @Check -// public void checkGreetingStartsWithCapital(Greeting greeting) { -// if (!Character.isUpperCase(greeting.getName().charAt(0))) { -// warning("Name should start with a capital", -// IdlPackage.Literals.GREETING__NAME, -// INVALID_NAME); -// } -// } - -} diff --git a/tools/eclipse/dev/org.xtext.udb.parent/.project b/tools/eclipse/dev/org.xtext.udb.parent/.project new file mode 100644 index 0000000000..859dc9d69b --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/.project @@ -0,0 +1,17 @@ + + + org.xtext.udb.parent + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/tools/eclipse/dev/org.riscv.idl.ide/.classpath b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/.classpath similarity index 88% rename from tools/eclipse/dev/org.riscv.idl.ide/.classpath rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/.classpath index 7994b69384..c1b088dcb8 100644 --- a/tools/eclipse/dev/org.riscv.idl.ide/.classpath +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/.classpath @@ -5,5 +5,5 @@ - + diff --git a/tools/eclipse/dev/org.riscv.idl.tests/.project b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/.project similarity index 79% rename from tools/eclipse/dev/org.riscv.idl.tests/.project rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/.project index 6e7128016e..f22c057d67 100644 --- a/tools/eclipse/dev/org.riscv.idl.tests/.project +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/.project @@ -1,10 +1,15 @@ - org.riscv.idl.tests + org.xtext.udb.ide + + org.eclipse.m2e.core.maven2Builder + + + org.eclipse.xtext.ui.shared.xtextBuilder @@ -27,6 +32,7 @@ + org.eclipse.m2e.core.maven2Nature org.eclipse.xtext.ui.shared.xtextNature org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/META-INF/MANIFEST.MF b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..327db9e38d --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Automatic-Module-Name: org.xtext.udb.ide +Bundle-ManifestVersion: 2 +Bundle-Name: org.xtext.udb.ide +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.xtext.udb.ide; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.xtext.udb, + org.eclipse.xtext.ide, + org.eclipse.xtext.xbase.ide, + org.antlr.runtime;bundle-version="[3.2.0,3.2.1)" +Bundle-RequiredExecutionEnvironment: JavaSE-21 +Export-Package: org.xtext.example.udb.ide.contentassist.antlr, + org.xtext.example.udb.ide.contentassist.antlr.internal, + org.xtext.example.udb.ide.contentassist.antlr.lexer diff --git a/tools/eclipse/dev/org.riscv.idl.ide/build.properties b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/build.properties similarity index 100% rename from tools/eclipse/dev/org.riscv.idl.ide/build.properties rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/build.properties diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/pom.xml b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/pom.xml new file mode 100644 index 0000000000..31ffbce14c --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/pom.xml @@ -0,0 +1,178 @@ + + 4.0.0 + + org.xtext.udb + org.xtext.udb.parent + 1.0.0-SNAPSHOT + + org.xtext.udb.ide + eclipse-plugin + + + + ch.qos.reload4j + reload4j + + + org.eclipse.lsp4j + org.eclipse.lsp4j + + + org.ow2.asm + asm + + + + + + org.eclipse.xtend + xtend-maven-plugin + + + org.eclipse.tycho + target-platform-configuration + + consider + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.5.0 + + + copy-dependencies + package + + copy-dependencies + + + p2.eclipse-feature + ${project.build.directory}/libs + false + false + true + true + + icu4j, + commons-logging, + org.eclipse.core.commands, + org.eclipse.core.contenttype, + org.eclipse.core.expressions, + org.eclipse.core.filesystem, + org.eclipse.core.jobs, + org.eclipse.core.resources, + org.eclipse.core.runtime, + org.eclipse.core.variables, + org.eclipse.debug.core, + org.eclipse.emf.codegen.ecore, + org.eclipse.emf.codegen, + org.eclipse.emf.mwe.core, + org.eclipse.emf.mwe.utils, + org.eclipse.emf.mwe2.lib, + org.eclipse.emf.mwe2.runtime, + org.eclipse.equinox.app, + org.eclipse.equinox.preferences, + org.eclipse.equinox.registry, + org.eclipse.jdt.core, + org.eclipse.jdt.debug, + org.eclipse.jdt.launching, + org.eclipse.text, + + + + + + + com.googlecode.addjars-maven-plugin + addjars-maven-plugin + 1.0.5 + + + package + + add-jars + + + + + ${project.build.directory}/libs + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.4.1 + + + + org.eclipse.xtext.ide.server.ServerLauncher + + + plugin.properties + + + + + + + *:org.xtext.udb.ide-org.eclipse.lsp4j* + *:org.xtext.udb.ide-com.google.guava* + *:org.xtext.udb.ide-asm* + *:org.xtext.udb.ide-log4j* + *:org.xtext.udb.ide-reload4j* + *:org.xtext.udb.ide-org.objectweb.asm* + *:org.xtext.udb.ide-org.apache.log4j* + *:*commons-logging* + + + + + *:* + + **/*.java + META-INF/INDEX.LIST + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + .options + .api_description + *.profile + *.html + about.* + about_files/* + plugin.xml + systembundle.properties + profile.list + **/*._trace + **/*.g + **/*.mwe2 + **/*.xtext + + + + true + ls + false + + + + package + + shade + + + + + + + + diff --git a/tools/eclipse/dev/org.riscv.idl.ide/src/org/riscv/idl/ide/IdlIdeModule.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/src/org/xtext/example/udb/ide/UdbIdeModule.java similarity index 50% rename from tools/eclipse/dev/org.riscv.idl.ide/src/org/riscv/idl/ide/IdlIdeModule.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/src/org/xtext/example/udb/ide/UdbIdeModule.java index c11cfdbfbe..bea4c26fa6 100644 --- a/tools/eclipse/dev/org.riscv.idl.ide/src/org/riscv/idl/ide/IdlIdeModule.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/src/org/xtext/example/udb/ide/UdbIdeModule.java @@ -1,11 +1,11 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.ide; +package org.xtext.example.udb.ide; /** * Use this class to register ide components. */ -public class IdlIdeModule extends AbstractIdlIdeModule { +public class UdbIdeModule extends AbstractUdbIdeModule { } diff --git a/tools/eclipse/dev/org.riscv.idl.ide/src/org/riscv/idl/ide/IdlIdeSetup.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/src/org/xtext/example/udb/ide/UdbIdeSetup.java similarity index 50% rename from tools/eclipse/dev/org.riscv.idl.ide/src/org/riscv/idl/ide/IdlIdeSetup.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/src/org/xtext/example/udb/ide/UdbIdeSetup.java index e903726d65..2d9b1aeda3 100644 --- a/tools/eclipse/dev/org.riscv.idl.ide/src/org/riscv/idl/ide/IdlIdeSetup.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/src/org/xtext/example/udb/ide/UdbIdeSetup.java @@ -1,22 +1,22 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.ide; +package org.xtext.example.udb.ide; import com.google.inject.Guice; import com.google.inject.Injector; import org.eclipse.xtext.util.Modules2; -import org.riscv.idl.IdlRuntimeModule; -import org.riscv.idl.IdlStandaloneSetup; +import org.xtext.example.udb.UdbRuntimeModule; +import org.xtext.example.udb.UdbStandaloneSetup; /** * Initialization support for running Xtext languages as language servers. */ -public class IdlIdeSetup extends IdlStandaloneSetup { +public class UdbIdeSetup extends UdbStandaloneSetup { @Override public Injector createInjector() { - return Guice.createInjector(Modules2.mixin(new IdlRuntimeModule(), new IdlIdeModule())); + return Guice.createInjector(Modules2.mixin(new UdbRuntimeModule(), new UdbIdeModule())); } } diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/src/org/xtext/example/udb/ide/contentassist/antlr/UdbTokenSource.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/src/org/xtext/example/udb/ide/contentassist/antlr/UdbTokenSource.java new file mode 100644 index 0000000000..d62916e2cc --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ide/src/org/xtext/example/udb/ide/contentassist/antlr/UdbTokenSource.java @@ -0,0 +1,39 @@ +/* + * generated by Xtext 2.40.0 + */ +package org.xtext.example.udb.ide.contentassist.antlr; + +import org.antlr.runtime.Token; +import org.antlr.runtime.TokenSource; +import org.eclipse.xtext.parser.antlr.AbstractIndentationTokenSource; +import org.xtext.example.udb.ide.contentassist.antlr.internal.InternalUdbParser; + +public class UdbTokenSource extends AbstractIndentationTokenSource { + + public UdbTokenSource(TokenSource delegate) { + super(delegate); + } + + @Override + protected boolean shouldSplitTokenImpl(Token token) { + // TODO Review assumption + return token.getType() == InternalUdbParser.RULE_WS; + } + + @Override + protected int getBeginTokenType() { + // TODO Review assumption + return InternalUdbParser.RULE_INDENT; + } + + @Override + protected int getEndTokenType() { + // TODO Review assumption + return InternalUdbParser.RULE_DEDENT; + } + + @Override + protected boolean shouldEmitPendingEndTokens() { + return false; + } +} diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.target/.project b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.target/.project new file mode 100644 index 0000000000..ea0315ee2d --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.target/.project @@ -0,0 +1,17 @@ + + + org.xtext.udb.target + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.target/org.xtext.udb.target.target b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.target/org.xtext.udb.target.target new file mode 100644 index 0000000000..9bd3180819 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.target/org.xtext.udb.target.target @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.target/pom.xml b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.target/pom.xml new file mode 100644 index 0000000000..885a428229 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.target/pom.xml @@ -0,0 +1,15 @@ + + 4.0.0 + + org.xtext.udb + org.xtext.udb.parent + 1.0.0-SNAPSHOT + + org.xtext.udb.target + eclipse-target-definition + + + + + diff --git a/tools/eclipse/dev/org.riscv.idl.tests/.classpath b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/.classpath similarity index 68% rename from tools/eclipse/dev/org.riscv.idl.tests/.classpath rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/.classpath index 8ee4cf1d89..138b1dc43a 100644 --- a/tools/eclipse/dev/org.riscv.idl.tests/.classpath +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/.classpath @@ -1,21 +1,21 @@ - + - + - + - + diff --git a/tools/eclipse/dev/org.riscv.idl.ui/.project b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/.project similarity index 79% rename from tools/eclipse/dev/org.riscv.idl.ui/.project rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/.project index 70ed9972db..8ac3609439 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui/.project +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/.project @@ -1,10 +1,15 @@ - org.riscv.idl.ui + org.xtext.udb.tests + + org.eclipse.m2e.core.maven2Builder + + + org.eclipse.xtext.ui.shared.xtextBuilder @@ -27,6 +32,7 @@ + org.eclipse.m2e.core.maven2Nature org.eclipse.xtext.ui.shared.xtextNature org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature diff --git a/tools/eclipse/dev/org.riscv.idl.tests/META-INF/MANIFEST.MF b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/META-INF/MANIFEST.MF similarity index 51% rename from tools/eclipse/dev/org.riscv.idl.tests/META-INF/MANIFEST.MF rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/META-INF/MANIFEST.MF index 8bc1924414..fd504a9271 100644 --- a/tools/eclipse/dev/org.riscv.idl.tests/META-INF/MANIFEST.MF +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/META-INF/MANIFEST.MF @@ -1,17 +1,16 @@ Manifest-Version: 1.0 -Automatic-Module-Name: org.riscv.idl.tests +Automatic-Module-Name: org.xtext.udb.tests Bundle-ManifestVersion: 2 -Bundle-Name: org.riscv.idl.tests +Bundle-Name: org.xtext.udb.tests Bundle-Vendor: My Company Bundle-Version: 1.0.0.qualifier -Bundle-SymbolicName: org.riscv.idl.tests; singleton:=true +Bundle-SymbolicName: org.xtext.udb.tests; singleton:=true Bundle-ActivationPolicy: lazy -Require-Bundle: org.riscv.idl, +Require-Bundle: org.xtext.udb, org.eclipse.xtext.testing, org.eclipse.xtext.xbase.testing, - org.eclipse.xtext.xbase.lib;bundle-version="2.39.0", - org.objectweb.asm;bundle-version="[9.8.0,9.9.0)";resolution:=optional + org.eclipse.xtext.xbase.lib;bundle-version="2.39.0" Import-Package: org.junit.jupiter.api;version="[5.1.0,6.0.0)", org.junit.jupiter.api.extension;version="[5.1.0,6.0.0)" Bundle-RequiredExecutionEnvironment: JavaSE-21 -Export-Package: org.riscv.idl.tests;x-internal=true +Export-Package: org.xtext.example.udb.tests;x-internal=true diff --git a/tools/eclipse/dev/org.riscv.idl.tests/build.properties b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/build.properties similarity index 100% rename from tools/eclipse/dev/org.riscv.idl.tests/build.properties rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/build.properties diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/pom.xml b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/pom.xml new file mode 100644 index 0000000000..97d85e064e --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/pom.xml @@ -0,0 +1,21 @@ + + 4.0.0 + + org.xtext.udb + org.xtext.udb.parent + 1.0.0-SNAPSHOT + + org.xtext.udb.tests + eclipse-test-plugin + + + + + org.eclipse.xtend + xtend-maven-plugin + + + + + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/src/org/xtext/example/udb/tests/UdbParsingTest.xtend b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/src/org/xtext/example/udb/tests/UdbParsingTest.xtend new file mode 100644 index 0000000000..ee8fbdac39 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.tests/src/org/xtext/example/udb/tests/UdbParsingTest.xtend @@ -0,0 +1,127 @@ +/* + * generated by Xtext 2.39.0 + */ +package org.xtext.example.udb.tests + +import com.google.inject.Inject +import org.eclipse.xtext.testing.InjectWith +import org.eclipse.xtext.testing.extensions.InjectionExtension +import org.eclipse.xtext.testing.util.ParseHelper +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.^extension.ExtendWith +import org.xtext.example.udb.udb.Model + +@ExtendWith(InjectionExtension) +@InjectWith(UdbInjectorProvider) +class UdbParsingTest { + @Inject + ParseHelper parseHelper + + @Test + def void parsesValidCSR() { + val result = parseHelper.parse(''' + $schema: "csr_schema.json#" + kind: csr + name: vcsr + long_name: "Vector Control and Status Register" + address: 0x00F + writable: true + priv_mode: U + length: MXLEN + description: "Contains aliases to vxrm and vxsat CSRs" + definedBy: "V" + fields: + VXRM: + location: 2-1 + description: "See vxrm." + type: RW-RH + alias: vxrm.VALUE[1:0] + sw_write(csr_value): "| + CSR[vxrm].VALUE = csr_value.VXRM; + return csr_value.VXRM;" + reset_value: UNDEFINED_LEGAL + VXSAT: + location: 0 + description: "See vxsat." + type: RW-RH + alias: vxsat.VALUE[0] + sw_write(csr_value): "| + CSR[vxsat].VALUE = csr_value.VXSAT; + return csr_value.VXSAT;" + reset_value: UNDEFINED_LEGAL + ''') + Assertions.assertNotNull(result) + val errors = result.eResource.errors + Assertions.assertTrue(errors.isEmpty, '''Unexpected errors: «errors.join(", ")»''') + + + // check basic inputs + var schema = result.getSchema().getSchema(); + Assertions.assertEquals("csr_schema.json#", schema as String); + var k = result.getKind().getKind().getType(); + Assertions.assertEquals("csr", k as String); + var n = result.getCsrName().getName().getType(); + Assertions.assertEquals("vcsr", n as String); + var ln = result.getLongName().getLongName(); + Assertions.assertEquals("Vector Control and Status Register", ln); + var add = result.getAddress().getAddress().getValue(); + Assertions.assertEquals(0x00F, add); + var writ = result.getWritable().isWritable(); + Assertions.assertTrue(writ); + var priv = result.getPrivmode().getPrivMode().getType(); + Assertions.assertEquals("U", priv); + var len = result.getLength().getLength().getParmType().getParmName(); + Assertions.assertEquals("MXLEN", len as String); + var desc = result.getDescription().getDescription(); + Assertions.assertEquals("Contains aliases to vxrm and vxsat CSRs", desc); + var def = result.getDefinedBy().getExtensionName(); + Assertions.assertEquals("V", def); + + // test fields + var vxrm = result.getFields().getFields().get(0); + var vxsat = result.getFields().getFields().get(1); + Assertions.assertEquals("VXRM", vxrm.getName()); + Assertions.assertEquals("VXSAT", vxsat.getName()); + + // test location + var rmrange = vxrm.getLocation().getStaticLoc().getLocValue().getRange(); + var satloc = vxsat.getLocation().getStaticLoc().getLocValue().getValue(); + Assertions.assertEquals(2, rmrange.getUpper()); + Assertions.assertEquals(1, rmrange.getLower()); + Assertions.assertEquals(0, satloc); + + // test reset value + var rmreset = vxrm.getResetValue().getValue().getResetValue().getUndefinedLegal(); + var satreset = vxsat.getResetValue().getValue().getResetValue().getUndefinedLegal(); + Assertions.assertEquals("UNDEFINED_LEGAL", rmreset as String); + Assertions.assertEquals("UNDEFINED_LEGAL", satreset as String); + + // test IDL + var rmsw = vxrm.getSwWriteFunc().getSwWriteFunc().getIdl(); + var satsw = vxsat.getSwWriteFunc().getSwWriteFunc().getIdl(); + Assertions.assertNotNull(rmsw) + Assertions.assertNotNull(satsw) + + // testing description of fields + var rmdesc = vxrm.getDescription().getDescription(); + var satdesc = vxsat.getDescription().getDescription(); + Assertions.assertEquals("See vxrm.", rmdesc); + Assertions.assertEquals("See vxsat.", satdesc); + + // testing field type + var rmtype = vxrm.getType().getTypeVal().getPerms(); + var sattype = vxsat.getType().getTypeVal().getPerms(); + Assertions.assertEquals("RW-RH", rmtype); + Assertions.assertEquals("RW-RH", sattype); + + // testing alias + var vxalias = vxrm.getAlias().getAlias().getAlias().get(0); + var satalias = vxsat.getAlias().getAlias().getAlias().get(0); + Assertions.assertEquals("vxrm.VALUE[1:0]", vxalias); + Assertions.assertEquals("vxsat.VALUE[0]", satalias); + + + } + +} diff --git a/tools/eclipse/dev/org.riscv.idl.ui.tests/.classpath b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/.classpath similarity index 68% rename from tools/eclipse/dev/org.riscv.idl.ui.tests/.classpath rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/.classpath index 8ee4cf1d89..138b1dc43a 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui.tests/.classpath +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/.classpath @@ -1,21 +1,21 @@ - + - + - + - + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/.project b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/.project new file mode 100644 index 0000000000..8c1177533a --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/.project @@ -0,0 +1,40 @@ + + + org.xtext.udb.ui.tests + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/tools/eclipse/dev/org.riscv.idl.ui.tests/META-INF/MANIFEST.MF b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/META-INF/MANIFEST.MF similarity index 67% rename from tools/eclipse/dev/org.riscv.idl.ui.tests/META-INF/MANIFEST.MF rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/META-INF/MANIFEST.MF index 7a47b58471..2e88549faa 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui.tests/META-INF/MANIFEST.MF +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/META-INF/MANIFEST.MF @@ -1,12 +1,12 @@ Manifest-Version: 1.0 -Automatic-Module-Name: org.riscv.idl.ui.tests +Automatic-Module-Name: org.xtext.udb.ui.tests Bundle-ManifestVersion: 2 -Bundle-Name: org.riscv.idl.ui.tests +Bundle-Name: org.xtext.udb.ui.tests Bundle-Vendor: My Company Bundle-Version: 1.0.0.qualifier -Bundle-SymbolicName: org.riscv.idl.ui.tests; singleton:=true +Bundle-SymbolicName: org.xtext.udb.ui.tests; singleton:=true Bundle-ActivationPolicy: lazy -Require-Bundle: org.riscv.idl.ui, +Require-Bundle: org.xtext.udb.ui, org.eclipse.xtext.testing, org.eclipse.xtext.ui.testing, org.eclipse.xtext.xbase.testing, @@ -16,4 +16,4 @@ Require-Bundle: org.riscv.idl.ui, Import-Package: org.junit.jupiter.api;version="[5.1.0,6.0.0)", org.junit.jupiter.api.extension;version="[5.1.0,6.0.0)" Bundle-RequiredExecutionEnvironment: JavaSE-21 -Export-Package: org.riscv.idl.ui.tests;x-internal=true +Export-Package: org.xtext.example.udb.ui.tests;x-internal=true diff --git a/tools/eclipse/dev/org.riscv.idl.ui.tests/build.properties b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/build.properties similarity index 100% rename from tools/eclipse/dev/org.riscv.idl.ui.tests/build.properties rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/build.properties diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/pom.xml b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/pom.xml new file mode 100644 index 0000000000..cfe00766e4 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/pom.xml @@ -0,0 +1,28 @@ + + 4.0.0 + + org.xtext.udb + org.xtext.udb.parent + 1.0.0-SNAPSHOT + + org.xtext.udb.ui.tests + eclipse-test-plugin + + + + + org.eclipse.xtend + xtend-maven-plugin + + + org.eclipse.tycho + tycho-surefire-plugin + + true + + + + + + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/src/.gitkeep b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui.tests/src/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/eclipse/dev/org.riscv.idl.ui/.classpath b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/.classpath similarity index 88% rename from tools/eclipse/dev/org.riscv.idl.ui/.classpath rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/.classpath index 7994b69384..c1b088dcb8 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui/.classpath +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/.classpath @@ -5,5 +5,5 @@ - + diff --git a/tools/eclipse/dev/org.riscv.idl.ide/.project b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/.project similarity index 79% rename from tools/eclipse/dev/org.riscv.idl.ide/.project rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/.project index 513f13c2e6..f869469a9b 100644 --- a/tools/eclipse/dev/org.riscv.idl.ide/.project +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/.project @@ -1,10 +1,15 @@ - org.riscv.idl.ide + org.xtext.udb.ui + + org.eclipse.m2e.core.maven2Builder + + + org.eclipse.xtext.ui.shared.xtextBuilder @@ -27,6 +32,7 @@ + org.eclipse.m2e.core.maven2Nature org.eclipse.xtext.ui.shared.xtextNature org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/META-INF/MANIFEST.MF b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..63c0c4df3c --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/META-INF/MANIFEST.MF @@ -0,0 +1,24 @@ +Manifest-Version: 1.0 +Automatic-Module-Name: org.xtext.udb.ui +Bundle-ManifestVersion: 2 +Bundle-Name: org.xtext.udb.ui +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.xtext.udb.ui; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.xtext.udb, + org.xtext.udb.ide, + org.eclipse.xtext.ui, + org.eclipse.xtext.ui.shared, + org.eclipse.xtext.ui.codetemplates.ui, + org.eclipse.ui.editors;bundle-version="3.14.300", + org.eclipse.ui.ide;bundle-version="3.18.500", + org.eclipse.ui, + org.eclipse.compare, + org.eclipse.xtext.builder +Import-Package: org.apache.log4j +Bundle-RequiredExecutionEnvironment: JavaSE-21 +Export-Package: org.xtext.example.udb.ui.contentassist, + org.xtext.example.udb.ui.quickfix, + org.xtext.udb.ui.internal +Bundle-Activator: org.xtext.udb.ui.internal.UdbActivator diff --git a/tools/eclipse/dev/org.riscv.idl.ui/build.properties b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/build.properties similarity index 100% rename from tools/eclipse/dev/org.riscv.idl.ui/build.properties rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/build.properties diff --git a/tools/eclipse/dev/org.riscv.idl.ui/plugin.xml b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/plugin.xml similarity index 55% rename from tools/eclipse/dev/org.riscv.idl.ui/plugin.xml rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/plugin.xml index 162c77ea5c..9a07f9bf39 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui/plugin.xml +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/plugin.xml @@ -4,48 +4,48 @@ + extensions="udb" + id="org.xtext.example.udb.Udb" + name="Udb Editor"> + definitionId="org.xtext.example.udb.Udb.Editor.opened"> + class="org.xtext.example.udb.ui.UdbExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" + commandId="org.xtext.example.udb.Udb.validate"> + definitionId="org.xtext.example.udb.Udb.Editor.opened"> - + - + @@ -54,22 +54,22 @@ - + - + @@ -78,33 +78,33 @@ - + class="org.xtext.example.udb.ui.UdbExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.xtext.example.udb.Udb" + name="Udb"> + - + - + - + class="org.xtext.example.udb.ui.UdbExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.xtext.example.udb.Udb" + name="Udb"> + @@ -114,14 +114,14 @@ + id="org.xtext.example.udb.ui.keyword_Udb" + label="Udb"/> @@ -142,12 +142,12 @@ + definitionId="org.xtext.example.udb.Udb.Editor.opened"> @@ -157,7 +157,7 @@ - + @@ -165,7 +165,7 @@ - + @@ -174,7 +174,7 @@ style="push" tooltip="Copy Qualified Name"> - + @@ -187,7 +187,7 @@ - + @@ -195,11 +195,11 @@ + definitionId="org.xtext.example.udb.Udb.Editor.opened"> @@ -207,9 +207,9 @@ @@ -217,68 +217,68 @@ + class="org.xtext.example.udb.ui.UdbExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" + type="udb"> + class="org.xtext.example.udb.ui.UdbExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" + uriExtension="udb"> - + - + + class="org.xtext.example.udb.ui.UdbExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant" + fileExtensions="udb"/> - + - + @@ -289,20 +289,20 @@ - + - + @@ -310,11 +310,11 @@ + definitionId="org.xtext.example.udb.Udb.Editor.opened"> @@ -334,33 +334,33 @@ style="push" tooltip="Open Quick Outline"> - + - + + class="org.xtext.example.udb.ui.UdbExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.xtext.udb.ui.udb.check.fast"> + class="org.xtext.example.udb.ui.UdbExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.xtext.udb.ui.udb.check.normal"> + class="org.xtext.example.udb.ui.UdbExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.xtext.udb.ui.udb.check.expensive"> @@ -370,11 +370,11 @@ + definitionId="org.xtext.example.udb.Udb.Editor.opened"> @@ -386,7 +386,7 @@ style="push"> + definitionId="org.xtext.example.udb.Udb.Editor.opened"> @@ -394,40 +394,40 @@ - + - + + contentTypeId="org.xtext.example.udb.Udb.contenttype" + contentViewerId="org.xtext.example.udb.Udb.compare.contentViewers" /> - + + contentTypeId="org.xtext.example.udb.Udb.contenttype" + contentMergeViewerId="org.xtext.example.udb.Udb.compare.contentMergeViewers" /> - + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/plugin.xml_gen b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/plugin.xml_gen new file mode 100644 index 0000000000..9a07f9bf39 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/plugin.xml_gen @@ -0,0 +1,434 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/pom.xml b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/pom.xml new file mode 100644 index 0000000000..5f98617b8b --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/pom.xml @@ -0,0 +1,21 @@ + + 4.0.0 + + org.xtext.udb + org.xtext.udb.parent + 1.0.0-SNAPSHOT + + org.xtext.udb.ui + eclipse-plugin + + + + + org.eclipse.xtend + xtend-maven-plugin + + + + + diff --git a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/IdlUiModule.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/UdbUiModule.java similarity index 58% rename from tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/IdlUiModule.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/UdbUiModule.java index 0b47ebaa28..b929521844 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/IdlUiModule.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/UdbUiModule.java @@ -1,16 +1,16 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.ui; +package org.xtext.example.udb.ui; import org.eclipse.ui.plugin.AbstractUIPlugin; /** * Use this class to register components to be used within the Eclipse IDE. */ -public class IdlUiModule extends AbstractIdlUiModule { +public class UdbUiModule extends AbstractUdbUiModule { - public IdlUiModule(AbstractUIPlugin plugin) { + public UdbUiModule(AbstractUIPlugin plugin) { super(plugin); } } diff --git a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/contentassist/IdlProposalProvider.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/contentassist/UdbProposalProvider.java similarity index 63% rename from tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/contentassist/IdlProposalProvider.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/contentassist/UdbProposalProvider.java index 4c48eedaf0..d4ca06f9d5 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/contentassist/IdlProposalProvider.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/contentassist/UdbProposalProvider.java @@ -1,12 +1,12 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.ui.contentassist; +package org.xtext.example.udb.ui.contentassist; /** * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#content-assist * on how to customize the content assistant. */ -public class IdlProposalProvider extends AbstractIdlProposalProvider { +public class UdbProposalProvider extends AbstractUdbProposalProvider { } diff --git a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/labeling/IdlDescriptionLabelProvider.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/labeling/UdbDescriptionLabelProvider.java similarity index 84% rename from tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/labeling/IdlDescriptionLabelProvider.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/labeling/UdbDescriptionLabelProvider.java index 6154c4d412..95cbd34ea6 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/labeling/IdlDescriptionLabelProvider.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/labeling/UdbDescriptionLabelProvider.java @@ -1,7 +1,7 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.ui.labeling; +package org.xtext.example.udb.ui.labeling; import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider; @@ -10,7 +10,7 @@ * * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#label-provider */ -public class IdlDescriptionLabelProvider extends DefaultDescriptionLabelProvider { +public class UdbDescriptionLabelProvider extends DefaultDescriptionLabelProvider { // Labels and icons can be computed like this: // @Override diff --git a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/labeling/IdlLabelProvider.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/labeling/UdbLabelProvider.java similarity index 77% rename from tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/labeling/IdlLabelProvider.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/labeling/UdbLabelProvider.java index 5f68e3cbee..08cb63bd1d 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/labeling/IdlLabelProvider.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/labeling/UdbLabelProvider.java @@ -1,7 +1,7 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.ui.labeling; +package org.xtext.example.udb.ui.labeling; import com.google.inject.Inject; import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; @@ -12,10 +12,10 @@ * * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#label-provider */ -public class IdlLabelProvider extends DefaultEObjectLabelProvider { +public class UdbLabelProvider extends DefaultEObjectLabelProvider { @Inject - public IdlLabelProvider(AdapterFactoryLabelProvider delegate) { + public UdbLabelProvider(AdapterFactoryLabelProvider delegate) { super(delegate); } diff --git a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/outline/IdlOutlineTreeProvider.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/outline/UdbOutlineTreeProvider.java similarity index 71% rename from tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/outline/IdlOutlineTreeProvider.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/outline/UdbOutlineTreeProvider.java index d4a541879d..71e4fb5fa8 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/outline/IdlOutlineTreeProvider.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/outline/UdbOutlineTreeProvider.java @@ -1,7 +1,7 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.ui.outline; +package org.xtext.example.udb.ui.outline; import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider; @@ -10,6 +10,6 @@ * * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#outline */ -public class IdlOutlineTreeProvider extends DefaultOutlineTreeProvider { +public class UdbOutlineTreeProvider extends DefaultOutlineTreeProvider { } diff --git a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/quickfix/IdlQuickfixProvider.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/quickfix/UdbQuickfixProvider.java similarity index 83% rename from tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/quickfix/IdlQuickfixProvider.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/quickfix/UdbQuickfixProvider.java index 633a04f7c8..28f66e8685 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui/src/org/riscv/idl/ui/quickfix/IdlQuickfixProvider.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.ui/src/org/xtext/example/udb/ui/quickfix/UdbQuickfixProvider.java @@ -1,7 +1,7 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.ui.quickfix; +package org.xtext.example.udb.ui.quickfix; import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider; @@ -10,9 +10,9 @@ * * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#quick-fixes */ -public class IdlQuickfixProvider extends DefaultQuickfixProvider { +public class UdbQuickfixProvider extends DefaultQuickfixProvider { -// @Fix(IdlValidator.INVALID_NAME) +// @Fix(UdbValidator.INVALID_NAME) // public void capitalizeName(final Issue issue, IssueResolutionAcceptor acceptor) { // acceptor.accept(issue, "Capitalize name", "Capitalize the name.", "upcase.png", new IModification() { // public void apply(IModificationContext context) throws BadLocationException { diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/.classpath b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/.classpath new file mode 100644 index 0000000000..2210370333 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tools/eclipse/dev/org.riscv.idl/.project b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/.project similarity index 71% rename from tools/eclipse/dev/org.riscv.idl/.project rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/.project index 5bbc2c734f..1f2cd27f87 100644 --- a/tools/eclipse/dev/org.riscv.idl/.project +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/.project @@ -1,34 +1,29 @@ - org.riscv.idl + org.xtext.udb.web - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.jdt.core.javabuilder + org.eclipse.m2e.core.maven2Builder - org.eclipse.pde.ManifestBuilder + org.eclipse.xtext.ui.shared.xtextBuilder - org.eclipse.pde.SchemaBuilder + org.eclipse.jdt.core.javabuilder + org.eclipse.m2e.core.maven2Nature org.eclipse.xtext.ui.shared.xtextNature org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/WebRoot/index.html b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/WebRoot/index.html new file mode 100644 index 0000000000..12d21fecff --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/WebRoot/index.html @@ -0,0 +1,44 @@ + + + + + Example Web Editor + + + + + + + +
+
+

Example Udb Web Editor

+
+
+
+
+
+ + + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/WebRoot/style.css b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/WebRoot/style.css new file mode 100644 index 0000000000..9f0724d8f3 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/WebRoot/style.css @@ -0,0 +1,56 @@ +body { + width: 100%; + height: 100%; + overflow: hidden; + font: 16px Helvetica,sans-serif; +} + +a { + color: #22a; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.container { + display: block; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: 20px; +} + +.header { + display: block; + position: absolute; + background-color: #e8e8e8; + top: 0; + left: 0; + right: 0; + height: 60px; + padding: 10px; +} + +.content { + display: block; + position: absolute; + top: 90px; + bottom: 0; + left: 0; + width: 640px; +} + +#xtext-editor { + display: block; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + padding: 4px; + border: 1px solid #aaa; +} diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/pom.xml b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/pom.xml new file mode 100644 index 0000000000..4b09eac5c1 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/pom.xml @@ -0,0 +1,130 @@ + + 4.0.0 + + org.xtext.udb + org.xtext.udb.parent + 1.0.0-SNAPSHOT + + org.xtext.udb.web + war + + + src + + + src + + **/*.java + **/*.xtend + + + + + + org.eclipse.xtend + xtend-maven-plugin + + + maven-war-plugin + 3.4.0 + + WebRoot + false + + + + org.eclipse.jetty + jetty-maven-plugin + 11.0.25 + + WebRoot + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + + add-source + initialize + + add-source + add-resource + + + + src-gen + + + + src-gen + + **/*.java + + + + + + + + + + + + + ${project.groupId} + org.xtext.udb + ${project.version} + + + ${project.groupId} + org.xtext.udb.ide + ${project.version} + + + org.eclipse.xtext + org.eclipse.xtext.xbase.web + ${xtextVersion} + + + org.eclipse.xtext + org.eclipse.xtext.web.servlet + ${xtextVersion} + + + org.eclipse.xtend + org.eclipse.xtend.lib + ${xtextVersion} + + + org.webjars + requirejs + 2.3.7 + + + org.webjars + jquery + 3.6.0 + + + org.webjars + ace + 1.3.3 + + + org.eclipse.jetty + jetty-annotations + 11.0.25 + provided + + + org.slf4j + slf4j-simple + 2.0.5 + provided + + + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/ServerLauncher.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/ServerLauncher.java new file mode 100644 index 0000000000..a3d2d6dc8b --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/ServerLauncher.java @@ -0,0 +1,70 @@ +/* + * generated by Xtext 2.39.0 + */ +package org.xtext.example.udb.web; + +import java.net.InetSocketAddress; +import org.eclipse.jetty.annotations.AnnotationConfiguration; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.webapp.Configuration; +import org.eclipse.jetty.webapp.MetaInfConfiguration; +import org.eclipse.jetty.webapp.WebAppConfiguration; +import org.eclipse.jetty.webapp.WebAppContext; +import org.eclipse.jetty.webapp.WebInfConfiguration; +import org.eclipse.jetty.webapp.WebXmlConfiguration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This program starts an HTTP server for testing the web integration of your DSL. + * Just execute it and point a web browser to http://localhost:8080/ + */ +public class ServerLauncher { + + private static final Logger LOG = LoggerFactory.getLogger(ServerLauncher.class); + + public static void main(String[] args) { + Server server = new Server(new InetSocketAddress("localhost", 8080)); + WebAppContext ctx = new WebAppContext(); + ctx.setResourceBase("WebRoot"); + ctx.setWelcomeFiles(new String[] {"index.html"}); + ctx.setContextPath("/"); + ctx.setConfigurations(new Configuration[] { + new AnnotationConfiguration(), + new WebXmlConfiguration(), + new WebInfConfiguration(), + new MetaInfConfiguration(), + new WebAppConfiguration() + }); + ctx.setAttribute(MetaInfConfiguration.CONTAINER_JAR_PATTERN, + ".*/org\\.xtext\\.udb\\.web/.*,.*\\.jar"); + ctx.setInitParameter("org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false"); + server.setHandler(ctx); + try { + server.start(); + LOG.info("Server started " + server.getURI() + "..."); + new Thread() { + + public void run() { + try { + LOG.info("Press enter to stop the server..."); + int key = System.in.read(); + if (key != -1) { + server.stop(); + } else { + LOG.warn( + "Console input is not available. In order to stop the server, you need to cancel process manually."); + } + } catch (Exception e) { + LOG.warn(e.getMessage()); + } + } + + }.start(); + server.join(); + } catch (Exception exception) { + LOG.warn(exception.getMessage()); + System.exit(1); + } + } +} diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/UdbServlet.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/UdbServlet.java new file mode 100644 index 0000000000..80d23b16a8 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/UdbServlet.java @@ -0,0 +1,36 @@ +/* + * generated by Xtext 2.39.0 + */ +package org.xtext.example.udb.web; + +import com.google.inject.Injector; +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import org.eclipse.xtext.util.DisposableRegistry; +import org.eclipse.xtext.web.servlet.XtextServlet; + +/** + * Deploy this class into a servlet container to enable DSL-specific services. + */ +@WebServlet(name = "XtextServices", urlPatterns = "/xtext-service/*") +public class UdbServlet extends XtextServlet { + + private static final long serialVersionUID = 1L; + + DisposableRegistry disposableRegistry; + + public void init() throws ServletException { + super.init(); + Injector injector = new UdbWebSetup().createInjectorAndDoEMFRegistration(); + this.disposableRegistry = injector.getInstance(DisposableRegistry.class); + } + + public void destroy() { + if (disposableRegistry != null) { + disposableRegistry.dispose(); + disposableRegistry = null; + } + super.destroy(); + } + +} diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/UdbWebModule.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/UdbWebModule.java new file mode 100644 index 0000000000..07f1d8bee6 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/UdbWebModule.java @@ -0,0 +1,11 @@ +/* + * generated by Xtext 2.39.0 + */ +package org.xtext.example.udb.web; + + +/** + * Use this class to register additional components to be used within the web application. + */ +public class UdbWebModule extends AbstractUdbWebModule { +} diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/UdbWebSetup.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/UdbWebSetup.java new file mode 100644 index 0000000000..6e79289e12 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb.web/src/org/xtext/example/udb/web/UdbWebSetup.java @@ -0,0 +1,23 @@ +/* + * generated by Xtext 2.39.0 + */ +package org.xtext.example.udb.web; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.xtext.util.Modules2; +import org.xtext.example.udb.UdbRuntimeModule; +import org.xtext.example.udb.UdbStandaloneSetup; +import org.xtext.example.udb.ide.UdbIdeModule; + +/** + * Initialization support for running Xtext languages in web applications. + */ +public class UdbWebSetup extends UdbStandaloneSetup { + + @Override + public Injector createInjector() { + return Guice.createInjector(Modules2.mixin(new UdbRuntimeModule(), new UdbIdeModule(), new UdbWebModule())); + } + +} diff --git a/tools/eclipse/dev/org.riscv.idl/.antlr-generator-3.2.0-patch.jar b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.antlr-generator-3.2.0-patch.jar similarity index 100% rename from tools/eclipse/dev/org.riscv.idl/.antlr-generator-3.2.0-patch.jar rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.antlr-generator-3.2.0-patch.jar diff --git a/tools/eclipse/dev/org.riscv.idl/.classpath b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.classpath similarity index 88% rename from tools/eclipse/dev/org.riscv.idl/.classpath rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.classpath index 7994b69384..c1b088dcb8 100644 --- a/tools/eclipse/dev/org.riscv.idl/.classpath +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.classpath @@ -5,5 +5,5 @@ - + diff --git a/tools/eclipse/dev/org.riscv.idl/.launch/Generate Idl (idl) Language Infrastructure.launch b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.launch/Generate Udb (udb) Language Infrastructure.launch similarity index 55% rename from tools/eclipse/dev/org.riscv.idl/.launch/Generate Idl (idl) Language Infrastructure.launch rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.launch/Generate Udb (udb) Language Infrastructure.launch index f8f4c81ad2..4c745263cb 100644 --- a/tools/eclipse/dev/org.riscv.idl/.launch/Generate Idl (idl) Language Infrastructure.launch +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.launch/Generate Udb (udb) Language Infrastructure.launch @@ -1,7 +1,7 @@ - + @@ -10,9 +10,9 @@ - + - - + + diff --git a/tools/eclipse/dev/org.riscv.idl/.launch/Launch Runtime Eclipse.launch b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.launch/Launch Runtime Eclipse.launch similarity index 97% rename from tools/eclipse/dev/org.riscv.idl/.launch/Launch Runtime Eclipse.launch rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.launch/Launch Runtime Eclipse.launch index d43c9fe64f..569c8b2774 100644 --- a/tools/eclipse/dev/org.riscv.idl/.launch/Launch Runtime Eclipse.launch +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.launch/Launch Runtime Eclipse.launch @@ -4,7 +4,7 @@ - + diff --git a/tools/eclipse/dev/org.riscv.idl.ui.tests/.project b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.project similarity index 80% rename from tools/eclipse/dev/org.riscv.idl.ui.tests/.project rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.project index 2587ea097e..223fbccbd5 100644 --- a/tools/eclipse/dev/org.riscv.idl.ui.tests/.project +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/.project @@ -1,10 +1,15 @@ - org.riscv.idl.ui.tests + org.xtext.udb + + org.eclipse.m2e.core.maven2Builder + + + org.eclipse.xtext.ui.shared.xtextBuilder @@ -27,6 +32,7 @@ + org.eclipse.m2e.core.maven2Nature org.eclipse.xtext.ui.shared.xtextNature org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/META-INF/MANIFEST.MF b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..35b8aa0b05 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/META-INF/MANIFEST.MF @@ -0,0 +1,29 @@ +Manifest-Version: 1.0 +Automatic-Module-Name: org.xtext.udb +Bundle-ManifestVersion: 2 +Bundle-Name: org.xtext.udb +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.xtext.udb; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.xtext, + org.eclipse.xtext.xbase, + org.eclipse.equinox.common;bundle-version="3.19.0", + org.eclipse.emf.ecore, + org.eclipse.xtext.xbase.lib;bundle-version="2.39.0", + org.eclipse.emf.common, + org.antlr.runtime;bundle-version="[3.2.0,3.2.1)" +Bundle-RequiredExecutionEnvironment: JavaSE-21 +Export-Package: org.xtext.example.udb.parser.antlr, + org.xtext.example.udb.udb.impl, + org.xtext.example.udb.parser.antlr.internal, + org.xtext.example.udb.scoping, + org.xtext.example.udb.generator, + org.xtext.example.udb.services, + org.xtext.example.udb.udb, + org.xtext.example.udb.udb.util, + org.xtext.example.udb.validation, + org.xtext.example.udb.serializer, + org.xtext.example.udb, + org.xtext.example.udb.parser.antlr.lexer +Import-Package: org.apache.log4j diff --git a/tools/eclipse/dev/org.riscv.idl/build.properties b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/build.properties similarity index 100% rename from tools/eclipse/dev/org.riscv.idl/build.properties rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/build.properties diff --git a/tools/eclipse/dev/org.riscv.idl/plugin.xml b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/plugin.xml similarity index 53% rename from tools/eclipse/dev/org.riscv.idl/plugin.xml rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/plugin.xml index 4ce0470b94..42f931ee8a 100644 --- a/tools/eclipse/dev/org.riscv.idl/plugin.xml +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/plugin.xml @@ -3,8 +3,8 @@ + uri = "http://www.xtext.org/example/udb/Udb" + class = "org.xtext.example.udb.udb.UdbPackage" + genModel = "model/generated/Udb.genmodel" /> diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/plugin.xml_gen b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/plugin.xml_gen new file mode 100644 index 0000000000..42f931ee8a --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/plugin.xml_gen @@ -0,0 +1,10 @@ + + + + + + + diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/pom.xml b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/pom.xml new file mode 100644 index 0000000000..d5b2e9703f --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/pom.xml @@ -0,0 +1,102 @@ + + 4.0.0 + + org.xtext.udb + org.xtext.udb.parent + 1.0.0-SNAPSHOT + + org.xtext.udb + eclipse-plugin + + + + + org.codehaus.mojo + exec-maven-plugin + 3.0.0 + + + + mwe2Launcher + generate-sources + + java + + + + + org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher + + /${project.basedir}/src/org/xtext/example/udb/GenerateUdb.mwe2 + -p + rootPath=/${project.basedir}/.. + + compile + true + false + + + + org.eclipse.xtext + org.eclipse.xtext.xtext.generator.dependencies + ${xtextVersion} + + + + + org.eclipse.xtend + xtend-maven-plugin + + + + org.apache.maven.plugins + maven-clean-plugin + + + + ${basedir}/../org.xtext.udb/src-gen/ + + **/* + + + + ${basedir}/../org.xtext.udb.tests/src-gen/ + + **/* + + + + ${basedir}/../org.xtext.udb.ide/src-gen/ + + **/* + + + + ${basedir}/../org.xtext.udb.ui/src-gen/ + + **/* + + + + ${basedir}/../org.xtext.udb.ui.tests/src-gen/ + + **/* + + + + ${basedir}/../org.xtext.udb.web/src-gen/ + + **/* + + + + ${basedir}/model/generated/ + + + + + + + + diff --git a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/GenerateIdl.mwe2 b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/GenerateUdb.mwe2 similarity index 87% rename from tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/GenerateIdl.mwe2 rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/GenerateUdb.mwe2 index 91475429f0..2a089f6e8e 100644 --- a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/GenerateIdl.mwe2 +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/GenerateUdb.mwe2 @@ -1,4 +1,4 @@ -module org.riscv.idl.GenerateIdl +module org.xtext.example.udb.GenerateUdb import org.eclipse.xtext.xtext.generator.* import org.eclipse.xtext.xtext.generator.model.project.* @@ -10,7 +10,7 @@ Workflow { component = XtextGenerator { configuration = { project = StandardProjectConfig { - baseName = "org.riscv.idl" + baseName = "org.xtext.udb" rootPath = rootPath runtimeTest = { enabled = true @@ -21,6 +21,9 @@ Workflow { eclipsePluginTest = { enabled = true } + web = { + enabled = true + } createEclipseMetaData = true } code = { @@ -31,8 +34,8 @@ Workflow { } } language = StandardLanguage { - name = "org.riscv.idl.Idl" - fileExtensions = "idl" + name = "org.xtext.example.udb.Udb" + fileExtensions = "udb" serializer = { generateStub = false diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/Udb.xtext b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/Udb.xtext new file mode 100644 index 0000000000..d1062ce21a --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/Udb.xtext @@ -0,0 +1,217 @@ +grammar org.xtext.example.udb.Udb with org.eclipse.xtext.common.Terminals +hidden(SL_COMMENT, WS) +generate udb "http://www.xtext.org/example/udb/Udb" + +import "http://www.eclipse.org/emf/2002/Ecore" as ecore + +Model: + schema = Schema + kind = Kind & + csrName = Name & + base = Base? & + longName = LongName & + description = Description & + definedBy = DefinedBy & + address = Address & + indirectAddress = IndirectAddress? & + indirectSlot = IndirectSlot? & + writable = Writable & + privmode = PrivMode & + virtualAddress = VirtualAddress? & + length = Length & + requires = Requires? & + fields = Fields? & + swRead = SwRead? & + source = Source? & + certNormativeRules = CertNormativeRules? & + certTestProcedures = CertTestProcedures? +; + +// This is so we can directly copy+paste from a UDB .yaml file +Schema: "$schema" ":" schema=STRING; + +/* Required fields for the CSR schema */ +Kind: 'kind' ':' kind=KindType ; +Name: 'name' ':' name=NameType ; +LongName: 'long_name' ':' longName=STRING ; +Address: 'address' ':' address=Hex ; +Writable: 'writable' ':' writable=Boolean ; +PrivMode:'priv_mode' ':' privMode=PrivType ; +Length: 'length' ':' length=LengthType ; +Description: 'description' ':' description=STRING ; +DefinedBy:'definedBy' ':'extensionName=STRING ; + +/* Optional fields for the CSR schema */ +Base: 'base' ':' base=INT ; +IndirectAddress:'indirect_address' ':' indirectAddress=Hex; +IndirectSlot:'indirect_slot' ':' indirectSlot=INT ; /* TODO: validator: min:1 max:6 */ + + +VirtualAddress:'virtual_address' ':' virtualAddress=Hex ; +CertNormativeRules: 'cert_normative_rules' ':' certNormativeRules=CNRType ; +CertTestProcedures: 'cert_test_procedures' ':' certTestProcedures=CTPType ; + +// implement in validator? +Requires:'requires' ':' requires=STRING ; +SwRead:'sw_read()' ':' swRead=STRING ; +Source:'$source' ':' source=STRING ; + + +/* CSR Schema Types */ +KindType: type=('csr'|'extension'); +NameType: type=(CSR_NAME); +PrivType: type=('M'|'S'|'U'|'VS'|'D'); + +LengthType: intType = IntType | parmType = ParmType; +IntType: intVal=INT; // must be either 32 or 64 +ParmType: parmName=('MXLEN'|'SXLEN'|'VSXLEN'|'XLEN'); + +CNRType: '[' id=STRING ',' name=STRING ',' docLinks=StringArray ',' + description=STRING ']'; +CTPType: '[' id=STRING ',' name=STRING ',' description=STRING ',' + normativeRules=StringArray ',' list=STRING?']'; + + + +/* Grammar for fields */ +Fields: + {Fields} 'fields' ':' + INDENT + fields += FieldDef+ + DEDENT +; + +FieldDef: + name=FIELD_NAME ':' + INDENT + ('name' ':' fieldName = STRING ';')? & + longName = LongName? & + location = LocationType & + resetValue = ResetValueType & + swWriteFunc = SWWriteFunc? & + legalFunc = LegalFunc? & + base = Base? & + description = Description & + type = TypeType & + alias = Alias? & + definedBy = DefinedBy? & + affectedBy = AffectedBy? & + certNormativeRules = CertNormativeRules? & + certTestProcedures = CertTestProcedures? + DEDENT +; + +FieldDisplayName: 'name' ':' fieldName=STRING ; + + + +/* fields for Fields */ +StaticLocation: 'location' ':' locValue=FieldLocation ; +LocationRV32: "location_rv32" ":" locationRV32=FieldLocation ; +LocationRV64: "location_rv64" ":" locationRV64=FieldLocation ; + + +ResetValue: "reset_value" ":" resetValue=ResetValueValue ; +ResetValueFunc: "reset_value()" ":" resetValueFunc=IDL ; +SWWriteFunc: "sw_write(csr_value)" ":" swWriteFunc=IDL ; +LegalFunc: "legal?(csr_value)" ":" legalFunc=IDL ; +Type: "type" ":" perms=("RO"|"RO-H"|"RW"|"RW-R"|"RW-H"|"RW-RH") ; +TypeFunc: "type()" ":" idl=IDL ; +Alias: "alias" ":" alias=AliasType ; +AffectedBy: "affectedBy" ":" affectedBy=AffectedByType ; + +/* Types for Fields */ + +LocationType: staticLoc = StaticLocation | funcLoc = VarLocation; +VarLocation: + locationRV32=LocationRV32 + locationRV64=LocationRV64 +; +FieldLocation: value=INT | range=Range; +Range: upper=INT '-' lower=INT; +ResetValueType: value=ResetValue | function=ResetValueFunc; +ResetValueValue: value=INT | undefinedLegal=UndefinedLegal; +TypeType: typeVal=Type | typeFunc=TypeFunc; +AliasType: alias+=(CSR_FIELD | CSR_FIELD_BITS)+; + +// TODO: we probably will want a cross ref thing for this +AffectedByType: affectedByName=STRING | affectedByArray=StringArray; + + + +/* Conditions */ +//Condition: yamlCond=YAMLCondition | idlCond=IDLCondition; + +//YAMLCondition: +// yaml = YAMLCondition (TODO: implement) +// extensionCond = ExtensionCondition +// | paramCond = ParamCondition +// | xlenCond = XLenCondition +//; + +IDLCondition: + "idl()" ":" idl=IDL + reason?=Reason +; + +ExtensionCondition: + STRING /* TODO */ +; + +ParamCondition: + STRING /* TODO */ +; + +XLenCondition: xlen=INT; /* can be 32 or 64 (TODO: implement in validator) */ + +Reason: "reason" ":" reasonStr=STRING; + + + +/* IDL Grammar */ +IDL: idl=STRING; + + + + + +/* Keywords */ +UndefinedLegal: "UNDEFINED_LEGAL"; +Boolean returns ecore::EBoolean: "true" | "false"; + +/* Helpers*/ +StringArray: '[' names+=STRING (',' names+=STRING)+ ']'; + +/* Terminals */ +terminal CSR_NAME: + ('a'..'z')('a'..'z' | '0'..'9' | '_' | '.')+ +; +terminal FIELD_NAME: + ('a'..'z' | 'A'..'Z')+ +; +terminal CSR_FIELD: + ('a'..'z')('a'..'z' | '0'..'9' | '_' | '.')+ + ('.')('A'..'Z' | '0'..'9')+ +; +terminal CSR_FIELD_BITS: + ('a'..'z')('a'..'z' | '0'..'9' | '_' | '.')+ + '.'('A'..'Z' | '0'..'9')+ + '[' ('0'..'9')+(':'('0'..'9')+)? ']' +; + + +Hex: value=HEX_VALUE; +terminal HEX_VALUE returns ecore::EInt: + ('0x' | '0X') + ('0'..'9' | 'A'..'F' | 'a'..'f') + (('0'..'9' | 'A'..'F' | 'a'..'f' | '_')*('0'..'9' | 'A'..'F' | 'a'..'f'))? +; + +terminal INDENT: 'synthetic:INDENT'; +terminal DEDENT: 'synthetic:DEDENT'; + +@Override +terminal SL_COMMENT: '#' !('\n'|'\r')*; + +@Override +terminal WS: ('\r'|'\n'|'\t'|' ')+; diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/UdbRuntimeModule.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/UdbRuntimeModule.java new file mode 100644 index 0000000000..1d74a1a67d --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/UdbRuntimeModule.java @@ -0,0 +1,17 @@ +/* + * generated by Xtext 2.39.0 + */ +package org.xtext.example.udb; + +import org.eclipse.xtext.conversion.IValueConverterService; + + +/** + * Use this class to register components to be used at runtime / without the Equinox extension registry. + */ +public class UdbRuntimeModule extends AbstractUdbRuntimeModule { + @Override + public Class bindIValueConverterService() { + return org.xtext.example.udb.UdbValueConverter.class; + } +} diff --git a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/IdlStandaloneSetup.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/UdbStandaloneSetup.java similarity index 53% rename from tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/IdlStandaloneSetup.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/UdbStandaloneSetup.java index 8c426049cf..45c9d0524c 100644 --- a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/IdlStandaloneSetup.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/UdbStandaloneSetup.java @@ -1,15 +1,15 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl; +package org.xtext.example.udb; /** * Initialization support for running Xtext languages without Equinox extension registry. */ -public class IdlStandaloneSetup extends IdlStandaloneSetupGenerated { +public class UdbStandaloneSetup extends UdbStandaloneSetupGenerated { public static void doSetup() { - new IdlStandaloneSetup().createInjectorAndDoEMFRegistration(); + new UdbStandaloneSetup().createInjectorAndDoEMFRegistration(); } } diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/UdbValueConverter.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/UdbValueConverter.java new file mode 100644 index 0000000000..00589363fa --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/UdbValueConverter.java @@ -0,0 +1,39 @@ +package org.xtext.example.udb; + +import org.eclipse.xtext.common.services.DefaultTerminalConverters; +import org.eclipse.xtext.conversion.IValueConverter; +import org.eclipse.xtext.conversion.ValueConverter; +import org.eclipse.xtext.conversion.ValueConverterException; +import org.eclipse.xtext.nodemodel.INode; + +public class UdbValueConverter extends DefaultTerminalConverters { + + /** + * INT converter for hex digits + */ + @ValueConverter(rule = "HEX_VALUE") + public IValueConverter HEX_VALUE() { + return new HexValueConverter(); + } + + public static class HexValueConverter implements IValueConverter { + + @Override + public Integer toValue(String string, INode node) throws ValueConverterException { + try { + // remove underscores + String normalized = string.replace("_", ""); + return Integer.parseUnsignedInt(normalized.substring(2), 16); + + } catch (NumberFormatException e) { + throw new ValueConverterException("Invalid integer literal: " + string, node, e); + } + } + + @Override + public String toString(Integer value) throws ValueConverterException { + return "0x" + Integer.toHexString(value); + } + } + +} diff --git a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/generator/IdlGenerator.xtend b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/generator/UdbGenerator.xtend similarity index 53% rename from tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/generator/IdlGenerator.xtend rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/generator/UdbGenerator.xtend index 6aaeb28bf2..2c44a76934 100644 --- a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/generator/IdlGenerator.xtend +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/generator/UdbGenerator.xtend @@ -1,30 +1,25 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.generator +package org.xtext.example.udb.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 -import org.riscv.idl.idl.Csr -import java.util.Arrays /** * Generates code from your model files on save. * * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation */ -class IdlGenerator extends AbstractGenerator { +class UdbGenerator extends AbstractGenerator { override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { - val csv_file = resource.URI.lastSegment.replace(".idl", ".csv") - fsa.generateFile(csv_file, - 'address, name, reset_value, description' + '\n' + - resource.allContents - .filter(Csr) - .map[String.join(', ', - Arrays.asList(address, name, reset_value, description))] - .join('\n')) +// fsa.generateFile('greetings.txt', 'People to greet: ' + +// resource.allContents +// .filter(Greeting) +// .map[name] +// .join(', ')) } } diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/parser/antlr/UdbTokenSource.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/parser/antlr/UdbTokenSource.java new file mode 100644 index 0000000000..bb3b0535f3 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/parser/antlr/UdbTokenSource.java @@ -0,0 +1,35 @@ +/* + * generated by Xtext 2.40.0 + */ +package org.xtext.example.udb.parser.antlr; + +import org.antlr.runtime.Token; +import org.antlr.runtime.TokenSource; +import org.eclipse.xtext.parser.antlr.AbstractIndentationTokenSource; +import org.xtext.example.udb.parser.antlr.internal.InternalUdbParser; + +public class UdbTokenSource extends AbstractIndentationTokenSource { + + public UdbTokenSource(TokenSource delegate) { + super(delegate); + } + + @Override + protected boolean shouldSplitTokenImpl(Token token) { + // TODO Review assumption + return token.getType() == InternalUdbParser.RULE_WS; + } + + @Override + protected int getBeginTokenType() { + // TODO Review assumption + return InternalUdbParser.RULE_INDENT; + } + + @Override + protected int getEndTokenType() { + // TODO Review assumption + return InternalUdbParser.RULE_DEDENT; + } + +} diff --git a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/scoping/IdlScopeProvider.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/scoping/UdbScopeProvider.java similarity index 68% rename from tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/scoping/IdlScopeProvider.java rename to tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/scoping/UdbScopeProvider.java index 7c7ceb92e0..1375cb415c 100644 --- a/tools/eclipse/dev/org.riscv.idl/src/org/riscv/idl/scoping/IdlScopeProvider.java +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/scoping/UdbScopeProvider.java @@ -1,7 +1,7 @@ /* * generated by Xtext 2.39.0 */ -package org.riscv.idl.scoping; +package org.xtext.example.udb.scoping; /** @@ -10,6 +10,6 @@ * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping * on how and when to use it. */ -public class IdlScopeProvider extends AbstractIdlScopeProvider { +public class UdbScopeProvider extends AbstractUdbScopeProvider { } diff --git a/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/validation/UdbValidator.java b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/validation/UdbValidator.java new file mode 100644 index 0000000000..4f49d4ddc4 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/org.xtext.udb/src/org/xtext/example/udb/validation/UdbValidator.java @@ -0,0 +1,111 @@ +/* + * generated by Xtext 2.39.0 + */ +package org.xtext.example.udb.validation; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.xtext.validation.Check; +import org.xtext.example.udb.parser.antlr.UdbParser; +import org.xtext.example.udb.udb.FieldDef; +import org.xtext.example.udb.udb.IntType; +import org.xtext.example.udb.udb.LengthType; +import org.xtext.example.udb.udb.Model; +import org.xtext.example.udb.udb.ParmType; +import org.xtext.example.udb.udb.UdbPackage; + + +/** + * This class contains custom validation rules. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation + */ +public class UdbValidator extends AbstractUdbValidator { + + @Check + public void checkAddress(Model m) { + int address = m.getAddress() != null ? m.getAddress().getAddress().getValue() : null; + + if(address < 0 || address > 4096) { + error("Address must be between 0 and 12 bits.", UdbPackage.Literals.MODEL__ADDRESS); + } + } + + @Check + public void checkVirtualAddressValue(Model m) { + /* Ensure virtual address is in required range 0-4095 */ + int vaddress = m.getVirtualAddress() != null ? + m.getVirtualAddress().getVirtualAddress().getValue() : null; + + if (vaddress < 0 || vaddress > 4095) { + error("Virtual address must be between 0 and 12 bits.", UdbPackage.Literals.MODEL__VIRTUAL_ADDRESS); + } + } + + @Check + public void checkIndirectAddressValue(Model m) { + /* Ensure indirect address is in required range */ + int iaddress = m.getIndirectAddress() != null ? + m.getIndirectAddress().getIndirectAddress().getValue() : null; + + if(iaddress < 0 || iaddress > (2^64)) { + error("Indirect address must be between 0 and 64 bits.", UdbPackage.Literals.MODEL__INDIRECT_ADDRESS); + } + } + + @Check + public void checkBaseValue(Model m) { + /* Ensure base value is either 32 or 64 */ + int base = m.getBase() != null ? m.getBase().getBase() : null; + + if (base != 32 && base != 64) { + error("Base must have value of 32 or 64.", UdbPackage.Literals.MODEL__BASE); + } + } + + @Check + public void checkLengthValue(Model m) { + // Containment reference is always instantiated + LengthType length_t = m.getLength().getLength(); + if (length_t == null) { + error("length should not be null", + UdbPackage.Literals.MODEL__LENGTH); + } + // If length is an integer, value is either 32 or 64 + if (length_t instanceof IntType) { + Integer length = ((IntType) m.getLength().getLength()).getIntVal(); + if (length != 32 && length != 64) { + error("length if specified as integer, should be 32 or 64", + UdbPackage.Literals.MODEL__LENGTH); + } + } +// if (length != null && length != "MXLEN" && length != "SXLEN" && length != "VSXLEN" && length != "XLEN") { +// if (Integer.valueOf(length) != 32 && Integer.valueOf(length) != 64) { +// error("Integer length value must be 32 or 64.", UdbPackage.Literals.MODEL__LENGTH); +// } +// } + + } + + @Check + public void checkIndirectSlotValue(Model m) { + /* Ensure indirect_slot is between 1 and 6 */ + int slot = m.getIndirectSlot() != null ? m.getIndirectSlot().getIndirectSlot() : null; + + if (slot < 1 || slot > 6) { + error("Indirect slot value must be between 1 and 6.", UdbPackage.Literals.MODEL__INDIRECT_SLOT); + } + } + + @Check + public void checkVirtualAddress(Model m) { + String mode = m.getPrivmode() != null ? m.getPrivmode().getPrivMode().getType() : null; + + if (mode.equals("VS")) { + if (m.getVirtualAddress() == null) { + error("VS mode requires a virtual address.", UdbPackage.Literals.MODEL__PRIVMODE); + } + } + + } + +} diff --git a/tools/eclipse/dev/org.xtext.udb.parent/pom.xml b/tools/eclipse/dev/org.xtext.udb.parent/pom.xml new file mode 100644 index 0000000000..6ceb202339 --- /dev/null +++ b/tools/eclipse/dev/org.xtext.udb.parent/pom.xml @@ -0,0 +1,267 @@ + + 4.0.0 + org.xtext.udb + 1.0.0-SNAPSHOT + org.xtext.udb.parent + pom + + + 2.39.0 + 2.22.0 + UTF-8 + 21 + 21 + + 4.0.12 + + + + + + + + org.xtext.udb + org.xtext.udb.ide + org.xtext.udb.ui + org.xtext.udb.web + org.xtext.udb.target + org.xtext.udb.tests + org.xtext.udb.ui.tests + + + + + org.eclipse.xtext + xtext-dev-bom + ${xtextVersion} + pom + import + + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + + + org.xtext.udb + org.xtext.udb.target + ${project.version} + + + + + macosx + cocoa + x86_64 + + + win32 + win32 + x86_64 + + + linux + gtk + x86_64 + + + + + + eclipse-plugin + org.eclipse.xtext.logging + 0.0.0 + + + + eclipse-feature + org.eclipse.rcp + 0.0.0 + + + + + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtextVersion} + + + + compile + xtend-install-debug-info + testCompile + xtend-test-install-debug-info + + + + + ${basedir}/xtend-gen + ${basedir}/xtend-gen + + + + org.apache.maven.plugins + maven-clean-plugin + 3.2.0 + + + + ${basedir}/xtend-gen + + **/* + + + + + + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho-version} + + -err:-forbidden + false + + + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho-version} + + + ${platformSystemProperties} ${systemProperties} ${moduleProperties} ${additionalTestArguments} + false + false + + + + + + + + codehaus-snapshots + disable dead 'Codehaus Snapshots' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478 + http://nexus.codehaus.org/snapshots/ + + false + + + false + + + + + ossrh-snapshots + ossrh-snapshots + + false + + + false + + http://oss.sonatype.org/content/repositories/snapshots + + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://oss.sonatype.org/content/repositories/snapshots + + false + + + false + + + + + + codehaus-snapshots + disable dead 'Codehaus Snapshots' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478 + http://nexus.codehaus.org/snapshots/ + + false + + + false + + + + ossrh-snapshots + ossrh-snapshots + + false + + + false + + http://oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://oss.sonatype.org/content/repositories/snapshots + + false + + + false + + + + + + macos + + + mac + + + + + -XstartOnFirstThread + + + + jdk9-or-newer + + [9,) + + + --add-modules=ALL-SYSTEM + + + + + + + diff --git a/tools/eclipse/run/testIdl/.project b/tools/eclipse/run/testIdl/.project index 965dda33e7..f44adce15c 100644 --- a/tools/eclipse/run/testIdl/.project +++ b/tools/eclipse/run/testIdl/.project @@ -1,6 +1,6 @@ - testIdl + testudb diff --git a/tools/eclipse/run/testIdl/src/csrA.idl b/tools/eclipse/run/testIdl/src/csrA.idl deleted file mode 100644 index fb57de0b61..0000000000 --- a/tools/eclipse/run/testIdl/src/csrA.idl +++ /dev/null @@ -1,3 +0,0 @@ -csr A "Mock CSR A" "0x445" "0x12345678"; -csr misa "Machine ISA register" "0x301" "0xABCD4648" ; -csr mstatus "Machine Status Register" "0x300" "0x0"; diff --git a/tools/eclipse/run/testIdl/src/misa.idl b/tools/eclipse/run/testIdl/src/misa.idl deleted file mode 100644 index cd257f0eac..0000000000 --- a/tools/eclipse/run/testIdl/src/misa.idl +++ /dev/null @@ -1 +0,0 @@ -csr misa "Machine ISA register" "0x301" "0xABCD4648" ; diff --git a/tools/eclipse/run/testIdl/src/module-info.java b/tools/eclipse/run/testIdl/src/module-info.java index a0da18e2c6..c00d9dc55e 100644 --- a/tools/eclipse/run/testIdl/src/module-info.java +++ b/tools/eclipse/run/testIdl/src/module-info.java @@ -4,5 +4,5 @@ /** * */ -module testIdl { +module testUdb { } diff --git a/tools/eclipse/run/testIdl/src/mstatus.idl b/tools/eclipse/run/testIdl/src/mstatus.idl deleted file mode 100644 index 8cde4b064f..0000000000 --- a/tools/eclipse/run/testIdl/src/mstatus.idl +++ /dev/null @@ -1 +0,0 @@ -csr mstatus "Machine Status Register" "0x300" "0x0"; diff --git a/tools/eclipse/run/testIdl/src/vcsr.udb b/tools/eclipse/run/testIdl/src/vcsr.udb new file mode 100644 index 0000000000..b7175a3c97 --- /dev/null +++ b/tools/eclipse/run/testIdl/src/vcsr.udb @@ -0,0 +1,30 @@ +kind: csr +name: vcsr +address: 0x99F # validator works +definedBy: "V" +long_name: "Vector Control and Status Register" +description: "Contains aliases to vxrm and vxsat CSRs" +writable: true +priv_mode: VS +virtual_address: 0x00 +length: RNDLEN +# single line comment works +fields: + VXRM: + location: 2-1 + reset_value: 0 + description: "See vxrm." + sw_write(csr_value): "| + CSR[vxrm].VALUE = csr_value.VXRM; + return csr_value.VXRM;" + type: RW-RH + alias: vxrm.VALUE[1:0] + VXSAT: # syntax error if vxrm is dedented TODO: better error message + location: 0 + reset_value: 0 + sw_write(csr_value): "| + CSR[vxsat].VALUE = csr_value.VXSAT + return csr_value.VXSAT;" + description: "See vxsat." + type: RW-RH + alias: vxsat.VALUE[0] diff --git a/tools/eclipse/run/testIdl/src/vsstatus.udb b/tools/eclipse/run/testIdl/src/vsstatus.udb new file mode 100644 index 0000000000..14a9541dc4 --- /dev/null +++ b/tools/eclipse/run/testIdl/src/vsstatus.udb @@ -0,0 +1,225 @@ +# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +# SPDX-License-Identifier: BSD-3-Clause-Clear + + +kind: csr +name: vsstatus +long_name: "Virtual Supervisor Status" +description: "| + The vsstatus register tracks and controls the hart's current operating state. + + It is VS-mode's version of `sstatus`, and substitutes for it when in VS-mode + (_i.e._, in VS-mode CSR address 0x100 is `vsstatus`, not `sstatus`). + + Unlike the relationship between `sstatus` and `mstatus`, none of the bits in `vsstatus` are + aliases of another field." +definedBy: "H" +address: 0x200 +writable: true +priv_mode: VS +virtual_address: 0x100 +length: VSXLEN +fields: + SD: + location_rv32: 31 + location_rv64: 63 + reset_value: UNDEFINED_LEGAL + description: "| + *State Dirty* + + Read-only bit that summarizes whether any of the + `vsstatus.FS`, <% if ext?(:V) %> `vsstatus.VS`, <% end %> or `vsstatus.XS` + fields signal the presence of some dirty state + (_i.e._, any of them hold the value `11`). + + This bit is _not_ an alias of `mstatus.SD` since + it only reflects the state visible to VS-mode + (_e.g._, `status.FS` does not affect `vsstatus.SD`)." + type: RO-H + # affectedBy: [F, D, V]; TODO: doesn't work yet + + UXL: + location: 33-32 + reset_value(): "| + return (VUXLEN == 3264) ? UNDEFINED_LEGAL : VUXLEN;" + base: 64 + description: '| + *VU-mode XLEN* + + Sets the effective XLEN for VU-mode (0 = 32-bit, 1 = 64-bit, 2 = 128-bit). + + [when,"VUXLEN == 32"] + Since the hart only supports VUXLEN==32, this is hardwired to 0. + + [when,"VUXLEN == 64"] + Since the hart only supports VUXLEN==64, this is hardwired to 1.' + + type(): "| + return (VUXLEN == 3264) ? CsrFieldType::RW : CsrFieldType::RO;" + + MXR: + location: 19 + reset_value: UNDEFINED_LEGAL + description: "| + *Make eXecutable Readable* + + Makes it possible to read executable pages when loading from effective VU-mode or VS-mode + (normally, executable pages are not readable). + + * When 1, load in effective VU-mode or VS-mode from pages marked readable *or executable* + are allowed as long as the page is marked readable (or executable and `status.MXR` is set) in the + G-stage translation. + * When 0, load in effective VU-mode or VS-mode from pages marked executable raise a + Page Fault exception (unless `sstatus.MXR` is also set, in which case the above applies). + + 'vsstatus.MXR' affects all loads that operate under effective VU-mode or VS-mode: + + * All loads in VU-mode + * All loads in VS-mode + * Loads in M-mode when `mstatus.MPRV` == 1, `mstatus.MPV` == 1, and `mstatus.MPP`[1] == 0 + * Loads generated by one of the `hlv.*` instructions." + + type: RW + alias: mstatus.MXR + definedBy: "S" + + SUM: + location: 18 + reset_value: UNDEFINED_LEGAL + description: "| + *permit Supervisor Memory Access* + + Allows VS-mode to read user pages. + + Applies to the following loads and stores: + + * All loads and stores in VS-mode. + * All loads and stores in M-mode when `mstatus.MPRV` == 1, `mstatus.MPP` == 1, and `mstatus.MPV` == 1 + * Loads and stores generated by one of the `hlv.*`, `hlvx.*`, or `hsv.*` instructions. + + When `vsstatus.SUM` is 0, the loads and stores from the above categories cause an + `Illegal Instruction` exception if they access a user page during VS-level translation. + Otherwise, a load or store from the above categories is permitted to access a user page + during VS-level translation." + + type: RW + definedBy: "S" + + XS: + location: 16-15 + reset_value: 0 + description: "| + *Custom (X) extension context Status* + + Summarizes the current state of any custom extension state. + Either 0 - Off, 1 - Initial, 2 - Clean, 3 - Dirty. + Since there are no custom extensions, this field is read-only 0." + type: RO + alias: mstatus.XS + + FS: + location: 14-13 + reset_value: UNDEFINED_LEGAL + description: "| + *Floating point context status* + + When 0, floating point instructions (from F and D extensions) in VS-mode or VU-mode are disabled, + and cause ILLEGAL INSTRUCTION exceptions. + Floating point instructions in all modes, including VS-mode and VU-mode, + are similarly disabled when `mstatus.FS` is clear. + + When a floating point register, or the `fcsr` register is written in VS-mode or VU-mode, + `vsstatus.FS` is written with the value 3. + + Values 1 and 2 are valid write values for software, but are not interpreted by hardware + other than to possibly enable a previously-disabled floating point unit." + type: RW-H + definedBy: "F" + + VSD: # I think there's an issue with this being a keyword + location: 10-9 + reset_value: UNDEFINED_LEGAL + description: "| + *Vector context status* + + When 0, vector instructions (from the V extension) are disabled, and cause ILLEGAL INSTRUCTION exceptions. + When a vector register or vector CSR is written, VS obtains the value 3. + Values 1 and 2 are valid write values for software, but are not interpreted by hardware + other than to possibly enable a previously-disabled vector unit." + type: RW-H + definedBy: "V" + + SPP: + location: 8 + reset_value: UNDEFINED_LEGAL + description: "| + *VS-mode Previous Privilege* + + Written with the prior nominal privilege level (_i.e._, 0 for VU-mode and 1 for VS-mode) + when entering VS-mode from an exception/interrupt. + Can also be written by software without immediate side-effect. + + On a return from an exception from VS-mode, the machine will enter the nominal privilege level + stored in `vsstatus.SPP`." + type: RW-H + + UBE: + location: 6 + reset_value(): '| + if (VU_MODE_ENDIANNESS == "little") { + # little endian + return 0; + } else if (VU_MODE_ENDIANNESS == "big") { + # big endian + return 1; + } else { + # mutable + return UNDEFINED_LEGAL; + }' + description: "| + *VU-mode Big Endian* + + Controls the endianness of VU-mode (0 = little, 1 = big). + + [when,\"VU_MODE_ENDIANNESS == 'little'\"] + Since the CPU does not support big endian, this is hardwired to 0. + + [when,\"VU_MODE_ENDIANNESS == 'big'\"] + Since the CPU does not support big endian, this is hardwired to 1." + type(): '| + return (VU_MODE_ENDIANNESS == "dynamic") ? CsrFieldType::RW : CsrFieldType::RO;' + definedBy: "S" + + SPIE: + location: 5 + reset_value: UNDEFINED_LEGAL + description: "| + *VS-mode Previous Interrupt Enable* + + Written by hardware in two cases: + + * Written with prior value of `vsstatus.SIE` when entering VS-mode from an exception/interrupt. + * Written with the value 1 when returning from an exception in VS-mode (via the `sret` instruction). + + Can also be written by software without immediate side effect. + + Other than serving as a record of nested traps as described above, `vsstatus.SPIE` does not affect execution." + type: RW-H + definedBy: "S" + + SIE: + location: 1 + reset_value: UNDEFINED_LEGAL + description: "| + *VS-mode Interrupt Enable* + + Written by hardware in two cases: + + * Written with the value 0 when entering VS-mode from an exception/interrupt. + * Written with the prior value of `vsstatus.SPIE` when returning from an exception in VS-mode (via `sret`). + + Affects execution by: + + * When 0, all VS-mode interrupts are disabled when the current privilege level is VS ((H)S-mode and M-mode interrupts are still enabled). + * When 1, VS-mode interrupts that are not otherwise disabled with a field in `vsie` are enabled." + type: RW-H diff --git a/tools/eclipse/udb-ls/build.gradle b/tools/eclipse/udb-ls/build.gradle new file mode 100644 index 0000000000..d95a252127 --- /dev/null +++ b/tools/eclipse/udb-ls/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'java' + id 'application' + id 'com.github.johnrengelman.shadow' version '8.1.1' +} + +repositories { mavenCentral() } + +ext { + xtextVersion = '2.40.0' // matches your workspace +} + +dependencies { + + implementation fileTree(dir: 'lib', include: ['org.xtext.udb*.jar']) + + + implementation "org.eclipse.xtext:org.eclipse.xtext.ide:${xtextVersion}" + + + implementation "org.eclipse.xtext:org.eclipse.xtext.xbase.ide:${xtextVersion}" + + + implementation "io.github.classgraph:classgraph:4.8.180" + implementation "aopalliance:aopalliance:1.0" +} + +application { + mainClass = "org.eclipse.xtext.ide.server.ServerLauncher" +} + +java { + toolchain { languageVersion = JavaLanguageVersion.of(17) } // or 21 if you prefer +} + +tasks.shadowJar { + archiveClassifier.set('all') + mergeServiceFiles() +} diff --git a/tools/eclipse/udb-ls/gradle/wrapper/gradle-wrapper.jar b/tools/eclipse/udb-ls/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000..e6441136f3 Binary files /dev/null and b/tools/eclipse/udb-ls/gradle/wrapper/gradle-wrapper.jar differ diff --git a/tools/eclipse/udb-ls/gradle/wrapper/gradle-wrapper.properties b/tools/eclipse/udb-ls/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..b82aa23a4f --- /dev/null +++ b/tools/eclipse/udb-ls/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/tools/eclipse/udb-ls/gradlew b/tools/eclipse/udb-ls/gradlew new file mode 100755 index 0000000000..1aa94a4269 --- /dev/null +++ b/tools/eclipse/udb-ls/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/tools/eclipse/udb-ls/gradlew.bat b/tools/eclipse/udb-ls/gradlew.bat new file mode 100644 index 0000000000..7101f8e467 --- /dev/null +++ b/tools/eclipse/udb-ls/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/tools/eclipse/udb-ls/lib/org.xtext.udb.ide_1.0.0.202509271446(1).jar b/tools/eclipse/udb-ls/lib/org.xtext.udb.ide_1.0.0.202509271446(1).jar new file mode 100644 index 0000000000..8a34564fe6 Binary files /dev/null and b/tools/eclipse/udb-ls/lib/org.xtext.udb.ide_1.0.0.202509271446(1).jar differ diff --git a/tools/eclipse/udb-ls/lib/org.xtext.udb_1.0.0.202509271446(1).jar b/tools/eclipse/udb-ls/lib/org.xtext.udb_1.0.0.202509271446(1).jar new file mode 100644 index 0000000000..b449d9c14b Binary files /dev/null and b/tools/eclipse/udb-ls/lib/org.xtext.udb_1.0.0.202509271446(1).jar differ diff --git a/tools/eclipse/udb-ls/settings.gradle b/tools/eclipse/udb-ls/settings.gradle new file mode 100644 index 0000000000..7e6686207d --- /dev/null +++ b/tools/eclipse/udb-ls/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "udb-ls" diff --git a/tools/eclipse/udb-vscode/.vscode/launch.json b/tools/eclipse/udb-vscode/.vscode/launch.json new file mode 100644 index 0000000000..a142310519 --- /dev/null +++ b/tools/eclipse/udb-vscode/.vscode/launch.json @@ -0,0 +1,13 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run Extension", + "type": "extensionHost", + "request": "launch", + "args": ["--extensionDevelopmentPath=${workspaceFolder}"], + "outFiles": ["${workspaceFolder}/out/**/*.js"], + "preLaunchTask": "npm: compile" + } + ] +} diff --git a/tools/eclipse/udb-vscode/language-configuration.json b/tools/eclipse/udb-vscode/language-configuration.json new file mode 100644 index 0000000000..f913b110ab --- /dev/null +++ b/tools/eclipse/udb-vscode/language-configuration.json @@ -0,0 +1,14 @@ +{ + "comments": { "lineComment": "//" }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + { "open": "\"", "close": "\"" }, + { "open": "(", "close": ")" }, + { "open": "[", "close": "]" }, + { "open": "{", "close": "}" } + ] +} diff --git a/tools/eclipse/udb-vscode/package-lock.json b/tools/eclipse/udb-vscode/package-lock.json new file mode 100644 index 0000000000..aee6497433 --- /dev/null +++ b/tools/eclipse/udb-vscode/package-lock.json @@ -0,0 +1,1605 @@ +{ + "name": "udb-vscode", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "udb-vscode", + "version": "0.0.1", + "dependencies": { + "vscode-languageclient": "^9.0.1" + }, + "devDependencies": { + "@types/glob": "^8.1.0", + "@types/mocha": "^10.0.10", + "@types/node": "^20.19.17", + "@types/vscode": "^1.104.0", + "@vscode/test-electron": "^2.5.2", + "glob": "^7.2.3", + "mocha": "^10.4.0", + "typescript": "^5.9.2" + }, + "engines": { + "vscode": "^1.90.0" + } + }, + "node_modules/@types/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimatch": "^5.1.2", + "@types/node": "*" + } + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.19.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.17.tgz", + "integrity": "sha512-gfehUI8N1z92kygssiuWvLiwcbOB3IRktR6hTDgJlXMYh5OvkPSRmgfoBUmfZt+vhwJtX7v1Yw4KvvAf7c5QKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/vscode": { + "version": "1.104.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.104.0.tgz", + "integrity": "sha512-0KwoU2rZ2ecsTGFxo4K1+f+AErRsYW0fsp6A0zufzGuhyczc2IoKqYqcwXidKXmy2u8YB2GsYsOtiI9Izx3Tig==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vscode/test-electron": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.5.2.tgz", + "integrity": "sha512-8ukpxv4wYe0iWMRQU18jhzJOHkeGKbnw7xWRX3Zw1WJA4cEKbHcmmLPdPrPtL6rhDcrlCZN+xKRpv09n4gRHYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", + "jszip": "^3.10.1", + "ora": "^8.1.0", + "semver": "^7.6.2" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/emoji-regex": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", + "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", + "dev": true, + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "dev": true, + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", + "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/mocha/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", + "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true, + "license": "(MIT AND Zlib)" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true, + "license": "MIT" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/stdin-discarder": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", + "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageclient": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz", + "integrity": "sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==", + "license": "MIT", + "dependencies": { + "minimatch": "^5.1.0", + "semver": "^7.3.7", + "vscode-languageserver-protocol": "3.17.5" + }, + "engines": { + "vscode": "^1.82.0" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "license": "MIT", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "license": "MIT" + }, + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/tools/eclipse/udb-vscode/package.json b/tools/eclipse/udb-vscode/package.json new file mode 100644 index 0000000000..bbe5963237 --- /dev/null +++ b/tools/eclipse/udb-vscode/package.json @@ -0,0 +1,61 @@ +{ + "name": "udb-vscode", + "version": "0.0.1", + "private": true, + "engines": { + "vscode": "^1.90.0" + }, + "activationEvents": [], + "contributes": { + "languages": [ + { + "id": "udb", + "aliases": [ + "UDB" + ], + "extensions": [ + ".udb" + ], + "configuration": "./language-configuration.json" + } + ], + "grammars": [ + { + "language": "udb", + "scopeName": "source.udb", + "path": "./syntaxes/udb.tmLanguage.json" + } + ], + "configuration": { + "type": "object", + "title": "UDB", + "properties": { + "udb.javaPath": { + "type": "string", + "default": "java", + "description": "Path to the Java executable used to run the language server." + } + } + } + }, + "main": "./out/extension.js", + "scripts": { + "compile": "tsc -p .", + "test": "npm run compile && node ./out/test/runTests.js", + "watch": "tsc -w", + "vscode:prepublish": "npm run compile" + }, + "devDependencies": { + "@types/glob": "^8.1.0", + "@types/mocha": "^10.0.10", + "@types/node": "^20.19.17", + "@types/vscode": "^1.104.0", + "@vscode/test-electron": "^2.5.2", + "glob": "^7.2.3", + "mocha": "^10.4.0", + "typescript": "^5.9.2" + }, + "dependencies": { + "vscode-languageclient": "^9.0.1" + } +} diff --git a/tools/eclipse/udb-vscode/server/udb-ls-all.jar b/tools/eclipse/udb-vscode/server/udb-ls-all.jar new file mode 100644 index 0000000000..ececaae4c1 Binary files /dev/null and b/tools/eclipse/udb-vscode/server/udb-ls-all.jar differ diff --git a/tools/eclipse/udb-vscode/src/extension.d.ts b/tools/eclipse/udb-vscode/src/extension.d.ts new file mode 100644 index 0000000000..6ca62196f5 --- /dev/null +++ b/tools/eclipse/udb-vscode/src/extension.d.ts @@ -0,0 +1,4 @@ +import * as vscode from 'vscode'; +export declare function activate(ctx: vscode.ExtensionContext): Promise; +export declare function deactivate(): Promise; +//# sourceMappingURL=extension.d.ts.map diff --git a/tools/eclipse/udb-vscode/src/extension.d.ts.map b/tools/eclipse/udb-vscode/src/extension.d.ts.map new file mode 100644 index 0000000000..3f2025b7fb --- /dev/null +++ b/tools/eclipse/udb-vscode/src/extension.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["extension.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAKjC,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,gBAAgB,iBAgB1D;AAED,wBAAsB,UAAU,kBAAuC"} diff --git a/tools/eclipse/udb-vscode/src/extension.js b/tools/eclipse/udb-vscode/src/extension.js new file mode 100644 index 0000000000..e29866560e --- /dev/null +++ b/tools/eclipse/udb-vscode/src/extension.js @@ -0,0 +1,58 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.activate = activate; +exports.deactivate = deactivate; +const cp = __importStar(require("child_process")); +const vscode = __importStar(require("vscode")); +const node_1 = require("vscode-languageclient/node"); +let client; +async function activate(ctx) { + const java = vscode.workspace.getConfiguration('udb').get('javaPath') || 'java'; + const jar = ctx.asAbsolutePath('server/udb-ls-all.jar'); + const serverOptions = async () => { + const proc = cp.spawn(java, ['-jar', jar, '-stdio'], { cwd: ctx.extensionPath }); + proc.stderr.on('data', d => console.error(String(d))); + return Promise.resolve({ reader: proc.stdout, writer: proc.stdin }); + }; + const clientOptions = { + documentSelector: [{ language: 'udb', scheme: 'file' }], + }; + client = new node_1.LanguageClient('udb', 'UDB Language Server', serverOptions, clientOptions); + await client.start(); +} +async function deactivate() { if (client) + await client.stop(); } +//# sourceMappingURL=extension.js.map diff --git a/tools/eclipse/udb-vscode/src/extension.js.map b/tools/eclipse/udb-vscode/src/extension.js.map new file mode 100644 index 0000000000..be34f26f4e --- /dev/null +++ b/tools/eclipse/udb-vscode/src/extension.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extension.js","sourceRoot":"","sources":["extension.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,4BAgBC;AAED,gCAAuE;AAxBvE,kDAAoC;AACpC,+CAAiC;AACjC,qDAA+F;AAE/F,IAAI,MAAsB,CAAC;AAEpB,KAAK,UAAU,QAAQ,CAAC,GAA4B;IACzD,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,GAAG,CAAS,UAAU,CAAC,IAAI,MAAM,CAAC;IACxF,MAAM,GAAG,GAAG,GAAG,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAAC;IAExD,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;QAC/B,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;QACjF,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtD,OAAO,OAAO,CAAC,OAAO,CAAa,EAAE,MAAM,EAAE,IAAI,CAAC,MAAO,EAAE,MAAM,EAAE,IAAI,CAAC,KAAM,EAAE,CAAC,CAAC;IACpF,CAAC,CAAC;IAEF,MAAM,aAAa,GAA0B;QAC3C,gBAAgB,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;KACxD,CAAC;IAEF,MAAM,GAAG,IAAI,qBAAc,CAAC,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;IACxF,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;AACvB,CAAC;AAEM,KAAK,UAAU,UAAU,KAAK,IAAI,MAAM;IAAE,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC"} diff --git a/tools/eclipse/udb-vscode/src/extension.ts b/tools/eclipse/udb-vscode/src/extension.ts new file mode 100644 index 0000000000..84e7c18778 --- /dev/null +++ b/tools/eclipse/udb-vscode/src/extension.ts @@ -0,0 +1,32 @@ +import * as cp from 'child_process'; +import * as vscode from 'vscode'; +import { LanguageClient, LanguageClientOptions, StreamInfo } from 'vscode-languageclient/node'; + +let client: LanguageClient; + +export async function activate(ctx: vscode.ExtensionContext) { + const chan = vscode.window.createOutputChannel('UDB Language Server'); + const java = vscode.workspace.getConfiguration('udb').get('javaPath') || 'java'; + const jar = ctx.asAbsolutePath('server/udb-ls-all.jar'); + + const serverOptions = async () => { + chan.appendLine(`Launching: ${java} -jar ${jar} -stdio`); + const proc = cp.spawn(java, ['-jar', jar, '-stdio'], { cwd: ctx.extensionPath }); + + proc.on('error', (e) => chan.appendLine(`spawn error: ${String(e)}`)); + proc.on('exit', (code, sig) => chan.appendLine(`server exit code=${code} signal=${sig}`)); + proc.stderr.on('data', d => chan.appendLine(String(d))); + + + return { reader: proc.stdout!, writer: proc.stdin! } as StreamInfo; + }; + + const clientOptions: LanguageClientOptions = { + documentSelector: [{ language: 'udb', scheme: 'file' }], + }; + + client = new LanguageClient('udb', 'UDB Language Server', serverOptions, clientOptions); + await client.start(); +} + +export async function deactivate() { if (client) await client.stop(); } diff --git a/tools/eclipse/udb-vscode/src/test/runTests.ts b/tools/eclipse/udb-vscode/src/test/runTests.ts new file mode 100644 index 0000000000..9800fc793a --- /dev/null +++ b/tools/eclipse/udb-vscode/src/test/runTests.ts @@ -0,0 +1,21 @@ +import * as path from 'path'; +import { runTests } from '@vscode/test-electron'; + +async function main() { + const extensionDevelopmentPath = path.resolve(__dirname, '../../'); + const extensionTestsPath = path.resolve(__dirname, './suite/index'); + const testWorkspace = path.resolve(__dirname, '../../test-fixtures'); + + await runTests({ + extensionDevelopmentPath, + extensionTestsPath, + launchArgs: [ + testWorkspace, + '--disable-extensions', + '--new-window', + path.join(extensionDevelopmentPath, 'test-fixtures') // workspace with .udb files + ] + }); +} + +main().catch(err => { console.error('Failed to run tests', err); process.exit(1); }); diff --git a/tools/eclipse/udb-vscode/src/test/suite/basic.test.ts b/tools/eclipse/udb-vscode/src/test/suite/basic.test.ts new file mode 100644 index 0000000000..ea68cc5773 --- /dev/null +++ b/tools/eclipse/udb-vscode/src/test/suite/basic.test.ts @@ -0,0 +1,97 @@ +import * as assert from 'assert'; +import * as vscode from 'vscode'; +import * as path from 'path'; + +// Build an absolute path inside the test workspace (opened via runTests.ts) +function wsPath(...p: string[]) { + const root = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath!; + return path.join(root, ...p); +} + +async function waitFor(probe: () => T | null | undefined | false, ms = 8000, step = 50) { + const start = Date.now(); + while (Date.now() - start < ms) { + const v = probe(); + if (v) return v; + await new Promise(r => setTimeout(r, step)); + } + return undefined; +} + +// Smoke test, test if language server starts up correctly and +// it can distinguish between good and bad syntax. +suite('UDB LS – smoke', () => { + test('initialize → diagnostics on open (real .udb file)', async () => { + // Use your new invalid fixture filename here if you renamed it. + const uri = vscode.Uri.file(wsPath('badGrammar.udb')); + let doc = await vscode.workspace.openTextDocument(uri); + // force the language in case association is missing. + if (doc.languageId !== 'udb') { + doc = await vscode.languages.setTextDocumentLanguage(doc, 'udb'); + } + await vscode.window.showTextDocument(doc); + + // Nudge validation (on-change + on-save), then revert + let edit = new vscode.WorkspaceEdit(); + edit.insert(doc.uri, new vscode.Position(0, 0), ' '); + await vscode.workspace.applyEdit(edit); + await vscode.workspace.saveAll(); + edit = new vscode.WorkspaceEdit(); + edit.delete(doc.uri, new vscode.Range(0, 0, 0, 1)); + await vscode.workspace.applyEdit(edit); + + const diags = await waitFor(() => { + const d = vscode.languages.getDiagnostics(doc.uri); + return d.length ? d : null; + }, 8000); + + if (!diags || diags.length === 0) { + console.log('Diagnostics (bad file):', vscode.languages.getDiagnostics(doc.uri)); + } + // Expect at least one diagnostic for the intentionally bad grammar. + assert.ok(diags && diags.length >= 1, 'expected at least one diagnostic for invalid UDB in bad fixture'); + }); + + // completion test + test('completion after a keyword (e.g., "kind")', async () => { + // With the new grammar, keywords include: kind, name, long_name, address, ... + const doc = await vscode.workspace.openTextDocument({ language: 'udb', content: 'kind ' }); + await vscode.window.showTextDocument(doc); + const pos = new vscode.Position(0, 'kind '.length); + + const list = await vscode.commands.executeCommand( + 'vscode.executeCompletionItemProvider', + doc.uri, + pos + ); + + assert.ok(list, 'completion list present'); + + assert.ok((list.items ?? []).length >= 1, 'expected some completions after "kind "'); + }); + + // hover test + test('hover returns content (e.g., on address hex)', async () => { + // Probe hover on address value in validate fixture line + const uri = vscode.Uri.file(wsPath('goodGrammar.udb')); + let doc = await vscode.workspace.openTextDocument(uri); + if (doc.languageId !== 'udb') { + doc = await vscode.languages.setTextDocumentLanguage(doc, 'udb'); + } + await vscode.window.showTextDocument(doc); + + const text = doc.getText(); + const addrIx = text.indexOf('0x'); + const pos = addrIx >= 0 ? doc.positionAt(addrIx + 2) : new vscode.Position(0, 0); + + const hovers = await vscode.commands.executeCommand( + 'vscode.executeHoverProvider', + doc.uri, + pos + ); + + assert.ok(hovers && hovers.length >= 0, 'hover provider responded'); + }); + + +}); diff --git a/tools/eclipse/udb-vscode/src/test/suite/index.ts b/tools/eclipse/udb-vscode/src/test/suite/index.ts new file mode 100644 index 0000000000..c2c9081a4e --- /dev/null +++ b/tools/eclipse/udb-vscode/src/test/suite/index.ts @@ -0,0 +1,21 @@ +import * as path from 'path'; +import Mocha = require('mocha'); +import glob = require('glob'); + +export function run(): Promise { + const mocha = new Mocha({ ui: 'tdd', timeout: 20000 }); + const testsRoot = path.resolve(__dirname); + + const files: string[] = glob.sync('**/*.test.js', { cwd: testsRoot }); + for (const f of files) { + mocha.addFile(path.resolve(testsRoot, f)); + } + + return new Promise((resolve, reject) => { + try { + mocha.run((failures: number) => failures ? reject(new Error(`${failures} tests failed`)) : resolve()); + } catch (e) { + reject(e as Error); + } + }); +} diff --git a/tools/eclipse/udb-vscode/syntaxes/udb.tmLanguage.json b/tools/eclipse/udb-vscode/syntaxes/udb.tmLanguage.json new file mode 100644 index 0000000000..2f04d1faac --- /dev/null +++ b/tools/eclipse/udb-vscode/syntaxes/udb.tmLanguage.json @@ -0,0 +1,67 @@ +{ + "name": "UDB", + "scopeName": "source.udb", + "patterns": [ + { "include": "#keyword" }, + { "include": "#string" }, + { "include": "#hex" }, + { "include": "#boolean" }, + { "include": "#comment" }, + { "include": "#ident" } + ], + "repository": { + "keyword": { + "patterns": [ + { + "name": "keyword.control.udb", + "match": "\\b(kind|name|long_name|address|writable|priv_mode|length|description|definedBy|fields|type|alias|sw_write\\(csr_value\\)|reset_value|location|location_rv32|location_rv64)\\b" + }, + { + "name": "keyword.other.enum.udb", + "match": "\\b(csr|extension|U|S|M|VXRM|VXSAT)\\b" + } + ] + }, + "string": { + "patterns": [ + { + "name": "string.quoted.double.udb", + "begin": "\"", + "end": "\"", + "patterns": [ + { "name": "constant.character.escape.udb", "match": "\\\\." } + ] + } + ] + }, + "hex": { + "patterns": [ + { + "name": "constant.numeric.hex.udb", + "match": "\\b0[xX][0-9A-Fa-f](?:[0-9A-Fa-f_]*[0-9A-Fa-f])?\\b" + } + ] + }, + "boolean": { + "patterns": [ + { + "name": "constant.language.boolean.udb", + "match": "\\b(true|false)\\b" + } + ] + }, + "comment": { + "patterns": [ + { "name": "comment.line.double-slash.udb", "match": "//.*$" } + ] + }, + "ident": { + "patterns": [ + { + "name": "entity.name.type.udb", + "match": "\\b[A-Za-z_][A-Za-z0-9_]*\\b" + } + ] + } + } +} diff --git a/tools/eclipse/udb-vscode/test-fixtures/badGrammar.udb b/tools/eclipse/udb-vscode/test-fixtures/badGrammar.udb new file mode 100644 index 0000000000..310c2c4ae1 --- /dev/null +++ b/tools/eclipse/udb-vscode/test-fixtures/badGrammar.udb @@ -0,0 +1,32 @@ +kind: csr; +name: vcsr; +long_name: Vector Control and Status Register; +address: 0x00F; +writable: true; +priv_mode: U +length: "MXLEN"; +description: supposedtobestring; +definedBy: V; +fields + VXRM{ + location: "2-1"; + description: "See vxrm."; + type: "RW-RH"; + alias: "vxrm.VALUE[1:0]"; + sw_write(csr_value): "| + CSR[vxrm].VALUE = csr_value.VXRM; + return csr_value.VXRM;"; + reset_value: "UNDEFINED_LEGAL"; + + } + VXSAT { + location: "0"; + description: "See vxsat."; + type: "RW-RH"; + alias: "vxsat.VALUE[0];"; + sw_write(csr_value): "|; + CSR[vxsat].VALUE = csr_value.VXSAT; + return csr_value.VXSAT;"; + reset_value: "UNDEFINED_LEGAL"; + } +} diff --git a/tools/eclipse/udb-vscode/test-fixtures/goodGrammar.udb b/tools/eclipse/udb-vscode/test-fixtures/goodGrammar.udb new file mode 100644 index 0000000000..7f45548692 --- /dev/null +++ b/tools/eclipse/udb-vscode/test-fixtures/goodGrammar.udb @@ -0,0 +1,32 @@ +kind: csr; +name: vcsr; +long_name: Vector Control and Status Register; +address: 0x00F; +writable: true; +priv_mode: U; +length: "MXLEN"; +description: "Contains aliases to vxrm and vxsat CSRs"; +definedBy: V; +fields{ + VXRM{ + location: "2-1"; + description: "See vxrm."; + type: "RW-RH"; + alias: "vxrm.VALUE[1:0]"; + sw_write(csr_value): "| + CSR[vxrm].VALUE = csr_value.VXRM; + return csr_value.VXRM;"; + reset_value: "UNDEFINED_LEGAL"; + + } + VXSAT { + location: "0"; + description: "See vxsat."; + type: "RW-RH"; + alias: "vxsat.VALUE[0];"; + sw_write(csr_value): "|; + CSR[vxsat].VALUE = csr_value.VXSAT; + return csr_value.VXSAT;"; + reset_value: "UNDEFINED_LEGAL"; + } +} diff --git a/tools/eclipse/udb-vscode/tsconfig.json b/tools/eclipse/udb-vscode/tsconfig.json new file mode 100644 index 0000000000..06101bdffe --- /dev/null +++ b/tools/eclipse/udb-vscode/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "moduleResolution": "node", + "outDir": "out", + "rootDir": "src", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "verbatimModuleSyntax": false, + "types": ["mocha", "node"], + "lib": ["ES2020", "DOM"] + }, + "include": ["src/**/*.ts"] +}