Re: Please make sure the grammar is directly machine consumable.

> The JavaCC text output is converted to the HTML for the document by  
> a script although the tokens have to be manually described.  The  
> process is converting javacc syntax to the EBNF syntax as described in
> http://www.w3.org/TR/2004/REC-xml11-20040204/#sec-notation.
>
> The grammar in javacc is not quite LL(1) (there is a 2 state  
> lookahead at the Triples production - related to the optional dots  
> Richard commented on).  The document grammar is also fed into  
> yacker (a W3C tool) which checks for conversion to bison/flex (LALR 
> (1)).

I did try automated conversion of the grammar in the docs using  
yacker, and never got it to do anything but error.

> There are trade-off between readability by humans and processable  
> by machines in the current grammar.  Some people find the weighting  
> towards a machine-processable grammar makes the grammar unclear  
> (e.g. the use of recursive rules use rather than repetition).

I personally didn't find the conceptual structure difficult; it's the  
ambiguity, and the reduction to BNF, that I would prefer to be resolved.

-R

Received on Sunday, 21 August 2005 17:36:15 UTC