ABNF definition of NPT temporal fragment times

Parts of the definition of NPT temporal fragments in the spec looks like:

npttimedef    = [ deftimeformat ":"] ( npttime  [ "," npttime ] ) / (
"," npttime )
npt-sec       =  1*DIGIT [ "." *DIGIT ]
npt-mmss      =  npt-mm ":" npt-ss [ "." *DIGIT]
npttime       = npt-sec / npt-mmss / npt-hhmmss

Because the 'npt-sec' clause is the first item in the alternates
amongst 'npttime', given a temporal fragment of '#t=20:10', I see that
'npt-sec' will successfully match, but 'npttimedef' will fail since a
':' instead of a ',' follows the first number. Is it expected that
this will then backtrack to retry the 'npt-mmss' clause? I'm
unfamiliar with how ABNF definitions in these specs tend to work and
whether backtracking is the norm. If not, then 'npt-mmss' would never
match? Should the alternate clauses be re-ordered to work around this
or is this level of detail not usually worried about in these types of
specs since the intent is obvious?

Chris.
-- 
http://www.bluishcoder.co.nz

Received on Wednesday, 6 July 2011 06:18:08 UTC