summaryrefslogtreecommitdiff
path: root/src/lib/parser.mly
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/parser.mly')
-rw-r--r--src/lib/parser.mly10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/parser.mly b/src/lib/parser.mly
index fbd22f6..70590a0 100644
--- a/src/lib/parser.mly
+++ b/src/lib/parser.mly
@@ -148,7 +148,13 @@ syllables:
word:
- | Sep? syllables consonant_group(opening_consonant)? EOL { Process.rebuild $3 $2 }
+ | Sep? syllables consonant_group(opening_consonant)?
+ { Process.rebuild $3 $2 }
+
+words:
+ | word { $1::[] }
+ | ww=words Space w=word { w:: [Sounds.space $2] ::ww }
main:
- | word { $1 }
+ | words EOL
+ { List.concat (List.rev $1) }