36 |
|
|
37 |
tokens :- |
tokens :- |
38 |
|
|
39 |
$s+ ; |
$s+ { \p s -> (S, p) } |
40 |
@comment ; |
@comment ; |
41 |
|
|
42 |
"<!--" ; |
"<!--" ; |
45 |
"|=" { \p s -> (DASHMATCH, p) } |
"|=" { \p s -> (DASHMATCH, p) } |
46 |
|
|
47 |
@w"{" { \p s -> (LBRACE, p) } |
@w"{" { \p s -> (LBRACE, p) } |
48 |
|
@w"}" { \p s -> (RBRACE, p) } |
49 |
@w"+" { \p s -> (PLUS, p) } |
@w"+" { \p s -> (PLUS, p) } |
50 |
@w">" { \p s -> (GREATER, p) } |
@w">" { \p s -> (GREATER, p) } |
51 |
@w"," { \p s -> (COMMA, p) } |
@w"," { \p s -> (COMMA, p) } |
87 |
@ident"\050" { \p s -> (FUNCTION s, p) } |
@ident"\050" { \p s -> (FUNCTION s, p) } |
88 |
|
|
89 |
";" { \p s -> (SEMI, p) } |
";" { \p s -> (SEMI, p) } |
|
"}" { \p s -> (RBRACE, p) } |
|
90 |
":" { \p s -> (COLON, p) } |
":" { \p s -> (COLON, p) } |
91 |
"/" { \p s -> (SLASH, p) } |
"/" { \p s -> (SLASH, p) } |
92 |
"-" { \p s -> (MINUS, p) } |
"-" { \p s -> (MINUS, p) } |
103 |
type TokenPosn = (Token, AlexPosn) |
type TokenPosn = (Token, AlexPosn) |
104 |
|
|
105 |
data Token = |
data Token = |
106 |
|
S | |
107 |
INCLUDES | |
INCLUDES | |
108 |
DASHMATCH | |
DASHMATCH | |
109 |
LBRACE | |
LBRACE | |