Commit Graph

7 Commits

Author SHA1 Message Date
mrkkrp
c5bcdfb220 rewritten parsing of numbers, fixes #2 and #3
Changed how numbers are parsed because they were parsed in a naïf and
hairy way. Added tests for #2 and #3 (in old Parsec project these are
number 35 and 39 respectively).

* Since Haskell report doesn't say anything about sign, I've made
  ‘integer’ and ‘float’ parse numbers without sign.

* Removed ‘natural’ parser, it's equal to new ‘integer’ now.

* Renamed ‘naturalOrFloat’ → ‘number’ — this doesn't parse sign too.

* Added new combinator ‘signed’ to parse all sorts of signed numbers.

* For the sake of convenience I've added ‘integer'’, ‘float'’, and
 ‘number'’ combinators that also can parse signed numbers out of box.
2015-07-31 17:30:38 +06:00
mrkkrp
b19dae4315 improve efficiency of applicative interface 2015-07-31 01:50:36 +06:00
mrkkrp
b936e3c3a9 improved documentation, fixes #1 2015-07-31 00:36:54 +06:00
mrkkrp
773e9ccabe cosmetic changes in copyright (headers) 2015-07-30 22:20:37 +06:00
mrkkrp
e6f2379b22 refactoring, phase 3 2015-07-30 21:45:06 +06:00
mrkkrp
137ce0a521 refactoring, phase 2 2015-07-29 14:44:58 +06:00
mrkkrp
227667f829 refactoring, phase 1 2015-07-28 19:32:19 +06:00