W3C home > Mailing lists > Public > public-media-fragment@w3.org > July 2011

ABNF definition of NPT temporal fragment times

From: Chris Double <chris.double@double.co.nz>
Date: Wed, 6 Jul 2011 18:17:30 +1200
Message-ID: <CALn1vHHmmjrRRTpkXbyTqzgQEfNimygz0UkZLAs_2gkR94oXSA@mail.gmail.com>
To: Media Fragment <public-media-fragment@w3.org>
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?

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:46 UTC