Skip to content

Command Line Usage

Michael Wang edited this page Feb 9, 2022 · 8 revisions

The CLI interface is fairly simple to use. Most functionality comprises of command line arguments. Command line arguments in supperforth are parsed from left to right. The first expected flag is a functionality flag, followed by several operand flags depending on the functionality flag, and so forth(you can perform more than one operation in a single command).

Functionality Flags

There are four principle functionality flags.

Functionality Flag Expects Source Expects Output
Help -help No No
Information -info No no
Compile -c Expects SuperForth Source Expects Binary Output Destination
Run -r Expects Binary No
Compile and Run -cr Expects SuperForth Source No
Inspect Dump (from superforth binary) -rd Expects Binary No
Inspect Dump (after compiling source) -cd Expects SuperForth Source No

Argument/Specifier Flags

To specify an source, use the -s flag followed by a source specifier(ie filepath). To specify an output, use the -o flag followed by an output specifier(ie filepath). Note: that a source doesn't necessarily have to be a SuperForth source or a SuperForth binary. Note: Usually the source specifier is required before the output specifier.

Clone this wiki locally