Commit Graph

401 Commits

Author SHA1 Message Date
Marios Titas
f7faa2a1af lookAhead: reset error messages on success 2014-09-24 20:33:15 -05:00
Antoine Latter
c92f105736 Add test for #6. 2014-09-24 20:24:45 -05:00
Antoine Latter
f4601acddf Revert "Track current position in the 'tokens' function"
This reverts commit 860764939c.

This fixes #9.
2014-09-24 19:43:08 -05:00
Antoine Latter
b3a59d508e Post-release version bump 2014-09-24 19:28:13 -05:00
Antoine Latter
35b78b130b Add test for #9.
Also move test for #2 to have a more regular structure for tests aimed at
specific bugs.
2014-09-24 19:22:35 -05:00
Antoine Latter
c4778ac041 Update changelog. 2014-09-09 20:20:13 -05:00
Antoine Latter
fd8ecf5d03 Fix off-by-one error in Token charControl.
Fixes #2.
2014-09-09 20:17:49 -05:00
Antoine Latter
3276ef770c Update git ignore file. 2014-09-09 20:15:21 -05:00
Antoine Latter
e6ab087e11 Merge pull request #3 from Daniel-Diaz/master
Support for CRLF line breaks
2014-09-09 19:42:49 -05:00
Antoine Latter
564e731954 Merge pull request #4 from RyanGlScott/master
Bump text upper version bounds
2014-09-09 19:30:33 -05:00
RyanGlScott
c3e29252d4 Bump text upper version bounds 2014-09-09 00:08:41 -05:00
Antoine Latter
c5ad35149f Remove reference to darcs in package description. 2014-07-22 20:58:55 -05:00
Daniel Díaz
d98a576f5a Renamed 'anyNewline' to 'endOfLine' as suggested in #3 by @aslatter. 2014-05-19 13:48:37 +02:00
Daniel Díaz
9d962cc8fa Added parser for CRLF line breaks and a parser combining LF and CRLF line breaks. 2014-05-12 19:09:26 +02:00
Antoine Latter
0860144eff No more orphan 'Stream' instances.
The ByteString and Text instances for Stream now live in the
Prim module.
2014-04-09 15:01:24 -04:00
Antoine Latter
1dc1bec81b Add git ignore file, remove darcs boring file 2014-04-09 14:59:20 -04:00
Roman Cheplyaka
860764939c Track current position in the 'tokens' function
Example

Before:

  Prelude Text.Parsec> parseTest (string "abcd") "abbe"
  parse error at (line 1, column 1):
  unexpected "b"
  expecting "abcd"

After:

  *Main> parseTest (string "abcd") "abbe"
  parse error at (line 1, column 3):
  unexpected "b"
  expecting "cd"

Before this patch, 'b' was reported to be found at 1:1, which is clearly not the
case. After this patch, we correctly report the location of the wrong token, and
also report missing tokens starting from that position.
2014-04-04 01:28:21 +03:00
Antoine Latter
ec1627b158 Merge pull request #1 from creswick/master
moved Stream instance for lists (Text.Parsec.String to Text.Parsec.Prim)
2014-03-27 23:08:05 -05:00
Rogan Creswick
ec7d750987 moved Stream instance for lists from Text.Parsec.String into Text.Parsec.Prim and removed -fno-warn-orphans from String.hs pragma 2014-03-24 07:53:21 -07:00
Antoine Latter
b08ea2c40d Module 'prim' is now 'not home' for haddock links. 2014-03-23 20:08:26 -05:00
Antoine Latter
391b8dc1ab Update changelog. 2014-03-23 20:08:12 -05:00
Antoine Latter
c3ff212653 Explicitly export symbols from 'Combinator' and 'Prim' from the main
module.
2014-03-23 20:07:39 -05:00
Antoine Latter
595f274140 Export 'text' instances from 'Text.Parsec'. 2014-03-23 20:07:14 -05:00
Antoine Latter
dac01599dd Fix some haddocks. 2014-03-23 20:06:48 -05:00
Antoine Latter
296b3f6bf8 Add 'bug-reports' section to package description. 2014-03-23 20:06:15 -05:00
Antoine Latter
a43b1c3b71 Bump version, move to github. 2014-03-23 15:52:23 -05:00
Antoine Latter
2c060446c1 Bump version and allow newer "text" dependency 2014-01-11 05:59:42 +00:00
Antoine Latter
59a9af0513 Allow 'text' version 1.0 2013-12-09 13:04:14 +00:00
Antoine Latter
8bc07f2e35 Version bump 2013-12-09 13:03:57 +00:00
Bjorn Buckwalter
143e57454e Fix haddock module links. 2013-08-21 09:57:13 +00:00
Antoine Latter
119889617c add changefile to package description 2012-06-12 02:07:43 +00:00
Antoine Latter
bb4e915f7a Add changefile, update for release 2012-06-12 01:59:11 +00:00
Antoine Latter
ca4dedf414 Add versioned 'boring' file for darcs 2012-06-12 01:57:53 +00:00
Antoine Latter
3bc65fb2a4 bump version for release 2012-06-12 01:51:58 +00:00
Roman Cheplyaka
b8990ab042 When merging error messages, prefer known messages to unknown ones
This fixes a regression introduced by:

Sun Feb 20 18:24:22 EET 2011  Roman Cheplyaka <roma@ro-che.info>
  * Choose the longest match when merging error messages

The source of the regression is that parsec sometimes generates dummy (aka
"unknown") error messages when no actual error has occurred.

So, when merging errors, before simply looking at the positions we should check
if one of them is unknown and just ignore it.

Reported by Matthias Hörmann.
2012-05-30 22:38:09 +00:00
Roman Cheplyaka
1bac97f3b5 Documentation fix 2011-12-28 22:29:53 +00:00
Antoine Latter
18cab005a3 version bump for release 2011-10-08 18:18:44 +00:00
Antoine Latter
b7fed21061 add Stream Text instances 2011-10-08 18:17:18 +00:00
Antoine Latter
43087fead0 Fix reserved name recognition for case-insensitive languages. 2011-10-08 18:04:54 +00:00
Roman Cheplyaka
383963979d lookAhead: do not consume input on success; update documentation 2011-02-20 16:29:20 +00:00
Roman Cheplyaka
eaf3a6de71 try: do not reset the error position 2011-02-20 16:24:49 +00:00
Roman Cheplyaka
0a10e27db4 Choose the longest match when merging error messages 2011-02-20 16:24:22 +00:00
Antoine Latter
e66d3d07a8 add source repository information to package description 2011-01-29 15:59:20 +00:00
Antoine Latter
4467dfcf3b remove ghc-pro-options from package description 2011-01-29 15:52:26 +00:00
Antoine Latter
c71d13cfe7 update maintainer in package description 2011-01-29 15:47:58 +00:00
Derek Elkins
eef48c8c17 Minor fix to the CPP and bump version. 2011-01-08 17:28:44 +00:00
Antoine Latter
32f608c83a remove dependency on package 'syb' 2010-09-08 05:37:47 +00:00
Antoine Latter
f234bc7353 Carry forward error messages when parsers don't consume input 2010-10-03 22:55:54 +00:00
Derek Elkins
2f4f4dba4a Fixing typos. 2010-09-27 23:19:05 +00:00
Derek Elkins
b5ce757ed7 Update Daan's email address 2010-03-04 04:09:29 +00:00