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
Pushbacktrait can be mixed into anSafeIteratorto permit arbitrary pushback.The
Pushbacktrait can be mixed into anSafeIteratorto permit arbitrary pushback.NOTE: This trait it not thread-safe.
-
class
SafeIterator[+T] extends AnyRef
SafeIteratorplaces a simple stream on top of an iterator, returningOption-wrapped instances from the underlying iterator.SafeIteratorplaces a simple stream on top of an iterator, returningOption-wrapped instances from the underlying iterator. When the stream is exhausted, theIteratorstream returnsNone. Differences from a plainIteratorinclude:- An
SafeIteratorwill 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.