Go to file
Brian Picciano 360857d506 Completely refactor gg with new BNF file and decoder
The new gg format is based on a BNF file which can be found in the `gg`
directory. The code for decoding `.gg` files has been refactored to
mirror that file. The result is more resilient parsing, better errors,
and a greater ability to extend the format in the future.

The new decoder is notable in that it does not use a lexer. Both lexing
and parsing are done in a single step.

The format syntax itself has also been modified. Rather than using
semi-colons everywhere, commas are used as separators in tuples.
Additionally the final comma/semi-colon is no longer required.
2023-10-25 11:32:54 +02:00
cmd/eval Completely refactor gg with new BNF file and decoder 2023-10-25 11:32:54 +02:00
examples Completely refactor gg with new BNF file and decoder 2023-10-25 11:32:54 +02:00
gg Completely refactor gg with new BNF file and decoder 2023-10-25 11:32:54 +02:00
graph Completely refactor gg with new BNF file and decoder 2023-10-25 11:32:54 +02:00
sandbox rename Junction to Tuple, update syntax, rename Null to ZeroGraph 2021-08-26 21:26:24 -06:00
vm Completely refactor gg with new BNF file and decoder 2023-10-25 11:32:54 +02:00
.gitignore gitignore 2016-08-07 09:06:36 -06:00
flake.lock Switch to using nix flakes, and update go to a real version 2023-10-16 18:16:17 +02:00
flake.nix Switch to using nix flakes, and update go to a real version 2023-10-16 18:16:17 +02:00
go.mod Completely refactor gg with new BNF file and decoder 2023-10-25 11:32:54 +02:00
go.sum Completely refactor gg with new BNF file and decoder 2023-10-25 11:32:54 +02:00
README.md Switch to using nix flakes, and update go to a real version 2023-10-16 18:16:17 +02:00

Ginger

A programming language utilizing a graph datastructure for syntax. Currently in super-early-alpha-don't-actually-use-this-for-anything development.

Development

Current efforts on ginger are focused on a golang-based virtual machine, which will then be used to bootstrap the language.

If you are on a machine with nix installed, you can run:

nix develop

from the repo root and you will be dropped into a shell with all dependencies (including the correct go version) in your PATH, ready to use.

Demo

An example program which computes the Nth fibonacci number can be found at examples/fib.gg. You can try it out by doing:

go run ./cmd/eval/main.go "$(cat examples/fib.gg)" 5

Where you can replace 5 with any number.