problem about xtext-Collection of common programming errors
user833970
parsing antlr grammar xtext
I’ve boiled down the problem to a very simple grammar.Model:(greetings+=Greeting* | greetings+=FrGreeting*);Greeting:’Hello’ person=ID ‘!’;FrGreeting:’Bonjour’ person=(‘jacques’ | ‘philippe’) ‘!’;In a file you can greet people in english or in french but not both. We only know the names of 2 french people.The problem is you cannot greet jacques in English.Hello jacques!results in mismatched input ‘jacques’ expecting RULE_ID. I am very confused at why this would be. How would I fix it?edit: Do
ph09
syntax-highlighting default semantic xtext
I implemented the belowed code into MySemanticHighlightingCalculator and the color for the one element changes as expected. But the default default highlighting, like the purple color for keywords didn’t work anymore.INode root = resource.getParseResult().getRootNode();BidiTreeIterator<INode> iterator = root.getAsTreeIterable().iterator();while (iterator.hasNext()) {INode node = iterator.next();if (node.getSemanticElement() instanceof ParameterDesc) {ParameterDesc paramdesc = (ParameterDes
Sewi
dsl xtext cross-reference
I have a question regarding Xtext for Eclipse.I have a simple example which I believe, follows very closely the examples given in online documentation and howtos (as for example: http://blog.efftinge.de/2012/05/implementing-fowlers-state-machine-dsl.html).My grammar looks like the following:MyModel : properties += PropertyDefinition+rules += Rule+ ;PropertyDefinition :’property’ name=ID ‘{‘propertyValues += PropertyValue+’}’ ;PropertyValue :name=ID code=ID ‘;’ ;Rule :’rule:’ value=[PropertyValue
user1411732
eclipse xtext
I’ve created my DSL language and code generator using Xtext nad Xtend. But when I want to use it, I need to open my Xtext project and click “Run as-> Launch Runtime Eclipse”. Is it possible to have my editor/generator in the normal eclipse run? In other words, I want to download plain eclipse installation,than install some plugin or somehow configure my eclipse, and than create files of my language, have syntax coloring and all editor features, code generation etc.
Aaron Digulla
validation preferences xtext
I want to make my Xtext validator configurable via a couple of preferences but I couldn’t find a way to do it.Is there an example somewhere how I can do that?
Dana Klein
java eclipse dependency-injection xtext
I want to extend the class XtextDocumentProvider, which is created by dependencies injection of google injections. I want to extend this class in order to extend a method for internal needs but I don’t know where is XtextDocumentProvider being configured so that the extended class will be inject instead of it. How can i found the injection point or configuration or is it a xtext xml that i’m missing?thanks in advance 🙂
Sindico
eclipse xtext emf
I have redefined the STRING terminal this way terminal STRING : (‘.’|’+’|'(‘|’)’|’a’..’z’|’A’..’Z’|’_’|’0′..’9′)*;because I have to recognize STRING not delimited by ” or ‘the problem is that, though the generated parser works, it truncates the first and the last character of the recognized string. What am I missing?
Dana Klein
xtext
In general I have my dsl as plugin and I want to create a new app that use my dslso i tried to write this code:JsonParser p = new JsonParser(); IParseResult r = p.parse(new StringReader(“{}”)); //once that work it will be the file data instead of {}but when i do the parse the node model builder is null and the following line has exception: return doParse(ruleName, in, nodeModelBuilder.get(), 0);and i’m not sure how to init nodeModelBuilderi’m sure i missing some steps but i’m not quite familiar
yeti
xtext emf
I created a DSL via Xtext and now I need to transform the models created in the editor into another model(s). I suppose the most straightforward way is to employ some kind of M2M transformation framework, but i need to access the model behind the textual file. Question: how can I get a reference to the model?
gosling
xtext
I have implemented a Domain Specific Language(DSL) using Xtext which contains expressions, so in order to check easily their validity I decided to use Xtext-typesystem Framework. I was trying to implement the examples given in this tutorial, but when I use@Inject private ITypesystem ts;and then try to run Launch Runtime Eclipse in order to check my rules’ validity, editor won’t open and I get many errors. Below there are some of them:java.lang.NoClassDefFoundError: org/eclipse/xtext/xbase/lib/
pekayde
ant grammar generate xtext temp
i am developing an xtext plug-in project for an eclipse application for my Bachelor thesis.I want to do the ‘Generate Xtext Artifacts” at runtime with an ant script executing the Mwe2Launcher class and do the generation in an temp folder. I wrote an Activator to create in the temp folder a project folder and copy the mwe2 file, my grammar file and the ant script. Executing the ant script leads to the error:osgi> start 360 gen:[java] 0 INFO StandaloneSetup – Registering platform uri ‘C:
tgoossens
xtext xtend xbase
I’m using xbasegrammar xolang.Xolang with org.eclipse.xtext.xbase.Xbaseand anXBlockExpressionwhere I expect to write my codeWhen write an expression likeval c = 1 + 1Then I get the following error The method +(int) is undefinedThe same happens with Strings. In fact it happens with every binary operator: ==, < , >, … Now I know that xbase supports operator overloading, maybe that has something to do with it? (Maybe I still have to define somewhere that you can add numbers?)
John J. Camilleri
eclipse-plugin dsl xtext
I’m developing an Eclipse Plugin with support for my DSL using the Xtext framework. When I try to open a file on my system with the matching file extension .gf – but which is not in my workspace – I get the following:0 [main] ERROR org.eclipse.xtext.ui.editor.CompoundXtextEditorCallback – Was configured with another client or not configured at all. java.lang.IllegalStateException: Was configured with another client or not configured at all.at org.eclipse.xtext.ui.editor.DirtyStateEditorSuppo
Oak
eclipse xtext
I’ve created a new XText project with a single xtext file defining the grammar, and without changing any other files in the project. The grammar I defined took about 150 lines and when trying to “generate language infrastructure” everything went smoothly, but then I expanded it a bit and now that infrastructure generation fails on:460476 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher – Java heap space java.lang.OutOfMemoryError: Java heap spaceat java.util.ArrayList.iterator(Unknown Source)at
ceorron
syntax-highlighting xtext
I’m using (the rather heavy weight) xtext to create a basic DSL parser and text highlighting.I’m following the getting started tutorial at http://wiki.eclipse.org/Xtext/GettingStartedThe output in the console i’m getting is:0 [main] INFO eclipse.emf.mwe.core.WorkflowRunner – ————————————————————————————–0 [main] INFO eclipse.emf.mwe.core.WorkflowRunner – EMF Modeling Workflow Engine 0.7.2, Build v2009081204170 [main] INFO ecl
Web site is in building