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
- Source
- Printer.scala
- Graph
-
- Supertypes
- Known subtypes
-
class Fail[Err]class Failed[Err]class ParseRegex[Err]class ParseRegexLastChar[Err]class SkipRegexclass SucceedShow all
- Self type
-
Members list
Value members
Concrete methods
Symbolic alias for repeat0
Symbolic alias for repeat
Symbolic alias for orElseEither
Symbolic alias for orElse
Symbolic alias for zipLeft
Symbolic alias for optional
Provide this printer it's input value
Ignores the printer's result and input and use 'result' and 'value' instead
Ignores the printer's result and input and use 'result' and 'value' instead
Attributes
- Source
- Printer.scala
Surround this printer with 'left' and 'right', each getting Unit as value to be printed.
Surround this printer with 'left' and 'right', each getting Unit as value to be printed.
Attributes
- Source
- Printer.scala
Maps the printer's input value with function 'f'
Maps the printer's result with function 'to' and its input value with 'from'. Both functions can fail the printer.
Maps the printer's result with function 'to' and its input value with 'from'. Both functions can fail the printer.
Attributes
- Source
- Printer.scala
Maps the result of the printer with the function 'to', and the value to be printed with the partial function 'from'. It the partial function is not defined on the value, the printer fails with 'failure'.
Maps the result of the printer with the function 'to', and the value to be printed with the partial function 'from'. It the partial function is not defined on the value, the printer fails with 'failure'.
This can be used to define separate syntaxes for subtypes, that can be later combined.
Attributes
- Source
- Printer.scala
Specifies a filter condition 'condition' that gets checked on both the printed and the result value and in case it evaluates to false, fails with 'failure'.
Specifies a filter condition 'condition' that gets checked on both the printed and the result value and in case it evaluates to false, fails with 'failure'.
Attributes
- Source
- Printer.scala
Concatenates a chunk of string to be printed
Transforms the printer's input from a given case class for a tuple printer
Transforms the printer's input from a given case class for a tuple printer
Attributes
- Source
- package.scala
Maps the error with function 'f'
Print option values
Prints this and if it fails, ignore the printed output and print 'that' instead.
Prints this and if it fails, ignore the printed output and print 'that' instead.
Attributes
- Source
- Printer.scala
Prints this if the input is 'Left', or print 'that' if the input is 'Right'
Prints this if the input is 'Left', or print 'that' if the input is 'Right'
Attributes
- Source
- Printer.scala
Print the given 'value' to the given 'target' implementation
Print the given 'value' to a chunk of output elements
Print the given 'value' to a string
Repeats this printer for each element of the input chunk, assuming it has at least one element
Repeats this printer for each element of the input chunk, assuming it has at least one element
Attributes
- Source
- Printer.scala
Repeats this printer for each element of the input chunk, zero or more times
Repeats this printer for each element of the input chunk, zero or more times
Attributes
- Source
- Printer.scala
Repeat this printer for each element of the input chunk, verifying the 'stopConfition' after each.
Repeat this printer for each element of the input chunk, verifying the 'stopConfition' after each.
Attributes
- Source
- Printer.scala
Repeats this printer for each element of the input chunk, separated by the 'sep' printer (which gets Unit to be printed)
Repeats this printer for each element of the input chunk, separated by the 'sep' printer (which gets Unit to be printed)
Attributes
- Source
- Printer.scala
Repeats this printer for each element of the input chunk that can be empty, separated by the 'sep' printer (which gets Unit to be printed)
Repeats this printer for each element of the input chunk that can be empty, separated by the 'sep' printer (which gets Unit to be printed)
Attributes
- Source
- Printer.scala
Surround this printer with 'other', which will get Unit as value to be printed.
Surround this printer with 'other', which will get Unit as value to be printed.
Attributes
- Source
- Printer.scala
Maps the printer's result with function 'to' and its input value with 'from'. Both functions can fail the printer. Failure is indicated by None on the error channel.
Maps the printer's result with function 'to' and its input value with 'from'. Both functions can fail the printer. Failure is indicated by None on the error channel.
Attributes
- Source
- Printer.scala
Widen this printer's printed value type by specifying a partial function to narrow it back to the set of supported subtypes.
Widen this printer's printed value type by specifying a partial function to narrow it back to the set of supported subtypes.
Attributes
- Source
- Printer.scala
Take a pair to be printed, print the left value with this, and the right value with 'that'. The result is a pair of both printer's results.
Take a pair to be printed, print the left value with this, and the right value with 'that'. The result is a pair of both printer's results.
Attributes
- Source
- package.scala
Print 'that' by providing the unit value to it after printing this. The result is this printer's result.
Print 'that' by providing the unit value to it after printing this. The result is this printer's result.
Attributes
- Source
- Printer.scala
Print this, then print that and use the second printer's result value. Both printers get the same value to be printed.
Print this, then print that and use the second printer's result value. Both printers get the same value to be printed.
Attributes
- Source
- package.scala
Print Unit with this, then print that and use the second printer's result value
Print Unit with this, then print that and use the second printer's result value
Attributes
- Source
- package.scala
Symbolic alias for orElse
Symbolic alias for zip
Symbolic alias for zipRight
Symbolic alias for zipRight
Inherited methods
Prints this and if it fails, ignore the printed output and print 'that' instead.
Prints this and if it fails, ignore the printed output and print 'that' instead.
Attributes
- Inherited from:
- VersionSpecificPrinter
- Source
- VersionSpecificPrinter.scala