Browse Source

more examples

Getty Ritter 2 years ago
parent
commit
496cd7332c
3 changed files with 41 additions and 2 deletions
  1. 2 2
      examples/halfling.matzo
  2. 19 0
      examples/sylvan.matzo
  3. 20 0
      examples/terran.matzo

+ 2 - 2
examples/halfling.matzo

@@ -1,6 +1,6 @@
 word := begin rep.<1..4, syll> end;
 syll := cons vowel;
-end := cons vowel final | cons 'é' final | cons 'a' final | 'r' | 'n';
+end := cons vowel final | cons "é" final | cons "a" final | "r" | "n";
 
 begin := vowel | initcons vowel;
 
@@ -10,6 +10,6 @@ initcons ::= b c d ch d f g gn h j l m n p qu r s sc t v;
 vowel := 4: commonvowel | uncommonvowel;
 commonvowel ::= a i u e é o;
 uncommonvowel ::= à è ó ò í ú;
-final := 's' | 6: '';
+final := "s" | 6: "";
 
 puts word;

+ 19 - 0
examples/sylvan.matzo

@@ -0,0 +1,19 @@
+word := syll (rep.<1..4, syll>);
+
+syll := 2: cons vowel | cons vowel;
+
+(* Vowels *)
+vowel := 5: cardinal | 2: accented | diphthongs;
+cardinal ::= a e i o u;
+accented ::= á é í ó ú;
+diphthongs ::= ai au ia ua eu ue;
+
+(* Consonants *)
+cons := 2: avgcons | 4: commcons | 6: vercomcons | othercons;
+
+avgcons ::= p b k g m n f v s;
+commcons ::= t d;
+vercomcons ::= r l;
+othercons ::= ph bh kh gh mh nh fh;
+
+puts word;

+ 20 - 0
examples/terran.matzo

@@ -0,0 +1,20 @@
+word
+  := syll
+   | 2: syll syll
+   | 3: syll syll syll
+   | 2: syll syll syll syll
+   ;
+
+syll
+  := 6:  vowel
+   | 12: cons vowel
+   | 4:  vowel "n"
+   |     vowel "ng"
+   | 3:  cons vowel "n"
+   |     cons vowel "ng"
+   ;
+
+cons ::= k g t d s z r r r j m m n n w;
+vowel := (10: "" | "y") ("a" | "i" | "u" | "e" | "o");
+
+puts word;