ImAKappa / rollang

REPL for DnD rolls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rollang

A DSL and interpreter for DnD rolls. Inspired by Roll20 Dice Reference and Avrae Discord bot

This is just for fun. For actual DnD games, nothing beats real dice :)

Implementation Notes The interpreter is currently written in Python because that's what I know best at the moment. But I wanna switch to a compiled language soon, so realistically the final interpreter will probably be written in Nim. Although, a functional language might be a better fit, like OCaml or F#.

TODO

  • Scanner
  • Parser
  • Interpreter
  • Byte-code interpreter???
  • Switch implementation language to one of Nim, OCaml, or F#

Maybe everything should be a function?


Interpreter

python .\rollang\rollang.py

To exit on Windows, press Ctrl-z. Alternatively, type exit (doesn't work yet).


Source files

The rollang interpreter will execute the file line by line.

Only forward declarations are allowed.

Save your file with a .roll extension, e.g. myfile.roll


About

REPL for DnD rolls

License:MIT License


Languages

Language:Rust 100.0%