Fork Me on GitHub

SugarJ

Library-based Language Extensibility

SugarJ Eclipse plugin

Eclipse update site of SugarJ

This is the Eclipse update site of SugarJ. Copy the URL of this site into the Eclipse software installer: www.erdweg.org/projects/sugarj/update.

Installation

Requirements:

Instructions:

  1. Install Eclipse (follow instructions on eclipse.org).
  2. Start Eclipse.
  3. In Eclipse, select 'Install New Software' in the 'Help' menu.
  4. In the 'work with' field, copy the SugarJ update site www.erdweg.org/projects/sugarj/update and hit enter.
  5. Be sure to deselect the 'Group items by category' checkbox on the bottom of the window.
  6. The update dialog will let you select any number of our currently supported host languages, such as Java (*.sugj), Haskell (*.shs), Prolog (*.sugp), Scala (*.sugs).

Getting started

  1. Use the Sugar-Lang Wizzard to create a new project: File->New->Other or via the context menu, and then select Sugar-Lang Project. New Sugar-Lang Project Screenshot The following dialog is the same as for Java projects, and all settings you make here will be used by the sugar-lang compiler.
  2. Create a new file in the source folder: File->New->File or via the context menu. New File Screenshot Important: A source file's file extension decides which base language it belongs to. Choose .sugj for Java, .shs for Haskell, .sugp for Prolog, .sugs for Scala.
  3. All base languages support extensibility via library import. However, there are minor syntactic differences. To get an impression on how a base language is supported, we recommend taking a look at existing case studies. In particular, the following case studies are relatively easy: pairs for Java, idiom brackets for Haskell, XML syntax for Scala.