c

akka.parboiled2

ErrorFormatter

class ErrorFormatter extends AnyRef

Abstraction for error formatting logic. Instantiate with a custom configuration or override with custom logic.

Source
ErrorFormatter.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ErrorFormatter
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ErrorFormatter(showExpected: Boolean = true, showPosition: Boolean = true, showLine: Boolean = true, showTraces: Boolean = false, showFrameStartOffset: Boolean = true, expandTabs: Int = -1, traceCutOff: Int = 120)

    showExpected

    whether a description of the expected input is to be shown

    showPosition

    whether the error position is to be shown

    showLine

    whether the input line with a error position indicator is to be shown

    showTraces

    whether the error's rule trace are to be shown

    showFrameStartOffset

    whether formatted traces should include the frame start offset

    expandTabs

    whether and how tabs in the error input line are to be expanded. The value indicates the column multiples that a tab represents (equals the number of spaces that a leading tab is expanded into). Set to a value < 0 to disable tab expansion.

    traceCutOff

    the maximum number of (trailing) characters shown for a rule trace

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from ErrorFormatter to any2stringadd[ErrorFormatter] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (ErrorFormatter, B)
    Implicit
    This member is added by an implicit conversion from ErrorFormatter to ArrowAssoc[ErrorFormatter] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def ensuring(cond: (ErrorFormatter) ⇒ Boolean, msg: ⇒ Any): ErrorFormatter
    Implicit
    This member is added by an implicit conversion from ErrorFormatter to Ensuring[ErrorFormatter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (ErrorFormatter) ⇒ Boolean): ErrorFormatter
    Implicit
    This member is added by an implicit conversion from ErrorFormatter to Ensuring[ErrorFormatter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): ErrorFormatter
    Implicit
    This member is added by an implicit conversion from ErrorFormatter to Ensuring[ErrorFormatter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): ErrorFormatter
    Implicit
    This member is added by an implicit conversion from ErrorFormatter to Ensuring[ErrorFormatter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def expandErrorLineTabs(line: String, errorColumn: Int): (Int, String)

    Performs tab expansion as configured by the expandTabs member.

    Performs tab expansion as configured by the expandTabs member. The errorColumn as well as the returned Int value are both 1-based.

  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def format(sb: StringBuilder, error: ParseError, input: ParserInput): StringBuilder

    Formats the given ParseError into the given StringBuilder using the settings configured for this formatter instance.

  17. def format(error: ParseError, input: ParserInput): String

    Formats the given ParseError into a String using the settings configured for this formatter instance.

  18. def formatAsExpected(trace: RuleTrace): String

    Formats the given trace into an "expected" string.

  19. def formatErrorLine(sb: StringBuilder, error: ParseError, input: ParserInput): StringBuilder

    Formats the input line in which the error occurred and underlines the given error's position in the line with a caret.

  20. def formatErrorLine(error: ParseError, input: ParserInput): String

    Formats the input line in which the error occurred and underlines the given error's position in the line with a caret.

  21. def formatExpected(sb: StringBuilder, error: ParseError): StringBuilder

    Formats what is expected at the error location into the given StringBuilder including text padding.

  22. def formatExpected(error: ParseError): String

    Formats what is expected at the error location into a single line String including text padding.

  23. def formatExpectedAsList(error: ParseError): List[String]

    Formats what is expected at the error location as a List of Strings.

  24. def formatExpectedAsString(sb: StringBuilder, error: ParseError): StringBuilder

    Formats what is expected at the error location into the given StringBuilder.

  25. def formatExpectedAsString(error: ParseError): String

    Formats what is expected at the error location into a single line String.

  26. def formatNonTerminal(nonTerminal: NonTerminal, showFrameStartOffset: Boolean = showFrameStartOffset): String

    Formats the head element of a RuleTrace into a String.

  27. def formatProblem(sb: StringBuilder, error: ParseError, input: ParserInput): StringBuilder

    Formats a description of the error's cause into the given StringBuilder.

  28. def formatProblem(error: ParseError, input: ParserInput): String

    Formats a description of the error's cause into a single line String.

  29. def formatTerminal(terminal: Terminal): String
  30. def formatTrace(trace: RuleTrace, errorIndex: Int): String

    Formats a RuleTrace into a String.

  31. def formatTraces(error: ParseError): String

    Formats a Vector of RuleTrace instances into a String.

  32. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from ErrorFormatter to StringFormat[ErrorFormatter] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  33. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  34. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  35. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  36. def mismatchLength(error: ParseError): Int

    Determines the number of characters to be shown as "mismatched" for the given ParseError.

  37. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  38. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  45. def [B](y: B): (ErrorFormatter, B)
    Implicit
    This member is added by an implicit conversion from ErrorFormatter to ArrowAssoc[ErrorFormatter] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from ErrorFormatter to any2stringadd[ErrorFormatter]

Inherited by implicit conversion StringFormat from ErrorFormatter to StringFormat[ErrorFormatter]

Inherited by implicit conversion Ensuring from ErrorFormatter to Ensuring[ErrorFormatter]

Inherited by implicit conversion ArrowAssoc from ErrorFormatter to ArrowAssoc[ErrorFormatter]

Ungrouped