-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Welcome to the Expression Machine Wiki. This site contains documentation describing aspects of the Expression Machine.
Expression Machine consists of a high-level language, an assembly language, byte code, and a stack machine. Each of these items is discussed on other pages listed below. The collection of all of these items and the high level language itself are referred to as 'em'.
EM is very similar to JavaScript; however, it is only a subset and it does diverge from JavaScript in places. Perhaps the most obvious difference is that EM does not support assignment other than with the creation of symbols. Currently, it does not have any looping constructs either.
The main purpose of EM is to serve as glue in places where small bits of math and logic need to be executed at runtime. Typically, this requires look-ups only. If needed, intermediate values can be stored via 'sym' declarations which will assign that value to the scope that contains it.
Below are some descriptions of EM's features, syntax, built-in types, functions, and constants.
EM is compiled down to byte code that is executed in a stack machine. It is possible to write code directly at the byte code level. The ema language is a kind of assembly language for that purpose. It allows you to code directly to the stack machine. Most instructions have long and short forms
EM and ema are compiled to instructons represented by byte code. The following document describes the instructions available in the stack machine execution environment