Scala Library
|
|
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
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
/* true iff there are no more elements in this reader
/
|
def
|
first
: Token
/* Returns the first element of the reader
/
|
override def
|
offset : Int |
def
|
pos
: Position
/* The position of the first element in the reader
/
|
def
|
rest
: Scanner
/* Returns an abstract reader consisting of all elements except the first
|
override def
|
source
: java.lang.CharSequence
/* If this is a reader over character sequences, the underlying char sequence
If not, throws a
NoSuchMethodError exception.
/ |
Methods inherited from Reader | |
drop |
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
Method Details |
override
def
source : java.lang.CharSequence
NoSuchMethodError
exception.
/override
def
offset : Int
def
first : Token
def
rest : Scanner
atEnd
is true
, the result will be this'; otherwise, it's a Reader
containing
more elements.
/
def
pos : Position
def
atEnd : Boolean
Scala Library
|
|