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:
Help at the command line: Get help when using Rascal at the command line (CLI, REPL).
Help in the Integrated Development Environment (IDE): Get help when using Rascal in the IDE.
Browsing Documentation: Browsing the Rascal documentation.
Further Reading: How to continue reading the Rascal documentation.
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:
helpgives 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.
helpbut all (abbreviated) results are only shown as text in the command line interface.
help and get some introductory help:
rascal>help |prompt:///|(0,4,<1,0>,<1,4>): Undeclared variable: help Advice: |http://tutor.rascal-mpl.org/Errors/Static/UndeclaredVariable/UndeclaredVariable.html| ok
WARNING: unexpected errors in the above SHELL example. Documentation author please fix!
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.
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
2. Help in the Integrated Development Environment (IDE)
Get help when using Rascal in the IDE
DescriptionTo 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):
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 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.
4. Further Reading
How to continue reading the Rascal documentation
The Tutor home page is always reachable via the RascalTutor logo 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: