This is a very simple compiler whose goal is to implement ISO 7185:1990.
⚠️ This is still very much in MVP state, so don't expect much yet.⚠️
It is implemented in rust and uses the following main crates as dependences:
- lalrpop for the syntactic parser
- cranelift for the code generation
- clap for the command arguments handling of the driver
- lazy_static for global initialization of internal compiler state
- paste for a macro that helps with code generation of visitor
- Implement all of ISO 7185:1990 up to level 1
- Extensions to make it nicer, closer to Turbo Pascal or to ISO 10206:1990
-
An x86-64 Linux machine
- more platforms may be added in the future
-
Rust (tested with 1.75)
-
Meson (tested with 1.3.1)
- Used to build the runtime
-
GCC
-
Used to build the runtime
-
Used to link the pasko programs
-
-
Clone the repository
-
At the top level:
cargo build
-
Enter
pasko-runtime
-
meson setup builddir
-
cd builddir
-
make
To run the tests you will need both LLVM's FileCheck
and lit
installed and available in your path.
cargo test
will invoke the tests
The main testsuite is in pasko-testing/testsuite
.
Note: an installation procedure is not yet in place
From inside the build-directory
-
cargo run -- myprogram.pas --pasko-runtime=<top-level-dir>/pasko-runtime/builddir
-
If this succeeds you will have a
myprogram
file that you can execute
Feature | State | Notes |
---|---|---|
Variadic types | ❌ | Not even supported in the parser yet. |
Set types | ❌ | |
Pointer types | ❌ | |
File type | ❌ | |
Forward declarations of procedures and functions | ❌ | |
Conformable arrays in functions and procedures | ❌ | |
Nested procedures and functions | ❌ | |
Required procedures/functions: Math | ❌ | |
Required procedures/functions: File functions | ❌ | |
Required procedures/functions: I/O | Only writeln and readln without a file are implemented. |
|
Total digits and fraction width in write / writeln |
❌ | Runtime is ready. Crashes in codegen. |
input and output support in program |
❌ | They are ignored |
Please send me an email.
In order to keep my sanity at bay, this project does not have issues enabled.
The pasko components are all GPLv3.