mirror of https://git.sr.ht/~rabbits/parade
New datastructure
This commit is contained in:
parent
8548c90b7f
commit
ff3b41d29a
|
@ -0,0 +1,22 @@
|
|||
|
||||
|
||||
Datastructure:
|
||||
|
||||
(:library (
|
||||
(:ghost ()) (
|
||||
(:house (
|
||||
(:teapot (
|
||||
(:moth ())
|
||||
()))
|
||||
()))
|
||||
()))
|
||||
)
|
||||
|
||||
|
||||
|
||||
(:library children ())
|
||||
(:ghost children ())
|
||||
(:house children ())
|
||||
(:teapot children ())
|
||||
(:moth children ())
|
||||
|
39
old/NOTES
39
old/NOTES
|
@ -1,39 +0,0 @@
|
|||
Benchmark
|
||||
|
||||
answer(¶de, "create a teapot");
|
||||
answer(¶de, "become the teapot");
|
||||
answer(¶de, "enter the ghost");
|
||||
answer(¶de, "leave");
|
||||
|
||||
answer(¶de, "take the ghost");
|
||||
answer(¶de, "drop the ghost");
|
||||
answer(¶de, "warp in the teapot");
|
||||
answer(¶de, "transform into a bat");
|
||||
|
||||
answer(¶de, "note the bat is dark.");
|
||||
answer(¶de, "program create a teapot");
|
||||
answer(¶de, "warp to the library");
|
||||
answer(¶de, "become the ghost");
|
||||
answer(¶de, "use the bat");
|
||||
|
||||
Parser
|
||||
|
||||
answer(¶de, "create a machine");
|
||||
answer(¶de, "enter the machine");
|
||||
answer(¶de, "program create a thing");
|
||||
answer(¶de, "leave");
|
||||
answer(¶de, "create a place");
|
||||
answer(¶de, "enter the place");
|
||||
answer(¶de, "note this is a thing");
|
||||
answer(¶de, "leave");
|
||||
answer(¶de, "create a mixture");
|
||||
answer(¶de, "enter the mixture");
|
||||
answer(¶de, "note this is a both");
|
||||
answer(¶de, "program create a both");
|
||||
answer(¶de, "leave");
|
||||
answer(¶de, "save");
|
||||
|
||||
Stress
|
||||
|
||||
answer(¶de, "create a machine00000000");
|
||||
answer(¶de, "create a machine000000000");
|
|
@ -4,10 +4,7 @@
|
|||
|
||||
?(?-) (Sight)
|
||||
|
||||
<> (:?p (sight > $ :?v (:?a ?l)))
|
||||
(:?p ((\nYou are a ?v in the ?p.\nYou see a ?a.\n\n) print > $ :?v ?l))
|
||||
<> (:?v () > sight)
|
||||
(:?v () (\nYou are a ?v.\nYou see nothing.\n\n) print >)
|
||||
<> (sight > $ :?v) ((\nYou are a ?v.\n\n) print > $ :?v)
|
||||
|
||||
?(?-) (Cleanup articles)
|
||||
|
||||
|
@ -16,7 +13,7 @@
|
|||
|
||||
?(?-) (Actions)
|
||||
|
||||
<> ((create (?q ())) parse) ((You created a ?q.\n) print)
|
||||
<> ((create (?q ())) parse sight > $ :?v ?c) ((?v created a ?q.\n) print sight > $ :?v ((:?q ()) ?c))
|
||||
<> ((become ?q) parse) ()
|
||||
<> ((enter ?q) parse) ()
|
||||
<> ((leave ?q) parse) ()
|
||||
|
@ -42,4 +39,4 @@
|
|||
<> (?x input) (?(?* ((?*))) ?x parse)
|
||||
<> (?~ $ :?v) ((?~) input sight > $ :?v)
|
||||
|
||||
(:library (sight > $ :ghost (:teapot (:library ()))))
|
||||
(:library ((sight > $ :ghost ()) ((:house ((:teapot ((:moth ()) ())) ())) ())))
|
||||
|
|
Loading…
Reference in New Issue