parsley.debug

package parsley.debug

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

Attributes

Members list

Packages

Grouped members

(Vanilla) Debug Combinator Extension Methods

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

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
package.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
package.scala

(parsley-debug) Debug Combinators

These are additional debug combinators added by parsley-debug, which allow the attachment of a debug-view, or otherwise use of specialist debuggers like detectDivergence.

object combinator

This object contains the combinators for attaching debuggers to parsers.

This object contains the combinators for attaching debuggers to parsers.

Attributes

Since

5.0.0

Source
combinator.scala
Supertypes
class Object
trait Matchable
class Any
Self type
combinator.type

(parsley-debug) Debug Views

These are implementations of renderers for debug traces for parsley-debug.

sealed trait DebugView

A common interface for a rendering view for a debugger to present the debug tree.

A common interface for a rendering view for a debugger to present the debug tree. Inherit from one of the two provided subtraits to use.

Any compliant implementation that handles all nodes of a parsley.debugger.DebugTree can be used in place of any other implementation (e.g. a serialiser to JSON, a GUI, etc.).

If a view is reusable, one can implement it as either an object or a class, but an object is recommended. Either way, it should inherit DebugView.Reusable.

If a view is single-use (e.g. it has some non-reusable state), never implement it as an object. Always implement single-use views as a class of some sort inheriting from DebugView.SingleUse.

Attributes

Since

5.0.0

Companion
object
Source
DebugView.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Reusable
object PrintView
trait SingleUse
object DebugView

Attributes

Companion
trait
Source
DebugView.scala
Supertypes
class Object
trait Matchable
class Any
Self type
DebugView.type
object PrintView extends Reusable

A (reusable) pretty-printer for the debugger which outputs to the console.

A (reusable) pretty-printer for the debugger which outputs to the console.

It is recommended that all memory-heavy types (e.g. closures) are not stored explicitly. Consult the documentation on attaching debuggers to find out how to prevent that.

Attributes

Since

5.0.0

Source
PrintView.scala
Supertypes
trait Reusable
trait DebugView
class Object
trait Matchable
class Any
Self type
PrintView.type

(Vanilla) Debug Control

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

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

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

Attributes

Source
package.scala

(Vanilla) 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
Breakpoint.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object EntryBreak
object ExitBreak
object FullBreak
object NoBreak
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
Breakpoint.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
Breakpoint.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
Breakpoint.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
Breakpoint.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
Profiler.scala
Supertypes
class Object
trait Matchable
class Any