Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/detectivekaktus/ipl
The Imperative Programming Language
https://github.com/detectivekaktus/ipl
assembly assembly-like c compiler imperative lexer parser programming-language x86-64
Last synced: 13 days ago
JSON representation
The Imperative Programming Language
- Host: GitHub
- URL: https://github.com/detectivekaktus/ipl
- Owner: detectivekaktus
- License: mit
- Created: 2024-12-07T18:31:33.000Z (15 days ago)
- Default Branch: main
- Last Pushed: 2024-12-07T18:58:43.000Z (15 days ago)
- Last Synced: 2024-12-07T19:32:25.684Z (14 days ago)
- Topics: assembly, assembly-like, c, compiler, imperative, lexer, parser, programming-language, x86-64
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# The Imperative Programming Language
The imperative programming language, IPL for short, is a high-level functional imperative programming language that is under development. The file extension for the language is `.ipl`.The goals of this project are the following:
1. Get a Turing-complete programming language that can be used as a tool to solve problems.
2. Implement an assembly-like syntax for the language.
3. Implement x86-64 compilation.
4. Implement javascript compilation.
5. Implement some core utilities and functions.## Syntax
You may want to check out the syntax for the language down below. Keep in mind that the final result may look different from what you see below!Here's a Hello World program in this language.
```ipl
main:
set msg: string = "Hello World"
call print, msg; out
ret 0
```A fizzbuzz problem on numbers from 0 to 99.
```ipl
main:
set i: integer = 0
for i 0..100 start
if i % 3 == 0 && i & 5 == 0 start
call print, "FizzBuzz"; out
else if i % 3 == 0 start
call print, "Fizz"; out
else if i % 5 == 0 start
call print, "Buzz"; out
else
call string, i; str
call print, str; out
end
end
ret 0
```# Build and dependencies
The project depends on the NASM assembler and a modern C compiler such as GCC or Clang, so be sure to install them on your machine. Unfortunately, the project is not made for Windows-driven operating systems and will probably never be supported on them.To build the project simply invoke the `build.sh` script in the root directory and you will find yourself with `ipl` executable inside the same directory.
## Contributing
Feel free to improve this language as we go along but be sure to read [CONTRIBUTING.md](https://github.com/detectivekaktus/ipl/blob/main/CONTRIBUTING.md) file before submitting a pull request.