Commit Graph

8 Commits

Author SHA1 Message Date
ec443899c3 Builtins start with exclamation point 2023-11-02 16:36:43 +01:00
1a13c79ee4 Fix go mod import path 2023-10-28 09:53:37 +02:00
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
Brian Picciano
2be865181d Complete refactor vm to not be as stupid
This commit is the result of many days of picking vm apart and putting
it back together again. The result is an implementation which separates
compile and runtime into separate steps, and which functions (more)
correctly in the face of recursion.

Pretty much all aspects of vm have been modified or deleted, so it's not
even really worth it to describe specific changes. Just pretend this is
the original implementaiton and the old one was never done.
2022-03-31 09:27:52 -06:00
Brian Picciano
6040abc836 Implementation of a super basic vm
The vm does what it needs to do (evaluate the result of passing an input
to an operatio, where the input and the operation themselves may have
sub-inputs/operations to evaluate), with many caveats/misgivings.
2021-12-29 10:43:08 -07:00
Brian Picciano
3f28c60ab8 Remove a bunch of old code, update the README 2021-08-26 21:25:39 -06:00
Brian Picciano
97f972f287 refactor variable stuff to use fewer op types and be more consistent 2017-02-16 11:37:31 -07:00
Brian Picciano
ea869e7306 write some tests 2017-02-16 10:53:27 -07:00