summaryrefslogtreecommitdiff
path: root/utils/hpc/HpcLexer.hs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-11-23 17:41:10 +0000
committerIan Lynagh <ian@well-typed.com>2012-11-23 17:41:10 +0000
commit95027b829425b1a4f18f2cb197a0982cfaedcbe5 (patch)
tree849aee16d46e2002e18968876c1b3498d0211735 /utils/hpc/HpcLexer.hs
parentc04a98498cd1bd706ae9ce7b4c672af4b917a10e (diff)
downloadhaskell-95027b829425b1a4f18f2cb197a0982cfaedcbe5.tar.gz
de-tab hpc
Diffstat (limited to 'utils/hpc/HpcLexer.hs')
-rw-r--r--utils/hpc/HpcLexer.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/hpc/HpcLexer.hs b/utils/hpc/HpcLexer.hs
index feeb35a8ff..5610b7a89c 100644
--- a/utils/hpc/HpcLexer.hs
+++ b/utils/hpc/HpcLexer.hs
@@ -2,13 +2,13 @@ module HpcLexer where
import Data.Char
-data Token
- = ID String
+data Token
+ = ID String
| SYM Char
| INT Int
| STR String
- | CAT String
- deriving (Eq,Show)
+ | CAT String
+ deriving (Eq,Show)
initLexer :: String -> [Token]
initLexer str = [ t | (_,_,t) <- lexer str 1 1 ]
@@ -18,7 +18,7 @@ lexer (c:cs) line column
| c == '\n' = lexer cs (succ line) 1
| c == '\"' = lexerSTR cs line (succ column)
| c == '[' = lexerCAT cs "" line (succ column)
- | c `elem` "{};-:"
+ | c `elem` "{};-:"
= (line,column,SYM c) : lexer cs line (succ column)
| isSpace c = lexer cs line (succ column)
| isAlpha c = lexerKW cs [c] line (succ column)
@@ -54,4 +54,4 @@ test :: IO ()
test = do
t <- readFile "EXAMPLE.tc"
print (initLexer t)
-
+