Wiki
Clone wikiinf225 / 2013 / Installing Rascal
-
First, download Eclipse Juno for RCP and RAP Developers for your platform. (Version 3.8.1 should also work (perhaps even better), the newest version (Kepler) probably won't work; it may be possible to install the plugins below on the lab computer's Eclipse installation – if so, you don't need to install Eclipse yourself.)
-
The Eclipse download will give you a tar.gz file (at least on Linux). Extract it to your home directory (or an appropriate subdirectory of it, such as 'inf225'). E.g., on Linux, run the following command:
tar xzvf /tmp/eclipse-rcp-juno-SR2-linux-gtk-x86_64.tar.gz
This will give you an 'eclipse' subdirectory, and you can start Eclipse by running
eclipse/eclipse
. -
Install Rascal according to the installation instructions. Make sure you also edit the
eclipse/eclipse.ini
file according to these instructions. -
The bundled version of the Git plugin seems to be broken, so you should update EGit as well. Do Help → Install New Software, and enter the following update site:
http://download.eclipse.org/egit/updates
Select the features that have the little update symbol next to them:
-
To test, try importing the INF225 repository from Bitbucket:
-
Do File → Import....
-
Select Projects from Git.
-
Select URI.
-
Enter the repository URI (
https://bitbucket.org/anyahelene/inf225public.git
) in the URI field. -
Press next a few times.
-
When you get a list of projects, make sure
inf225ex1
is checked. -
Press Finish.
-
-
You should find a small grammar in the file
src/Simple.rsc
. Double-click on it, and examine it in the editor. -
Right-click in the editor, and select Start Console (unless you're already in the Rascal perspective, and you can see a console at the bottom of the Eclipse window with a
rascal>
prompt in it). -
Right-click in the editor again, and select Import Current Module in the Console.
-
Click in the console, and write
`x`
(note the back-quotes). This should give you output like the following:The first line of the result is the type (rascal>`x` ID: `x` Tree: appl(prod(lex("ID"),[conditional(iter(\char-class([range(65,90),range(95,95),range(97,122)])),{\not-precede(\char-class([range(65,90),range(95,95),range(97,122)])),\not-follow(\char-class([range(65,90),range(95,95),range(97,122)]))})],{}),[appl(regular(iter(\char-class([range(65,90),range(95,95),range(97,122)]))),[char(120)])[@loc=|stdin:///|(1,1,<1,1>,<1,2>)]])[@loc=|stdin:///|(1,1,<1,1>,<1,2>)]
ID
), the second line is the parse tree.
Updated