learn-teochew / parsetc

Parse and convert between different Teochew romanization systems
https://learn-teochew.github.io/parsetc/
MIT License
0 stars 1 forks source link

Assign each tone number to a distinct terminal #8

Open kbseah opened 6 months ago

kbseah commented 6 months ago

Separate data and logic in the diacritics_syllable_parse function so that it can be extended to other systems in the future: move tone marks data to external file

For ambiguous cases , e.g. 1 or 4 where it depends on the coda, represent with a placeholder character and use parser logic to correctly assign.

kbseah commented 6 months ago

Implemented with tag v0.4.0, defining tones as rules instead of terminals to deal with ambiguity when different tones share same tone mark, see commit message for 002403a3d84

Still looking for a more elegant solution