Skip to content

PL/0 Compiler Extension(including repeat, for, case, function, real, record and so on)

License

Notifications You must be signed in to change notification settings

pisceskkk/EX-PL0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EX-PL0

GitHub platform: windows(shields.io) GitHub last commit

GitHub watchers GitHub Repo stars GitHub forks

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 Makefiles in both src/PL and src/interpret;
  • TestCases basic test case files and run script;
  • TestCases/run script for compiling PL compiler and interpret, test some case and so on.

Prerequisites

  1. Install GNU Make and ensure that the path is addedd to the system variable PATH.

Start

Use TestCases/run script

List of scripts

  1. TestCases/run.ps1 for powershell 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

  • expand repeat statement
  • expand for statement
  • expand case statement
  • expand function statement
  • expand real structure
  • implicit conversion from int to real
  • expand record structure
  • run script for powershell
  • run script for bash
  • batch script for test cases

LICENSE

Apache 2.0

About

PL/0 Compiler Extension(including repeat, for, case, function, real, record and so on)

Topics

Resources

License

Stars

Watchers

Forks