What is xtext?

Source: Internet
Author: User

This is what xtext says on its official website.

"Building your own domain-specific languages has never been so easy. Just put your grammar in place and you not only get the working parser and linker but also first class eclipse support ."

Creating your own DSL is never that easy. You only need to write your syntax, and then hand the rest to xtext (including parser, linker and seamless support in eclipse ).


To learn xtext, you must at least understand the following technologies:

  1. Principles of grammar (Parser (left associativity, precedence, etc) and lexer), ebnf --> write xtext
  2. Anlr --> Generate parser
  3. Mwe2
  4. EMF and ecore --> in memory expression of Model
  5. Dependency injection and Google guice. --> put it in together
  6. Developing using eclipse --> ide support
  7. Java language, libraries and JVM
  8. Xtend --> one DSL for made Java developer more easy
  9. Xbase --> make write xtext more easy

Before proceeding, let's first explain what DSL is. Translation is a language in a specific field. DSL developers can develop experts in a certain field or industry.

Dialects That can be understood, they do not realize the specific implementation of the underlying layer, so as to focus on their own work, improve efficiency, and isolate responsibility.


Xtext is a free and open-source project to implement DSL.

To use xtext, you only need to compile the xtext file, that is, your DSL syntax, and some methods provided to you by extending xtext, you can implement a development environment that is supported by eclipse using the DSL language,

This environment can provide syntax highlighting, auto-incomplete, code assistance, syntax error checking, modification method recommendations, and other functions like jdt or PDT.


Xtext workflow:

  • Compile an xtext File
  • Use mwe2 to generate all the basic frameworks of the code you need. This framework can be run. This includes the ecore required by EMF, corresponding objects, corresponding editors, and UT tests.
  • In the running process, it is connected through guice.

If you have time in the future, I will connect each part and talk about it.

Http://www.euclideanspace.com/software/development/eclipse/xtext/index.htm

What is xtext?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.