3.2. Creating a new language specification

Follow this quick start guide to create a new Spoofax language specification project to define your own language.

  1. Choose Create New Project from the welcome dialog, or the FileNewProject… menu item, to open the New Project dialog.

  2. Select the Spoofax Language project type.

  3. Select the Metaborg SDK as the project’s SDK.

    ../../../../../_images/newprojectform_langspec_selectmetaborgsdk.pngSelect the "Metaborg SDK"

    Note

    If the Project SDK displays <None> and you can’t select the Metaborg SDK, then you need to add it first.

    1. Click the New… button next to the Project SDK field.

      ../../../../../_images/newproject_langspec_newsdk.png
    2. You may get a warning if you have no Java JDK configured. Click OK and configure the JDK’s home location. The suggested home directory is usually correct. Click OK.

    3. Select a home directory for the Metaborg SDK. The default is the Spoofax plugin’s lib/ folder, which is sufficient as it contains all the core dependencies.

    4. Click OK.

  4. Change the fields to suit your needs.

    ../../../../../_images/newprojectform_langspec_inputfields.pngChange the fields

  5. Click Next.

  6. Pick a project name and location, and click Finish.

    ../../../../../_images/newprojectform_langspec_projectname.pngPick a project name

The created Spoofax language specification project will have a metaborg.yaml file, which specifies the configuration and language dependencies of the specification.