Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

fix parsing of boolean constants #19

Closed
wants to merge 1 commit into from
Closed

fix parsing of boolean constants #19

wants to merge 1 commit into from

Conversation

mklinik
Copy link
Contributor

@mklinik mklinik commented Apr 23, 2012

couldn't figure out how your tests work, so I used the spec sekeleton as
sol taught me.

couldn't figure out how your tests work, so I used the spec sekeleton as
sol taught me.
@toothbrush
Copy link
Owner

"The lexeme parser reserved name parses symbol name, but it also checks that the name is not a prefix of a valid identifier. A reserved word is treated as a single token using try."

-- http://hackage.haskell.org/packages/archive/parsec/3.0.0/doc/html/Text-Parsec-Token.html

Translation: we want this.

@mklinik
Copy link
Contributor Author

mklinik commented Apr 23, 2012

Yes, see the testcases. With your change, the first test runs fine, but "parses identifiers that start with 'true' and 'false' to identifiers" fails.

@mklinik
Copy link
Contributor Author

mklinik commented Apr 23, 2012

The test setup from sol is very nice. You can either ghci test/Spec.hs and use main to run all tests, or ghci to an individual spec and run only that one with main

@toothbrush
Copy link
Owner

Yeah, I figured out the problem with using my way :) I think
I'll use sol's suite too. Thanks! I'll commit the merge sometime
soon (busy right now), just checking a few things.

On Mon, Apr 23, 2012 at 11:30:20 -0700, quoth Markus Klinik:

The test setup from sol is very nice. You can either ghci test/Spec.hs and use main to run all tests, or ghci to an individual spec and run only that one with main


Reply to this email directly or view it on GitHub:
#19 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants