Library with some functions for reading and converting numeric tokens.
Author: Michael Hanus, Frank Huch, Bjoern Peemoeller
Version: November 2016
readInt
:: String -> [(Int,String)]
Read a (possibly negative) integer as a first token in a string. |
readNat
:: String -> [(Int,String)]
Read a natural number as a first token in a string. |
readHex
:: String -> [(Int,String)]
Read a hexadecimal number as a first token in a string. |
readOct
:: String -> [(Int,String)]
Read an octal number as a first token in a string. |
readBin
:: String -> [(Int,String)]
Read a binary number as a first token in a string. |
Read a (possibly negative) integer as a first token in a string.
The string might contain leadings blanks and the integer is read
up to the first non-digit.
On success returns |
Read a natural number as a first token in a string.
The string might contain leadings blanks and the number is read
up to the first non-digit.
On success returns |
Read a hexadecimal number as a first token in a string.
The string might contain leadings blanks and the number is read
up to the first non-hexadecimal digit.
On success returns |
Read an octal number as a first token in a string.
The string might contain leadings blanks and the number is read
up to the first non-octal digit.
On success returns |
Read a binary number as a first token in a string.
The string might contain leadings blanks and the number is read
up to the first non-binary digit.
On success returns |