I want to understand the valid formats of timeExpressions in TTML. This section of the specification describes the syntax. Here is an extract:
<timeExpression>
: clock-time
| offset-time
clock-time
: hours ":" minutes ":" seconds ( fraction | ":" frames ( "." sub-frames )? )?
offset-time
: time-count fraction? metric
hours
: <digit> <digit>
| <digit> <digit> <digit>+
-- ✂ --
I the nomenclature of the document is familiar to some extent, e.g. I understand:
|
means OR(
...)
groups?
means optional
but what does +
mean?
I would assume it means 'one or more' as it does in a regex but, if that were the case, why would the specification read:
hours
: <digit> <digit>
| <digit> <digit> <digit>+
Instead of simply:
hours
: <digit> <digit>+