Define an ANTLR package

In this section, you will learn how to create an ANTLR package.

You can define as many different ANTLR packages as you like. ANTLR packages are used to build, run and debug grammars. Your ANTLR packages are managed on the Window>Preferences>ANTLR>Builder preference page

An ANTLR package consist of:

You can switch the default ANTLR package for the workbench. The default ANTLR package is used by default when building, running, and debugging grammars. Alternatively, projects may specify a specific an ANTLR package that they should be built and run with.

Create a new ANTLR package

  1. Go to ANTLR site and get the source distribution
  2. Extract the file to disk, for example: /home/edgar/antlr-3.1.3
  3. Go to Window > Preferences > ANTLR > Builder
  4. ANTLR Package

  5. Select the Add button
  6. ANTLR Package

  7. Select the Directory button and select the "/home/edgar/antlr-3.1.3" directory
  8. ANTLR Package

    Note: The Add External JARS... button is used for add Custom Targets

  9. Press the OK button
  10. ANTLR Package

  11. Press the OK button
SourceForge.net Logo