case class State[Token](input: IndexedSeq[Token], offset: Int, pos: Position)(implicit evidence$1: SourceMap[Token]) extends Product with Serializable
State of a parser.
A parser works with:
- an array of tokens to explore (typically the characters that compose a string).
- an offset in that array that represents how far we've parsed already.
- the position of the last parsed token.
TODO: before writing documentation, we need to keep track of a token's START and END position. It makes things far easier to explain. With chars, a token's start position is always the previous token's end position. With more complex tokens, this might not hold - think of space-separated ints: "1 2". You cannot guess the start position of '2' just from '1': this doesn't tell you how many spaces there are before the next token starts.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- State
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def consume(parsed: Token): State[Token]
- def consumeRep(parsed: Seq[Token]): State[Token]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val input: IndexedSeq[Token]
- def isEOF: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val offset: Int
- val pos: Position
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def startsAt(parsed: Token): Position
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated