zio.parser

package zio.parser

Members list

Packages

Type members

Classlikes

final implicit class AnyParserOps[Err, In](self: Parser[Err, In, Any]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class AnySyntaxOps[Err, In, Out](self: Syntax[Err, In, Out, Unit]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Macros

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Macros.type
sealed trait Parser[+Err, -In, +Result] extends VersionSpecificParser[Err, In, Result]

A Parser consumes a stream of 'In's and either fails with a ParserError possibly holding a custom error of type 'Err' or succeeds with a result of type Result

A Parser consumes a stream of 'In's and either fails with a ParserError possibly holding a custom error of type 'Err' or succeeds with a result of type Result

Parsers can be combined with Printers to get Syntax, or a Parser and a Printer can be built simultaneously by using the combinators of Syntax.

Recursive parsers can be expressed directly by recursing in one of the zipping or or-else combinators.

By default a parser backtracks automatically. This behavior can be changed with the 'manualBacktracking' operator.

Parsers trees get optimized automatically before running the parser. This optimized tree can be examined by the 'optimized' field. For the full list of transformations performed in the optimization phase check each parser node's 'optimizeNode' method.

Type parameters

Err

Custom error type

In

Element type of the input stream of parsing

Result

The type of the parsed result value

Attributes

Companion
object
Supertypes
trait VersionSpecificParser[Err, In, Result]
class Object
trait Matchable
class Any
Known subtypes
class Backtrack[Err, In, Result]
class CaptureString[Err, Err2]
object End
class Fail[Err]
class Failed[Err]
class FlatMap[Err, Err2, In, In2, Result, Result2]
class Ignore[Err, Err2, In, Result, Result2]
object Index
class Lazy[Err, In, Result]
class MapError[Err, Err2, In, Result]
class Named[Err, In, Result]
class Not[Err, In]
class Optional[Err, In, Result]
class OrElse[Err, Err2, In, In2, Result, Result2]
class OrElseEither[Err, Err2, In, In2, Result, Result2]
class ParseRegex[Err]
class ParseRegexLastChar[Err]
class Passthrough[D1, D2]
class Repeat[Err, In, Result]
class SetAutoBacktrack[Err, In, Result]
class SkipRegex[Err]
class Succeed[Result]
class Transform[Err, Err2, In, Result, Result2]
class TransformEither[Err, Err2, In, Result, Result2]
class Zip[Err, Err2, In, In2, Result, Result2, ZippedResult]
class ZipLeft[Err, Err2, In, In2, Result]
class ZipRight[Err, Err2, In, In2, Result, Result2]
Show all
Self type
Parser[Err, In, Result]
object Parser

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Parser.type
sealed trait ParserImplementation

The available parser implementations

The available parser implementations

The default parser implementation is Recursive. There is an alternative implementation available which is stack-safe but slower.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Recursive
object StackSafe

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final implicit class ParserOps[Err, In, Value](self: Parser[Err, In, Value]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
sealed trait Printer[+Err, +Out, -Value] extends VersionSpecificPrinter[Err, Out, Value]

A Printer takes a value of type 'Value' and either produces a stream of 'Out' elements and a result value of type 'Result', or fails with a custom error of type 'Err'.

A Printer takes a value of type 'Value' and either produces a stream of 'Out' elements and a result value of type 'Result', or fails with a custom error of type 'Err'.

Parsers can be combined with Printers to get Syntax, or a Parser and a Printer can be built simultaneously by using the combinators of Syntax.

Type parameters

Err

Custom error type

Out

Element type of the output stream of printing

Value

The type of the value to be printed

Attributes

Companion
object
Supertypes
trait VersionSpecificPrinter[Err, Out, Value]
class Object
trait Matchable
class Any
Known subtypes
class Contramap[Err, Err2, Out, Value2, Value]
class ContramapEither[Err, Err2, Out, Value2, Value]
class Fail[Err]
class Failed[Err]
class FlatMapValue[Err, Out, Value]
class Ignore[Err, Out, Value, Value2]
class Lazy[Err, Out, Value]
class MapError[Err, Err2, Out, Value]
class Optional[Err, Out, Value]
class OrElse[Err, Err2, Out, Out2, Value2, Value]
class OrElseEither[Err, Err2, Out, Out2, Value2, Value]
class ParseRegex[Err]
class ParseRegexLastChar[Err]
class Passthrough[Value, Result]
class ProvideValue[Err, Out, Value]
class Repeat[Err, Out, Value]
class SkipRegex
class Succeed
class Zip[Err, Err2, Out, Out2, Value2, Value, ZippedValue]
class ZipLeft[Err, Err2, Out, Out2, Value2, Value]
class ZipRight[Err, Err2, Out, Out2, Value2, Value]
Show all
Self type
Printer[Err, Out, Value]
object Printer

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Printer.type
final implicit class PrinterOps[Err, Out, Value](self: Printer[Err, Out, Value]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
sealed trait Regex

A model of a regular expression.

A model of a regular expression.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
object Regex

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Regex.type
final implicit class StringErrSyntaxOps[In, Out, Value](self: Syntax[String, In, Out, Value]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final case class StringParserError[+Err](input: String, error: ParserError[Err])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class Syntax[+Err, -In, +Out, Value] extends VersionSpecificSyntax[Err, In, Out, Value]

Syntax defines a parser and a printer together and provides combinators to simultaneously build them up from smaller syntax fragments.

Syntax defines a parser and a printer together and provides combinators to simultaneously build them up from smaller syntax fragments.

Type parameters

Err

Custom error type

In

Element type of the input stream of parsing

Out

Element type of the output stream of printing

Value

The type of the value to be parsed or printed

Attributes

Companion
object
Supertypes
trait VersionSpecificSyntax[Err, In, Out, Value]
class Object
trait Matchable
class Any
Self type
Syntax[Err, In, Out, Value]

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Syntax.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Syntax
implicit class SyntaxOps[Err, In, Out, Value](self: Syntax[Err, In, Out, Value])

Attributes

Supertypes
class Object
trait Matchable
class Any
trait TupleConversion[A, B]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class TupleConversionImpl[A, B]

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class TupleConversionImpl[A, B](_to: A => B, _from: B => A) extends TupleConversion[A, B]

Attributes

Supertypes
trait TupleConversion[A, B]
class Object
trait Matchable
class Any
final implicit class TupleParserOps[Err, In, Result](self: Parser[Err, In, Result]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
implicit class TuplePrinterOps[Err, Out, Value <: Product](self: Printer[Err, Out, Value])

Attributes

Supertypes
class Object
trait Matchable
class Any
final implicit class UnitPrinterOps[Err, Out](self: Printer[Err, Out, Unit]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
trait VersionSpecificParser[+Err, -In, +Result]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Parser[Err, In, Result]
class Backtrack[Err, In, Result]
class CaptureString[Err, Err2]
object End
class Fail[Err]
class Failed[Err]
class FlatMap[Err, Err2, In, In2, Result, Result2]
class Ignore[Err, Err2, In, Result, Result2]
object Index
class Lazy[Err, In, Result]
class MapError[Err, Err2, In, Result]
class Named[Err, In, Result]
class Not[Err, In]
class Optional[Err, In, Result]
class OrElse[Err, Err2, In, In2, Result, Result2]
class OrElseEither[Err, Err2, In, In2, Result, Result2]
class ParseRegex[Err]
class ParseRegexLastChar[Err]
class Passthrough[D1, D2]
class Repeat[Err, In, Result]
class SetAutoBacktrack[Err, In, Result]
class SkipRegex[Err]
class Succeed[Result]
class Transform[Err, Err2, In, Result, Result2]
class TransformEither[Err, Err2, In, Result, Result2]
class Zip[Err, Err2, In, In2, Result, Result2, ZippedResult]
class ZipLeft[Err, Err2, In, In2, Result]
class ZipRight[Err, Err2, In, In2, Result, Result2]
Show all
Self type
Parser[Err, In, Result]
trait VersionSpecificPrinter[+Err, +Out, -Value]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Printer[Err, Out, Value]
class Contramap[Err, Err2, Out, Value2, Value]
class ContramapEither[Err, Err2, Out, Value2, Value]
class Fail[Err]
class Failed[Err]
class FlatMapValue[Err, Out, Value]
class Ignore[Err, Out, Value, Value2]
class Lazy[Err, Out, Value]
class MapError[Err, Err2, Out, Value]
class Optional[Err, Out, Value]
class OrElse[Err, Err2, Out, Out2, Value2, Value]
class OrElseEither[Err, Err2, Out, Out2, Value2, Value]
class ParseRegex[Err]
class ParseRegexLastChar[Err]
class Passthrough[Value, Result]
class ProvideValue[Err, Out, Value]
class Repeat[Err, Out, Value]
class SkipRegex
class Succeed
class Zip[Err, Err2, Out, Out2, Value2, Value, ZippedValue]
class ZipLeft[Err, Err2, Out, Out2, Value2, Value]
class ZipRight[Err, Err2, Out, Out2, Value2, Value]
Show all
Self type
Printer[Err, Out, Value]
trait VersionSpecificSyntax[+Err, -In, +Out, Value]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Syntax[Err, In, Out, Value]
Self type
Syntax[Err, In, Out, Value]

Givens

Inherited givens

inline given autoTupleConversion[Prod <: Product](using m: ProductOf[Prod]): TupleConversion[Prod, m.MirroredElemTypes]

Attributes

Inherited from:
ImplicitTupleConversion
inline given autoTupleConversion1[Prod <: Product, A](using c: TupleConversion[Prod, Tuple1[A]]): TupleConversion[Prod, A]

Attributes

Inherited from:
ImplicitTupleConversion

Implicits

Implicits

final implicit def AnyParserOps[Err, In](self: Parser[Err, In, Any]): AnyParserOps[Err, In]
final implicit def AnySyntaxOps[Err, In, Out](self: Syntax[Err, In, Out, Unit]): AnySyntaxOps[Err, In, Out]
final implicit def ParserOps[Err, In, Value](self: Parser[Err, In, Value]): ParserOps[Err, In, Value]
final implicit def PrinterOps[Err, Out, Value](self: Printer[Err, Out, Value]): PrinterOps[Err, Out, Value]
final implicit def StringErrSyntaxOps[In, Out, Value](self: Syntax[String, In, Out, Value]): StringErrSyntaxOps[In, Out, Value]
final implicit def SyntaxOps[Err, In, Out, Value](self: Syntax[Err, In, Out, Value]): SyntaxOps[Err, In, Out, Value]
final implicit def TupleParserOps[Err, In, Result](self: Parser[Err, In, Result]): TupleParserOps[Err, In, Result]
final implicit def TuplePrinterOps[Err, Out, Value <: Product](self: Printer[Err, Out, Value]): TuplePrinterOps[Err, Out, Value]
final implicit def UnitPrinterOps[Err, Out](self: Printer[Err, Out, Unit]): UnitPrinterOps[Err, Out]