Re: XPath (Section 3.7) Lexical Structure

Thanks for your helpful comments.

Denys Duchier wrote:
> 
> This is a comment concerning (Section 3.7) "Lexical Structure" in the
> XPath specification.
> 
> James Clark was kind enough to send me some code clarifying the intent
> of the specification and I now realize that Section 3.7 plays an
> important role in disambiguating the grammar.  I believe that it would
> be extremely beneficial to strengthen the wording in that section.
> 
> 1. state explicitly that the tokenizing rules serve an important role
>    in disambiguating the grammar.
> 
>    This may be obvious to those involved in the elaboration of the
>    specification, but it is easy to overlook or misappreciate for an
>    outsider.
> 
> 2. identify the exceptional tokenizing rules (they are informally
>    listed in the 3rd paragraph of the section) and clarify their
>    precedence: e.g. is the 1st identifier in "and(" an operator or a
>    function name?
> 
> A more general comment: the specification does not make it clear (tout
> du moins, pour un lecteur non-averti) that the start symbol of the
> grammar is Expr (or, at least, that this is the most general phrase
> recognized by the grammar, or something to that effect).  Instead, it
> starts in the "middle" of the grammar, with location paths, and then
> introduces larger phrasal types; I found that confusing.  I am not
> suggesting a different organization, but again a strengthening of the
> wording so that the game plan becomes clearer.  Here are some specific
> suggestions:
> 
> "The primary syntactic construct in XPath is the expression"
> 
> This should be followed by "and is described by non-terminal Expr",
> with an appropriate link to the corresponding production.
> 
> "One important kind of expression is a location path"
> 
> This should be followed by "and is described by non-terminal Location
> Path", with an appropriate link to the corresponding production.
> Furthermore, the specification should say that "due to their
> importance, they will be described first in Section 2", or words to
> that effect.
> 
> In other words, the introduction should state clearly: _The_Grammar_
> _Really_Starts_There_ (pointing to expressions) ... but
> _This_Is_The_Interesting_Bit_ (pointing to location paths).
> 
> Sincerely,
> 
> --
> Dr. Denys Duchier                       Denys.Duchier@ps.uni-sb.de
> Forschungsbereich Programmiersysteme    (Programming Systems Lab)
> Universitaet des Saarlandes, Geb. 45    http://www.ps.uni-sb.de/~duchier
> Postfach 15 11 50                       Phone: +49 681 302 5618
> 66041 Saarbruecken, Germany             Fax:   +49 681 302 5615

Received on Friday, 16 July 1999 11:30:27 UTC