
SemiThorpe 2004-11-25


* White Space
Currently SemiThorpe is lexxed into words, by white space.
All tokens (including ( ) [ ] { } ; ...) must be separated by white space.
All white space are equal;  newlines are not special.

* Functions
A Semithorpe program is just function definitions.

The function named M is the main routine, run by default, as in unithorpe.

All functions return a thingy.  
All functions take zero or more thingies as arguments.

When called, unspecified arguments become 0, and extra are ignored.
For local variables, define extra parameters.

All parameters are "in" parameters.
The "inout" parameter in the unithorpe translation is only used for the 
return value.

* Variables
All variables access the Global Table.
As in unithorpe, local variables are slots in the global table
for which the old value was stored away on entry to the function,
and will be restored when the function returns.

* Values
All values are thingies, as in unithorpe:
they are either 16-bit unicode characters,
or arrays of 65536 thingies, indexed by characters.

Integers are in the range 0..65535, and are the same as characters.

* Examples





