mozilla/webvtt — pull request #243 by caitp (2013-03-05 02:32:14+00:00)
Title: Implemented routine `webvtt_parse_cuesetting`

This generalized routine is the basis for parsing cuesettings with a
uniform standard of error reporting and validation.

This is intended to be used by smaller routines which can provide the
rules for parsing a given cuesetting (keyword:value pair) through the
general interface provided.

This general interface includes: The expected keyword token, a
null-terminated array of tokens (including optional token_flags) which
define the acceptable value types, and a pointer to an integer which
returns the column at which the value started.

This will assist in simplifying that section of the parser which is
currently a macro-laden state machine that is somewhat terrifying and
not mathematically sound.