[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pascal-S
Hi Etienne and everyone,
We developed a Pascal-S compiler using SableCC.
It is available via
http://www.slis.tsukuba.ac.jp/~nakai/Pascal-S.tar.gz
It emits Pascal-P4 code.
You can get a P4 interpreter via
http://www.cwi.nl/~steven/pascal/
How to use the Pascal-S compiler :
1. expand the tar.gz file.
[ex]
% 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.
[ex]
% cd Pascal-S
% sablecc pascal.grammar
% javac pascal/Main.java
3. compile a Pascal-S source with the Pascal-S compiler.
[ex]
% 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.
[ex]
% mv prr prd
% pint < /dev/null (or pint < input)
Have fun!
--
Nakai, Hisashi
University of Library and Information Science
E-mail: nakai@ulis.ac.jp