Skip to content

readme updates, post-2.0.0 #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# scala-parser-combinators

[<img src="https://img.shields.io/travis/scala/scala-parser-combinators.svg"/>](https://travis-ci.org/scala/scala-parser-combinators)
[<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-parser-combinators_2.11.svg?label=latest%20release%20for%202.11"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-parser-combinators_2.11)
[<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-parser-combinators_2.12.svg?label=latest%20release%20for%202.12"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-parser-combinators_2.12)
[<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-parser-combinators_2.13.svg?label=latest%20release%20for%202.13"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-parser-combinators_2.13)
[<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-parser-combinators_3.svg?label=latest%20release%20for%203"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-parser-combinators_3)

### Scala Standard Parser Combinator Library

This library was originally part of the Scala standard library, but is now community-maintained, under the guidance of the Scala team at Lightbend. If you are interested in helping please contact [@Philippus](https://github.com/philippus) or [@SethTisue](https://github.com/SethTisue).

The latest stable release is 1.1.2.

The 1.2.0-RCx series supports Scala 3.
The latest stable release is 2.0.0.

## Documentation

* [Current API](https://javadoc.io/page/org.scala-lang.modules/scala-parser-combinators_2.12/latest/scala/util/parsing/combinator/index.html)
* [Current API](https://javadoc.io/page/org.scala-lang.modules/scala-parser-combinators_2.13/latest/scala/util/parsing/combinator/index.html)
* The [Getting Started](docs/Getting_Started.md) guide
* A more complicated example, [Building a lexer and parser with Scala's Parser Combinators](https://enear.github.io/2016/03/31/parser-combinators/)
* "Combinator Parsing", chapter 33 of [_Programming in Scala, Third Edition_](http://www.artima.com/shop/programming_in_scala), shows how to apply this library to e.g. parsing of arithmetic expressions. The second half of the chapter examines how the library is implemented.
Expand All @@ -24,7 +22,7 @@ The 1.2.0-RCx series supports Scala 3.
To depend on scala-parser-combinators in sbt, add something like this to your build.sbt:

```
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "2.0.0"
```

To support multiple Scala versions, see the example in [scala/scala-module-dependency-sample](https://github.com/scala/scala-module-dependency-sample).
Expand All @@ -34,7 +32,7 @@ To support multiple Scala versions, see the example in [scala/scala-module-depen
Scala-parser-combinators is also available for Scala.js and Scala Native:

```
libraryDependencies += "org.scala-lang.modules" %%% "scala-parser-combinators" % "1.1.2"
libraryDependencies += "org.scala-lang.modules" %%% "scala-parser-combinators" % "2.0.0"
```

## Example
Expand Down
15 changes: 10 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor
.settings(
ScalaModulePlugin.scalaModuleSettings,
name := "scala-parser-combinators",

// once https://github.com/lightbend/mima/issues/630 is fixed and sbt-scala-module
// adopts the fixed version, we'll be able to just do:
// scalaModuleMimaPreviousVersion := Some("2.0.0"),
// but for the time being we must still:
scalaModuleMimaPreviousVersion := (CrossVersion.partialVersion(scalaVersion.value) match {
// pending resolution of https://github.com/scalacenter/sbt-version-policy/issues/62
case Some((3, _)) => None
case _ => Some("1.2.0-RC1")
}),
// pending resolution of https://github.com/scalacenter/sbt-version-policy/issues/62
case Some((3, _)) => None
case _ => Some("1.2.0-RC1")
}),

libraryDependencies += "junit" % "junit" % "4.13.2" % Test,
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
// so we can `@nowarn` in test code, but only in test code, so the dependency
// doesn't leak downstream
// doesn't leak downstream. can be dropped when we drop 2.11 from the crossbuild
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.4" % Test,

apiMappings ++= scalaInstance.value.libraryJars.collect {
Expand Down