1 Scope

(1) This document defines the embeddable scripting language Pinax: which Pinax programs are conforming, what a conforming program does when it runs, how a processor refuses a program that does not conform, and how a C program drives a processor.

(2) This document defines:

(3) This document does not define:

(4) This document is not written against one processor. Still, every example in it was run with the implementation in the same repository (pnx, libpinax), and the output printed is the output captured then. Where an example and the text disagree, the text wins.

Note

Pinax is a scripting language that runs inside one fixed block of memory. It has no garbage collector, no heap allocation, no pointers, no objects, no dynamic types and no exceptions. On the surface it is a typed Forth: words pass values over a stack, and inside a word values have names. The rest of this document spells that sentence out.

1.1 How to read this document

(5) This document defines rules. Someone learning Pinax for the first time will find the manual easier to start with. This document is for checking a rule exactly where the manual points to it (“standard 9.3”).

(5a) The index at the end points, for each term, to the clause and page that define it. Annex B collects the diagnostic messages of the clauses in one place.

(6) Each clause has these parts in this order, leaving out the empty ones:

(7) A change of the stack is written before → after, with the top on the right: a b → b a exchanges the top two values. “shall” is a rule for programs; “the processor refuses” is a rule for implementations. A paragraph number such as (3a) is a paragraph inserted later; a number once used is never changed.