io.github.edadma.recognizer

Members list

Type members

Classlikes

trait CharRecognizer[W] extends Recognizer[W, Char]

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
trait Recognizer[W, Char]
class Object
trait Matchable
class Any
trait Input[W, E]

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 Object
trait Matchable
class Any
Known subtypes
class StringInput
trait Recognizer[W, E]

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 Object
trait Matchable
class Any
Known subtypes
trait CharRecognizer[W]
case class StringInput(s: String, idx: Int, prev: Option[StringInput]) extends Input[Char, Char]

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 Serializable
trait Product
trait Equals
trait Input[Char, Char]
class Object
trait Matchable
class Any
Show all