|
| 1 | +\fan_{i}[\scope_{j}(a), \scope_{j}(b)] { |
| 2 | + /* Duplicate higher delimiter. */ |
| 3 | + if (i < j) |
| 4 | + ++this.total; |
| 5 | + else |
| 6 | + return false; |
| 7 | +} \scope_{j}[\fan_{i}(a, b)]; |
| 8 | + |
| 9 | +\scope_{i}[\fan_{j + 1}(a, b)] { |
| 10 | + /* Level up higher or matching fan. */ |
| 11 | + if (i <= j) |
| 12 | + ++this.total; |
| 13 | + else |
| 14 | + return false; |
| 15 | +} \fan_{j}[\scope_{i}(a), \scope_{i}(b)]; |
| 16 | + |
| 17 | +\scope_{i}[\scope_{j + 1}(a)] { |
| 18 | + /* Level up higher delimiter. */ |
| 19 | + if (i < j) |
| 20 | + ++this.total; |
| 21 | + else |
| 22 | + return false; |
| 23 | +} \scope_{j}[\scope_{i}(a)]; |
| 24 | + |
| 25 | +\print { |
| 26 | + /* Ignore delimiter. */ |
| 27 | + ++this.total; |
| 28 | +} \scope_{i}[!print]; |
| 29 | + |
| 30 | +\read_{C}[\scope_{i}(a)] { |
| 31 | + /* Pass through context. */ |
| 32 | + ++this.total; |
| 33 | +} \scope_{i}[\read_{C}(a)]; |
| 34 | + |
| 35 | +\scope_{i}[a] { |
| 36 | + /* Annihilate matching delimiters. */ |
| 37 | + if (i == j) |
| 38 | + ++this.total; |
| 39 | + else |
| 40 | + return false; |
| 41 | +} \scope_{j}[a]; |
| 42 | + |
| 43 | +\scope_{i}[\apply(a, b)] { |
| 44 | + /* Pass through application. */ |
| 45 | + ++this.total; |
| 46 | +} \apply[\scope_{i}(a), \scope_{i}(b)]; |
| 47 | + |
| 48 | +\scope_{i}[\lambda(a, b)] { |
| 49 | + /* Level up delimiter. */ |
| 50 | + ++this.total; |
| 51 | +} \lambda[\scope_{i + 1}(a), \scope_{i + 1}(b)]; |
| 52 | + |
| 53 | +\scope_{i}[\atom_{M}] { |
| 54 | + /* Return an atom. */ |
| 55 | + ++this.total; |
| 56 | +} \atom_{M}; |
| 57 | + |
| 58 | +\read_{C}[\fan_{i}(a, b)] { |
| 59 | + /* Duplicate context. */ |
| 60 | + ++this.total; |
| 61 | +} \fan_{i}[\read_{C}(a), \read_{this.clone(C)}(b)]; |
| 62 | + |
| 63 | +\print { |
| 64 | + /* Output results of read-back. */ |
| 65 | + this.nf = M; |
| 66 | + ++this.total; |
| 67 | +} \atom_{M}; |
| 68 | + |
| 69 | +\read_{C}[a] { |
| 70 | + /* Read back abstraction. */ |
| 71 | + ++this.total; |
| 72 | +} \lambda[\atom_{this.mkid()}, \read_{this.abst(C)}(a)]; |
| 73 | + |
| 74 | +\apply[\read_{this.appl(M)}(a), a] { |
| 75 | + /* Read back application. */ |
| 76 | + ++this.total; |
| 77 | +} \atom_{M}; |
| 78 | + |
| 79 | +\read_{C}[\atom_{this.atom(C, M)}] { |
| 80 | + /* Read back an atom. */ |
| 81 | + ++this.total; |
| 82 | +} \atom_{M}; |
| 83 | + |
| 84 | +\fan_{i}[\atom_{M}, \atom_{M}] { |
| 85 | + /* Duplicate an atom. */ |
| 86 | + ++this.total; |
| 87 | +} \atom_{M}; |
| 88 | + |
| 89 | +\apply[\scope_{0}(a), \scope_{0}(b)] { |
| 90 | + /* Apply beta reduction. */ |
| 91 | + ++this.beta; |
| 92 | + ++this.total; |
| 93 | +} \lambda[a, b]; |
| 94 | + |
| 95 | +\fan_{i}[\apply(a, b), \apply(c, d)] { |
| 96 | + /* Duplicate application. */ |
| 97 | + ++this.total; |
| 98 | +} \apply[\fan_{i}(a, c), \fan_{i}(b, d)]; |
| 99 | + |
| 100 | +\fan_{i}[\lambda(a, b), \lambda(c, d)] { |
| 101 | + /* Level up fan. */ |
| 102 | + ++this.total; |
| 103 | +} \lambda[\fan_{i + 1}(a, c), \fan_{i + 1}(b, d)]; |
| 104 | + |
| 105 | +\fan_{i}[a, b] { |
| 106 | + /* Annihilate matching fans. */ |
| 107 | + if (i == j) |
| 108 | + ++this.total; |
| 109 | + else |
| 110 | + return false; |
| 111 | +} \fan_{j}[a, b]; |
| 112 | + |
| 113 | +\fan_{i}[\fan_{j}(a, b), \fan_{j}(c, d)] { |
| 114 | + /* Duplicate higher fan. */ |
| 115 | + if (i < j) |
| 116 | + ++this.total; |
| 117 | + else |
| 118 | + return false; |
| 119 | +} \fan_{j}[\fan_{i}(a, c), \fan_{i}(b, d)]; |
| 120 | + |
| 121 | +$$ |
| 122 | + |
| 123 | +INCONFIG |
| 124 | + |
| 125 | +$$ |
| 126 | + |
| 127 | +READBACK |
| 128 | + |
| 129 | +this.beta = 0; |
| 130 | +this.total = 0; |
0 commit comments