PrefixedParser

Factories and utilities for creating or processing PrefixedParser instances.

Companion:
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[U](sc: Type[Char])(p: Parser[U]): PrefixedParser[U]

Creates a new parser that is only triggered when a character in the specified set is seen on the input.

Creates a new parser that is only triggered when a character in the specified set is seen on the input.

def apply[U](char: Char, chars: Char*)(p: Parser[U]): PrefixedParser[U]

Creates a new parser that is only triggered when one of the specified characters is seen on the input.

Creates a new parser that is only triggered when one of the specified characters is seen on the input.

def mapAndMerge[T](parsers: Seq[PrefixedParser[T]]): Map[Char, Parser[T]]

Creates a mapping from start characters to their corresponding parser from the specified sequence of PrefixedParsers. If a character is a trigger for more than one parser they will be combined using orElse where the parser which comes first in the sequence has higher precedence.

Creates a mapping from start characters to their corresponding parser from the specified sequence of PrefixedParsers. If a character is a trigger for more than one parser they will be combined using orElse where the parser which comes first in the sequence has higher precedence.