Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    João Pedro Sá Medeiros
    @jpsmedeiros
    I'm using the Calculator example with some changes
    Alexander Myltsev
    @alexander-myltsev

    well, I don’t know how compiler interprets that construct

    I suggest you to use the lambda:

    def Number = rule { capture(Digits) ~> { x => Value(x.toInt) } }

    João Pedro Sá Medeiros
    @jpsmedeiros
    Thanks!!! That works!
    mvillafuertem
    @mvillafuertem
    [error] gpg: [don't know]: invalid packet (ctb=2d)
    [error] gpg: keydb_search failed: Invalid packet
    [error] gpg: no default secret key: Invalid packet
    [error] gpg: signing failed: Invalid packet
    [error] java.lang.RuntimeException: Failure running gpg --detach-sign. Exit code: 2
    any solution?
    Alexander Myltsev
    @alexander-myltsev
    hi @mvillafuertem
    last time I saw this in a configuration that used sbt 1.x while trying to publish it somewhere
    where did you get that?
    Philipp Dörfler
    @phdoerfler
    [error]   [RR](f: (String, Seq[String]) => RR)(implicit j: org.parboiled2.support.ActionOps.SJoin[shapeless.HNil,shapeless.HNil,RR], implicit c: org.parboiled2.support.FCapture[(String, Seq[String]) => RR])org.parboiled2.Rule[j.In,j.Out] <and>
    [error]   [RR](f: Seq[String] => RR)(implicit j: org.parboiled2.support.ActionOps.SJoin[shapeless.HNil,String :: shapeless.HNil,RR], implicit c: org.parboiled2.support.FCapture[Seq[String] => RR])org.parboiled2.Rule[j.In,j.Out] <and>
    [error]   [RR](f: () => RR)(implicit j: org.parboiled2.support.ActionOps.SJoin[shapeless.HNil,String :: Seq[String] :: shapeless.HNil,RR], implicit c: org.parboiled2.support.FCapture[() => RR])org.parboiled2.Rule[j.In,j.Out]
    [error]  cannot be applied to ((String, Seq[String], Option[io.doerfler.BashAst.Command]) => io.doerfler.BashAst.Command)
    [error]     Program ~ Arguments ~ optional(PipeConnection) ~> ((bin: String, args: Seq[String], pt: Option[Command]) => Command(bin, args, pt))
    [error]                                                    ^
    What do I do in such a case to find out why this is failing?
    All I am getting is a hugemongous wall of text

    Which starts like this:

    [error] /Users/phi/Dropbox/code/Parser/src/main/scala/io/doerfler/Bashturtle.scala:41:52: overloaded method value apply with alternatives:
    [error]   [G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RR](f: (G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR)(implicit j: org.parboiled2.support.ActionOps.SJoin[G :: H :: I :: J :: K :: L :: M :: N :: O :: P :: Q :: R :: S :: T :: U :: V :: W :: X :: Y :: Z :: shapeless.HNil,shapeless.HNil,RR], implicit c: org.parboiled2.support.FCapture[(G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR])org.parboiled2.Rule[j.In,j.Out] <and>
    [error]   [H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RR](f: (H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR)(implicit j: org.parboiled2.support.ActionOps.SJoin[H :: I :: J :: K :: L :: M :: N :: O :: P :: Q :: R :: S :: T :: U :: V :: W :: X :: Y :: Z :: shapeless.HNil,shapeless.HNil,RR], implicit c: org.parboiled2.support.FCapture[(H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR])org.parboiled2.Rule[j.In,j.Out] <and>
    [error]   [I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RR](f: (I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR)(implicit j: org.parboiled2.support.ActionOps.SJoin[I :: J :: K :: L :: M :: N :: O :: P :: Q :: R :: S :: T :: U :: V :: W :: X :: Y :: Z :: shapeless.HNil,shapeless.HNil,RR], implicit c: org.parboiled2.support.FCapture[(I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR])org.parboiled2.Rule[j.In,j.Out] <and>
    [error]   [J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RR](f: (J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR)(implicit j: org.parboiled2.support.ActionOps.SJoin[J :: K :: L :: M :: N :: O :: P :: Q :: R :: S :: T :: U :: V :: W :: X :: Y :: Z :: shapeless.HNil,shapeless.HNil,RR], implicit c: org.parboiled2.support.FCapture[(J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR])org.parboiled2.Rule[j.In,j.Out] <and>
    [error]   [K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, RR](f: (K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR)(implicit j: org.parboiled2.support.ActionOps.SJoin[K :: L :: M :: N :: O :: P :: Q :: R :: S :: T :: U :: V :: W :: X :: Y :: Z :: shapeless.HNil,shapeless.HNil,RR], implicit c: org.parboiled2.support.FCapture[(K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, String, Seq[String]) => RR])org.parboiled2.Rule[j.In,j.Out] <and>

    and eventually ends in what I posted before

    Philipp Dörfler
    @phdoerfler
    Related question: Can I get rid of that alphabet soup somehow?
    Philipp Dörfler
    @phdoerfler
    ok I solved my problem by doing the old "add type annotations everywhere" dance
    but I really want this huge wall of text to disappear
    makes searching through the compile errors tedious
    Alexander Myltsev
    @alexander-myltsev
    unforturately, not in the current state of parboiled2
    this is how it works
    Philipp Dörfler
    @phdoerfler
    I was afraid the answer would be something like that. Oh well
    At least with the splain plugin some of those errors look a bit more decent
    image.png
    Is there any info on how parboiled2 will be continued in times of scala-meta?
    because goodbye macros
    Alexander Myltsev
    @alexander-myltsev
    I don’t think it would be developed actively. I suppose people choose https://github.com/lihaoyi/fastparse as an alternative
    Philipp Dörfler
    @phdoerfler
    but fastparse is…
    I mean
    no
    just no
    Alexander Myltsev
    @alexander-myltsev
    there are ways to redo parboiled2 preserving same ideas. unfortunately, all of them would consume a lot of time to implement
    Philipp Dörfler
    @phdoerfler
    But I really don't like fastparse
    And parboiled2 is so nice
    Philipp Dörfler
    @phdoerfler
    can't we start a Patreon for parboiled3 or something?
    Alexander Myltsev
    @alexander-myltsev
    there are lots of really nice parsers. for example, have you looked at the Haskell parsers? I see some Haskell compiler ports that should be working on Java
    Philipp Dörfler
    @phdoerfler
    no, haven't seen them. Do you have a link handy?
    Alexander Myltsev
    @alexander-myltsev
    the lang: https://eta-lang.org/
    a parser: http://hackage.haskell.org/package/parsers
    there are lots of them. some should be ported to Eta