At the bottom level, the source program comprises:
Whitespace (spaces, tabs, newlines) which is ignored.
Comments ('C' style i.e. between /* and */)
which are ignored.
Literals of the following types:
Strings enclosed in double quotes, e.g. "a string"
Characters enclosed in single quotes, e.g. 'a'
Numbers in decimal, e.g. 501
Numbers in binary, octal and hex using the following syntax:
2#10100011
8#077
16#FF0B5511
Character and string literals may include 'C'-style escape
sequences such as \n, \t, \", etc.
The only escape sequence that is not allowed is \0,
which would give the compiler indigestion.
The following reserved symbols:( , )
Words. A word is any sequence of alphanumerics and _.
The language is case sensitive.
Symbols. A symbol is any of the following: ! $ % ^ & * - + = [ { } ] ; : @ ~ # < > . ? /
Note: this list is subject to expansion.
Syntax
LARD's syntax rules are minimalist: everything is an expression.
Expressions can take any of the following forms:
Literals, as above.
Expressions enclosed in parentheses, e.g. (99).
Single identifiers, e.g. pi.
Prefix expressions of the form identifier(expression,expression, ... ).
Infix expressions, which are described in the following section.