Changeset 15425 for src/Pugs/Lexer.hs
- Timestamp:
- 03/03/07 16:37:34 (21 months ago)
- Files:
-
- 1 modified
-
src/Pugs/Lexer.hs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Lexer.hs
r15327 r15425 1 {-# OPTIONS_GHC -fglasgow-exts -fvia-C -optc-w #-}1 {-# OPTIONS_GHC -fglasgow-exts -fvia-C -optc-w -cpp #-} 2 2 3 3 {-| … … 67 67 balancedDelim c = case c of 68 68 '\x0028' -> '\x0029'; '\x003C' -> '\x003E'; '\x005B' -> '\x005D'; 69 #ifndef HADDOCK 69 70 '\x007B' -> '\x007D'; '\x00AB' -> '\x00BB'; '\x0F3A' -> '\x0F3B'; 70 71 '\x0F3C' -> '\x0F3D'; '\x169B' -> '\x169C'; '\x2039' -> '\x203A'; … … 128 129 '\xFF1C' -> '\xFF1E'; '\xFF3B' -> '\xFF3D'; '\xFF5B' -> '\xFF5D'; 129 130 '\xFF5F' -> '\xFF60'; '\xFF62' -> '\xFF63'; other -> other 131 #endif 130 132 131 133 -- balanced: parses an open/close delimited expression of any non-alphanumeric character … … 295 297 -- "\08..." and "\09..." are treated as "\0" and then "8..." or "9...". 296 298 ('0':xs@(x:_)) | x == '8' || x == '9' -> return (0:map (toInteger . ord) xs) 297 _ -> error ("Error: Invalid escape sequence \\" ++ ds ++ "; write as decimal \\d" ++ ds ++ " or octal \\o" ++ ds ++ " instead") -- $return [read ds]299 _ -> error ("Error: Invalid escape sequence \\" ++ ds ++ "; write as decimal \\d" ++ ds ++ " or octal \\o" ++ ds ++ " instead") -- return [read ds] 298 300 , based 'o' 8 octDigit 299 301 , based 'x' 16 hexDigit
