Basic operation

Command line options

The command line options to GSiril can be sumarised by running gsiril --help. This will display something similar to the following.

gsiril -- proves touches.

Usage: gsiril OPTIONS

  -?, --help             Print this help message
  -V, --version          Print the program version
  -b, --bells=BELLS      The default number of bells.
  -n, --extents=NUM      The number of extents required.
  -r, --rounds=ROW       The starting 'rounds'.
  -i, --interactive      Run in interactive mode
  -v, --verbose          Run in verbose mode
  -E, --everyrow-only    Only print output from the everyrow symbol
  -I, --case-insensitive Run case insensitively 
  -P, --prove[=SYMBOL]   Proves a particular symbol (or the first if none
  -D, --define=NAME=VALUE Define a particular symbol
  -m, --module=MODULE    Import the given module
  --msiril               Run in microsiril compatibile mode

Required or optional arguments to long options are also required or
optional arguments to the corresponding short options.

MicroSiril compatibility

The --msiril option actives MicroSiril compatibility mode. MicroSiril compatibility mode is also activated automatically if the program has been renamed msiril or microsiril (possibly with a .exe suffix on Windows). Making a copy (or, on Linux, a symlink) of GSiril can be a convenient way to active MicroSiril compatibility mode. (If you have compiled and installed GSiril from source, there should already be version installed as msiril.)

Currently, the --msiril option is exactly the same as the combination of the -P option (without an argument) and the -I option. The -I option tells GSiril to treat symbols as case-insensitve: thus, for example, you cannot use b to mean a bob and B to mean a course containing a bob before.

The -P, when used without an argument, option tells GSiril to prove the first symbol defined in the file. Without this option, it would be necessary to add a prove statement to source file to tell GSiril which symbol to prove. The -P option, when used with an argument, can also be used to tell GSiril which symbol to prove. For example using the option -Ppeal is equivalent to adding the line prove peal to the end of the source file.

Interactive Mode

GSiril attempts from standard input. This means it is possible to type the GSiril language directly into the program. Frequently, however, it is more convenient to get GSiril to read from a file. This can be done in most environments via redirection:

gsiril < input

When typing directly into GSiril, the -i option can be used to put GSiril into interactive mode. This is does two things: errors in user input do not cause GSiril to exit immediately, and on systems that support it, more advanced line editting is enabled (for example, via the GNU readline library). The -v option can also be useful in this situation for providing additional feedback.

GSiril will continue parsing its input until the end of the input file is reached. When typing directly into GSiril, it is usually possible to explicitly signal end-of-file. This is usually done with Control-D, but on Windows it is done with Control-Z. Alternatively, a statement containing just the single word end, quit or exit will cause GSiril to finish parsing its input and exit.