Selectors WD: grammar

pseudoelement
  : '::' IDENT
  ;

is wrong - try:

pseudoelement
  : ':' ':' IDENT
  ;

[them thar be two tokens]

---

The words of the spec and the grammar don't match:

simple_selector_sequence
  : [ [ namespace_prefix ]? element_name ]? [ HASH ...

element_name
  : IDENT | '*'
  ;

[i.e. element_name (the type/universal selector) is optional]
 cf.

A sequence of simple selectors ... always begin [sic] with a type selector or a universal selector.

So:

simple_selector_sequence
  : [ [ namespace_prefix ]? element_name ] [ HASH ...

and

element_name
  : [IDENT | '*']?
  ;

[Also, some of the faults with the grammar remain; e.g., that name is too loose.]

Received on Friday, 6 October 2000 06:26:49 UTC