package parsing
Methods and classes useful for parsing various things.
- Alphabetic
- By Inheritance
- parsing
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
Pushback[T] extends SafeIterator[T]
The
Pushback
trait can be mixed into anSafeIterator
to permit arbitrary pushback.The
Pushback
trait can be mixed into anSafeIterator
to permit arbitrary pushback.NOTE: This trait it not thread-safe.
-
class
SafeIterator[+T] extends AnyRef
SafeIterator
places a simple stream on top of an iterator, returningOption
-wrapped instances from the underlying iterator.SafeIterator
places a simple stream on top of an iterator, returningOption
-wrapped instances from the underlying iterator. When the stream is exhausted, theIterator
stream returnsNone
. Differences from a plainIterator
include:- An
SafeIterator
will not throw an exception if you try to read past the end of it. Instead, it will just keep returningNone
.Example of use with a string:
import grizzled.parsing.SafeIterator val s = ... val istream = new SafeIterator[Char](s.elements)
- Annotations
- @SuppressWarnings()
-
final
case class
StringToken(string: String, start: Int) extends Product with Serializable
A simple string token class, consisting of:
A simple string token class, consisting of:
- a string token - the starting position of the token in the original string from which the token was parsed
This class is used by the
toTokens()
method in grizzled.string.Implicits.String.GrizzledString.- string
the string token
- start
the start of the token within the original string
Value Members
-
object
SafeIterator
Companion object for
SafeIterator
.