parser
parser copied to clipboard
Simple Parser + Nice Error Messages
commonmark has a bunch of block-level elements. The first one I implemented was thematic breaks (`---`, `***`, but *not* mixed) I took care of that like this: ```elm thematicBreak :...
Issue #33 reported the following behavior: ``` run float "00.23" == Ok 0 run float "01" == Ok 0 ``` Need to test with newer implementation
My code: ```elm > parser = Parser.succeed (,) |= Parser.int |. Parser.symbol "x" |= Parser.int > Parser.run parser "1x1" ``` Expected output: ```elm ( 1, 1 ) : ( Int,...
The following is executed in elm-repl v0.18. The first two calls with `allowTabs=False` terminate as expected (although I'm confused as to why `"\t"` has a positive match when `allowTabs=False`), but...
``` ---- elm-repl 0.18.0 ----------------------------------------------------------- :help for help, :exit to exit, more at -------------------------------------------------------------------------------- > import Parser > import Parser.LanguageKit > parser = Parser.LanguageKit.list (Parser.symbol "") Parser.int Parser : Parser.Parser...
### Minimal example ```elm module Main exposing (..) import Html exposing (Html, text) import Parser exposing (andThen, keyword, oneOf, run) main = view (createBigFile 10000) createBigFile n = String.repeat n...
Hi, Really nice library, enjoying using it! I noticed the `whitespace` function only works with `allowTabs = False`. When set to `True`, it looks like there's an infinite recursion somewhere....
TL;DR: I need something like `keepOne : (Bool -> Char) -> Parser Char`. Context: I'm parsing commonmark markdown. [The spec for thematic breaks](http://spec.commonmark.org/0.28/#thematic-breaks) specifies that while `---` and the like...
Fixed issue #33 parsing leading zeroes Fixed issue #12 Parsing "." results in Debug crash
Fixes issue #29 `tabParser` uses `Parser.ignore` with a count of `zeroOrMore`, which means it can never fail! This results in a non-terminating recursion in `whitespaceHelp`. Switching to `oneOrMore` ensures that...