How to use the Pascal-S compiler

  1. expand the tar.gz file.
    % tar zxvf Pascal-S.tar.gz
    (or % gzip -cd Pascal-S.tar.gz | tar xvf )

  2. move to Pascal-S directory and then execute sablecc and compile the sources.
    % cd Pascal-S
    % sablecc pascal.grammar
    % javac pascal/

  3. compile a Pascal-S source with the Pascal-S compiler.
    % java pascal.Main sample.p

  4. then you can get a P4 code in a file named "prr". So you can run P4 interpreter as follows.
    % mv prr prd
    % pint < /dev/null   (or pint < input)