scala.util.parsing.input

class CharSequenceReader

[source: scala/util/parsing/input/CharSequenceReader.scala]

class CharSequenceReader(val override source : java.lang.CharSequence, val override offset : Int)
extends Reader[Char]
A character array reader reads a stream of characters (keeping track of their positions) from an array.
Parameters
source - the source sequence
offset - starting offset.
Author
Martin Odersky
Direct Known Subclasses:
CharArrayReader

Additional Constructor Summary
def this (source : java.lang.CharSequence) : CharSequenceReader
Construct a CharSequenceReader with its first element at source(0) and position (1,1).
Method Summary
def atEnd : Boolean
true iff there are no more elements in this reader (except for trailing EofCh's)
override def drop (n : Int) : CharSequenceReader
Returns an abstract reader consisting of all elements except the first n elements.
def first : Char
Returns the first element of the reader, or EofCh if reader is at its end
def pos : Position
The position of the first element in the reader
def rest : CharSequenceReader
Returns a CharSequenceReader 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(source : java.lang.CharSequence) : CharSequenceReader
Construct a CharSequenceReader with its first element at source(0) and position (1,1).

Method Details
def first : Char
Returns the first element of the reader, or EofCh if reader is at its end
Overrides
Reader.first

def rest : CharSequenceReader
Returns a CharSequenceReader consisting of all elements except the first
Returns
If atEnd is true, the result will be this'; otherwise, it's a CharSequenceReader containing the rest of input.
Overrides
Reader.rest

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

def atEnd : Boolean
true iff there are no more elements in this reader (except for trailing EofCh's)
Overrides
Reader.atEnd

override def drop(n : Int) : CharSequenceReader
Returns an abstract reader consisting of all elements except the first n elements.
Overrides
Reader.drop