@@ -12,8 +12,9 @@ data Out
12 | TagComment | TagOpen | TagClose | TagOpenClose
12 | TagComment | TagOpen | TagClose | TagOpenClose
13 deriving Show
13 deriving Show
15+is lower upper x = x >= lower && x <= upper
15−isName1 x = x == ':' || x == '_' || (x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z')
16+isName1 x = x == ':' || x == '_' || is 'a' 'z' x || is 'A' 'Z' x
16−isName x = isName1 x || x == '-' || (x >= '0' && x <= '9')
17+isName x = isName1 x || x == '-' || is '0' '9' x
17isSpace x = x == ' ' || x == '\t' || x == '\r' || x == '\n'
18isSpace x = x == ' ' || x == '\t' || x == '\r' || x == '\n'
19whitespace = many $ match isSpace
20whitespace = many $ match isSpace
@@ -52,8 +53,7 @@ tag = do
52 let name_ = name `choice` abort "Missing tag name"
53 let name_ = name `choice` abort "Missing tag name"
54 [do lit "!--"
55 [do lit "!--"
56− lit "-->" -- FIXME: Not correct!!!
56+ many $ lit "-->" -- FIXME: Not correct!!!
57 out TagComment
57 out TagComment
58 ,do lit "?"
58 ,do lit "?"