ParserInput

fastparse.ParserInput
See theParserInput companion object
abstract class ParserInput extends IsReachable

ParserInput class represents data that is needed to parse.

It can be regular IndexedSeq that behaves as simple array or Iterator of IndexedSeq batches which is optimized by dropBuffer method.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Value members

Abstract methods

def apply(index: Int): Char
def checkTraceable(): Unit
def dropBuffer(index: Int): Unit

Special method for Iterator mode. It drops the prefix of the internal buffer so that all the data '''strictly before''' becomes unavailable and index is the first valid element to access.

Special method for Iterator mode. It drops the prefix of the internal buffer so that all the data '''strictly before''' becomes unavailable and index is the first valid element to access.

Attributes

def innerLength: Int
def isReachable(index: Int): Boolean

Shows if we can access to the element at given index.

Shows if we can access to the element at given index.

Attributes

def length: Int
def prettyIndex(index: Int): String
def slice(from: Int, until: Int): String

Attributes

Returns:

Slice of internal data. For IndexedSeq mode it works as regular slice, if until overshoots the end of input, it just ignores it and behaves like until equals to the length of input. Same for Iterator mode, but it requests batches while the index of last retrieved element is less than until and if until is farther away than any element, it ignores this too.