package scala_cli_parser
Provide utilities to parse, check and manipulate CLI arguments.
- Alphabetic
- By Inheritance
- scala_cli_parser
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class Arg(longName: String, value: Seq[String]) extends Argument with Product with Serializable
General (non GNU as of now) argument.
General (non GNU as of now) argument.
Requirements are assured by the parser.
- trait Argument extends AnyRef
General trait for an argument.
- trait CLIConfigTestableMain extends TestableMain
Testable main trait with a configurable file CLI implementation.
Testable main trait with a configurable file CLI implementation.
Combine testability with modularity.
- trait CLIParser extends AnyRef
CLI parser most general trait.
- trait ConfigFileParser extends CLIParser
Configuration file based CLI parser.
- case class GNUArg(longName: String, value: Seq[String]) extends Argument with Product with Serializable
GNU style argument.
GNU style argument. Requirements are assured by the parser.
- case class GNUParser(format: Map[String, Map[String, String]]) extends StandardParser with Product with Serializable
GNU Compliant argument parser.
GNU Compliant argument parser.
- type Parser = (String) => Option[Map[String, String]]
- class StandardParser extends ConfigFileParser
Standard parser.
- trait TestableMain extends AnyRef
Provide a testable main interface: Read lines, process and output lines.
Value Members
- object Arg extends Serializable
Companion object for Arg.
- object ConfCLIParser
- object GNUArg extends Serializable
Companion object for GNUArg.
- object GNUParser extends Serializable
Companion object for GNUParser.
- object Main extends CLIConfigTestableMain
- object ParserCombinator
- object ParserPrimitives
New design of parsers:
New design of parsers:
1. KISS principle.
1. Proof of concept stage.
1. Parsers must be able to be combined to form more advanced parsers.
1. In this case a parser is a String => Option[Map[String, String]].
1. A parser can fail. Maybe Option[String] is a better approach.
1. In this the types are:
a. Empty line.
b. Comment line (starts with a #).
c. Sequence of non spaces terminated with ": " followed by a string.
- object StandardParser
Companion object for StandardParser.