| 1 |
|
-- |
| 2 |
|
-- This file is part of FactorCSS |
| 3 |
|
-- Licensed under the MIT License, |
| 4 |
|
-- http://www.opensource.org/licenses/mit-license |
| 5 |
|
-- Copyright 2004 James Bursa <james@semichrome.net> |
| 6 |
|
-- |
| 7 |
|
|
| 8 |
-- Tokeniser for CSS 2.1 |
-- Tokeniser for CSS 2.1 |
| 9 |
-- See CSS 2.1 G.2 |
-- See CSS 2.1 G.2 |
| 10 |
|
|
| 21 |
@nmstart = [_a-z]|$nonascii|@escape |
@nmstart = [_a-z]|$nonascii|@escape |
| 22 |
@nmchar = [\-_a-zA-Z0-9]|$nonascii|@escape |
@nmchar = [\-_a-zA-Z0-9]|$nonascii|@escape |
| 23 |
@nl = \n|\r\n|\r|\f |
@nl = \n|\r\n|\r|\f |
| 24 |
@string1 = \"([\t\ !#\x24\x25&\x28-\x7e]|\\@nl|\'|$nonascii|@escape|\.)*\" |
@string1 = \"([\t\ \!\#\x24\x25&\x28-\x7e]|\\@nl|\'|$nonascii|@escape|\.)*\" |
| 25 |
@string2 = \'([\t\ !#\x24\x25&\x28-\x7e]|\\@nl|\"|$nonascii|@escape|\.)*\' |
@string2 = \'([\t\ \!\#\x24\x25&\x28-\x7e]|\\@nl|\"|$nonascii|@escape|\.)*\' |
| 26 |
@ident = @nmstart@nmchar* |
@ident = @nmstart@nmchar* |
| 27 |
@name = @nmchar+ |
@name = @nmchar+ |
| 28 |
@num = [\-\053]?[0-9]+|[0-9]*"."[0-9]+ |
@num = [\-\053]?[0-9]+|[0-9]*"."[0-9]+ |
| 29 |
@string = @string1|@string2 |
@string = @string1|@string2 |
| 30 |
@url = ([!#\x24\x25&\x2a-\x7e]|$nonascii|@escape)* |
@url = ([\!\#\x24\x25&\x2a-\x7e]|$nonascii|@escape)* |
| 31 |
$s = [\ \t\r\n\f] |
$s = [\ \t\r\n\f] |
| 32 |
@w = $s* |
@w = $s* |
| 33 |
@range = \?{1,6}|$h(\?{0,5}|$h(\?{0,4}|$h(\?{0,3}|$h(\?{0,2}|$h(\??|$h))))) |
@range = \?{1,6}|$h(\?{0,5}|$h(\?{0,4}|$h(\?{0,3}|$h(\?{0,2}|$h(\??|$h))))) |
| 34 |
@comment = \/\*[^\x2a]*\*+([^\/\x2a][^\x2a]*\*+)*\/ |
$all = \x00-\xff |
| 35 |
|
@comment = \/\*$all#\x2a*\*+($all#[\/\x2a]$all#\x2a*\*+)*\/ |
| 36 |
|
|
| 37 |
tokens :- |
tokens :- |
| 38 |
|
|