scala.util.parsing.combinator1.lexical.Scanners

class Scanner

[source: scala/util/parsing/combinator1/lexical/Scanners.scala]

class Scanner(in : Reader[Char])
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

Additional Constructor Summary
def this (in : java.lang.String) : Scanner
Convenience constructor (makes a character reader out of the given string)
Method Summary
def atEnd : Boolean
Whether there are any more elements in this reader besides the first. (i.e., whether calling `rest' will yield a `Reader' with more elements)
def first : Token
Returns the first element of the stream
def pos : Position
The position of the first element in the stream
def rest : Scanner
Returns an abstract reader consisting of all elements except the first
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Additional Constructor Details
def this(in : java.lang.String) : Scanner
Convenience constructor (makes a character reader out of the given string)

Method Details
def first : Token
Returns the first element of the stream
Overrides
Reader.first

def rest : Scanner
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.
Overrides
Reader.rest

def pos : Position
The position of the first element in the stream
Overrides
Reader.pos

def atEnd : Boolean
Whether there are any more elements in this reader besides the first. (i.e., whether calling `rest' will yield a `Reader' with more elements)
Overrides
Reader.atEnd