[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lack of identifying keywords in iCal grammar



3 Questions:

1. duration. The duration rule is one of the possible properties of an iCalendar component. All of the other component properties (except for iana-comp and x-comp) begin with an identifying keyword (e.g.: attendee starts with "ATTENDEE", attach starts with "ATTACH"). In draft 5, it was defined better:

duration = "DURATION" "=" duration CRLF

whereas now:
duration = (["+"] / "-") "P" (dur-date / dur-time / dur-week)

2. ianaparam, xparam, iana-comp, x-comp. The problem with these 4 new rules is
similar to that of duration, the lack of an identifying keyword at the start of the rule. The other components and parameter sub-rules begin with a distinguishing keyword (e.g. cnparam begins with the keyword "cnparam").

The rules ianaparam and xparam rules are:
ianaparam = iana-token "=" param-value *("," param-value)

xparam =x-name "=" param-value *("," param-value)

but they would be clearer and easier to parse if defined in a maner similar to:
ianaparam = "ianaparam" ":" iana-token "=" param-value
*("," param-value)

xparam = "xparam" ":" x-name "=" param-value *("," param-value)



What is unappealing about these new definitions is the lack of the identifying
keyword for two reasons:
1. it can be implemented, but is somewhat more difficult to avoid
lexical nondeterminism when comparing keywords to identifiers.
2. It leaves one to have to infer the rule from the value instead of
being able to quickly identify it by a keyword (it's type).

There doesn't seem to be any reason to make the grammar this semantically
or syntactically complicated. Type inference has never been well regarded,
which is why languages like ML ad Prolog never made it.

3. iana-token. What are the iana-tokens for in the grammar? There seems to be
no documentation regarding their usage or purpose in the draft. Could someone please clarify the reason(s) for their implementation?



=================================================================
John Narbaitz TEL: (408) 469-1780
CrossWind Technologies, Inc. FAX: (408) 469-1750
140 Du Bois, Suite D EMAIL: narbaitz@crosswind.com
Santa Cruz, CA 95060 WWW: http://www.crosswind.com
=================================================================