You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to parseback and this could be completly me running against a wall, but I am having trouble getting your example of the arithmetic expression grammar to work. This line here,
val result: Eval[Either[List[ParseError], List[Int]]] = expr(input)
gives me the following Error message:
Error:(28, 63) type mismatch;
found : cats.Eval[List[parseback.ParseError] / parseback.util.Catenable[Int]]
(which expands to) cats.Eval[scala.util.Either[List[parseback.ParseError],parseback.util.Catenable[Int]]]
required: cats.Eval[Either[List[parseback.ParseError],List[Int]]]
val result: Eval[Either[List[ParseError], List[Int]]] = expr(input)
However, the example executes when omitting the explicit type declaration of variable result. But it will fail to parse and throw the following error message:
After observing your own test-cases in the parseback-test folder I figured, that the Whitespace is implemented in a different way. There, it is defined as
implicit val W = Whitespace(() | """\s+""".r)
which indeed does work an makes more sense. Please consider to adjust this in the intro-example.
Hi,
I am new to parseback and this could be completly me running against a wall, but I am having trouble getting your example of the arithmetic expression grammar to work. This line here,
val result: Eval[Either[List[ParseError], List[Int]]] = expr(input)
gives me the following Error message:
However, the example executes when omitting the explicit type declaration of variable result. But it will fail to parse and throw the following error message:
Moreover when inserting a whitespace before the 1 in the LineStream like this
" 1 + 2"
the example parses correctly. Am i doing anything wrong?And also, is there a forum for questions like this? I wasn't able to find any, so i posted it here. Please let me know.
Cheers
Besides, here is my SBT File :
version := "0.1"
scalaVersion := "2.12.7"
resolvers += "bintray-djspiewak-maven" at "https://dl.bintray.com/djspiewak/maven"
val ParsebackVersion = "0.3"
libraryDependencies += "com.codecommit" %% "parseback-core" % ParsebackVersion
libraryDependencies += "com.codecommit" %% "parseback-cats" % ParsebackVersion
The text was updated successfully, but these errors were encountered: