Typo
[packages/base.git] / tests / lex001.hs
1 module Main where
2
3 import Text.ParserCombinators.ReadP
4 import qualified Text.Read.Lex
5
6 testStrings
7 = [ "0x3y",
8 "0X3abx",
9 "0o39y",
10 "0O334z",
11
12 "NaN",
13 "NaNx",
14 "Infinity",
15 "Infinityx",
16
17 "Wibble Foo",
18 "Wibble8_+",
19
20 "34yy",
21 "34.4x",
22 "034.4x",
23 "31.45e-6y",
24 "49.2v",
25 "049.2v",
26 "35e-3x",
27 "035e-3x",
28 "35e+3y",
29 "83.3e-22",
30 "083.3e-22"
31 ]
32
33 main = mapM test testStrings
34
35 test s = do print s
36 print (lex s)
37 print (readP_to_S Text.Read.Lex.lex s)
38 putStrLn ""
39