Skip to content

Commit

Permalink
latest as of 20 Apr 2019, hoijui/master, c5324c3
Browse files Browse the repository at this point in the history
  • Loading branch information
hoijui committed Apr 20, 2019
1 parent dbf7b6d commit 2d5d611
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 32 deletions.
14 changes: 7 additions & 7 deletions basis-escher.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ <h1>Escher faculty</h1>
<h2>Index reflex</h2>

<p>Every running Escher circuit program has been <a href="program.html">materialized relative to an index</a>.
The index reflex, <code>escher.Index</code>, is a noun reflex that emits the index relative to which
The index reflex, <code>e.Index</code>, is a noun reflex that emits the index relative to which
the current circuit has been materialized.

<p>The following program, for instance, will print out the index used to materialize the invoking circuit program:

<pre>
{
*Show = *escher.Index
*Show = *e.Index
}
</pre>

<h2>Materialize reflex</h2>

<p>The materialize reflex, named <code>escher.Materialize</code>,
<p>The materialize reflex, named <code>e.Materialize</code>,
materializes a program circuit relative to an index of faculties.

<p>The reflex requires that two valves, <code>:View</code> and <code>:Residue</code>, be connected.
Expand All @@ -49,14 +49,14 @@ <h2>Materialize reflex</h2>

<pre>
{
m *escher.Materialize
f *Fork
m *e.Materialize
f *e.Fork

m:View = f:
f:Program = {
*Show = "Hello from the child circuit program."
}
f:Index = *escher.Index
f:Index = *e.Index
m:Residue = *Show
}
</pre>
Expand All @@ -70,7 +70,7 @@ <h2>Materialize reflex</h2>
</pre>

<p>using the same index that was used to materialize the parent program, as acquired from
the <code>*escher.Index</code> reflex in the parent program.
the <code>*e.Index</code> reflex in the parent program.


</div>
Expand Down
4 changes: 2 additions & 2 deletions basis-flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h4>Split direction</h4>

<pre>
{
f *Fork
f *e.Fork
f: = {
x "Hello"
y "World"
Expand Down Expand Up @@ -102,7 +102,7 @@ <h4>Merge direction</h4>

<pre>
{
f *Fork
f *e.Fork
f: = *Show
f:x = "New"
f:y = "York"
Expand Down
4 changes: 2 additions & 2 deletions basis-os.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ <h2>Process execution reflex</h2>
Args { "/" }
}

yio *Fork
yio *e.Fork
proc:IO = yio:

yio:Stdin = *Ignore
yio:Stdout = *os.Stdout
yio:Stderr = *os.Stderr

yexit *Fork
yexit *e.Fork
proc:Exit = yexit:

exit *os.Exit
Expand Down
2 changes: 1 addition & 1 deletion cmd.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h1>Command-line and runtime</h1>
<p>The following command, for instance, will generate the contents of this handbook and place it in the
current working directory where it is invoked:
<pre>
escher -src github.com/gocircuit/escher/src *handbook.main
escher -src "$GOPATH/src/github.com/gocircuit/escher/src/" "*handbook.main"
</pre>
<p>The <code>-src</code> can be omitted in favor of setting the <code>ESCHER</code> environment variable.

Expand Down
26 changes: 13 additions & 13 deletions debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ <h2>Panic traces</h2>
{
*Show = "Parent circuit"

m *escher.QuickMaterialize
m *e.QuickMaterialize
m:Residue = *Ignore
m:Index = *escher.Index
m:Index = *e.Index
m:Program = {
*escher.Breakpoint = 1
*e.Breakpoint = 1
}
}
</pre>
Expand All @@ -56,36 +56,36 @@ <h2>Panic traces</h2>

<pre>
BASIS(:)
DIRECTIVE(:) *escher.Breakpoint/*escher.Breakpoint
DIRECTIVE(:) *e.Breakpoint/*e.Breakpoint
CIRCUIT() {
0 *escher.Breakpoint
0 *e.Breakpoint
1 1
0: = 1:
}
MATERIALIZE() {
0 *escher.Breakpoint
0 *e.Breakpoint
1 1
0: = 1:
}
BASIS(:Residue :View)
DIRECTIVE(:Residue :View) *escher.Materialize/*escher.Materialize
DIRECTIVE(:Residue :View) *e.Materialize/*e.Materialize
CIRCUIT(:Index :Program :Residue) {
x *escher.Materialize
y *Fork
x *e.Materialize
y *e.Fork
:Residue = x:Residue
:Index = y:Index
:Program = y:Program
x:View = y:
}
DIRECTIVE(:Index :Program :Residue) *escher.QuickMaterialize/*escher.QuickMaterialize
DIRECTIVE(:Index :Program :Residue) *e.QuickMaterialize/*e.QuickMaterialize
CIRCUIT() {
m *escher.QuickMaterialize
m *e.QuickMaterialize
0 *Show
1 "Parent circuit"
2 *Ignore
3 *escher.Index
3 *e.Index
4 {
0 *escher.Breakpoint
0 *e.Breakpoint
1 1
0: = 1:
}
Expand Down
2 changes: 1 addition & 1 deletion install.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1>Bulding and installing Escher</h1>
<p>To check that installation succeeded, run

<pre>
% ESCHER=github.com/gocircuit/escher/src escher test.All
% ESCHER=github.com/gocircuit/escher/src escher "*test.All"
+ Test basic.TestFork (ok)
+ Test basic.TestFunc (ok)
+ Test text.TestForm (ok)
Expand Down
2 changes: 1 addition & 1 deletion program.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ <h3>Materializing from Go</h3>
<h3>Materializing from Escher</h3>

<p>One can recursively materialize circuits programs from within other
circuit programs. This is accomplished using the built-in reflex <code>escher.Materialize</code>
circuit programs. This is accomplished using the built-in reflex <code>e.Materialize</code>
which is described in the <a href="basis-escher.html">materialization faculty section</a>.

<h3>Materializing from POSIX</h3>
Expand Down
11 changes: 6 additions & 5 deletions syntax.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,26 +96,27 @@ <h2 id="runtime">Go interface</h2>
<p>Using the Escher parser is very simple, in three steps:

<ul>
<li>Import the parsing package <code>"github.com/gocircuit/escher/see"</code></li>
<li>Import the parsing packages <code>"github.com/gocircuit/escher/a"</code> and <code>"github.com/gocircuit/escher/see"</code></li>
<li>Create a parsing object for your source string</li>
<li>Repeatedly parse one circuit definition at a time</li>
</ul>

<p>The following example illustrates this:
<p>The following Go example illustrates this:

<pre class="go">
package main

import (
"fmt"
"github.com/gocircuit/escher/a"
"github.com/gocircuit/escher/see"
)

func main() {
src = "alpha { a 123; b 3.14; a: = b:}\n beta { 1, 2, 3, \"abc\" }"
p := see.NewSrcString(src) // create a parsing object
src := "alpha { a 123; b 3.14; a: = b:}\n beta { 1, 2, 3, \"abc\" }"
p := a.NewSrcString(src) // create a parsing object
for {
n, v := see.See(p) // parse one circuit at a time
n, v := see.SeePeer(p) // parse one circuit at a time
if v == nil {
break
}
Expand Down

0 comments on commit 2d5d611

Please sign in to comment.