Getting help when working with Rascal


You can use Rascal in two ways:

  • At the command line — the Command Line Interface (CLI) or if you prefer the Read-Eval-Print-Loop (REPL).

  • In an Integrated Development Environment (IDE) like Eclipse.

Both provide help facilities that we discuss in more detail:

1. Help at the command line


Get help when using Rascal at the command line (CLI, REPL)


While using the command line interface you have two commands at your proposal:

  • help:

    • Without arguments, help gives some introductory information about the help facilities.

    • With arguments, the arguments are interpreted as search terms and search results are shown in a separate browser window.

  • apropos: like help but all (abbreviated) results are only shown as text in the command line interface.


First, type help and get some introductory help:

|prompt:///|(0,4,<1,0>,<1,4>): Undeclared variable: help
Advice: |http://tutor.rascal-mpl.org/Errors/Static/UndeclaredVariable/UndeclaredVariable.html|

WARNING: unexpected errors in the above SHELL example. Documentation author please fix! Next, type help followed by some search terms will open a browser window with a list of relevant pages in the Rascal documentation. From there-on you can further browse through and search in Rascal’s extensive documentation.

Typing apropos followed by search terms shows the search results directly in the command shell and does not open a separate browser. Here is a way to search for help related to if.

rascal>apropos if

2. Help in the Integrated Development Environment (IDE)


Get help when using Rascal in the IDE

To be written

3. Browsing Documentation


Browsing the Rascal documentation


All Rascal documentation has been indexed and cross-referenced and can be accessed via a single browser interface.

Suppose we want to learn about while statement in Rascal and the type help while at the command line. This will show the following results (actual results may differ):

search results while

In the right pane you find the search results, most relevant first (this happpens to be the description of the while statement). Each result consists of a clickable link and a synopsis of the information to be found there.

In the top left corner, you find a search box for new searches and the RascalTutor logo rascal tutor small that will bring you back to the Tutor home page.

All Rascal documentation is organized in courses, each course consist of a hierarchy of concepts. The documentation for while is found in the course named Rascal and the complete name is Rascal/Statements/While.

There are other courses like Help (this course) and Recipes and the search for while found uses of while in various courses (like this one, since we are mentioning while quite a lot).

4. Further Reading


How to continue reading the Rascal documentation


The Tutor home page is always reachable via the RascalTutor logo rascal tutor small in the top left corner of each Tutor page and is the best starting point for further reading. Here is a recent overview of the available courses:

Beginner Moderate Advanced General