skip to main content
10.1145/1297846.1297921acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Extracting a domain specific language from an example: a bottom-up method using the ngrease metalanguage

Published:20 October 2007Publication History

ABSTRACT

This demonstration shows a lightweight and fast method for creating a tested and working domain specific language. The method is demonstrated using the ngrease metalanguage.

The creation of a new language is started by writing a representative example of the final product with a test that tests the transformation from a stub source to the result.

The test is made to pass by writing a constant transformer that unconditionally outputs the result.

At each step the language is extended by refactoring: Some part of the transformer template is converted from a constant subtree to a reference to data read from the source tree, thus driving additions to the new language.

Optionally, each refactoring step can be driven by a new test that demonstrates the lack of parameterization of some part of the final product.

References

  1. http://ngrease.sourceforge.net/introduction.htmlGoogle ScholarGoogle Scholar
  2. http://www.refactoring.com/catalog/parameterizeMethod.html; accessed 25.7.2007Google ScholarGoogle Scholar

Index Terms

  1. Extracting a domain specific language from an example: a bottom-up method using the ngrease metalanguage

    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 '07: Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications companion
      October 2007
      241 pages
      ISBN:9781595938657
      DOI:10.1145/1297846

      Copyright © 2007 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: 20 October 2007

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Upcoming Conference

    • Article Metrics

      • Downloads (Last 12 months)0
      • Downloads (Last 6 weeks)0

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader