Renaming idea for a future version.

Working further on my tutorial.
I give examples of how to rename an element:

 start: -date.

so a <start> element has the same content structure as a <date>.

But it would be handy to go in the other direction too.

 date: day, " ", month, " ", year.
 day: d, d?.
 month: "January"; "February"; etc.
 year: d, d, d, d.

 iso: year, "-", nmonth, "-", day.
 nmonth: d, d.

the month and nmonth elements have to have different names, because they 
have different syntaxes.

Strawperson proposal:

 iso: year, "-", nmonth^month, "-", day.

Read "an nmonth serialised as <month>", and by extension, used in a rule 
definition:

 nmonth^month: d, d.

Steven

Received on Wednesday, 27 October 2021 19:25:37 UTC