4.2. Processors

A _processor_ is an object that performs some processing function. Processors are generally hooked up to to devices to read or write data. The separation of processing data streams, and sourcing and sinking those streams, is the traditional operating system facility known as device independence.

Whereas a file, denoted by a filename, is used in an operating system to implement device independence, in Interscript, a Python object is used instead.

The design of Interscript consists of four processors: the input, the code tangler, the document weaver, and the Python engine.

The Interscript parser reads and parses the input and sends lines to one of the three outputs. If the line begins with the special warning character @ it is sent to Python, otherwise if the tangler is not None it is sent to the tangler, otherwise it is sent to the weaver. If the tangler receives the line, it is written to a code file and echoed to the weaver.

The main source of power in this system is the ability to execute arbitrary Python script. Interscript has some builtin commands and data structures to facilitate control.