Command Syntax

All commands in the program are words that consist of a primary word (a noun/object) and a first keyword (a verb/action). To this foundation may be added options and modifiers (adverb(s)). Lastly, the entirety of the command may be filtered through a range (a prepositional phrase). In other words, commands syntactically mimic natural language.

The latter components (options, modifiers, and ranges) are not uniformly required by all commands; they are frequently optional. These parts also usually require user-supplied values to be completed.

The syntactical pattern is expressed as

NOUN - VERB - OPTION(S) - MODIFIER(S) - RANGE

Note the order is consistent and required in all commands. That said, parts may be omitted in the middle when optional. Thus commands may manifest the simpler pattern NOUN - VERB - RANGE when OPTION and MODIFIER components are optional (which is most commands).

Syntax Pattern Examples

NOUN-VERB

program quit
model new

This is the simplest of command patterns. In these lines, program and model are the NOUN component; quit and new are the VERB component. The first command exits the program. The second command clears the current model state. See program quit and model new for reference information on these commands.

NOUN-VERB-OPTION, with and without RANGE


NOUN-VERB-MODIFIER, with and without RANGE


NOUN-VERB-OPTION-MODIFIER, with and without RANGE

To recap, a command will always have, at minimum, a NOUN and a VERB. Depending on the command, these two may be followed by:

  • zero, one, or more OPTIONs

  • zero, one, or more MODIFIERs (which will vary the effect of the command), and

  • zero or one (and one only) RANGE phrase (which will restrict the effect of the command).