PL/0 Compiler Extension(including repeat
, for
, case
, function
, real
, record
and so on)
src/PL
source code of PL compiler;src/interpret
source code of interpret for intermediate code;- There are
Makefile
s in bothsrc/PL
andsrc/interpret
; TestCases
basic test case files andrun
script;TestCases/run
script for compiling PL compiler and interpret, test some case and so on.
- Install GNU Make and ensure that the path is addedd to the system variable
PATH
.
TestCases/run.ps1
forpowershell
in Windows.
cd TestCases
# run script directly(compile and run test1.pls by default)
./run
# run script with specific .pls file
./run part1.pls
There is Makefile
in source dir. And you can just run make
to compile PL compiler or interpret.
- expand
repeat
statement - expand
for
statement - expand
case
statement - expand
function
statement - expand
real
structure - implicit conversion from
int
toreal
- expand
record
structure -
run
script forpowershell
-
run
script forbash
- batch script for test cases