The GSiril language

Language basics

Several GSiril statements in GSiril may be placed on one line, in which case they are separated by semicolons (;). Line breaks are also used to mark the end of a statement. A semicolon at the end of the line is optional. (In the future, this semicolon might be required except when in MicroSiril compatibility mode. It is therefore suggested that they be used.)

Because a line break is used to terminate a statement, it is not possible to arbitrarily break long statements into multiple lines. To allow GSiril statements to be more conveniently formatted, a line break is always permitted immediately after a comma. (This is possible because a comma can never be the last character in a statement.) For instance, the following code contains a single statement broken across two lines.

prove 3( Cm,b,Cm,Pr,Pr,Cm,
         Cm,b,Cm,Pr,Pr,Cm,b );

Comments start with a pair of slashes (//) and continue to the end of the line. (In MicroSiril compatibility mode, a single slash (/) is sufficient.)

Unless the -I command line option has been used, keywords and identifiers are all case sensitive.


Definitions are a way of assigning a symbolic name to an expression, such as a block of place notation, so that it can be reused. The syntax for a definition statement is

name = expression

The name must start with a letter, and may contain letters, numbers or underscores. The right-hand side is an expression and is documented in the section on expressions. The right-hand side may be omitted, in which case the statement undefines the named symbol. The following example shows some simple definitions for plain and bobbed leads of Bristol Major.

m = &-5-4.5-5.36.4-4.5-4-1;
p = m, +8;
b = m, +4;

The bells, extents and rounds statements

When GSiril proves a touch, it needs to know three things: the number of bells, the number of times each row is allowed, and which row to start from. There pieces of information can be supplied in two ways. They can be set from the command line, via the -b, -n and -r options. Alternatively, they can be set with the bells, extents and rounds statements. For example,

6 bells;         // Sets the number of bells to 6
2 extents;       // The touch is allowed to contain rows twice.
rounds '134256'; // Start the touch from 134256

By default, GSiril only allows rows to occur once; it does not have a default number of bells, and must be specified before any place notation can be parsed.

The prove statement

There are two ways to prove touches: using the -P option, or using the prove statement. The -P option takes an optional argument giving the name of the symbol to be proved. If no argument is supplied, then the first symbol defined will be proved. (This is for compatibility with MicroSiril.)

When entering input directly into GSiril, or when you want to prove more than one touch, the prove statement is often more useful. This statement simply consists of the word prove followed by an expression to prove. This example will prove the standard 720 of Plain Bob Minor (assuming p and b have been defined appropriately).

prove 3(b,3p,2b,4p);

The import statement

The import statement provides GSiril with a way of including the contents of one file within another. This can be useful for building up files containing libraries of definitions. The syntax of the import statement is as follows.

import "filename"