Source

Nomo / src / main / scala / nomo / Main.scala

Full commit
package nomo

import nomo.Errors._

object ParserMain { 
  
  def main(args: Array[String]) = {
    implicit val U: Unit = ()

    val P = Parsers(Monotypic.String, Errors.tree[Char], Accumulators.position[Unit](4))
    import P._
    import Errors.msg
    import Accumulators.Position
    println {
      unit(42)
    }
    println {
      unit(None)("")
    }
    println {
      word("k").optional("")
    }
    println {
      val s = List.fill(10000)('a').mkString
      val p = word(s)// single('a').many
      p(s).get
      // p(List.fill(10000)("a").mkString).get == List.fill(10000)('a')
    }
  }
}