Packages

trait SourceCursor extends AnyRef

Represents the state and context of a parsing operation, containing the input string as well as positional information.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SourceCursor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type Self <: SourceCursor

Abstract Value Members

  1. abstract def atEnd: Boolean

    Indicates whether this contexts offset is behind the last character of the input string

  2. abstract def capture(numChars: Int): String

    Captures a string containing the specified number of characters from the current offset.

    Captures a string containing the specified number of characters from the current offset. If the number of remaining characters is less than the specified number, all remaining characters will be returned.

  3. abstract def consume(numChars: Int): Self

    Consumes the specified number of characters, returning a new SourceCursor with the new offset.

  4. abstract def input: String

    The full input string, containing the string portions before and after the current offset.

  5. abstract def nestLevel: Int

    The nest level of this cursor in case of recursive parsing.

  6. abstract def nextNestLevel: Self

    Create a new instance of this cursor with the nestLevel incremented.

  7. abstract def offset: Int

    The offset of this cursor from the start of the source.

  8. abstract def position: Position

    The current position in the input string.

  9. abstract def remaining: Int

    Indicates the number of characters remaining in the input string after the current offset.

  10. abstract def reverse: Self

    Returns a new SourceCursor with the input string being reversed, but pointing to the same character as this context.

    Returns a new SourceCursor with the input string being reversed, but pointing to the same character as this context.

    This is a low-level optimization for parsers that look for strings like email addresses where the first character is not significant, so that parsing backwards from any @ encountered in the input provided better performance.

  11. abstract def root: RootSource

    The source for the root input, positioned to match the offset of this (potentially nested) source.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def canConsume(maxChars: Int): Int
    Attributes
    protected
  6. def char: Char

    The character at the current offset.

  7. def charAt(relativeOffset: Int): Char

    The character at the specified offset, relative from the current offset.

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def length: Int

    The length of the input of this cursor.

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def path: Option[Path]

    The (virtual) path of the document this input originates from; may be empty in case of generated sources.

  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped