This is the cl-argparse Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:39:32 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-argparse
A python argparse inspired command line parser library
Simon Koch <projects@halcony.de>
Simon Koch <projects@halcony.de>
MIT
package.lisp
(file).
classes.lisp
(file).
methods.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-argparse/cl-argparse.asd
cl-argparse/package.lisp
cl-argparse/classes.lisp
cl-argparse/methods.lisp
cl-argparse/classes.lisp
package.lisp
(file).
cl-argparse
(system).
cancel-parsing-error
(condition).
parser
(class).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
cmd-arg-error
(condition).
default
(reader method).
defaults
(reader method).
description
(reader method).
flag
(class).
flags
(reader method).
format-arguments
(reader method).
format-arguments
(reader method).
format-control
(reader method).
format-control
(reader method).
help-flag
(class).
help-flag-condition
(condition).
help-message
(reader method).
help-message
(reader method).
help-message
(reader method).
long
(reader method).
long
(reader method).
name
(reader method).
name
(reader method).
optional
(class).
optionals
(reader method).
positional
(class).
positionals
(reader method).
previous-parsers
(reader method).
program-name
(reader method).
short
(reader method).
short
(reader method).
subparsers
(reader method).
table
(reader method).
var
(reader method).
var
(reader method).
cl-argparse/methods.lisp
package.lisp
(file).
classes.lisp
(file).
cl-argparse
(system).
add-default
(method).
add-flag
(method).
add-generic-parser
(method).
add-help
(method).
add-optional
(method).
add-positional
(method).
add-subparser
(method).
create-main-parser
(macro).
create-sub-parser
(macro).
get-key-value-pairs
(method).
get-value
(method).
parse
(method).
aif
(macro).
create-mockup-parser
(macro).
merge-tables
(function).
parse-flag
(method).
parse-flag
(method).
parse-optional
(method).
parse-optionals
(method).
parse-positional
(method).
parse-positionals
(method).
parse-subparsers
(method).
print-help
(method).
sync-parser
(method).
Packages are listed by definition order.
de.halcony.argparse
cl-argparse
common-lisp
.
common-lisp-user
.
add-default
(generic function).
add-flag
(generic function).
add-generic-parser
(generic function).
add-help
(generic function).
add-optional
(generic function).
add-positional
(generic function).
add-subparser
(generic function).
cancel-parsing-error
(condition).
create-main-parser
(macro).
create-sub-parser
(macro).
get-key-value-pairs
(generic function).
get-value
(generic function).
parse
(generic function).
parser
(class).
aif
(macro).
cmd-arg-error
(condition).
create-mockup-parser
(macro).
default
(generic reader).
defaults
(generic reader).
description
(generic reader).
flag
(class).
flags
(generic reader).
format-arguments
(generic reader).
format-control
(generic reader).
help-flag
(class).
help-flag-condition
(condition).
help-message
(generic reader).
long
(generic reader).
merge-tables
(function).
name
(generic reader).
optional
(class).
optionals
(generic reader).
parse-flag
(generic function).
parse-optional
(generic function).
parse-optionals
(generic function).
parse-positional
(generic function).
parse-positionals
(generic function).
parse-subparsers
(generic function).
positional
(class).
positionals
(generic reader).
previous-parsers
(generic reader).
print-help
(generic function).
program-name
(generic reader).
short
(generic reader).
subparsers
(generic reader).
sync-parser
(generic function).
table
(generic reader).
var
(generic reader).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Macro for creating the main parser. Always names the parser main-parser (required for parsing
to work) and adds the help flag. Allows to add further parameters to the parser. Returns the parser
at the end
Macro for creating a sub parser, provides name as the subparser name to the help message, adds a help flag and allows to add further parameters to the parser. Returns the parser at the end.
parser
) &key short long help var) ¶Adds a flag to the given parser using short as the short value of the flag (has to be lead with a single - in the argument list. The var determines the name under which it is stored in the parser value table. long determines the long version of the flag (lead with two -) and help is the help string used to generate the help message
parser
) &key short long default help var) ¶Adds an optional value to the given parser. short is the to be used parameter name (with a single leading -). Var is the name under which to store the value in the parser table. long is the long version of the name (lead with two –). Default determines the default value and help is the help message string to be used in the auto generated help message
parser
) &key name help) ¶Adds a positional argument to the given parser. Name is both the name of the positional used in the help message as well as the name under which the value is stored. Help defines the string to be used in the auto generated help message
cancel-parsing-error
) stream) ¶positional
) stream) ¶cmd-arg-error
) stream) ¶simple-error
.
(quote "")
:format-control
This slot is read-only.
(quote (list))
:format-arguments
This slot is read-only.
add-default
.
add-flag
.
add-generic-parser
.
add-help
.
add-optional
.
add-positional
.
add-subparser
.
defaults
.
description
.
flags
.
get-key-value-pairs
.
get-value
.
name
.
optionals
.
parse
.
parse-optionals
.
parse-positionals
.
parse-subparsers
.
positionals
.
previous-parsers
.
print-help
.
print-object
.
program-name
.
subparsers
.
sync-parser
.
table
.
"no description"
:description
This slot is read-only.
"program.lisp"
:program-name
This slot is read-only.
(list)
This slot is read-only.
(list)
This slot is read-only.
(list)
This slot is read-only.
(make-hash-table :test (quote equalp))
This slot is read-only.
allows for the creation of a mockup parser to enable creating a parser without actually parsing command line parameters
merges table-b into table-a
cancel-parsing-error
)) ¶cmd-arg-error
)) ¶cancel-parsing-error
)) ¶cmd-arg-error
)) ¶positional
)) ¶automatically generated reader method
optional
)) ¶automatically generated reader method
help-flag
) argv table) ¶Tries to parse (car argv) using the passed flag (i.e., help flag). If the flag is successfully parsed the help-flag-condition is signaled, else argv and nil is returned.
parser
) argv) ¶Given a parser and a list of strings this method extracts the provided
flags and optional parameters and enters them into the parser table.
It returns the remaining list. The parsing either stops if all optionals
or flags of the parser a filled or if the currently viewed list element does
not match either an optional or flag.
positional
) argv table) ¶Parses a positional argument, i.e., (car argv) and stores it in the given table. Throws an error in case no value is contained in argv. Returns (cdr argv) as it either always works or has to throw an error.
simple-error
.
(quote "")
:format-control
This slot is read-only.
(quote (list))
:format-arguments
This slot is read-only.
simple-error
.
:help-message
This slot is read-only.
:help-message
This slot is read-only.
:help-message
This slot is read-only.
Jump to: | A C D F G H L M N O P S T V |
---|
Jump to: | A C D F G H L M N O P S T V |
---|
Jump to: | D F H L N O P S T V |
---|
Jump to: | D F H L N O P S T V |
---|
Jump to: | C D F H M O P S |
---|
Jump to: | C D F H M O P S |
---|