debug

parsley.debug
object debug

This module contains the very useful debugging combinator, as well as breakpoints.

Attributes

Source
debug.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
debug.type

Members list

Grouped members

Debug Combinator Extension Methods

These are the debugging combinators, which are enabled by bringing these implicit classes into scope.

implicit class DebugCombinators[P, A](p: P)(implicit con: P => Parsley[A])

This class enables the debug combinator on parsers.

This class enables the debug combinator on parsers.

This extension class operates on values that are convertible to parsers. It enables the use of the debug combinator, which can be used to trace the execution through a parser.

Type parameters

P

the type of base value that this class is used on (the conversion to Parsley) is summoned automatically.

Value parameters

con

a conversion that allows values convertible to parsers to be used.

p

the value that this class is enabling methods on.

Attributes

Constructor

This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.

Source
debug.scala
Supertypes
class Object
trait Matchable
class Any
final implicit def DebugCombinators[P, A](p: P)(implicit con: P => Parsley[A]): DebugCombinators[P, A]

This class enables the debug combinator on parsers.

This class enables the debug combinator on parsers.

This extension class operates on values that are convertible to parsers. It enables the use of the debug combinator, which can be used to trace the execution through a parser.

Type parameters

P

the type of base value that this class is used on (the conversion to Parsley) is summoned automatically.

Value parameters

con

a conversion that allows values convertible to parsers to be used.

p

the value that this class is enabling methods on.

Attributes

Constructor

This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.

Source
debug.scala

Debug Control

These methods can control how the debug mechanism functions in a general way.

This method can be used to disable the coloured debug output for terminals that don't support it.

This method can be used to disable the coloured debug output for terminals that don't support it.

Attributes

Source
debug.scala

Breakpoints

These can be used to control how the debug combinator operates: when a breakpoint is used it can halt the execution of the combinator and print out information about the parsers state.

sealed trait Breakpoint

Base trait for breakpoints.

Base trait for breakpoints.

Attributes

Source
debug.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object EntryBreak.type
object ExitBreak.type
object FullBreak.type
object NoBreak.type
case object EntryBreak extends Breakpoint

Break on entry to the combinator, require user input to advance.

Break on entry to the combinator, require user input to advance.

Attributes

Source
debug.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Breakpoint
class Object
trait Matchable
class Any
Show all
Self type
EntryBreak.type
case object ExitBreak extends Breakpoint

Break on exit to the combinator, require user input to advance.

Break on exit to the combinator, require user input to advance.

Attributes

Source
debug.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Breakpoint
class Object
trait Matchable
class Any
Show all
Self type
ExitBreak.type
case object FullBreak extends Breakpoint

Break on both entry and exit to the combinator, require user input to advance in both cases.

Break on both entry and exit to the combinator, require user input to advance in both cases.

Attributes

Source
debug.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Breakpoint
class Object
trait Matchable
class Any
Show all
Self type
FullBreak.type
case object NoBreak extends Breakpoint

Indicates that no breaking should occur.

Indicates that no breaking should occur.

Attributes

Source
debug.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Breakpoint
class Object
trait Matchable
class Any
Show all
Self type
NoBreak.type

Type members

Classlikes

class Profiler

This class is used to store the profile data for a specific group of sub-parsers.

This class is used to store the profile data for a specific group of sub-parsers.

It records the start and end timestamps of the parsers that interact with it. It is possible to use multiple different profilers if you want to establish the cumulative time for a sub-parser instead of the self-time.

This class is mutable, so care must be taken to call reset() between runs, unless you want to accumulate the data.

Attributes

Since

4.4.0

Source
debug.scala
Supertypes
class Object
trait Matchable
class Any