XDoc Search Logo
Xdoc:
Stratego Library API Documentation
util/config
Link to XDoc
Description: No additional information available
Modules:
common Get and set values in the configuration table.
keep No additional information available
options This module contains strategies for handling command line options and simple serialization/unserialization of ATerms. These strategies are particularly useful for writing command line tools in Stratego that may be connected into pipelines by the standard Unix piping mechanism.
parse-options Strategies for handling command-line options. Example: --------------------------------------------------------------------------- module option-demo imports options strategies main = io-wrap(demo-options, demo-usage, default-system-about, demo-impl) demo-impl = id demo-options = Option("--option1",<set-config>("--option1", ()) , !"--option1 This is a an example option") + ArgOption("--arg1",<set-config>("--arg1",<id>) , !"--arg1 This is an example arg option") demo-usage = default-system-usage( !"Usage: option-demo [options]", !"This is a test program to demonstrate use of parse-options and generation of usage info from option and switch specificatios. These now contain usage info as additional third argument.") --------------------------------------------------------------------------- option-demo --help now displays: --------------------------------------------------------------------------- Usage: option-demo [options] Options: --option1 This is a an example option --arg1 This is an example arg option -i f|--input f Read input from f -o f|--output f Write output to f -b Write binary output -S|--silent Silent execution (same as --verbose 0) --verbose i Verbosity level i (default 1) -s Turn on statistics -k i | --keep i Keep intermediates (default 0) -h|-?|--help Display usage information --about Display information about this program --version Same as --about Description: This is a test program to demonstrate use of parse-options and generation of usage info from option and switch specificatios. These now contain usage info as additional third argument. ---------------------------------------------------------------------------
stats No additional information available
verbose Verbosity management.