io.github.edadma.recognizer
Members list
Type members
Classlikes
A specialized recognizer trait for character-based input streams.
A specialized recognizer trait for character-based input streams.
This trait extends Recognizer to provide convenient patterns and utilities for working with character input, such as string matching, whitespace handling, and common character classifications.
Type parameters
- W
-
the wrapped value type
Attributes
- Supertypes
Represents a position in an input stream with elements of type E and wrapped values of type W.
Represents a position in an input stream with elements of type E and wrapped values of type W.
The Input trait provides methods to access the current element, check for end of input, advance to the next position, and collect elements or wrapped values between positions.
Type parameters
- E
-
the type of elements in the input stream
- W
-
the type of wrapped values associated with elements
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class StringInput
Core trait providing pattern matching functionality over an input stream.
Core trait providing pattern matching functionality over an input stream.
The Recognizer trait defines a composable pattern matching DSL with support for backtracking, value capture, and transformation. It implements a recursive descent parser with explicit backtracking control through choice points.
Type parameters
- E
-
the type of elements in the input stream
- W
-
the type of wrapped values associated with input elements
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CharRecognizer[W]
An implementation of the Input trait for string inputs.
An implementation of the Input trait for string inputs.
StringInput provides a character-based input implementation where each position represents a character in a string. The wrapped value is the same as the element (the character itself).
Value parameters
- idx
-
the current position in the string (0-based index)
- prev
-
the previous StringInput position, if any
- s
-
the string to process
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all