Commit bce7298b authored by simonpj's avatar simonpj
Browse files

[project @ 2003-02-05 11:41:26 by simonpj]

-------------------------------------
  Fix parsing of floating-point constants in External Core
	-------------------------------------

This fix accidentally made it into the previous (unrelated) commit,
so it's really the *previous* change to LexCore you should look
at.

The fix updates LexCore so that it can parse literals in scientific
notation (e.g. 4.3e-3)
parent 319346a4
......@@ -69,7 +69,7 @@ lexNum cont cs =
| isDigit c -> cont (TKrational r) rest'
where ((r,rest'):_) = readFloat (digits ++ ('.':c:rest))
-- When reading a floating-point number, which is
-- a bit comlicated, use the Haskell 98 library function
-- a bit complicated, use the Haskell 98 library function
(digits,rest) -> cont (TKinteger (sgn * (read digits))) rest
lexName cont cstr cs = cont (cstr name) rest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment