|
2.2 Command Line Arguments Following the verb is the body of the command line which FunnelWeb parses into zero or more arguments separated by runs of one or more blanks.
FunnelWeb_command_line = FunnelWeb_verb { {" "}+ argument } Because some operating systems convert their command line to upper case before handing it to the invoked program, FunnelWeb has been constructed so as to be insensitive to the case of its command line arguments. However, when dealing internally with arguments, FunnelWeb preserves the case of its command line arguments so that it will be able to operate with operating systems (such as Unix) whose file names are case dependent. A valid FunnelWeb argument consists of a sign, an identifying letter, and an optional string with no spaces separating them.
argument = sign id_letter [non_blank_string] sign = "+" | "-" | "=" id_letter = "B" | "C" | "D" | "F" | "H" | "I" | "J" | "K" | "L" | "O" | "Q" | "S" | "T" | "W" | "X" In addition there is a special form of argument that does not begin with a sign.
argument = non_blank_string_not_starting_with_+_=_or_- This form is exactly equivalent to the same string with "+F" prepended to it. The semantic effect of these arguments is defined in terms of options which are the internal parameters of FunnelWeb and which correspond closely with the set of legal command line arguments. FunnelWeb has a predefined set of options each identified by an identifying letter having two attributes: a string , and a boolean . The boolean determines whether an option is turned on or off . The string contains additional information depending on the option. When FunnelWeb starts up, its options have predefined default values. FunnelWeb then parses its command line sequentially from left to right executing the effect of each argument on the argument's corresponding option. The sign and the string components of the argument are processed independently . A sign of + turns the option on. A sign of - turns the option off. A sign of = leaves the option's boolean attribute unchanged. The argument string replaces the string of the corresponding option, unless the argument string is empty, in which case the option string is not changed. Because FunnelWeb processes its command line arguments from left to right, a later argument can cancel the effect of an earlier one. For example fw +t -t will result in the t option ending up off . This allows users to set up their own default arguments by defining a symbol in their operating system's command language. For example, a Unix user who wants FunnelWeb to delete all identical output files and create a documentation file on each run with a default .typ extension could simply place the following definition in their ".login" file.
alias fw fw +d +t.typ These default options can then later be easily overridden on the command line.
Webmaster Copyright © Ross N. Williams 1992,1999. All rights reserved. |