Skip to main content
Version: 2.x

Introduction to ZIO Parser

Library for constructing parsers and pretty printers based on invertible syntax descriptions

Development CI Badge Sonatype Releases Sonatype Snapshots javadoc ZIO Parser

Introductionโ€‹

ZIO Parser describes a grammar once, as a Syntax, and uses that description in both directions: it parses text into values and prints values back to text. Because one value drives both, a parser and its pretty printer cannot drift apart.

The library gives you small building blocks (characters, strings, regexes), operators to combine them, and error values that say where and why a parse failed.

Installationโ€‹

Add ZIO Parser to your build.sbt. It is published for Scala 2.12, 2.13 and 3.

On the JVM, use %%:

libraryDependencies ++= Seq(
// ZIO Parser: syntaxes, parsers, printers and regexes (JVM)
"dev.zio" %% "zio-parser" % "0.1.13"
)

On Scala.js and Scala Native, use %%%:

libraryDependencies ++= Seq(
// ZIO Parser: syntaxes, parsers, printers and regexes (Scala.js and Scala Native)
"dev.zio" %%% "zio-parser" % "0.1.13"
)

Where to Go Nextโ€‹

ZIO Chat

Hi there! ๐Ÿ‘‹ I'm ZIO Chat, your friendly neighborhood ZIO expert. I'm here to help you navigate the world of ZIO. Whether you're a seasoned pro or just starting out, fire away with your ZIO questions. I will hit you back with the best insights I've got. Let's dive into the world of ZIO together!