An open API service indexing awesome lists of open source software.

https://github.com/erik-donath/kage

An ordinary Eso-Lang.
https://github.com/erik-donath/kage

c cmake esolangs kage kage-esolang mit-license

Last synced: 14 days ago
JSON representation

An ordinary Eso-Lang.

Awesome Lists containing this project

README

          

# Kage

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Language](https://img.shields.io/badge/Language-Kage-purple)](#)
[![CI](https://github.com/Erik-Donath/kage/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Erik-Donath/kage/actions/workflows/ci.yml)

An ordinary Eso-Lang.

## Overview

Kage is a minimal register-based esoteric programming language built around three keyword families:

| Family | Keywords |
|---------|----------------------------|
| Yami | `yami`, `Yami`, `YAMI` |
| Hikari | `hikari`, `Hikari`, `HIKARI` |
| Rei | `rei`, `Rei`, `REI` |

Programs operate on an infinite set of lazily initialized 32-bit registers, featuring arithmetic operations, conditional jumps, character I/O, and a dedicated zero register.

Read [Language.md](Language.md) for a complete language reference.
Read [Implementation.md](Implementation.md) for a breakdown of the interpreter internals.

## Usage

```sh
kage [options]
kage [options] -e

Options:
-h, --help Show this help message and exit
-v, --version Print version and exit
-e Execute code directly
-i --input Uses the content of an file instead of stdin for VM input
-o --output Prints the VM Output to an file instead of stdout
--verbose Enable debug output (token dump, IR dump)
--max-steps N Abort after N instructions (0 = unlimited)
```

## Building

Kage uses CMake and requires a C17-compatible compiler.

### Requirements

- CMake 3.20 or newer
- GCC, Clang, or another C17-compatible compiler

### Configure and Build

```sh
git clone https://github.com/Erik-Donath/kage.git
cd kage
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
```

### Run

```sh
./build/kage --help
./build/kage test.kage
./build/kage -e "1 yami 72 rei 1 rei 0"
./build/kage --verbose test.kage
./build/kage --max-steps 1000 test.kage
```

## License

Kage is licensed under the [MIT License](LICENSE).