The quickest way to get started with Spoofax by downloading an instance of Eclipse with the latest release. Alternatively, you can install the Spoofax plugin into an existing Eclipse instance, use Homebrew on macOS, or download and build Spoofax from source.
The recommended way to get started with Spoofax is to download an Eclipse instance with the latest Spoofax plugin. The plugin also includes the Spoofax meta-languages. Alternatively, you can install the Spoofax plugin into an existing Eclipse instance, or download and build Spoofax from source. Choose the Eclipse Bundle installation (recommended) or the Eclipse Plugin installation:
Download an Eclipse instance with an embedded Java Runtime Environment (JRE) and the latest Spoofax plugin pre-installed for your platform:
Perform a manual installation of the Spoofax plugin in Eclipse 3.5 or newer through the update site:
On macOS Spoofax can be installed easily using Homebrew.
Install the latest release of Spoofax Eclipse as follows:
brew tap metaborg/metaborg brew install --cask spoofax
The optional command-line tools are installed with:
brew install strategoxt
Upgrading the Spoofax cask is not recommended
Upgrading the Spoofax cask using
brew cask upgrade --greedy will lose all manually installed plugins. It is recommended to use Eclipse update sites to keep Spoofax up-to-date.
Once installed, create a new Spoofax project:
- Right-click the Package Explorer, choose New → Project, and select Spoofax Language project from the Spoofax category.
- Provide a name for your new language and click Finish.
- Select the created language project and press Ctrl+Alt+B (Cmd+Alt+B on macOS) to build the project.
- Create a new file with the extension registered to your language to test it.
- Follow one of the tutorials to learn more.
Finding the filename extension of your language
If you didn't explicitly specify a filename extension for your language, it is derived from the language name. You can find the filename extension for your language in
editor/Main.esv at the