xText? XPand? XBASE? We sometimes see different ways these names are being written in online publications and even scientific works. Here's a quick reminder on how to write them correctly and why this is important.Read more >
By default it is not possible to use identifiers for naming elements with a name that collides with a DSL's keyword. In regular programming languages this is also not possible. For example, it is not allowed in Java to name a variable, field or other element
class, since it is a reserved verb.
This article shows a pattern that allows to use keywords as identifiers. The source code for this example is available in our GitHub repository.Read more >
With Xtext 2.8 a new Formatter API was introduced, which is way easier to use and more flexible than the old one. Instead of using the DSL's Grammar Access it is now possible to work directly on the elements inside your document. This article shows how the Formatter API can be used to format text in tables. As an example, a small DSL is defined that allows the specification on tables in Wiki syntax.Read more >
In the first part of this series we defined a Xtext grammar based on boilerplates in order to control the use of natural language and create acceptable requirements as they are written. Another approach to improve the quality of textual requirements is the use of Natural Language Processing (NLP) techniques to control their quality in terms of grammar and vocabulary after they have been written. Read on to learn more!
There is currently some buzz around Microsoft’s Visual Studio Code (VS Code) editor and its ability to support rich code editing for potentially any language through its Language Server Protocol (LSP). Thanks to the work from TypeFox, the upcoming version 2.11 (release date Oct 18th) of Xtext will provide LSP support which enables integration of Xtext DSLs in code editors that support the LSP. This article explains how Xtext supports the Language Server Protocol and its implementation in detail and how a VS Code extension can be built and installed that uses an Xtext Language Server.Read more >
Stakeholders usually document requirements informally, i.e. in natural language. Often using text processing programs which do not provide any input assistance related to the requirements and do not allow their automated validation or post-processing. This leads either to higher efforts for cost intensive and time consuming human review processes or to reduced quality which can have a negative impact on subsequent development phases. To compensate these disadvantages of the usage of natural language in requirements documentation, various approaches exist. One of these approaches is to control the use of natural language by using templates in order to create acceptable requirements as they are written. This series shows how to create a controlled natural language based on sentence templates (we call them 'boilerplates') using Xtext.Read more >
If you use Xbase in your Xtext-based DSL, you are usually satisfied with the set of operators the expression language defines. They are closely related to what you are used to in Java or similar languages. But what if that's not enough and you need to customize keywords for operators? Here is how it's done.Read more >