o

fpinscalalib

ParserCombinatorsSection

object ParserCombinatorsSection extends AnyFlatSpec with Matchers with Section with ReferenceHelper

Linear Supertypes
ReferenceHelper, Section, Matchers, Explicitly, MatcherWords, Tolerance, AnyFlatSpec, AnyFlatSpecLike, Documenting, Alerting, Notifying, Informing, CanVerb, MustVerb, ShouldVerb, TestRegistration, TestSuite, Suite, Serializable, Assertions, TripleEquals, TripleEqualsSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParserCombinatorsSection
  2. ReferenceHelper
  3. Section
  4. Matchers
  5. Explicitly
  6. MatcherWords
  7. Tolerance
  8. AnyFlatSpec
  9. AnyFlatSpecLike
  10. Documenting
  11. Alerting
  12. Notifying
  13. Informing
  14. CanVerb
  15. MustVerb
  16. ShouldVerb
  17. TestRegistration
  18. TestSuite
  19. Suite
  20. Serializable
  21. Assertions
  22. TripleEquals
  23. TripleEqualsSupport
  24. AnyRef
  25. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class AWord extends AnyRef
    Definition Classes
    Matchers
  2. final class AnWord extends AnyRef
    Definition Classes
    Matchers
  3. sealed class AnyShouldWrapper[T] extends AnyRef
    Definition Classes
    Matchers
  4. final class BehaviorWord extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  5. class CheckingEqualizer[L] extends AnyRef
    Definition Classes
    TripleEqualsSupport
  6. sealed class Collected extends Serializable
    Attributes
    protected
    Definition Classes
    Matchers
  7. class DecidedByEquality[A] extends Equality[A]
    Definition Classes
    Explicitly
  8. class DecidedWord extends AnyRef
    Definition Classes
    Explicitly
  9. class DeterminedByEquivalence[T] extends Equivalence[T]
    Definition Classes
    Explicitly
  10. class DeterminedWord extends AnyRef
    Definition Classes
    Explicitly
  11. class Equalizer[L] extends AnyRef
    Definition Classes
    TripleEqualsSupport
  12. final class HavePropertyMatcherGenerator extends AnyRef
    Definition Classes
    Matchers
  13. final class IgnoreVerbString extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  14. final class IgnoreVerbStringTaggedAs extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  15. final class IgnoreWord extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  16. final class InAndIgnoreMethods extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  17. final class InAndIgnoreMethodsAfterTaggedAs extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  18. final class ItVerbString extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  19. final class ItVerbStringTaggedAs extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  20. final class ItWord extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  21. final class KeyWord extends AnyRef
    Definition Classes
    Matchers
  22. trait NoArgTest extends () => Outcome with TestData
    Attributes
    protected
    Definition Classes
    TestSuite
  23. final class PlusOrMinusWrapper[T] extends AnyRef
    Definition Classes
    Tolerance
  24. final class RegexWord extends AnyRef
    Definition Classes
    Matchers
  25. final class RegexWrapper extends AnyRef
    Definition Classes
    Matchers
  26. class ResultOfBeWordForAny[T] extends AnyRef
    Definition Classes
    Matchers
  27. sealed class ResultOfBeWordForCollectedAny[T] extends AnyRef
    Definition Classes
    Matchers
  28. final class ResultOfBeWordForCollectedArray[T] extends ResultOfBeWordForCollectedAny[Array[T]]
    Definition Classes
    Matchers
  29. final class ResultOfCollectedAny[T] extends AnyRef
    Definition Classes
    Matchers
  30. final class ResultOfContainWordForCollectedAny[T] extends AnyRef
    Definition Classes
    Matchers
  31. final class ResultOfEndWithWordForCollectedString extends AnyRef
    Definition Classes
    Matchers
  32. final class ResultOfEndWithWordForString extends AnyRef
    Definition Classes
    Matchers
  33. final class ResultOfFullyMatchWordForCollectedString extends AnyRef
    Definition Classes
    Matchers
  34. final class ResultOfFullyMatchWordForString extends AnyRef
    Definition Classes
    Matchers
  35. final class ResultOfHaveWordForCollectedExtent[A] extends AnyRef
    Definition Classes
    Matchers
  36. final class ResultOfHaveWordForExtent[A] extends AnyRef
    Definition Classes
    Matchers
  37. final class ResultOfIncludeWordForCollectedString extends AnyRef
    Definition Classes
    Matchers
  38. final class ResultOfIncludeWordForString extends AnyRef
    Definition Classes
    Matchers
  39. final class ResultOfNotWordForCollectedAny[T] extends AnyRef
    Definition Classes
    Matchers
  40. final class ResultOfStartWithWordForCollectedString extends AnyRef
    Definition Classes
    Matchers
  41. final class ResultOfStartWithWordForString extends AnyRef
    Definition Classes
    Matchers
  42. trait StringCanWrapperForVerb extends AnyRef
    Definition Classes
    CanVerb
  43. trait StringMustWrapperForVerb extends AnyRef
    Definition Classes
    MustVerb
  44. final class StringShouldWrapper extends AnyShouldWrapper[String] with org.scalatest.matchers.should.Matchers.StringShouldWrapperForVerb
    Definition Classes
    Matchers
  45. trait StringShouldWrapperForVerb extends AnyRef
    Definition Classes
    ShouldVerb
  46. class TheAfterWord extends AnyRef
    Definition Classes
    Explicitly
  47. final class TheSameInstanceAsPhrase extends AnyRef
    Definition Classes
    Matchers
  48. final class TheyVerbString extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  49. final class TheyVerbStringTaggedAs extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  50. final class TheyWord extends AnyRef
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  51. final class ValueWord extends AnyRef
    Definition Classes
    Matchers

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. def !==[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
    Definition Classes
    TripleEqualsSupport
  3. def !==(right: Null): TripleEqualsInvocation[Null]
    Definition Classes
    TripleEqualsSupport
  4. def !==[T](right: T): TripleEqualsInvocation[T]
    Definition Classes
    TripleEqualsSupport
  5. final def ##: Int
    Definition Classes
    AnyRef → Any
  6. def <[T](right: T)(implicit arg0: Ordering[T]): ResultOfLessThanComparison[T]
    Definition Classes
    Matchers
  7. def <=[T](right: T)(implicit arg0: Ordering[T]): ResultOfLessThanOrEqualToComparison[T]
    Definition Classes
    Matchers
  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def ===[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
    Definition Classes
    TripleEqualsSupport
  10. def ===(right: Null): TripleEqualsInvocation[Null]
    Definition Classes
    TripleEqualsSupport
  11. def ===[T](right: T): TripleEqualsInvocation[T]
    Definition Classes
    TripleEqualsSupport
  12. def >[T](right: T)(implicit arg0: Ordering[T]): ResultOfGreaterThanComparison[T]
    Definition Classes
    Matchers
  13. def >=[T](right: T)(implicit arg0: Ordering[T]): ResultOfGreaterThanOrEqualToComparison[T]
    Definition Classes
    Matchers
  14. def a[T](implicit arg0: ClassTag[T]): ResultOfATypeInvocation[T]
    Definition Classes
    Matchers
  15. val a: AWord
    Definition Classes
    Matchers
  16. val after: TheAfterWord
    Definition Classes
    Explicitly
  17. def alert: Alerter
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike → Alerting
  18. def all(xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  19. def all[K, V, JMAP[k, v] <: Map[k, v]](xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  20. def all[K, V, MAP[k, v] <: GenMap[k, v]](xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  21. def all[E, C[_]](xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  22. def allElementsOf[R](elements: GenTraversable[R]): ResultOfAllElementsOfApplication
    Definition Classes
    Matchers
  23. def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfAllOfApplication
    Definition Classes
    Matchers
  24. def an[T](implicit arg0: ClassTag[T]): ResultOfAnTypeInvocation[T]
    Definition Classes
    Matchers
  25. val an: AnWord
    Definition Classes
    Matchers
  26. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  27. macro def assert(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  28. macro def assert(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  29. macro def assertCompiles(code: String)(implicit pos: Position): Assertion
    Definition Classes
    Assertions
  30. macro def assertDoesNotCompile(code: String)(implicit pos: Position): Assertion
    Definition Classes
    Assertions
  31. def assertResult(expected: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  32. def assertResult(expected: Any, clue: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  33. def assertThrows[T <: AnyRef](f: => Any)(implicit classTag: ClassTag[T], pos: Position): Assertion
    Definition Classes
    Assertions
  34. macro def assertTypeError(code: String)(implicit pos: Position): Assertion
    Definition Classes
    Assertions
  35. macro def assume(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  36. macro def assume(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  37. def atLeast(num: Int, xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  38. def atLeast[K, V, JMAP[k, v] <: Map[k, v]](num: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  39. def atLeast[K, V, MAP[k, v] <: GenMap[k, v]](num: Int, xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  40. def atLeast[E, C[_]](num: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  41. def atLeastOneElementOf(elements: GenTraversable[Any]): ResultOfAtLeastOneElementOfApplication
    Definition Classes
    Matchers
  42. def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfAtLeastOneOfApplication
    Definition Classes
    Matchers
  43. def atMost(num: Int, xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  44. def atMost[K, V, JMAP[k, v] <: Map[k, v]](num: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  45. def atMost[K, V, MAP[k, v] <: GenMap[k, v]](num: Int, xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  46. def atMost[E, C[_]](num: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  47. def atMostOneElementOf[R](elements: GenTraversable[R]): ResultOfAtMostOneElementOfApplication
    Definition Classes
    Matchers
  48. def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfAtMostOneOfApplication
    Definition Classes
    Matchers
  49. val be: BeWord
    Definition Classes
    MatcherWords
  50. val behave: BehaveWord
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  51. val behavior: BehaviorWord
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  52. def between(from: Int, upTo: Int, xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  53. def between[K, V, JMAP[k, v] <: Map[k, v]](from: Int, upTo: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  54. def between[E, C[_]](from: Int, upTo: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  55. def cancel(cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  56. def cancel(message: String, cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  57. def cancel(message: String)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  58. def cancel()(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  59. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  60. val compile: CompileWord
    Definition Classes
    MatcherWords
  61. val contain: ContainWord
    Definition Classes
    MatcherWords
  62. def convertEquivalenceToAToBConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: <:<[A, B]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  63. def convertEquivalenceToBToAConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: <:<[B, A]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  64. implicit def convertNumericToPlusOrMinusWrapper[T](pivot: T)(implicit arg0: Numeric[T]): PlusOrMinusWrapper[T]
    Definition Classes
    Tolerance
  65. implicit def convertSymbolToHavePropertyMatcherGenerator(symbol: Symbol)(implicit prettifier: Prettifier, pos: Position): HavePropertyMatcherGenerator
    Definition Classes
    Matchers
  66. implicit def convertToAnyShouldWrapper[T](o: T)(implicit pos: Position, prettifier: Prettifier): AnyShouldWrapper[T]
    Definition Classes
    Matchers
  67. def convertToCheckingEqualizer[T](left: T): CheckingEqualizer[T]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  68. implicit def convertToEqualizer[T](left: T): Equalizer[T]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  69. implicit def convertToInAndIgnoreMethods(resultOfStringPassedToVerb: ResultOfStringPassedToVerb): InAndIgnoreMethods
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  70. implicit def convertToInAndIgnoreMethodsAfterTaggedAs(resultOfTaggedAsInvocation: ResultOfTaggedAsInvocation): InAndIgnoreMethodsAfterTaggedAs
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  71. implicit def convertToRegexWrapper(o: Regex): RegexWrapper
    Definition Classes
    Matchers
  72. implicit def convertToStringCanWrapper(o: String)(implicit position: Position): StringCanWrapperForVerb
    Definition Classes
    CanVerb
  73. implicit def convertToStringMustWrapperForVerb(o: String)(implicit position: Position): StringMustWrapperForVerb
    Definition Classes
    MustVerb
  74. implicit def convertToStringShouldWrapper(o: String)(implicit pos: Position, prettifier: Prettifier): StringShouldWrapper
    Definition Classes
    Matchers
  75. implicit def convertToStringShouldWrapperForVerb(o: String)(implicit position: Position): StringShouldWrapperForVerb
    Definition Classes
    ShouldVerb
  76. val decided: DecidedWord
    Definition Classes
    Explicitly
  77. def defaultEquality[A]: Equality[A]
    Definition Classes
    TripleEqualsSupport
  78. val defined: DefinedWord
    Definition Classes
    MatcherWords
  79. def definedAt[T](right: T): ResultOfDefinedAt[T]
    Definition Classes
    Matchers
  80. val determined: DeterminedWord
    Definition Classes
    Explicitly
  81. val empty: EmptyWord
    Definition Classes
    MatcherWords
  82. val endWith: EndWithWord
    Definition Classes
    MatcherWords
  83. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  84. def equal(o: Null): Matcher[AnyRef]
    Definition Classes
    Matchers
  85. def equal[T](spread: Spread[T]): Matcher[T]
    Definition Classes
    Matchers
  86. def equal(right: Any): MatcherFactory1[Any, Equality]
    Definition Classes
    MatcherWords
  87. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  88. def every(xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  89. def every[K, V, JMAP[k, v] <: Map[k, v]](xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  90. def every[K, V, MAP[k, v] <: Map[k, v]](xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  91. def every[E, C[_]](xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  92. def exactly(num: Int, xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  93. def exactly[K, V, JMAP[k, v] <: Map[k, v]](num: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  94. def exactly[K, V, MAP[k, v] <: GenMap[k, v]](num: Int, xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  95. def exactly[E, C[_]](num: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  96. final def execute(testName: String, configMap: ConfigMap, color: Boolean, durations: Boolean, shortstacks: Boolean, fullstacks: Boolean, stats: Boolean): Unit
    Definition Classes
    Suite
  97. val exist: ExistWord
    Definition Classes
    MatcherWords
  98. def expectedTestCount(filter: Filter): Int
    Definition Classes
    Suite
  99. def fail(cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  100. def fail(message: String, cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  101. def fail(message: String)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  102. def fail()(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  103. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  104. val fullyMatch: FullyMatchWord
    Definition Classes
    MatcherWords
  105. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  106. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  107. val have: HaveWord
    Definition Classes
    MatcherWords
  108. val ignore: IgnoreWord
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  109. def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfInOrderApplication
    Definition Classes
    Matchers
  110. def inOrderElementsOf[R](elements: GenTraversable[R]): ResultOfInOrderElementsOfApplication
    Definition Classes
    Matchers
  111. def inOrderOnly[T](firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfInOrderOnlyApplication
    Definition Classes
    Matchers
  112. val include: IncludeWord
    Definition Classes
    MatcherWords
  113. def info: Informer
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike → Informing
  114. def intercept[T <: AnyRef](f: => Any)(implicit classTag: ClassTag[T], pos: Position): T
    Definition Classes
    Assertions
  115. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  116. val it: ItWord
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  117. val key: KeyWord
    Definition Classes
    Matchers
  118. val length: LengthWord
    Definition Classes
    MatcherWords
  119. def lowPriorityTypeCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], ev: <:<[A, B]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  120. def markup: Documenter
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike → Documenting
  121. val matchPattern: MatchPatternWord
    Definition Classes
    MatcherWords
  122. def message(expectedMessage: String): ResultOfMessageWordApplication
    Definition Classes
    Matchers
  123. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  124. def nestedSuites: IndexedSeq[Suite]
    Definition Classes
    Suite
  125. def no(xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  126. def no[K, V, JMAP[k, v] <: Map[k, v]](xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  127. def no[E, C[_]](xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  128. def noElementsOf(elements: GenTraversable[Any]): ResultOfNoElementsOfApplication
    Definition Classes
    Matchers
  129. def noException(implicit pos: Position): NoExceptionWord
    Definition Classes
    MatcherWords
  130. def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfNoneOfApplication
    Definition Classes
    Matchers
  131. val not: NotWord
    Definition Classes
    MatcherWords
  132. def note: Notifier
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike → Notifying
  133. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  134. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  135. def of[T](implicit ev: ClassTag[T]): ResultOfOfTypeInvocation[T]
    Definition Classes
    Matchers
  136. def oneElementOf(elements: GenTraversable[Any]): ResultOfOneElementOfApplication
    Definition Classes
    Matchers
  137. def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfOneOfApplication
    Definition Classes
    Matchers
  138. def only(xs: Any*)(implicit pos: Position): ResultOfOnlyApplication
    Definition Classes
    Matchers
  139. def parseFlatMapAssert(res0: String): Unit

    Exercise 9.5

    Exercise 9.5

    One way we can deal with non-strictness, is by using a new combinator (wrap):

    def wrap[A](p: => Parser[A]): Parser[A]

    We can then define many as:

    def many[A](p: Parser[A]): Parser[List[A]] =
      map2(p, wrap(many(p)))(_ :: _) or succeed(List())

    In the parallelism chapter, we were particularly interested in avoiding having Par objects that took as much time and space to build as the corresponding serial computation, and the delay combinator let us control this more carefully. Here, this isn't as much of a concern, and having to think carefully each time we map2 to decide whether we need to call wrap seems like unnecessary friction for users of the API.

    Handling context sensitivity

    Exercise 9.6

    We're now going to try parse a single digit (i.e.: 4), followed by that many 'a' characters. For instance: "0", "1a", "2aa", and so on. This is also called a context-sensitive grammar. It can't be expressed with product because what the second parser decides depends on the first parser's result. Similarly as we did in previous chapters, this problem calls for the use of a new primitive, flatMap:

    def flatMap[A,B](p: Parser[A])(f: A => Parser[B]): Parser[B]

    To parse the digits, we'll be using regular expressions. Note the use of the new primitive regex which converts any regular expression into a Parser. Complete the implementation with a regular expression to catch the digits in our parser's first step, and take a look on how we chain both operations:

  140. def parserJSONAssert(res0: String): Unit

    Exercise 9.15

    Exercise 9.15

    It's time to implement the run primitive:

    def run[A](p: Parser[A])(s: String): Either[ParseError,A] = {
      val s0 = ParseState(Location(s))
      p(s0).extract
    }

    Exercise 9.16

    ParseError can be improved by better formatting it for human consumption. Let's see how this could work:

    case class ParseError(stack: List[(Location,String)] = List()) {
      def push(loc: Location, msg: String): ParseError =
        copy(stack = (loc,msg) :: stack)
    
      def label[A](s: String): ParseError =
        ParseError(latestLoc.map((_,s)).toList)
    
      def latest: Option[(Location,String)] = stack.lastOption
    
      def latestLoc: Option[Location] = latest map (_._1)
    
      // Display collapsed error stack - any adjacent stack elements with the same location are combined on one line.
      // For the bottommost error, we display the full line, with a caret pointing to the column of the error.
      override def toString =
        if (stack.isEmpty) "no error message"
      else {
        val collapsed = collapseStack(stack)
        val context =
          collapsed.lastOption.map("\n\n" + _._1.currentLine).getOrElse("") +
          collapsed.lastOption.map("\n" + _._1.columnCaret).getOrElse("")
        collapsed.map { case (loc,msg) => loc.line.toString + "." + loc.col + " " + msg }.mkString("\n") + context
      }
    
      // Builds a collapsed version of the given error stack - messages at the same location have their messages
      // merged, separated by semicolons.
      def collapseStack(s: List[(Location,String)]): List[(Location,String)] =
        s.groupBy(_._1).
        mapValues(_.map(_._2).mkString("; ")).
        toList.sortBy(_._1.offset)
    
      def formatLoc(l: Location): String = l.line + "." + l.col

    Exercise 9.17

    In order to make the slice combinator more efficient (i.e.: many(char('a')).slice will still create a List[Char], only to discard it) we can create a different representation of the Parser type. The main change is to add another piece of state to ParseState, an isSliced flag, and an additional Slice constructor to Result. If the isSliced flag is set, parsers avoid building a meaningful result. You can take a look at the complete implementation here.

    Exercise 9.18

    Right now, we're missing error information when we combine several parsers with the or combinator. For instance, when both parsers fail we only take into account errors from the second parser. Maybe we could show both error messages, or choose the error from the branch that got furthest without failing. Let's sketch a way of doing that:

     // We'll just give a sketch here. The basic idea is to add an additional field to `ParseError`
     case class ParseError(stack: List[(Location,String)] = List(),
                           otherFailures: List[ParseError] = List()) {
    
       def addFailure(e: ParseError): ParseError =
         this.copy(otherFailures = e :: this.otherFailures)
         // ...
       }
    
    // We then need to make sure we populate this in the implementation of `or`
       def or[A](p: Parser[A], p2: => Parser[A]): Parser[A] =
         s => p(s) match {
           case Failure(e,false) => p2(s).mapError(_.addFailure(e))
           case r => r // committed failure or success skips running `p2`
         }

    Of course, we have to decide how to print a ParseError for human consumption. We also can expose combinators for selecting which error(s) get reported in the event that a chain of a | b | c fails--we might choose to collect up all the errors for each of the three parsers, or perhaps only show the parser that got the furthest in the input before failing, etc.

    Exercise 9.x

    To wrap this section up, here's a small exercise for you to test the aforementioned JSON parser with your own entries. Source code for this parser can be found here or in the source code of this section.

  141. def parserListOfNAssert(res0: Int, res1: Int): Unit

    Exercise 9.4

    Exercise 9.4

    Using map2 and succeed, we can also implement listOfN:

  142. def parserMany1Assert(res0: String, res1: String): Unit

    The following set of sections represent the exercises contained in the book "Functional Programming in Scala", written by Paul Chiusano and Rúnar Bjarnason and published by Manning.

    Functional programming in Scala

    The following set of sections represent the exercises contained in the book "Functional Programming in Scala", written by Paul Chiusano and Rúnar Bjarnason and published by Manning. This content library is meant to be used in tandem with the book. We use the same numeration for the exercises for you to follow them.

    For more information about "Functional Programming in Scala" please visit its official website.

    Slicing and nonempty repetition

    Exercise 9.1

    First let's implement map2 in our Parser type:

    def map2[A,B,C](p: Parser[A], p2: Parser[B])(f: (A,B) => C): Parser[C] =
      map(product(p, p2))(f.tupled)

    With map2 in our set of combinators, we can implement many1:

    def many1[A](p: Parser[A]): Parser[List[A]] =
      map2(p, many(p))(_ :: _)
  143. def parserManyAssert(res0: Either[ParseError, List[Char]], res1: Either[ParseError, List[Char]]): Unit

    Exercise 9.2

    Exercise 9.2

    Regarding laws that specify the behavior of product (**), let's start by stating that product is associative. These two expressions are "roughly" equal:

    (a ** b) ** c
    a ** (b ** c)

    The only difference is how the pairs are nested. The (a ** b) ** c parser returns an ((A,B), C), whereas the a ** (b ** c) returns an (A, (B,C)). We can define functions unbiasL and unbiasR to convert these nested tuples to flat 3-tuples:

    def unbiasL[A,B,C](p: ((A,B), C)): (A,B,C) = (p._1._1, p._1._2, p._2)
    def unbiasR[A,B,C](p: (A, (B,C))): (A,B,C) = (p._1, p._2._1, p._2._2)

    With these, we can now state the associativity property:

    (a ** b) ** c map (unbiasL) == a ** (b ** c) map (unbiasR)

    We'll sometimes just use ~= when there is an obvious bijection between the two sides:

    (a ** b) ** c ~= a ** (b ** c)

    map and product also have an interesting relationship--we can map either before or after taking the product of two parsers, without affecting the behavior:

    a.map(f) ** b.map(g) == (a ** b) map { case (a,b) => (f(a), g(b)) }

    For instance, if a and b were both Parser[String], and f and g both computed the length of a string, it doesn't matter if we map over the result of a to compute its length, or whether we do that after the product.

    For more discussion of these laws, take a look at chapter 12 of "Functional Programming in Scala".

    Exercise 9.3

    Let's try to define many via or, map2, and succeed:

  144. def parserRegexAssert(res0: String): Unit

    Let's continue by implementing regex:

  145. def parserSliceAssert(res0: Boolean): Unit

    Implementation of succeed is pretty straightforward:

    Implementation of succeed is pretty straightforward:

    def succeed[A](a: A): Parser[A] = s => Success(a, 0)

    Finally let's implement slice for our new representation:

  146. def parserStringAssert(res0: String): Unit

    Exercise 9.7

    Exercise 9.7

    We can also implement product and map2 in terms of flatMap:

    def product[A,B](p: Parser[A], p2: => Parser[B]): Parser[(A,B)] =
      flatMap(p)(a => map(p2)(b => (a,b)))
    
    def map2[A,B,C](p: Parser[A], p2: => Parser[B])(f: (A,B) => C): Parser[C] =
      for { a <- p; b <- p2 } yield f(a,b)

    Exercise 9.8

    The same way as map can be implemented via flatMap:

    def map[A,B](p: Parser[A])(f: A => B): Parser[B] = p.flatMap(a => succeed(f(a)))

    Exercise 9.9

    Let's see an example of how a Parser[JSON] could be implemented using the primitives we've defined:

    trait JSON
    
    object JSON {
      case object JNull extends JSON
      case class JNumber(get: Double) extends JSON
      case class JString(get: String) extends JSON
      case class JBool(get: Boolean) extends JSON
      case class JArray(get: IndexedSeq[JSON]) extends JSON
      case class JObject(get: Map[String, JSON]) extends JSON
    
      def jsonParser[Parser[+_]](P: Parsers[Parser]): Parser[JSON] = {
        import P.{string => _, _}
        implicit def tok(s: String) = P.token(P.string(s))
    
        def array = surround("[","]")(
          value sep "," map (vs => JArray(vs.toIndexedSeq))) scope "array"
    
        def obj = surround("{","}")(
          keyval sep "," map (kvs => JObject(kvs.toMap))) scope "object"
    
        def keyval = escapedQuoted ** (":" *> value)
    
        def lit = scope("literal") {
          "null".as(JNull) |
          double.map(JNumber(_)) |
          escapedQuoted.map(JString(_)) |
          "true".as(JBool(true)) |
          "false".as(JBool(false))
        }
    
        def value: Parser[JSON] = lit | obj | array
          root(whitespace *> (obj | array))
      }
    }

    Error reporting

    Exercise 9.11

    Some useful primitives that could be useful to let programmers specify what error(s) get reported in an or chain could be:

    /** In the event of an error, returns the error that occurred after consuming the most number of characters. */
    def furthest[A](p: Parser[A]): Parser[A]
    
    /** In the event of an error, returns the error that occurred most recently. */
    def latest[A](p: Parser[A]): Parser[A]

    One possible implementation

    Explore 9.13

    We'll be exploring an actual representation of Parser. Let's begin by implementing some of its methods, starting with string:

  147. def pending: Assertion with PendingStatement
    Definition Classes
    Assertions
  148. def pendingUntilFixed(f: => Unit)(implicit pos: Position): Assertion with PendingStatement
    Definition Classes
    Assertions
  149. val readable: ReadableWord
    Definition Classes
    MatcherWords
  150. val regex: RegexWord
    Definition Classes
    Matchers
  151. final def registerIgnoredTest(testText: String, testTags: Tag*)(testFun: => Any)(implicit pos: Position): Unit
    Definition Classes
    AnyFlatSpecLike → TestRegistration
  152. final def registerTest(testText: String, testTags: Tag*)(testFun: => Any)(implicit pos: Position): Unit
    Definition Classes
    AnyFlatSpecLike → TestRegistration
  153. def rerunner: Option[String]
    Definition Classes
    Suite
  154. def run[A](p: Parser[A])(s: String): Either[ParseError, A]
    Definition Classes
    ReferenceHelper
  155. def run(testName: Option[String], args: Args): Status
    Definition Classes
    AnyFlatSpecLike → Suite
  156. def runNestedSuites(args: Args): Status
    Attributes
    protected
    Definition Classes
    Suite
  157. def runTest(testName: String, args: Args): Status
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike → TestSuite → Suite
  158. def runTests(testName: Option[String], args: Args): Status
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike → Suite
  159. implicit val shorthandSharedTestRegistrationFunction: StringVerbBehaveLikeInvocation
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  160. implicit val shorthandTestRegistrationFunction: StringVerbStringInvocation
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  161. val size: SizeWord
    Definition Classes
    MatcherWords
  162. val sorted: SortedWord
    Definition Classes
    MatcherWords
  163. val startWith: StartWithWord
    Definition Classes
    MatcherWords
  164. final val succeed: Assertion
    Definition Classes
    Assertions
  165. def suiteId: String
    Definition Classes
    Suite
  166. def suiteName: String
    Definition Classes
    Suite
  167. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  168. def tags: Map[String, Set[String]]
    Definition Classes
    AnyFlatSpecLike → Suite
  169. def testDataFor(testName: String, theConfigMap: ConfigMap): TestData
    Definition Classes
    AnyFlatSpecLike → Suite
  170. def testNames: Set[String]
    Definition Classes
    AnyFlatSpecLike → Suite
  171. def the[T](implicit arg0: ClassTag[T], pos: Position): ResultOfTheTypeInvocation[T]
    Definition Classes
    Matchers
  172. def theSameElementsAs(xs: GenTraversable[_]): ResultOfTheSameElementsAsApplication
    Definition Classes
    Matchers
  173. def theSameElementsInOrderAs(xs: GenTraversable[_]): ResultOfTheSameElementsInOrderAsApplication
    Definition Classes
    Matchers
  174. val theSameInstanceAs: TheSameInstanceAsPhrase
    Definition Classes
    Matchers
  175. val they: TheyWord
    Attributes
    protected
    Definition Classes
    AnyFlatSpecLike
  176. def thrownBy(fun: => Any): ResultOfThrownByApplication
    Definition Classes
    Matchers
  177. def toString(): String
    Definition Classes
    AnyFlatSpec → AnyRef → Any
  178. val typeCheck: TypeCheckWord
    Definition Classes
    MatcherWords
  179. def typeCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], ev: <:<[B, A]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  180. implicit def unconstrainedEquality[A, B](implicit equalityOfA: Equality[A]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  181. val value: ValueWord
    Definition Classes
    Matchers
  182. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  183. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  184. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  185. def withClue[T](clue: Any)(fun: => T): T
    Definition Classes
    Assertions
  186. def withFixture(test: NoArgTest): Outcome
    Attributes
    protected
    Definition Classes
    TestSuite
  187. val writable: WritableWord
    Definition Classes
    MatcherWords

Deprecated Value Members

  1. def conversionCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], cnv: (B) => A): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The conversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  2. def convertEquivalenceToAToBConversionConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: (A) => B): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The convertEquivalenceToAToBConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  3. def convertEquivalenceToBToAConversionConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: (B) => A): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The convertEquivalenceToBToAConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  4. def lowPriorityConversionCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], cnv: (A) => B): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The lowPriorityConversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  5. final val styleName: String
    Definition Classes
    AnyFlatSpecLike → Suite
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.

Inherited from ReferenceHelper

Inherited from Section

Inherited from Matchers

Inherited from Explicitly

Inherited from MatcherWords

Inherited from Tolerance

Inherited from AnyFlatSpec

Inherited from AnyFlatSpecLike

Inherited from Documenting

Inherited from Alerting

Inherited from Notifying

Inherited from Informing

Inherited from CanVerb

Inherited from MustVerb

Inherited from ShouldVerb

Inherited from TestRegistration

Inherited from TestSuite

Inherited from Suite

Inherited from Serializable

Inherited from Assertions

Inherited from TripleEquals

Inherited from TripleEqualsSupport

Inherited from AnyRef

Inherited from Any

Ungrouped