Browse Source

add Tracery example

Getty Ritter 2 years ago
parent
commit
0a31680ee8
1 changed files with 16 additions and 0 deletions
  1. 16 0
      examples/vexed.matzo

+ 16 - 0
examples/vexed.matzo

@@ -0,0 +1,16 @@
+(*
+An example from the Tracery tutorial:
+  {"name": ["Arjun","Yuuma","Darcy","Mia","Chiaki","Izzi","Azra","Lina"]
+  ,"animal": ["unicorn","raven","sparrow","scorpion","coyote","eagle","owl","lizard","zebra","duck","kitten"]
+  ,"mood": ["vexed","indignant","impassioned","wistful","astute","courteous"]
+  ,"story": ["#hero# traveled with her pet #heroPet#.  #hero# was never #mood#, for the #heroPet# was always too #mood#."]
+  ,"origin": ["#[hero:#name#][heroPet:#animal#]story#"]
+  }
+*)
+
+fix name := "Arjun" | "Yuuma" | "Darcy" | "Mia" | "Chiaki" | "Izzi" | "Azra" | "Lina";
+fix pet ::= unicorn raven sparrow scorpion coyote eagle owl lizard zebra duck kitten;
+mood ::= vexed indignant impassioned wistful astute corteous;
+
+puts name " traveled with her pet " pet ". "
+     name " was never " mood " for the " pet " was always too " mood ".";