scala/scala-parser-combinators — pull request #30 by gourlaysama (2014-08-08 09:39:34+00:00)
Title: make RegexParser.err handle whitespace like literal and regex.

This overrides `err` in RegexParser to make it consume whitespace just
like regex and literal. The original motivation was:
```scala
object parser extends RegexParsers {
def num = "\\d+".r

def twoNums = num ~ (num | err("error!"))
}

// succeeds
parser.parseAll(twoNums, "42 721")

// fails with a parsing Failure instead of an Error
// because err doesn't consume the whitespace but the regex does.
parser.parseAll(twoNums, "42 foo")
```
This may change the output of some parsers that failed to parse input
(from a Failure to an Error).

Fixes #29