Skip to content

Commit 5937553

Browse files
committed
[css2] Issues w3c#55-60.
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402255
1 parent 1fe141f commit 5937553

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

css2/grammar.src

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: grammar.src,v 2.37 2004-02-09 21:47:46 bbos Exp $ -->
3+
<!-- $Id: grammar.src,v 2.38 2004-07-05 17:08:00 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Grammar of CSS&nbsp;2.1</TITLE>
@@ -158,21 +158,21 @@ nmchar [_a-zA-Z0-9-]|{nonascii}|{escape}
158158
string1 \"([\t !#$%&amp;(-~]|\\{nl}|\'|{nonascii}|{escape})*\"
159159
string2 \'([\t !#$%&amp;(-~]|\\{nl}|\"|{nonascii}|{escape})*\'
160160

161-
ident {nmstart}{nmchar}*
161+
ident -?{nmstart}{nmchar}*
162162
name {nmchar}+
163163
num [0-9]+|[0-9]*"."[0-9]+
164164
string {string1}|{string2}
165165
url ([!#$%&amp;*-~]|{nonascii}|{escape})*
166166
s [ \t\r\n\f]
167167
w {s}*
168168
nl \n|\r\n|\r|\f
169-
range \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|{h})))))
170169

171170
%%
172171

173172
{s}+ {return S;}
174173

175-
\/\*[^*]*\*+([^/*][^*]*\*+)*\/ /* ignore comments */
174+
\/\*[^*]*\*+([^/*][^*]*\*+)*\/ /* ignore comments */
175+
{s}+\/\*[^*]*\*+([^/*][^*]*\*+)*\/ {unput(' '); /*replace by space*/}
176176

177177
"&lt;!--" {return CDO;}
178178
"-->" {return CDC;}
@@ -220,6 +220,8 @@ range \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|{h})))))
220220
"url("{w}{url}{w}")" {return URI;}
221221
{ident}"(" {return FUNCTION;}
222222

223+
u\+[0-9a-f?]{1,6}(-[0-9a-f]{1,6})? {return UNICODERANGE;}
224+
223225
. {return *yytext;}
224226
</pre>
225227

css2/syndata.src

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
22
"http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
33
<html lang="en">
4-
<!-- $Id: syndata.src,v 2.104 2004-03-25 18:09:51 bbos Exp $ -->
4+
<!-- $Id: syndata.src,v 2.105 2004-07-05 17:08:21 bbos Exp $ -->
55
<head>
66
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
77
<title>Syntax and basic data types</title>
@@ -231,7 +231,8 @@ href="#parsing-errors">rules for handling parsing errors</a>. However, because t
231231
(including element names, classes, and IDs in <a
232232
href="selector.html">selectors</a>) can contain only the
233233
characters [A-Za-z0-9] and ISO 10646 characters <!--161--> U+00A1 and higher,
234-
plus the hyphen (-) and the underscore (_); they cannot start with a digit.
234+
plus the hyphen (-) and the underscore (_); they cannot start with
235+
a digit or a hyphen followed by a digit.
235236
Only properties, values, units, pseudo-classes,
236237
pseudo-elements, and at-rules may <em>start</em> with a hyphen (-); other
237238
identifiers (e.g. element names, classes, or IDs) may not.

0 commit comments

Comments
 (0)