A generic programming language.
- Identifiers consist of #, @, $, _, and capital and lowercase letters, and digits (except at the start of an identifier).
- Numbers consist of base-10 digits.
- Strings start with ' or " and end with the same. Escapes are made using \. \t is tab, \n is newline, \r is carriage return, and \u followed by any number of decimal digits is the unicode character with that number in decimal.
- Every other ASCII non-control character is a symbol. The following symbol sequences with no whitespace in between count as one symbol:
- !=
- %=
- &=
- &&=
- *=
- +=
- -=
- /=
- <=
- <<
- ==
- >=
- >>
- ^=
- |=
- ||=
- ~/=
- ~/
A program is a sequence of statements. When a program is run, it runs each of these statements in turn.
Each statement starts with one of the following identifiers:
expression: followed by an expression that is evaluated when this statement is ran.call: followed by an expression (the procedure), a colon, a comma-separated list of expressions (the arguments), and a semicolon. When this statement is ran, the procedure is evaluated (if it is not a procedure, runtime error), then the arguments in left-to-right order, then the procedure is called with the arguments.
- a string
- an identifier: finds the variable with that identifier as its name (if nonexistent, parse-time error) and when evaluated returns that variable's value.
- print: prints the arguments left-to-right and then a newline