RiddlParserInput

com.reactific.riddl.language.parsing.RiddlParserInput
See theRiddlParserInput companion object
abstract class RiddlParserInput extends ParserInput

Same as fastparse.IndexedParserInput but with Location support

Attributes

Companion
object
Graph
Supertypes
class ParserInput
trait IsReachable
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def data: String
def origin: String
def root: File

Concrete methods

def annotateErrorLine(index: At): String
override def apply(index: Int): Char

Attributes

Definition Classes
ParserInput -> IsReachable
override def dropBuffer(index: Int): Unit

Special method for Iterator mode.

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

Definition Classes
ParserInput
override def innerLength: Int

Attributes

Definition Classes
ParserInput
override 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

Definition Classes
ParserInput -> IsReachable
override def length: Int

Attributes

Definition Classes
ParserInput
final def location(index: Int): At
final def nonEmpty: Boolean
def prettyIndex(index: Int): String
def rangeOf(index: Int): (Int, Int)
def rangeOf(loc: At): (Int, Int)
override 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.

Definition Classes
ParserInput

Concrete fields

val nl: String