Packages

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

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.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Alt
  2. RegularLanguage
  3. Serializable
  4. Serializable
  5. Product
  6. Equals
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Alt(left: RegularLanguage, right: RegularLanguage)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def *: RegularLanguage
    Definition Classes
    RegularLanguage
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def ?: Alt
    Definition Classes
    RegularLanguage
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  8. def contains(tokens: List[String], cliConfig: CliConfig): UIO[Boolean]

    Checks to see if the input token list is a member of the language.

    Checks to see if the input token list is a member of the language.

    returns

    true if and only if tokens is in the language.

    Definition Classes
    RegularLanguage
  9. def derive(token: String, cliConfig: CliConfig): ZIO[Any, Nothing, RegularLanguage]

    Calculate the Brzozowski derivative of this language with respect to the given string.

    Calculate the Brzozowski derivative of this language with respect to the given string. This is an effectful function because it can call PrimType.validate (e.g., when validating file paths, etc.).

    token

    The string to use for calculation of the Brzozowski derivative.

    returns

    Brzozowski derivative wrapped in an UIO instance.

    Definition Classes
    AltRegularLanguage
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def firstTokens(prefix: String, compgen: Compgen): UIO[Set[String]]

    Returns a set consisting of the first token of all strings in this language that are useful for CLI tab completion.

    Returns a set consisting of the first token of all strings in this language that are useful for CLI tab completion. For infinite or unwieldly languages, it is perfectly fine to return the empty set: This will simply not display any completions to the user.

    If you'd like the cursor to advance to the next word when tab completion unambiguously matches the prefix to a token, append a space (" ") character to the end of the returned token. Otherwise, the cursor will skip to the end of the completed token in the terminal.

    Some examples of different use cases:

    1. Completing file/directory names:
      • Append a space to the ends of file names (e.g., "bippy.pdf"). This is because we want the cursor to jump to the next argument position if tab completion unambiguously succeeds.
      • Do not append a space to the end of a directory name (e.g., "foo/"). This is because we want the user to be able to press tab again to gradually complete a lengthy file path.
      • Append a space to the ends of string tokens.

    You may be asking why we don't try to use the -o nospace setting of compgen and complete. The answer is they appear to be all or nothing: For a given tab completion execution, you have to choose one behavior or the other. This does not work well when completing both file names and directory names at the same time.

    Definition Classes
    AltRegularLanguage
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. lazy val isNullable: Boolean

    This is the delta (δ) predicate from "Parsing With Derivatives", indicating whether this language contains the empty string.

    This is the delta (δ) predicate from "Parsing With Derivatives", indicating whether this language contains the empty string.

    returns

    true if and only if this language contains the empty string.

    Definition Classes
    AltRegularLanguage
  15. val left: RegularLanguage
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  19. def rep(min: Option[Int] = None, max: Option[Int] = None): RegularLanguage
    Definition Classes
    RegularLanguage
  20. val right: RegularLanguage
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def |(other: String): RegularLanguage
    Definition Classes
    RegularLanguage
  26. def |(other: RegularLanguage): RegularLanguage
    Definition Classes
    RegularLanguage
  27. def ~(other: String): RegularLanguage
    Definition Classes
    RegularLanguage
  28. def ~(other: RegularLanguage): RegularLanguage
    Definition Classes
    RegularLanguage

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from RegularLanguage

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped