Skip to content

Commit

Permalink
full passing tests using 2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
SwiftEngineer committed Dec 29, 2019
1 parent 28609ea commit 4c79d22
Show file tree
Hide file tree
Showing 33 changed files with 402 additions and 55 deletions.
334 changes: 334 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -3,7 +3,8 @@ language: scala

scala:
- 2.11.12
- 2.12.6
- 2.12.8
- 2.13.1

script:
- sbt ++$TRAVIS_SCALA_VERSION ci
Expand Down
13 changes: 9 additions & 4 deletions build.sbt
Expand Up @@ -22,11 +22,14 @@ addCommandAlias("measure-all", "benchmarks/jmh:run -rff results.csv")
addCommandAlias("measure", "benchmarks/jmh:run -rff results.csv .*parsebackRun")
addCommandAlias("profile", "benchmarks/jmh:run -prof jmh.extras.JFR -f 1 .*parsebackRun")

publishGithubUser in ThisBuild := "djspiewak"
publishFullName in ThisBuild := "Daniel Spiewak"

lazy val root = project
.in(file("."))
.settings(name := "root")
.settings(noPublishSettings)
.aggregate(benchmarks, coreJVM, coreJS)
.aggregate(coreJVM, coreJS)

lazy val benchmarks = project
.in(file("benchmarks"))
Expand All @@ -41,15 +44,17 @@ lazy val benchmarks = project
.settings(noPublishSettings)
.enablePlugins(JmhPlugin)

lazy val core = crossProject
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

lazy val core = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("core"))
.settings(
name := "parseback")
.settings(
libraryDependencies += "org.typelevel" %%% "cats-core" % "1.1.0",
libraryDependencies += "org.typelevel" %%% "cats-core" % "2.1.0",
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.13.4" % Test,
"org.scalacheck" %% "scalacheck" % "1.14.2" % Test,
"org.specs2" %% "specs2-core" % Versions.Specs % Test,
"org.specs2" %% "specs2-scalacheck" % Versions.Specs % Test),
initialCommands := "import parseback._",
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/Line.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/LineStream.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/MemoTable.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/Nullable.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/ParseError.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/Results.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/Whitespace.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/ast/nodes.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/ast/package.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/ast/precedence.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/package.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/parsers.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/render/RenderResult.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/render/Renderer.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/render/package.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/parseback/util/Catenable.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/parseback/ArithmeticSpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@

package parseback

object ArithmeticSpec extends ParsebackSpec {
class ArithmeticSpec extends ParsebackSpec {
import ParseError._

"expression evaluator" should {
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/parseback/CompoundParserSpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@

package parseback

object CompoundParserSpec extends ParsebackSpec {
class CompoundParserSpec extends ParsebackSpec {
import ParseError._

"compound non-terminal parsers" should {
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/parseback/EBNFSpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@

package parseback

object EBNFSpec extends ParsebackSpec {
class EBNFSpec extends ParsebackSpec {
import ParseError._

"p?" should {
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/parseback/ErrorSpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@ package parseback

import org.specs2.mutable._

object ErrorSpec extends Specification {
class ErrorSpec extends Specification {
import ParseError._

"error rendering" should {
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/parseback/LineSpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@ package parseback

import org.specs2.mutable._

object LineSpec extends Specification {
class LineSpec extends Specification {

"line rendering" should {
"basically work" in {
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/parseback/NullabilitySpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@

package parseback

object NullabilitySpec extends ParsebackSpec {
class NullabilitySpec extends ParsebackSpec {

"non-recursive nullability" should {
"handle sequence by conjunction" in {
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/scala/parseback/ParsebackSpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/parseback/RegexSpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@

package parseback

object RegexSpec extends ParsebackSpec {
class RegexSpec extends ParsebackSpec {

"regex parsing" should {
"consume an integer literal" in {
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/parseback/SimpleParserSpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@

package parseback

object SimpleParserSpec extends ParsebackSpec {
class SimpleParserSpec extends ParsebackSpec {
import ParseError._

"parentheses parser" should {
Expand Down
20 changes: 10 additions & 10 deletions core/src/test/scala/parseback/ast/FilterSpecs.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@
package parseback
package ast

object FilterSpecs extends ParsebackSpec {
class FilterSpecs extends ParsebackSpec {

implicit val W = Whitespace("" | """\s+""".r)

Expand Down Expand Up @@ -171,42 +171,42 @@ object FilterSpecs extends ParsebackSpec {

case class Add(left: Expr, right: Expr) extends Expr with BinaryNode {
val assocLeft = true
val sym = 'add
val sym: Symbol = Symbol("add")
}

case class AddRight(left: Expr, right: Expr) extends Expr with BinaryNode {
val assocLeft = false
val sym = 'add
val sym: Symbol = Symbol("add")
}

case class Sub(left: Expr, right: Expr) extends Expr with BinaryNode {
val assocLeft = true
val sym = 'sub
val sym: Symbol = Symbol("sub")
}

case class Mul(left: Expr, right: Expr) extends Expr with BinaryNode {
val assocLeft = true
val sym = 'mul
val sym: Symbol = Symbol("mul")
}

case class Div(left: Expr, right: Expr) extends Expr with BinaryNode {
val assocLeft = true
val sym = 'div
val sym: Symbol = Symbol("div")
}

case class Neg(child: Expr) extends Expr with UnaryNode {
val isPrefix = true
val sym = 'neg
val sym: Symbol = Symbol("neg")
}

case class Comp2(child: Expr) extends Expr with UnaryNode {
val isPrefix = true
val sym = 'comp
val sym: Symbol = Symbol("comp")
}

case class Comp(child: Expr) extends Expr with UnaryNode {
val isPrefix = false
val sym = 'comp
val sym: Symbol = Symbol("comp")
}

case class IntLit(i: Int) extends Expr with LeafNode
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/parseback/util/CatenableSpec.scala
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Daniel Spiewak
* Copyright 2019 Daniel Spiewak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,7 @@ import org.specs2.mutable._
import org.specs2.ScalaCheck
import org.scalacheck._

object CatenableSpec extends Specification with ScalaCheck {
class CatenableSpec extends Specification with ScalaCheck {
import Catenable.{+:, Syntax}
import Prop._

Expand Down
2 changes: 1 addition & 1 deletion project/Versions.scala
@@ -1,3 +1,3 @@
object Versions {
val Specs = "4.0.2"
val Specs = "4.8.0"
}
2 changes: 1 addition & 1 deletion project/build.properties
@@ -1 +1 @@
sbt.version=1.1.1
sbt.version=1.3.2

0 comments on commit 4c79d22

Please sign in to comment.