New datastructure

This commit is contained in:
Devine Lu Linvega 2024-05-14 17:35:12 -07:00
parent 8548c90b7f
commit ff3b41d29a
3 changed files with 25 additions and 45 deletions

22
NOTES Normal file
View File

@ -0,0 +1,22 @@
Datastructure:
(:library (
(:ghost ()) (
(:house (
(:teapot (
(:moth ())
()))
()))
()))
)
(:library children ())
(:ghost children ())
(:house children ())
(:teapot children ())
(:moth children ())

View File

@ -1,39 +0,0 @@
Benchmark
answer(&parade, "create a teapot");
answer(&parade, "become the teapot");
answer(&parade, "enter the ghost");
answer(&parade, "leave");
answer(&parade, "take the ghost");
answer(&parade, "drop the ghost");
answer(&parade, "warp in the teapot");
answer(&parade, "transform into a bat");
answer(&parade, "note the bat is dark.");
answer(&parade, "program create a teapot");
answer(&parade, "warp to the library");
answer(&parade, "become the ghost");
answer(&parade, "use the bat");
Parser
answer(&parade, "create a machine");
answer(&parade, "enter the machine");
answer(&parade, "program create a thing");
answer(&parade, "leave");
answer(&parade, "create a place");
answer(&parade, "enter the place");
answer(&parade, "note this is a thing");
answer(&parade, "leave");
answer(&parade, "create a mixture");
answer(&parade, "enter the mixture");
answer(&parade, "note this is a both");
answer(&parade, "program create a both");
answer(&parade, "leave");
answer(&parade, "save");
Stress
answer(&parade, "create a machine00000000");
answer(&parade, "create a machine000000000");

View File

@ -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 ()) ())) ())) ())))