The Spoofax Language Workbench: Rules for Declarative Specification of Languages and IDEs

Reference: Kats, L. C. L., Visser, E. (2010). Proc. OOPSLA 2010, ACM SIGPLAN Notices. Source file: The_Spoofax_Language_Workbench_Rules_for_Declarati.pdf. URL

Summary

Spoofax is an Eclipse-based language workbench that lets developers define a DSL’s syntax, semantics, and full IDE support (syntax highlighting, content completion, reference resolution, refactoring, error marking, code generation) entirely via concise declarative specifications. Syntax is expressed in SDF with permissive error-recovery grammars; transformations, name analysis, and code generation are written in Stratego; editor services are declared in rule-based service descriptors.

The architecture separates language-parametric infrastructure from language-specific definitions and supports agile development: language definitions can be dynamically loaded into the same Eclipse instance and tested side-by-side. The paper describes component dependencies (grammar-driven presentation services, semantic services derived from name analysis) and contrasts Spoofax with EMFText, MPS, Xtext, and the Synthesizer Generator. The result is a coherent, concise toolchain for agile DSL + IDE development.

Key Ideas

  • Single declarative spec drives both compiler and IDE services.
  • SDF grammars + Stratego rewrites as the semantic base.
  • Permissive grammars for error recovery.
  • Editor service descriptors separate “which” from “what”.
  • Dynamic loading enables agile language development.

Connections

Conceptual Contribution

Tags

#language-workbench #dsl #ide #meta-programming

Backlinks