scala.util.parsing.json.Lexer

Scanner

class Scanner extends Reader[Token]

Scanner is essentially(*) a parser that produces Token's from a stream of characters. The tokens it produces are typically passed to parsers in TokenParsers.

Note: (*) Scanner is really a Reader' of Token's

definition classes: Scanners

Inherits

  1. Reader
  2. AnyRef
  3. Any

Value Members

  1. def atEnd: Boolean

    true iff there are no more elements in this reader

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

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

  3. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

  4. def first: Token

    Returns the first element of the reader

  5. def hashCode(): Int

    Returns a hash code value for the object

  6. def offset: Int

  7. def pos: Position

    The position of the first element in the reader

  8. def rest: Scanner

    Returns an abstract reader consisting of all elements except the first

  9. def source: CharSequence

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

  10. def toString(): String

    Returns a string representation of the object

Instance constructors

  1. new Scanner(in: String)

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

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

  3. new Scanner()