EX-PL0
EX-PL0 copied to clipboard
PL/0 Compiler Extension(including repeat, for, case, function, real, record and so on)
EX-PL0
PL/0 Compiler Extension(including repeat
, for
, case
, function
, real
, record
and so on)
Structure
-
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.
Prerequisites
- Install GNU Make and ensure that the path is addedd to the system variable
PATH
.
Start
Use TestCases/run
script
List of scripts
-
TestCases/run.ps1
forpowershell
in Windows.
Usage
cd TestCases
# run script directly(compile and run test1.pls by default)
./run
# run script with specific .pls file
./run part1.pls
Manual
There is Makefile
in source dir. And you can just run make
to compile PL compiler or interpret.
TODO
- [x] expand
repeat
statement - [x] expand
for
statement - [x] expand
case
statement - [x] expand
function
statement - [x] expand
real
structure - [ ] implicit conversion from
int
toreal
- [ ] expand
record
structure - [x]
run
script forpowershell
- [ ]
run
script forbash
- [ ] batch script for test cases