Commit 6a68ee11 authored by Gérard Huet's avatar Gérard Huet

Notation ! for chunk non-terminal vocatives/interjection

parent 46f07e82
...@@ -77,10 +77,11 @@ EXTEND Gramskt ...@@ -77,10 +77,11 @@ EXTEND Gramskt
sanscrit: sanscrit:
[ [ p = pada; "|"; "|" -> [ p ] [ [ p = pada; "|"; "|" -> [ p ]
| p = pada; "|"; sl = sanscrit -> [ p :: sl ] | p = pada; "|"; sl = sanscrit -> [ p :: sl ]
| p = pada; `EOI -> [ p ] | p = pada; "!"; sl = sanscrit -> [ p :: sl ] (* for voc and interj *)
| p = pada; `EOI -> [ p ]
| `EOI -> failwith "Empty sanskrit input" | `EOI -> failwith "Empty sanskrit input"
] ] ; ] ] ;
(*i Beware! due to limitation of camlp4 grammars, not possible to simplify above in (*i NB! due to limitation of camlp4 grammars, not possible to simplify above in
sanscrit: sanscrit:
[ [ p = pada; `EOI -> Pada p [ [ p = pada; `EOI -> Pada p
| s = sloka -> Sloka s | s = sloka -> Sloka s
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment