Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hisoka999/wirthx
Wirthx is a pascal compiler and interpreter
https://github.com/hisoka999/wirthx
compiler llvm pascal
Last synced: 23 days ago
JSON representation
Wirthx is a pascal compiler and interpreter
- Host: GitHub
- URL: https://github.com/hisoka999/wirthx
- Owner: hisoka999
- License: bsd-3-clause
- Created: 2024-04-20T15:44:10.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-17T17:18:40.000Z (3 months ago)
- Last Synced: 2024-10-02T07:42:34.191Z (about 1 month ago)
- Topics: compiler, llvm, pascal
- Language: C++
- Homepage:
- Size: 255 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wirthx
Wirthx is an experimental pascal interpreter and compiler.
The language is named after Nicolaus Wirth the creator of pascal.## Compiler
The compiler is based on llvm and will generate a native binary for the target plattform.
For now only `linux-x86-64` is supported.## Interpreter
# Usage
```sh
wirthx testfiles/hello.pas
```
## Executing the compiler
The compiler will generate a native executable based on the program name defined in the program unit.```sh
wirthx -c testfiles/hello.pas
```# Examples
## Hello World
```pascal
program testbegin
Writeln('Hello World');
end.
```
## Functions```pascal
program testfunction addx(a : integer;b :integer): integer;
begin
addx := a + b;
end;
var
my_var : integer;
begin
my_var := addx(1,2);
Writeln(my_var);
end.
```