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

Re: [css3-mediaqueries] grammar unspecified?

From: Andrey Mikhalev <amikhal@abisoft.spb.ru>
Date: Wed, 25 Feb 2009 19:36:22 +0300 (MSK)
To: Anne van Kesteren <annevk@opera.com>
cc: www-style@w3.org
Message-ID: <Pine.LNX.4.63.0902251911360.7663@master.abisoft.spb.ru>
On Wed, 25 Feb 2009, Anne van Kesteren wrote:

> On Wed, 25 Feb 2009 05:41:49 +0900, Andrey Mikhalev <amikhal@abisoft.spb.ru> 
> wrote:
>> in WD-css3-mediaqueries-20081015 part '3. Syntax' contain mix of references 
>> both to generic grammar and CSS2 appendix G grammar, which makes it 
>> unusable:
>> 
>> 1. "media_query_list production defined below replaces the medium
>>    production from CSS2"
>>    - appendix G grammar has 'medium' but does not define 'value'
>>      production which used in syntax.
>>    - generic grammar has 'value' but does not contain 'medium' production.
>> 2. "RESOLUTION is to be added to the CSS2 term  production and NOT, ONLY,
>>    AND, and ',' are to be added to the CSS2 value production"
>>    - again, weird unclean mix of statements from two different grammars
>>      (generic has no 'term', app.G has no 'value')
>>    - 'value' defined in generic grammar. for me, statement above claim
>>      mediaquery syntax broken (i.e. mediaquery cannot be parsed in generic
>>      grammar w/o modification).
>
> This is mostly because CSS grammar is a mix of productions, prose and magic. 
> (Ok, no magic.) This seemed like a good approximation, though if you have 
> suggestions on how to improve things that'd be cool.

"good approximation" which produce yacc syntax error?
suggest only one basic grammar should be used to define syntax, not both.
e.g.
expression
  : '(' S* media_feature S* [':' S* expr]? ')' S*

>
>
>> btw, generic value ("[ any | block | ATKEYWORD S* ]+") looks like overkill 
>> for mediaquery expressions listed in spec.
>
> We could restrict it I suppose, it does not really matter either way as far 
> as I can tell...

thin ice of another issue.
css generic grammar allow only one [nested] block per at-rule...

>
>
>
Received on Wednesday, 25 February 2009 16:37:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:16 GMT