ParserInput

org.parboiled2.ParserInput
See theParserInput companion trait
object ParserInput

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

class ByteArrayBasedParserInput(bytes: Array[Byte], endIndex: Int) extends DefaultParserInput

ParserInput reading directly off a byte array. This avoids a separate decoding step but assumes that each byte represents exactly one character, which is encoded by ISO-8859-1! You can therefore use this ParserInput type only if you know that all input will be ISO-8859-1-encoded, or only contains 7-bit ASCII characters (which is a subset of ISO-8859-1)!

ParserInput reading directly off a byte array. This avoids a separate decoding step but assumes that each byte represents exactly one character, which is encoded by ISO-8859-1! You can therefore use this ParserInput type only if you know that all input will be ISO-8859-1-encoded, or only contains 7-bit ASCII characters (which is a subset of ISO-8859-1)!

Note that this ParserInput type will NOT work with general UTF-8-encoded input as this can contain character representations spanning multiple bytes. However, if you know that your input will only ever contain 7-bit ASCII characters (0x00-0x7F) then UTF-8 is fine, since the first 127 UTF-8 characters are encoded with only one byte that is identical to 7-bit ASCII and ISO-8859-1.

Attributes

Supertypes
trait ParserInput
class Object
trait Matchable
class Any
class CharArrayBasedParserInput(chars: Array[Char], endIndex: Int) extends DefaultParserInput

Attributes

Supertypes
trait ParserInput
class Object
trait Matchable
class Any
abstract class DefaultParserInput extends ParserInput

Attributes

Supertypes
trait ParserInput
class Object
trait Matchable
class Any
Known subtypes
class StringBasedParserInput(string: String) extends DefaultParserInput

Attributes

Supertypes
trait ParserInput
class Object
trait Matchable
class Any

Value members

Concrete fields

Implicits

Implicits

implicit def apply(bytes: Array[Byte]): ByteArrayBasedParserInput
implicit def apply(bytes: Array[Byte], endIndex: Int): ByteArrayBasedParserInput
implicit def apply(string: String): StringBasedParserInput
implicit def apply(chars: Array[Char]): CharArrayBasedParserInput
implicit def apply(chars: Array[Char], endIndex: Int): CharArrayBasedParserInput