W3C home > Mailing lists > Public > www-style@w3.org > February 2013

[css3-syntax][css3-page] The mixed declaration/at-rule syntax is not LL(k)

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Sat, 02 Feb 2013 20:01:23 +0100
Message-ID: <510D6283.9090505@kozea.fr>
To: www-style <www-style@w3.org>, Bert Bos <bert@w3.org>, "L. David Baron" <dbaron@dbaron.org>
Hi,

Is has been reported that the grammar for the body of @page rules (that 
allows mixed declarations and at-rules) is not LL(k). In other words, it 
requires unbounded look-ahead.

https://www.w3.org/Style/CSS/Tracker/issues/263

css3-syntax defines the same syntax for all declarations blocks. The 
state machine there is clearly unambiguous and only requires bounded 
look-ahead.

But the only ways I found to translate this state machine into the 
traditional grammar operators (concatenation, alternation, repetition, 
etc.) required unbouded look-ahead to pick between the branches of a 
declaration that ends with ';' or one that ends with '}'.

Should we care about this? Is it a problem for grammar-based parser 
implementations?

-- 
Simon Sapin
Received on Saturday, 2 February 2013 19:01:46 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:05 GMT