skip to main content
10.1145/1869542.1869625acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
tutorial

Xtext: implement your language faster than the quick and dirty way

Published:17 October 2010Publication History

ABSTRACT

Whether there is an (emerging or legacy) Domain-Specific Language to increase the expressiveness of your coworkers or whether you are about to invent a new General Purpose Prgramming Language: Tool support that goes beyond a parser/compiler is essential to make other people adopt your language and to be more productive. Xtext is an award- winning framework to build such tooling.

In this tutorial we explain how to define a language and a statically typed, EMF-based Abstract Syntax Tree using only a grammar. We then generate a parser, a serializer and a smart editor from it. The editor provides many features out-of-the-box, such as syntax highlighting, content-assist, folding, jump-to-declaration and reverse-reference lookup across multiple files. Then, it is shown how literally every as- pects of the language and its complementary tool support can be customized using Dependency Injection, especially how this can be done for linking, formatting and validation. As an outlook, we will demonstrate how to integrate a custom language with Java, how Xtext maintains a workspace-wide index of named elements and how to implement incremental code generation or attach an interpreter.

References

  1. }}Xtext framework, http://eclipse.org/XtextGoogle ScholarGoogle Scholar
  2. }}M. Eysholdt and J. Rupprecht. Migrating a Large Modeling Environment from XML/UML to Xtext/GMF. Proceedings of SPLASH' 10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}M. Fowler. Domain Specific Languages. Addison-Wesley Professional, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}T. Stahl andM. Völter. Model-Driven Software Development. Wiley, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}D. Steinberg, F. Budinsky, M. Paternostro, and E. Merks. EMF: Eclipse Modeling Framework 2.0. Addison-Wesley Professional, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Xtext: implement your language faster than the quick and dirty way

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      OOPSLA '10: Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion
      October 2010
      352 pages
      ISBN:9781450302401
      DOI:10.1145/1869542

      Copyright © 2010 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 17 October 2010

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • tutorial

      Upcoming Conference

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader