Browse Source

add aquan to expectation tests

Getty Ritter 2 years ago
parent
commit
79febdf17f
3 changed files with 120 additions and 0 deletions
  1. 13 0
      tests/aquan.matzo
  2. 67 0
      tests/aquan.output
  3. 40 0
      tests/aquan.parsed

+ 13 - 0
tests/aquan.matzo

@@ -0,0 +1,13 @@
+(* Below is a literal assignment, which is
+ * identical to cons := "p"| "t" | "k" | "w" | "h" | "n"; *)
+cons ::= p t k w h n;
+
+(* And this could also be done with two rules and a literal
+ * assignment *)
+vowel := ("a" | "e" | "i" | "o" | "u") (4: "" | "'");
+
+(* Here is a weighted disjunction *)
+syll := 4: cons vowel | vowel;
+
+(* And finally, here's an output statement *)
+puts syll rep.<1..6, syll>;

+ 67 - 0
tests/aquan.output

@@ -0,0 +1,67 @@
+# generated for 661e5a3d927a5780756f552aa3b7e10c4487cb04
+---
+"0": "wepie'wouno"
+"1": "kepi'anoto"
+"10": watu
+"11": "huu'niiiwapo"
+"12": wohe
+"13": "woti'po'powi"
+"14": "ohino'ipiwui"
+"15": "to'konuwau'tewo"
+"16": "ahe'"
+"17": "tu'puhu"
+"18": "tei'hawo'we"
+"19": "kohahu'ha'"
+"2": pitewu
+"20": pune
+"21": "tu'o'nohu'"
+"22": "popehi'wupupoe"
+"23": "ne'pe"
+"24": toki
+"25": "huwatahuwa'tu'e"
+"26": kewiweui
+"27": "huhi'kawuteka"
+"28": "pauhehahupita'"
+"29": kunukawino
+"3": "kiwune'ha"
+"30": pawuhoeni
+"31": "wewehi'po'hi"
+"32": pato
+"33": hohawe
+"34": "apatuto'kikawi"
+"35": "we'wiwokaokapu"
+"36": "iwupa'opa'potu'"
+"37": "heha'o"
+"38": "hewiha'"
+"39": "nahaki'ahi'tua"
+"4": "wona'hoho"
+"40": "piwepi'tato'ne"
+"41": "neukuetihu'a"
+"42": "kaatanikiku'"
+"43": kane
+"44": hinopohe
+"45": "puwukoano'"
+"46": paonuhee
+"47": "tepiohe'a'nawa"
+"48": konipeki
+"49": "a'ko'nouata"
+"5": kouatipu
+"50": "ne'nu"
+"51": "kupiha'wu'nuwoi'"
+"52": "ka'ponepotu'"
+"53": wetoohenueke
+"54": pikoenohupa
+"55": "kawe'wiihu"
+"56": "touuwu'ho"
+"57": kanouu
+"58": hune
+"59": "nitoku'kopekito'"
+"6": "neu'toe'e"
+"60": "iuka'we"
+"61": "pakawe'e"
+"62": ketini
+"63": "ao'ekahe"
+"7": wepaukinune
+"8": woapano
+"9": "poneani'ko"
+

+ 40 - 0
tests/aquan.parsed

@@ -0,0 +1,40 @@
+LitAssn  cons, [  p  t  k  w  h  n ]
+
+Assn  vowel Cat(
+  Chc(
+    Str("a")
+    Str("e")
+    Str("i")
+    Str("o")
+    Str("u")
+  )
+  Chc(
+    4:
+      Str("")
+    Str("'")
+  )
+)
+
+Assn  syll Chc(
+  4:
+    Cat(
+      Var(cons)
+      Var(vowel)
+    )
+  Var(vowel)
+)
+
+Puts Cat(
+  Var(syll)
+  Ap(
+    Var(rep)
+    Tup(
+      Range(
+        Num(1)
+        Num(6)
+      )
+      Var(syll)
+    )
+  )
+)
+