(*** aquan ***)

(* 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 (6 @ syll);


(*** auran ***)

word := start (4@syll) end;
syll := vowel cons;
start := 3: cons | 2: "";
end := 3: vowel | vowel "s"| vowel "n";
cons ::= p b m m f v t t t d n n s s s z l k g g gg sh j l r th th th;
vowel ::= a a e e i i i o u eu au ae ai oi;

puts word;

-- hello world

use "hello world"
  | "bonjour monde"
  | "nihao shijian"


-- aquan
use syllable (rep.6.syllable)
  consonant = %{p t k w h n}
  vowel = ("a" | "e" | "i" | "o" | "u") (4: "" | "'")
  syllable = 4: consonant vowel | vowel


-- aquan
use syllable (rep.6.syllable)
  consonant = %{p t k w h n}
  vowel = %{a e i o u} (4: "" | "'")
  syllable = 4: consonant vowel | vowel

-- auran
use init (rep.4.syll)
  syll  = vowel cons
  start = 3: cons | 2: nil
  end   = 3: vowel | vowel "s" | vowel "n"
  cons  = %{p b m m f v t t t d n n s s s z l k g g gg sh j l r th th th}
  vowel = %{2: a 2: e 3: i o u eu au ae ai oi}
