xtext

Does boxing cause performance issues?

柔情痞子 提交于 2019-12-01 03:43:52
问题 I'm working on a project in which we are producing a language which compiles to java. The framework we are using (xtext) makes prolific use of boxing in its generated code. Specifically, if you have a statement like: int i = 1; int j = 2; int k = i + j; Then the compiled code looks like: IntegerExtensions.operator_plus(((Integer)i), ((Integer)j)) Now, in the project I'm working on, there are certain situations where particular basic binary operations are going to be extremely common

What are features of ANTLR that XText Does not provide?

Deadly 提交于 2019-12-01 02:20:53
I just came across very nice tool Xtext to create DSL as well as IDE for editing. I did some search on the web and found people saying it does not provide all the features of ANTLR. I am using ANTLR as my parser generator. I am not even sure what features of ANTLR I will need to write complete parser for my language but ANTLR is around for quite a long time and probably supports more features than Xtext. Can anyone please give some examples of what CANNOT be specified in a Xtext grammar? You cannot specify semantic predicates in an Xtext grammar. Furthermore it's not possible to include

How to invoke Xtext parser/JvmModelInferrer from a Java project

独自空忆成欢 提交于 2019-12-01 01:53:36
I have implemented a simple little DSL that generates classes from input files, by using the JvmModelInferrer approach. I am trying to figure out how I can invoke the parser and the code genarator within the code of a regular java project. So at some point in the main class of my non-Xtext project I can just create a file, pass it to the Xtext parser/codeGenerator for my DSL, and the result will be that class files are generated to a folder of my choice (within my java project). This case is not covered in the documentation, so any help would be much appreciated, Thanks! UPDATE: My code so far

What are features of ANTLR that XText Does not provide?

别等时光非礼了梦想. 提交于 2019-11-30 21:57:00
问题 I just came across very nice tool Xtext to create DSL as well as IDE for editing. I did some search on the web and found people saying it does not provide all the features of ANTLR. I am using ANTLR as my parser generator. I am not even sure what features of ANTLR I will need to write complete parser for my language but ANTLR is around for quite a long time and probably supports more features than Xtext. Can anyone please give some examples of what CANNOT be specified in a Xtext grammar? 回答1:

Has anybody fully implemented an XText editor in an IViewPart

醉酒当歌 提交于 2019-11-30 15:33:59
问题 Basically I need to implement a full XText editor in an IViewPart . I have most of it working based on the XText Forms Integration project. Unfortunately, this is not a full implementation on an XText editor, and I wondered if anybody are aware of better starting points.. or even complete implementations :-) 回答1: It is possible since 2.2 (see this thread). This code worked for me: IEditedResourceProvider resourceProvider = new IEditedResourceProvider() { @Override public XtextResource

How to disable css warning “Unknown property” in Eclipse Mars?

試著忘記壹切 提交于 2019-11-30 07:21:09
I get many "Unknown property" warnings in my css files. This might be due to the fact that I have e(fx)clipse 2.0 and the Eclipse Web Developer Tools installed. If I open the css files with the e(fx)clipse css editor and add / SuppressWarnings / the warning icon changes its color (see figure below). However: the Problems view still shows the warning and the default css Editor shows the warning, too. I do not want to add / SuppressWarnings / since the css files are automatically generated with WinLess. How can I disable the "Unknown property" warnings for specific files or at all? My css files

How to disable css warning “Unknown property” in Eclipse Mars?

爷,独闯天下 提交于 2019-11-29 09:22:17
问题 I get many "Unknown property" warnings in my css files. This might be due to the fact that I have e(fx)clipse 2.0 and the Eclipse Web Developer Tools installed. If I open the css files with the e(fx)clipse css editor and add / SuppressWarnings / the warning icon changes its color (see figure below). However: the Problems view still shows the warning and the default css Editor shows the warning, too. I do not want to add / SuppressWarnings / since the css files are automatically generated with

Xtext: grammar for language with significant/semantic whitespace

老子叫甜甜 提交于 2019-11-28 11:02:45
How can I use Xtext to parse languages with semantic whitespace? I'm trying to write a grammar for CoffeeScript and I can't find any good documentation on this. AFAIK, you can't. In case of parsing Python-like languages, you'd need the lexer to emit INDENT and DEDENT tokens. For that to happen, you'd need semantic predicates to be supported inside lexer rules (Xtext's terminal rules) that would first check if the current-position-in-line of the next character int the input equals 0 (the beginning of the line) and is a ' ' or '\t' . But browsing through the documentation , I don't see this is

Xtext: grammar for language with significant/semantic whitespace

你。 提交于 2019-11-27 06:01:59
问题 How can I use Xtext to parse languages with semantic whitespace? I'm trying to write a grammar for CoffeeScript and I can't find any good documentation on this. 回答1: AFAIK, you can't. In case of parsing Python-like languages, you'd need the lexer to emit INDENT and DEDENT tokens. For that to happen, you'd need semantic predicates to be supported inside lexer rules (Xtext's terminal rules) that would first check if the current-position-in-line of the next character int the input equals 0 (the