A BNF grammar for the Singhala script
=====================================
JC Ahangama - TX. Phone: 817-473-9984
(Revised: Bertie Fernando - 4-6-2014; updated: 4-15-2014)

KEY:
::= 'defined as'
[]  'optional item'
{}  'repeatable item (one or more)'
|   'or'
... 'items omitted from list for brevity'
""  'encloses a place-holder for the shape of a phoneme'
;   'begins a comment regarding the line above'


Modern orthography:
-------------------

<lipisaMkhyaa> ::= {[{<salakuNa>}]{<vacanaya>}[{<salakuNa>}]}
    ; Text formation
<vacanaya> ::= {<akura>}<ws>
<akura> ::= <c><f><ls> | [{<c>}]<v><ls>
    ; One or more consonant plus a vowel or stand-alone vowel,
    ; alternatively, a consonant with the modification flag <f>
<ls> ::= letter space
    ; the gap between letters.
<v> ::= "a" | "aa" | ... |"e" | "e"<f> | "ai" | "o"| "o"<f> | "au"
    ; 18 vowels, adding <f> exists only in Singhala orthography
<c> ::= "k" | "kh" ... | "x" | "f"
    ; 40 consonants + 2 allophones)
<f> ::= modification indicator flag
    ; Two shapes, each applied according to the height of letter
<salakuNa> ::= Any modern punctuation mark
<ws> ::= word space


Classic orthography (as in palm-leaf books):
--------------------------------------------

<paaliya> ::= <peLa> ::= {{<vacanaya>}[<kuNdaliiya>]}
    ; Sanskrit: paaliya, Singhala: peLa = row, book
<vacanaya> ::= {<akura>}[<halantaya>]
<akura> ::= [{<c>}]<v><ls>
    ; One or more consonant plus a vowel or stand-alone vowel
<halantaya> ::= <c><f><ls>
    ; if <vacanaya> is terminated by a consonant, then <f> is added
<ls> ::= letter space
    ; the gap between letters.
<v> ::= "a" | "aa" | ... |"e" | "e"<f> | "ai" | "o"| "o"<f> | "au"
    ; 18 vowels, adding <f> exists only in Singhala orthography
<c> ::= "k" | "kh" ... | "x" | "f"
    ; 40 consonants + 2 allophones)
<f> ::= modification flag
    ; Two shapes, each applied according to the height of letter
<kuNdaliiya> ::= Section delimiter
    ; A wavy shape found in palm-leaf books


----- E&OE -----