Bridgeconn / usfm-grammar

An elegant USFM parser.
https://usfmgrammar.vachanengine.org/
MIT License
36 stars 14 forks source link

Type of \z markers #237

Open kavitharaju opened 3 months ago

kavitharaju commented 3 months ago

A z marker may have any role: char, para, milestone, note, etc. And that is why we have marker.ext.

As of now USFM Grammar treats all z markers as milestone.

kavitharaju commented 3 months ago

To determine what the "type" is

You can't determine the type from syntax alone^1. I.e. you can't work it out with a parser. Instead we have defined an extension file: markers.ext where people describe the extension markers and give their type. ^1 You can to a certain extent (milestone, char, para) but even that is hard and assumes no errors in the data. But you can't, for example distinguish a note from a char style and then deal with the implicit closure of markers within the note, etc.