Permalink
Browse files

.

  • Loading branch information...
Li Haoyi
Li Haoyi committed Apr 26, 2015
1 parent d3af6f3 commit e642e103e2daa3dbb3df7e3ad20076708759759c
View
@@ -1,17 +1,15 @@
val shared = Seq(
val root = project.in(file(".")).settings(
name := "scala-parser",
libraryDependencies ++= Seq(
"com.lihaoyi" %% "utest" % "0.3.0"
),
organization := "com.lihaoyi",
version := "0.1.4",
scalaVersion := "2.11.6",
crossScalaVersions := Seq("2.11.6", "2.10.5"),
libraryDependencies += "com.lihaoyi" %% "acyclic" % "0.1.2" % "provided",
addCompilerPlugin("com.lihaoyi" %% "acyclic" % "0.1.2"),
autoCompilerPlugins := true,
libraryDependencies ++= Seq(
"com.lihaoyi" %% "utest" % "0.3.0",
"org.parboiled" %% "parboiled" % "2.1.0"
),
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
testFrameworks += new TestFramework("utest.runner.Framework"),
publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"),
@@ -34,4 +32,13 @@ val root = project.in(file(".")).settings(
<url>https://github.com/lihaoyi</url>
</developer>
</developers>
)
val parsing = project.in(file("parsing")).settings(
name := "parsing",
shared
)
val root = project.in(file(".")).settings(
name := "scala-parser",
shared
)
@@ -0,0 +1,10 @@
package parsing
object Parsing {
sealed trait Parser[T]
case class Literal(s: String) extends Parser[String]
case class Regex(re: scala.util.matching.Regex) extends Parser[String]
implicit val stringToLiteral = Literal
implicit val regexToRegex = Regex
def rule[T](p: Parser[T]): Parser[T] = p
}
@@ -0,0 +1,10 @@
package parsing
import utest._
import Parsing._
object ParsingTests extends TestSuite{
val tests = TestSuite{
'hello{
rule("Hello WOrld!")
}
}
}
View
@@ -0,0 +1 @@
sbt.version=0.13.8

0 comments on commit e642e10

Please sign in to comment.