Bring in the Prolog impl.

This commit is contained in:
Simon Forman
2022-01-15 17:23:11 -08:00
parent 564417c985
commit 839b376d73
60 changed files with 19083 additions and 0 deletions
@@ -0,0 +1,21 @@
?- phrase(joy_parse(Expression), `truedat`).
Expression = [bool(true), symbol(dat)] .
Oops!
I knew about:
?- phrase(joy_parse(Expression), `23dat`).
Expression = [int(23), symbol(dat)] .
should probably fix it too
still want:
?- phrase(joy_parse(Expression), `[2[3]]`).
Expression = [list([int(2), list([int(3)])])] .
?- phrase(joy_parse(Expression), `[true[false]]`).
Expression = [list([bool(true), list([bool(false)])])] .
...to work. That is, you shouldn't need spaces around '[' and ']'.