@@ -12,8 +12,9 @@ data Out
1212 | TagComment | TagOpen | TagClose | TagOpenClose
1313 deriving Show
1414
15−isName1 x = x == ':' || x == '_' || (x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z')
16−isName x = isName1 x || x == '-' || (x >= '0' && x <= '9')
15+is lower upper x = x >= lower && x <= upper
16+isName1 x = x == ':' || x == '_' || is 'a' 'z' x || is 'A' 'Z' x
17+isName x = isName1 x || x == '-' || is '0' '9' x
1718isSpace x = x == ' ' || x == '\t' || x == '\r' || x == '\n'
1819
1920whitespace = many $ match isSpace
@@ -52,8 +53,7 @@ tag = do
5253 let name_ = name `choice` abort "Missing tag name"
5354 choices
5455 [do lit "!--"
55− many $ do
56− lit "-->" -- FIXME: Not correct!!!
56+ many $ lit "-->" -- FIXME: Not correct!!!
5757 out TagComment
5858 ,do lit "?"
5959 name_