8000 [css2] Added a list of tokens, for the moment in a comment, to see if… · w3c/csswg-drafts@cea3627 · GitHub
Skip to content

Commit cea3627

Browse files
committed
[css2] Added a list of tokens, for the moment in a comment, to see if a fixed
list of tokens for now and all future versions is possible. --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40233
1 parent 9e04c65 commit cea3627

1 file changed

Lines changed: 56 additions & 2 deletions

File tree

css2/grammar.src

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1+
<!doctype html public '-//W3C//DTD HTML 4.0//EN'>
22
<html lang="en">
3-
<!-- $Id: grammar.src,v 1.8 1997-09-30 18:31:28 bbos Exp $ -->
3+
<!-- $Id: grammar.src,v 1.9 1997-10-17 18:13:34 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Appendix D: The grammar of CSS2</TITLE>
@@ -214,5 +214,59 @@ rgb\({w}{num}%?{w}\,{w}{num}%?{w}\,{w}{num}%?{w}\) {BEGIN(0); return RGB;}
214214
. {fprintf(stderr, "%d: Illegal character (%d)\n",
215215
lineno, *yytext);}
216216
</PRE>
217+
<!--
218+
macros (\nnn is octal):
219+
220+
nonascii [\241-\17777777777]
221+
h [0-9a-fA-F]
222+
unicode \\{h}{1,8}
223+
escaped {unicode}|\\[ -~]|\\{nonascii}
224+
nmstrt [a-z]|{nonascii}|{escaped}
225+
nmchar [-a-z0-9]|{latin1}|{escape}
226+
ident {nmstrt}{nmchar}*
227+
name {nmchar}+
228+
stringchar {escape}|{nonascii}|[ !#$%&(-~]
229+
string \"({stringchar}|\')*\"|\'({stringchar}|\")*\'
230+
231+
232+
List of tokens (longest match wins):
233+
234+
ident {ident}
235+
percentage {num}"%"
236+
dimension {num}{ident}
237+
pseudo-something-after-ident ":"{ident} after {ident}, {pseudo*}, {hash*}, {class*}
238+
pseudo-something ":"{ident}
239+
class "."{name}
240+
at-keyword "@"{ident}
241+
string {string}
242+
hash "#"{name}
243+
hash-after-ident "#"{name} after {ident}, {pseudo*}, {hash*}, {class*}
244+
bang-keyword "!"{w}{ident}
245+
number {num}
246+
url "url("{w}{string}{w}")"|"url("{w}([^ \n\'\")]|\\\ |\\\'|\\\"|\\\))+{w}")"
247+
functor {ident}"("
248+
CDO \<\!\-\-
249+
CDC \-\-\>
250+
unicode-range "U+"[0-9a-fA-F?]{1,8}("-"{h}{1,8})?
251+
252+
253+
and ignored:
254+
255+
comment "/*"[.\n]*"*/"
256+
257+
258+
if not matched above, characters stand for themselves
259+
260+
-->
217261
</BODY>
218262
</HTML>
263+
<!-- Keep this comment at the end of the file
264+
Local variables:
265+
mode: sgml
266+
sgml-declaration:"~/SGML/HTML4.decl"
267+
sgml-default-doctype-name:"html"
268+
sgml-minimize-attributes:t
269+
sgml-nofill-elements:("pre" "style" "br")
270+
sgml-live-element-indicator:t
271+
End:
272+
-->

0 commit comments

Comments
 (0)