Class

org.parboiled2

ErrorFormatter

Related Doc: package parboiled2

Permalink

class ErrorFormatter extends AnyRef

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

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ErrorFormatter
  2. AnyRef
  3. Any
  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)

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def expandErrorLineTabs(line: String, errorColumn: Int): (Int, String)

    Permalink

    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.

  9. def finalize(): Unit

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

    Permalink

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

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

    Permalink

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

  12. def formatAsExpected(trace: RuleTrace): String

    Permalink

    Formats the given trace into an "expected" string.

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

  16. def formatExpected(error: ParseError): String

    Permalink

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

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

    Permalink

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

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

    Permalink

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

  19. def formatExpectedAsString(error: ParseError): String

    Permalink

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

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

    Permalink

    Formats the head element of a RuleTrace into a String.

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

    Permalink

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

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

    Permalink

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

  23. def formatTerminal(terminal: Terminal): String

    Permalink
  24. def formatTrace(trace: RuleTrace, errorIndex: Int): String

    Permalink

    Formats a RuleTrace into a String.

  25. def formatTraces(error: ParseError): String

    Permalink

    Formats a Vector of RuleTrace instances into a String.

  26. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. def mismatchLength(error: ParseError): Int

    Permalink

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

  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped