Error creating PDA for syntactic sequencer (2.29.0) [message #1856115] |
Tue, 22 November 2022 11:25 |
Sebastian Waldhauser Messages: 24 Registered: March 2022 |
Junior Member |
|
|
Hi,
I have three grammars: Base.xtext, Base2.xtext, Mydsl.xtext
Base.xtext
grammar org.xtext.example.Base with org.eclipse.xtext.common.Terminals
generate myBase "http://www.xtext.org/example/base/MyBase"
Basic:
name=ID
;
KEYWORDID:
ID | "foo"
;
Base2.xtext
grammar org.xtext.example.Base2 with org.xtext.example.Base
generate myBase2 "http://www.xtext.org/example/base/MyBase2"
Basic2:
name=ID
;
KEYWORDID2:
ID | "foo"
;
Mydsl.xtext
grammar org.xtext.example.dsl.Mydsl with org.xtext.example.Base2
generate myDsl "http://www.xtext.org/example/dsl/MyDsl"
Model:
greetings+=Greeting*;
Greeting:
'Hello' name=KEYWORDID lastname=ID '!';
The Mydsl grammar depends on Base2 and Base: Mydsl -with-> Base2 -with-> Base.
While executing the mwe2 workflow for the Mydsl grammar, I get the following error:
1137 ERROR SyntacticSequencerPDAProvider - Error creating PDA for syntactic sequencer for contexts: Basic2 returns Basic2: no type found for name=unresolved_rule
java.lang.RuntimeException: no type found for name=unresolved_rule
at org.eclipse.xtext.serializer.analysis.SyntacticSequencerPDAProvider.getType(SyntacticSequencerPDAProvider.java:703)
at org.eclipse.xtext.serializer.analysis.SyntacticSequencerPDAProvider.createAbsorberState(SyntacticSequencerPDAProvider.java:564)
at org.eclipse.xtext.serializer.analysis.SyntacticSequencerPDAProvider.createAbsorberState(SyntacticSequencerPDAProvider.java:569)
at org.eclipse.xtext.serializer.analysis.SyntacticSequencerPDAProvider.getSyntacticSequencerPDAs(SyntacticSequencerPDAProvider.java:631)
at org.eclipse.xtext.serializer.analysis.SemanticSequencerNfaProvider.getSemanticSequencerNFAs(SemanticSequencerNfaProvider.java:240)
at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider.getConstraints(GrammarConstraintProvider.java:624)
at org.eclipse.xtext.xtext.generator.serializer.SemanticSequencerExtensions.getGrammarConstraints(SemanticSequencerExtensions.java:112)
at org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2.generateAbstractSemanticSequencer(SerializerFragment2.java:417)
at org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2.generate(SerializerFragment2.java:211)
at org.eclipse.xtext.xtext.generator.CompositeGeneratorFragment2.generate(CompositeGeneratorFragment2.java:43)
at org.eclipse.xtext.xtext.generator.XtextGenerator.invokeInternal(XtextGenerator.java:228)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:133)
at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:35)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:213)
at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:38)
at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:21)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:103)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:63)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:53)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:254)
at java.base/java.lang.Thread.run(Thread.java:829)
1142 ERROR SyntacticSequencerPDAProvider - Error creating PDA for syntactic sequencer for contexts: KEYWORDID2 returns null: no type found for unresolved_rule
java.lang.RuntimeException: no type found for unresolved_rule
at org.eclipse.xtext.serializer.analysis.SyntacticSequencerPDAProvider.getType(SyntacticSequencerPDAProvider.java:703)
at org.eclipse.xtext.serializer.analysis.SyntacticSequencerPDAProvider.createEmitterStates(SyntacticSequencerPDAProvider.java:605)
at org.eclipse.xtext.serializer.analysis.SyntacticSequencerPDAProvider.createAbsorberState(SyntacticSequencerPDAProvider.java:574)
at org.eclipse.xtext.serializer.analysis.SyntacticSequencerPDAProvider.getSyntacticSequencerPDAs(SyntacticSequencerPDAProvider.java:631)
at org.eclipse.xtext.serializer.analysis.SemanticSequencerNfaProvider.getSemanticSequencerNFAs(SemanticSequencerNfaProvider.java:240)
at org.eclipse.xtext.serializer.analysis.GrammarConstraintProvider.getConstraints(GrammarConstraintProvider.java:624)
at org.eclipse.xtext.xtext.generator.serializer.SemanticSequencerExtensions.getGrammarConstraints(SemanticSequencerExtensions.java:112)
at org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2.generateAbstractSemanticSequencer(SerializerFragment2.java:417)
at org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2.generate(SerializerFragment2.java:211)
at org.eclipse.xtext.xtext.generator.CompositeGeneratorFragment2.generate(CompositeGeneratorFragment2.java:43)
at org.eclipse.xtext.xtext.generator.XtextGenerator.invokeInternal(XtextGenerator.java:228)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:133)
at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:35)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:213)
at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:38)
at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:21)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:103)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:63)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:53)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:254)
at java.base/java.lang.Thread.run(Thread.java:829)
Worked with 2.18.0.
I'd be thankful for any ideas.
Best regards,
Sebastian
[Updated on: Tue, 22 November 2022 11:28] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Error creating PDA for syntactic sequencer (2.29.0) [message #1856130 is a reply to message #1856129] |
Tue, 22 November 2022 15:37 |
Sebastian Waldhauser Messages: 24 Registered: March 2022 |
Junior Member |
|
|
Thank you.
I just deleted the directory and copied yours. Then I ran mvnw clean install in the parent project.
Concerning the original project:
1) Create new Xtext project
2) create the packages base and base2 and populate them with the grammars/workflows as discussed ("names in sync").
3) Adapt the mydsl workflow (StandaloneSetup and referencedResource)
4) Adapt the pom.xml of the mydsl project
- a) copy the <configuration> of the workflow into the <execution> block of the mydsl workflow
- b) copy and adapt the execution block for each additional workflow
5) run mvnw clean install in the parent project
[Updated on: Tue, 22 November 2022 15:40] Report message to a moderator
|
|
|
|
Re: Error creating PDA for syntactic sequencer (2.29.0) [message #1856132 is a reply to message #1856131] |
Tue, 22 November 2022 15:46 |
|
can you try this workflow instead
module org.xtext.example.mydsl.GenerateMyDsl
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
var rootPath = ".."
Workflow {
component = XtextGenerator {
cleaner = {
enabled = false
}
configuration = {
project = StandardProjectConfig {
baseName = "org.xtext.example.mydsl"
rootPath = rootPath
runtimeTest = {
enabled = true
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = true
}
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\r\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
preferXtendStubs = false
}
}
language = StandardLanguage {
name = "org.xtext.example.base.Base"
fileExtensions = "base"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
generator = {
generateXtendStub = true
}
junitSupport = {
junitVersion = "5"
}
}
language = StandardLanguage {
name = "org.xtext.example.base2.Base2"
fileExtensions = "base2"
referencedResource = "platform:/resource/org.xtext.example.mydsl/src/org/xtext/example/base2/Base2.xtext"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
generator = {
generateXtendStub = true
}
junitSupport = {
junitVersion = "5"
}
}
language = StandardLanguage {
name = "org.xtext.example.mydsl.MyDsl"
fileExtensions = "mydsl"
referencedResource = "platform:/resource/org.xtext.example.mydsl/src/org/xtext/example/base/Base.xtext"
referencedResource = "platform:/resource/org.xtext.example.mydsl/src/org/xtext/example/base2/Base2.xtext"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
generator = {
generateXtendStub = true
}
junitSupport = {
junitVersion = "5"
}
}
}
}
might be needed to replace platform resource with classpath for maven
module org.xtext.example.mydsl.GenerateMyDsl
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
var rootPath = ".."
Workflow {
component = XtextGenerator {
cleaner = {
enabled = false
}
configuration = {
project = StandardProjectConfig {
baseName = "org.xtext.example.mydsl"
rootPath = rootPath
runtimeTest = {
enabled = true
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = true
}
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\r\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
preferXtendStubs = false
}
}
language = StandardLanguage {
name = "org.xtext.example.base.Base"
fileExtensions = "base"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
generator = {
generateXtendStub = true
}
junitSupport = {
junitVersion = "5"
}
}
language = StandardLanguage {
name = "org.xtext.example.base2.Base2"
fileExtensions = "base2"
referencedResource = "classpath:/org/xtext/example/base2/Base2.xtext"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
generator = {
generateXtendStub = true
}
junitSupport = {
junitVersion = "5"
}
}
language = StandardLanguage {
name = "org.xtext.example.mydsl.MyDsl"
fileExtensions = "mydsl"
referencedResource = "classpath:/org/xtext/example/base/Base.xtext"
referencedResource = "classpath:/org/xtext/example/base2/Base2.xtext"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
generator = {
generateXtendStub = true
}
junitSupport = {
junitVersion = "5"
}
}
}
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
[Updated on: Tue, 22 November 2022 15:49] Report message to a moderator
|
|
|
|
|
Re: Error creating PDA for syntactic sequencer (2.29.0) [message #1856135 is a reply to message #1856126] |
Tue, 22 November 2022 16:01 |
|
this is the wf that works for me from eclipse
module org.xtext.example.mydsl.GenerateMyDsl
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
var rootPath = ".."
Workflow {
bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
platformUri = ".."
registerGenModelFile = "platform:/resource/org.xtext.example.mydsl/model/generated/Base.genmodel"
registerGenModelFile = "platform:/resource/org.xtext.example.mydsl/model/generated/Base2.genmodel"
}
component = XtextGenerator {
cleaner = {
enabled = false
}
configuration = {
project = StandardProjectConfig {
baseName = "org.xtext.example.mydsl"
rootPath = rootPath
runtimeTest = {
enabled = true
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = true
}
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\r\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
preferXtendStubs = false
}
}
language = StandardLanguage {
name = "org.xtext.example.mydsl.MyDsl"
fileExtensions = "mydsl"
referencedResource = "platform:/resource/org.xtext.example.mydsl/src/org/xtext/example/base/Base.xtext"
referencedResource = "platform:/resource/org.xtext.example.mydsl/src/org/xtext/example/base2/Base2.xtext"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
generator = {
generateXtendStub = true
}
junitSupport = {
junitVersion = "5"
}
}
}
}
(in your project)
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05827 seconds