Escher A language for connecting technologies using pure metaphors

Command-line and runtime

The Escher binary is intended to be a general-purpose execution environment for Escher programs. It is invoked with two parameters:

escher -src SourceDirectory MainDirective
The following steps are performed upon invocation:
  1. A default (initially empty) startup index is created.
  2. Basis reflexes are registered in the startup index, as described in the reflex section.
  3. The supplied source directory is traversed recursively:
    • Files with extension .escher are parsed as Escher source files. Circuits found therein are placed in the startup index, such that their location in the index is the same as the path of their source file relative to the source directory, followed by their circuit names. For instance, the source file a/b/c.escher, containing:
      	CircuitName { … }
      
      Will be registered under the index directive a.b.c.CircuitName.
    • Files with other extensions will be converted into SourceFile reflex materializers, located in the index at the path of their source file relative to the source directory. SourceFile reflexes, when materialized, return an io.ReadCloser for the content of the source file.
  4. Finally, the main directive is materialized.

The following command, for instance, will generate the contents of this handbook and place it in the current working directory where it is invoked:

escher -src "$GOPATH/src/github.com/hoijui/escher/src/" "*handbook.main"

The -src can be omitted in favor of setting the ESCHER environment variable.