|
1 | | -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 1 | +<!doctype html public '-//W3C//DTD HTML 4.0//EN'> |
2 | 2 | <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 $ --> |
4 | 4 | <HEAD> |
5 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
6 | 6 | <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;} |
214 | 214 | . {fprintf(stderr, "%d: Illegal character (%d)\n", |
215 | 215 | lineno, *yytext);} |
216 | 216 | </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 | +--> |
217 | 261 | </BODY> |
218 | 262 | </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