Back


Scripting Essentials

A Linguist script language consists of a set of whitespace-delimited tokens, mainly words consisting of alphabetic characters. The exact content of the language is up to you but you must follow the general rules. Very few non-alphabetic or numeric symbols are needed; in fact only four symbols are used in the language:

  1. The colon (:) signifies a program label (somewhere you can go to).
  2. Text string constants are enclosed by double quotation marks, as in "Hello, world!"
  3. A exclamation mark (!) not in a text string means the rest of the line is a comment.
  4. The command #include permits you to include one or more other scripts in the build.

Everything else is alphabetic characters and numbers.

So the following lines are legal:

add 5 to X
adjust Handle
schreiben "Sind Sie fertig?"
ecrivez "Etes-vous fini?"

but these are not:

X += 5;
adjust (Handle);
schreiben ("Sind Sie fertig?");
ecrivez ("Etes-vous fini?");

As you can see, there's nothing to stop you creating an all-German or all-French scripting language.

Every script language command starts with a keyword token, defined according to the structure of the language you are building.

And finally, Linguist pays little regard to line breaks. The only exceptions are comments and quoted text strings, neither of which may continue from one line to the next.


Back