RegularLanguage

zio.cli.completion.RegularLanguage
See theRegularLanguage companion trait

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Alt(left: RegularLanguage, right: RegularLanguage) extends RegularLanguage

Alt(left, right) represents the union of two regular languages. We call it "Alt" for consistency with the names used in the "Parsing With Derivatives" paper.

Alt(left, right) represents the union of two regular languages. We call it "Alt" for consistency with the names used in the "Parsing With Derivatives" paper.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object AnyStringToken extends Token

AnyStringToken represents the set of all strings. For tab completion purposes, this is used to represent the name of the executable. (It may be aliased or renamed to be different than Command.Single.name.)

AnyStringToken represents the set of all strings. For tab completion purposes, this is used to represent the name of the executable. (It may be aliased or renamed to be different than Command.Single.name.)

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Token
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
final case class Cat(left: RegularLanguage, right: RegularLanguage) extends RegularLanguage

Cat(left, right) represents the concatenation of two regular languages.

Cat(left, right) represents the concatenation of two regular languages.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object Empty extends RegularLanguage

The Empty language (∅) accepts no strings.

The Empty language (∅) accepts no strings.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Empty.type
case object Epsilon extends RegularLanguage

The Epsilon language (ε) accepts only the empty string.

The Epsilon language (ε) accepts only the empty string.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Epsilon.type
final case class Permutation(values: RegularLanguage*) extends RegularLanguage

Permutation is like Cat, but it is a commutative monoid. A Permutation(a_1, a_2, ..., a_{k}) is equivalent to the following language:

Permutation is like Cat, but it is a commutative monoid. A Permutation(a_1, a_2, ..., a_{k}) is equivalent to the following language:

a2 ~ Permutation(a_1, a_3, ..., a_k) | a1 ~ Permutation(a_2, a_3, ..., a_k) | ... ak ~ Permutation(a_1, a_2, ..., a_{k - 1})

So when we calculate its derivative, we apply the above "desugaring" transformation, then compute the derivative as usual.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class PrimTypeToken(value: PrimType[Any]) extends Token

A PrimTypeToken(value) language represents the regular language containing any strings s where value.validate(s) succeeds.

A PrimTypeToken(value) language represents the regular language containing any strings s where value.validate(s) succeeds.

Attributes

Supertypes
trait Token
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Rep(language: RegularLanguage, min: Option[Int], max: Option[Int]) extends RegularLanguage

Rep(language, min, max) represents the repetition of language. The number of repetitions can be bounded via min and max. Setting max=None represents the "Kleene star" of language.

Rep(language, min, max) represents the repetition of language. The number of repetitions can be bounded via min and max. Setting max=None represents the "Kleene star" of language.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class StringToken(value: String) extends Token

A StringToken(value) language represents the regular language that contains only value.

A StringToken(value) language represents the regular language that contains only value.

Attributes

Supertypes
trait Token
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait Token extends RegularLanguage

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

Inherited from:
Mirror