Package

fmv1992.fmv1992_scala_utilities

cli

Permalink

package cli

Provide utilities to parse, check and manipulate CLI arguments.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. cli
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Arg(longName: String, value: Seq[String]) extends Argument with Product with Serializable

    Permalink

    General implementation for an argument.

  2. trait Argument extends AnyRef

    Permalink

    General trait for an argument.

  3. trait CLIConfigParser extends AnyRef

    Permalink
  4. trait CLIConfigTestableMain extends TestableMain

    Permalink

    Testable main trait with a configurable file CLI implementation.

    Testable main trait with a configurable file CLI implementation.

    Combine testability with modularity.

  5. trait CLIParser extends AnyRef

    Permalink

    CLI parser most general trait.

  6. trait ConfigFileParser extends CLIParser

    Permalink

    Configuration file based CLI parser.

  7. case class GNUArg(longName: String, value: Seq[String]) extends Argument with Product with Serializable

    Permalink

    GNU style argument.

    GNU style argument. Requirements are assured by the parser.

  8. case class GNUParser(format: Map[String, Map[String, String]]) extends ConfigFileParser with Product with Serializable

    Permalink

    GNU Compliant argument parser.

  9. trait Parsers extends AnyRef

    Permalink
  10. case class StandardParser(format: Map[String, Map[String, String]]) extends ConfigFileParser with Product with Serializable

    Permalink

    Standard parser.

  11. trait TestableMain extends AnyRef

    Permalink

    Provide a testable main interface: Read lines, process and output lines.

Value Members

  1. object CLIConfigParser extends Parsers

    Permalink
  2. object GNUArg extends Serializable

    Permalink

    Companion object for GNUArg.

  3. object GNUParser extends Serializable

    Permalink

    Companion object for GNUParser.

  4. object Parser

    Permalink
  5. object ParserTypes

    Permalink

    Parse a CLI config file.

    Parse a CLI config file. This file consists of:

    1. Empty lines.

    2. Comment lines: Starting with spaces followed by '#'.

    3. A 'name:' followed by nested (space indented) attributes.

    Mandatory attributes:

    a. 'help:': the help text. b. 'n:': the number of subsequent arguments to be parsed. c. 'type:': data type of the parsed arguments.

    Example:

    name: debug n: 0 type: int help: Help text.

    name: verbose n: 0 type: int help: Help text.

    This design is influenced by <https://github.com/fpinscala/fpinscala>.

  6. object StandardParser extends Serializable

    Permalink

    Companion object for StandardParser.

Inherited from AnyRef

Inherited from Any

Ungrouped