Packages

class Scanner extends Reader[Token]

Scanner is essentially¹ a parser that produces Tokens from a stream of characters. The tokens it produces are typically passed to parsers in TokenParsers.

Source
Scanners.scala
Note

¹ Scanner is really a Reader of Tokens

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Scanner
  2. Reader
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Scanner(in: String)

    Convenience constructor (makes a character reader out of the given string)

  2. new Scanner(in: Reader[Char])

Value Members

  1. def atEnd: Boolean

    true iff there are no more elements in this reader.

    true iff there are no more elements in this reader.

    Definition Classes
    ScannerReader
  2. def drop(n: Int): Reader[Token]

    Returns an abstract reader consisting of all elements except the first n elements.

    Returns an abstract reader consisting of all elements except the first n elements.

    Definition Classes
    Reader
  3. def first: Token

    Returns the first element of the reader

    Returns the first element of the reader

    Definition Classes
    ScannerReader
  4. def offset: Int
    Definition Classes
    ScannerReader
  5. def pos: Position

    The position of the first element in the reader.

    The position of the first element in the reader.

    Definition Classes
    ScannerReader
  6. def rest: Scanner

    Returns an abstract reader consisting of all elements except the first

    Returns an abstract reader consisting of all elements except the first

    returns

    If atEnd is true, the result will be this'; otherwise, it's a Reader containing more elements.

    Definition Classes
    ScannerReader
  7. def source: CharSequence

    If this is a reader over character sequences, the underlying char sequence.

    If this is a reader over character sequences, the underlying char sequence. If not, throws a NoSuchMethodError exception.

    Definition Classes
    ScannerReader
    Exceptions thrown

    [[java.lang.NoSuchMethodError]] if this not a char sequence reader.