[2d layout, refactor of opr logic (typesetting)
raph.levien@gmail.com**20060905090310] {
hunk ./app/typeset.py 5
+widlim = 400
+
hunk ./app/typeset.py 89
+        elif sexp[0] == 'vbox':
+            self.write_vbox(sexp)
+        elif sexp[0] == 'hline':
+            print >> self.out, 'gsave .5 setlinewidth %g 0 rlineto stroke grestore' % int(sexp[1])
hunk ./app/typeset.py 104
-    def newline(self):
-        self.x = self.x0
-        self.y -= 14
-        self.curptvalid = 0
-        if (self.y < 36):
+    def write_vbox(self, sexp):
+        for i in range(1, len(sexp) - 1, 2):
+            print >> self.out, 'gsave'
+            self.write_sexp(sexp[i])
+            print >> self.out, 'grestore 0 %g rmoveto' % -int(sexp[i + 1])
+        self.write_sexp(sexp[-1])
+    def write_slug_nl(self, slug):
+        if (self.y - slug.height < 22):
hunk ./app/typeset.py 114
+        self.write_sexp(slug.markup)
+        self.y -= slug.height
+        self.curptvalid = 0
hunk ./app/typeset.py 122
-    def __init__(self, prec, width, nlines, markup, prsp = 0):
+    def __init__(self, prec, width, nlines, markup, prsp = 0, height = 14):
hunk ./app/typeset.py 126
+        self.height = height
+        #self.ascent = 11
hunk ./app/typeset.py 129
-        self.op_assoc = 'n'
-        self.op_prec = 0
hunk ./app/typeset.py 141
+def hline_slug(wid):
+    return Slug(9999, wid, 1, ['rise', '10', ['hline', wid]], -1, 1)
+
hunk ./app/typeset.py 146
+    height = 0
hunk ./app/typeset.py 151
+        height = max(height, slug.height)
+        #if slug.nlines != 1:
+        #    markup.append(['string', 'CMR10', '10', '[%d]' % slug.nlines])
hunk ./app/typeset.py 156
-    return Slug(prec, width, nlines, markup, prsp)
+    return Slug(prec, width, nlines, markup, prsp, height)
+
+def vbox_slugs(slugs, prec, prsp = 0):
+    width = 0
+    height = 0
+    markup = ['vbox']
+    nlines = 0
+    for slug in slugs:
+        width = slug.width
+        height += slug.height
+        nlines += slug.nlines
+        markup.append(slug.markup)
+        markup.append(slug.height)
+    del markup[-1]
+    return Slug(prec, width, nlines, markup, prsp, height)
+
+def combine_infix_slugs(slugs, prec, prsp):
+    result = combine_slugs(slugs, prec, prsp)
+    if (result.width > widlim or result.nlines > 1):
+        inner = []
+        for i in range(0, len(slugs) - 1, 4):
+            if i:
+                inslugs = [space_slug(10)]
+            else:
+                inslugs = []
+            inslugs.extend(slugs[i: i + 3])
+            inner.append(combine_slugs(inslugs, prec))
+        inner.append(combine_slugs([space_slug(10), slugs[-1]], prec))
+        result = vbox_slugs(inner, prec, prsp)
+    return result
hunk ./app/typeset.py 195
+    #print 'dst:', term
hunk ./app/typeset.py 233
-                return combine_slugs(slugs, prec, prsp)
+                return combine_infix_slugs(slugs, prec, prsp)
hunk ./app/typeset.py 274
-                return combine_slugs(slugs, prec, prsp)
+                return combine_infix_slugs(slugs, prec, prsp)
hunk ./app/typeset.py 373
-                slug = markup_slug(prod[3])
-                slug.op_assoc = prod[1]
-                slug.op_prec = int(prod[2])
+                slug = markup_slug(prod[1])
hunk ./app/typeset.py 381
-            return parenthesize(combine_slugs(slugs, 9999))
+            combined = combine_slugs(slugs, 9999)
+            if combined.width > widlim or combined.nlines > 1:
+                inner = [combine_slugs(slugs[0:min(3, len(slugs))], -1)]
+                for i in range(3, len(slugs), 2):
+                    inner.append(combine_slugs([space_slug(10), slugs[i + 1]], -1))
+                combined = vbox_slugs(inner, 9999)
+            return parenthesize(combined)
hunk ./app/typeset.py 396
+            slug = set_br(term)
+            if slug: return slug
hunk ./app/typeset.py 401
-            prec = op_slug.op_prec
-            if prec == 0:
-                prec = 1050
+            prec = 1050
hunk ./app/typeset.py 403
-            if op_slug.op_assoc == 'l':
-                lprec += 1
hunk ./app/typeset.py 416
-            if op_slug.op_assoc == 'r':
-                rprec += 1
hunk ./app/typeset.py 427
-            return combine_slugs(slugs, prec, prsp)
+            return combine_infix_slugs(slugs, prec, prsp)
hunk ./app/typeset.py 440
+            slug = set_opr(term)
+            if slug: return slug
hunk ./app/typeset.py 445
-            prec = op_slug.op_prec
+            prec = 0
hunk ./app/typeset.py 447
-            if op_slug.op_assoc == 'l':
-                lprec += 1
hunk ./app/typeset.py 460
-            if op_slug.op_assoc == 'r':
-                rprec += 1
hunk ./app/typeset.py 471
-            return combine_slugs(slugs, prec, prsp)
+            return combine_infix_slugs(slugs, prec, prsp)
+        elif len(term) == 1 and oprtab.has_key(term[0]):
+            prod = oprtab[term[0]]
+            if prod[0] == 'infix':
+                return markup_slug(prod[3])
+        elif len(term) == 1 and brtab.has_key(term[0]):
+            prod = brtab[term[0]]
+            if prod[0] == 'infix':
+                return markup_slug(prod[3])
hunk ./app/typeset.py 508
+def set_opr(term):
+    op = term[2]
+    if type(op) == type([]) and len(op) == 1 and oprtab.has_key(op[0]):
+        prod = oprtab[op[0]]
+        optype = prod[0]
+        assoc = prod[1]
+        prec = int(prod[2])
+        left_slug = set_term(term[1], 'class')
+        right_slug = set_term(term[3], 'class')
+        if optype == 'infix':
+            assoc = prod[1]
+            prec = int(prod[2])
+            op_slug = markup_slug(prod[3])
+            lprec = left_slug.prec
+            if assoc == 'l':
+                lprec += 1
+            if prec >= lprec:
+                left_slug = parenthesize(left_slug)
+                lprsp = 3
+            elif prec + 1 == lprec:
+                lprsp = left_slug.prsp
+            else:
+                lprsp = left_slug.prsp + 2
+            rprec = right_slug.prec
+            if assoc == 'r':
+                rprec += 1
+            if prec >= rprec:
+                right_slug = parenthesize(right_slug)
+                rprsp = 3
+            elif prec + 1 == rprec:
+                rprsp = right_slug.prsp
+            else:
+                rprsp = right_slug.prsp + 2
+            prsp = max(lprsp, rprsp)
+            sp = max(0, prsp - 1)
+            sp_slug = space_slug(sp)
+            slugs = [left_slug, sp_slug, op_slug, sp_slug, right_slug]
+            return combine_infix_slugs(slugs, prec, prsp)
+
+def set_br(term):
+    op = term[2]
+    if type(op) == type([]) and len(op) == 1 and brtab.has_key(op[0]):
+        prod = brtab[op[0]]
+        optype = prod[0]
+        left_slug = set_term(term[1], 'class')
+        right_slug = set_term(term[3], 'class')
+        if optype == 'infix':
+            assoc = prod[1]
+            prec = int(prod[2])
+            op_slug = markup_slug(prod[3])
+            lprec = left_slug.prec
+            if assoc == 'l':
+                lprec += 1
+            if prec >= lprec:
+                left_slug = parenthesize(left_slug)
+                lprsp = 3
+            elif prec + 1 == lprec:
+                lprsp = left_slug.prsp
+            else:
+                lprsp = left_slug.prsp + 2
+            rprec = right_slug.prec
+            if assoc == 'r':
+                rprec += 1
+            if prec >= rprec:
+                right_slug = parenthesize(right_slug)
+                rprsp = 3
+            elif prec + 1 == rprec:
+                rprsp = right_slug.prsp
+            else:
+                rprsp = right_slug.prsp + 2
+            prsp = max(lprsp, rprsp)
+            sp = max(0, prsp - 1)
+            sp_slug = space_slug(sp)
+            slugs = [left_slug, sp_slug, op_slug, sp_slug, right_slug]
+            return combine_infix_slugs(slugs, prec, prsp)
+
hunk ./app/typeset.py 615
-    page.write_sexp(slug.markup)
+    page.write_slug_nl(slug)
hunk ./app/typeset.py 627
-    page.write_sexp(combine_slugs(slugs, -1).markup)
-    page.newline()
+    combined = combine_slugs(slugs, -1)
+    if combined.width > widlim or combined.nlines > 1:
+        # vertical layout
+        inner = []
+        if len(stmt[2]):
+            for hyp in stmt[2]:
+                inner.append(set_term(hyp, 'wff'))
+            inner.append(hline_slug(200))
+        inner.append(set_term(stmt[3], 'wff'))
+        slugs = [string_slug('Sans', '10', stmt[0])]
+        slugs.append(space_slug(10))
+        slugs.append(vbox_slugs(inner, -1))
+        combined = combine_slugs(slugs, -1)
+    page.write_slug_nl(combined)
hunk ./app/typeset.py 643
-    slugs = [string_slug('Sans', '10', thm[0])]
-    slugs.append(space_slug(10))
-    if len(thm[2]):
-        for hypname, hyp in thm[2]:
-            slugs.append(set_term(hyp, 'wff'))
-            slugs.append(space_slug(10))
-        slugs.append(markup_slug(['glyph', 'CMSY10', '10', '41']))
-        slugs.append(space_slug(10))
-    slugs.append(set_term(thm[3], 'wff'))
-    page.write_sexp(combine_slugs(slugs, -1).markup)
-    page.newline()
+    stmt = [thm[0], thm[1], [hyp for (label, hyp) in thm[2]], thm[3]]
+    return print_stmt(page, stmt)
hunk ./app/typeset.py 650
+oprtab = {}
+brtab = {}
hunk ./app/typeset.py 684
+            elif cmd == 'opr':
+                oprtab[args[0]] = args[1]
+            elif cmd == 'br':
+                brtab[args[0]] = args[1]
hunk ./app/typeset.py 690
-                page.newline()
hunk ./app/zfc-script 12
-font (rsfs10 rsfs10.pfa Script)
-font (rsfs7 rsfs7.pfa Script7)
+#font (rsfs10 rsfs10.pfa Script)
+#font (rsfs7 rsfs7.pfa Script7)
+font (TypoScript TypoScript10.pfa Script)
+font (TypoScript TypoScript10.pfa Script7)
hunk ./app/zfc-script 81
-term (On (const n 9999 (string CMR10 10 On)))
-term (card (const n 9999 (string CMR10 10 card)))
-term (cf (const n 9999 (string CMR10 10 cf)))
-term (rank (const n 9999 (string CMR10 10 rank)))
-term (R1 (const n 9999 (string CMR10 10 R1)))
-term (limsup (const n 9999 (string CMR10 10 limsup)))
-term (C. (const n 9999 (string CMR10 10 C)))
+term (On (const (string CMR10 10 On)))
+term (card (const (string CMR10 10 card)))
+term (cf (const (string CMR10 10 cf)))
+term (rank (const (string CMR10 10 rank)))
+term (R1 (const (string CMR10 10 R1)))
+term (limsup (const (string CMR10 10 limsup)))
+term (C. (const (string CMR10 10 C)))
hunk ./app/zfc-script 89
-term (1st (const n 9999 (hbox (string CMR10 10 1) (rise 3 (string CMR7 7 st)))))
-term (2nd (const n 9999 (hbox (string CMR10 10 2) (rise 3 (string CMR7 7 nd)))))
+term (1st (const (hbox (string CMR10 10 1) (rise 3 (string CMR7 7 st)))))
+term (2nd (const (hbox (string CMR10 10 2) (rise 3 (string CMR7 7 nd)))))
hunk ./app/zfc-script 95
-term ({,} (compr 3800 (glyph CMSY10 10 102) (hbox (string CMR10 10 ,) (sp 1)) (glyph CMSY10 10 103))font (MSBM10 msbm10.pfa)
+term ({,} (compr 3800 (glyph CMSY10 10 102) (hbox (string CMR10 10 ,) (sp 1)) (glyph CMSY10 10 103))
hunk ./app/zfc-script 111
-term ({/} (const n 9999 (glyph CMSY10 10 59)))
-term (V (const n 9999 (string CMR10 10 V)))
-term (E (const n 1050 (string CMMI10 10 E)))
-term (I (const n 1050 (string CMMI10 10 I)))
-term (om (const n 9999 (glyph CMMI10 10 33)))
-term (aleph (const n 9999 (glyph CMSY10 10 64)))
+term ({/} (const (glyph CMSY10 10 59)))
+term (V (const (string CMR10 10 V)))
+br (E (infix n 1050 (string CMMI10 10 E)))
+br (I (infix n 1050 (string CMMI10 10 I)))
+term (om (const (glyph CMMI10 10 33)))
+term (aleph (const (glyph CMSY10 10 64)))
hunk ./app/zfc-script 118
-term (0 (const n 9999 (string CMR10 10 0)))
-term (1 (const n 9999 (string CMR10 10 1)))
-term (2 (const n 9999 (string CMR10 10 2)))
-term (3 (const n 9999 (string CMR10 10 3)))
-term (4 (const n 9999 (string CMR10 10 4)))
-term (5 (const n 9999 (string CMR10 10 5)))
-term (6 (const n 9999 (string CMR10 10 6)))
-term (7 (const n 9999 (string CMR10 10 7)))
-term (8 (const n 9999 (string CMR10 10 8)))
-term (9 (const n 9999 (string CMR10 10 9)))
-term (CC (const n 9999 (string MSBM10 10 C)))
-term (NN (const n 9999 (string MSBM10 10 N)))
-term (NN0 (const n 9999 (hbox (string MSBM10 10 N) (rise -2 (string CMR7 7 0)))))
-term (QQ (const n 9999 (string MSBM10 10 Q)))
-term (RR (const n 9999 (string MSBM10 10 R)))
-term (RR* (const n 9999 (hbox (string MSBM10 10 R) (string CMR10 10 *))))
-term (ZZ (const n 9999 (string MSBM10 10 Z)))
-term (+oo (const n 9999 (hbox (string CMR10 10 +) (glyph CMSY10 10 49))))
-term (-oo (const n 9999 (hbox (glyph CMSY10 10 0) (glyph CMSY10 10 49))))
+term (0 (const (string CMR10 10 0)))
+term (1 (const (string CMR10 10 1)))
+term (2 (const (string CMR10 10 2)))
+term (3 (const (string CMR10 10 3)))
+term (4 (const (string CMR10 10 4)))
+term (5 (const (string CMR10 10 5)))
+term (6 (const (string CMR10 10 6)))
+term (7 (const (string CMR10 10 7)))
+term (8 (const (string CMR10 10 8)))
+term (9 (const (string CMR10 10 9)))
+term (CC (const (string MSBM10 10 C)))
+term (NN (const (string MSBM10 10 N)))
+term (NN0 (const (hbox (string MSBM10 10 N) (rise -2 (string CMR7 7 0)))))
+term (QQ (const (string MSBM10 10 Q)))
+term (RR (const (string MSBM10 10 R)))
+term (RR* (const (hbox (string MSBM10 10 R) (string CMR10 10 *))))
+term (ZZ (const (string MSBM10 10 Z)))
+term (+oo (const (hbox (string CMR10 10 +) (glyph CMSY10 10 49))))
+term (-oo (const (hbox (glyph CMSY10 10 0) (glyph CMSY10 10 49))))
hunk ./app/zfc-script 138
-term (< (const n 1050 (string CMMI10 10 <)))
-term (<RR (const n 1050 (hbox (string CMMI10 10 <) (rise -2 (string MSBM10 7 R)))))
-term (<_ (const n 1050 (glyph CMSY10 10 20)))
-term (~~ (const n 1050 (glyph CMSY10 10 188)))
-term (~<_ (const n 1050 (glyph MSAM10 10 52)))
-term (~< (const n 1050 (glyph CMSY10 10 193)))
-term (~~> (const n 1050 (glyph MSAM10 10 32)))
+br (< (infix n 1050 (string CMMI10 10 <)))
+br (<RR (infix n 1050 (hbox (string CMMI10 10 <) (rise -2 (string MSBM10 7 R)))))
+br (<_ (infix n 1050 (glyph CMSY10 10 20)))
+br (~~ (infix n 1050 (glyph CMSY10 10 188)))
+br (~<_ (infix n 1050 (glyph MSAM10 10 52)))
+br (~< (infix n 1050 (glyph CMSY10 10 193)))
+br (~~> (infix n 1050 (glyph MSAM10 10 32)))
hunk ./app/zfc-script 146
-term (1o (const n 9999 (hbox (string CMR10 10 1) (rise -2 (string CMR7 7 o)))))
-term (2o (const n 9999 (hbox (string CMR10 10 2) (rise -2 (string CMR7 7 o)))))
-term (+o (const l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMR7 7 o)))))
-term (-o (const l 2200 (hbox (glyph CMSY10 10 0) (rise -2 (string CMR7 7 o)))))
-term (.o (const l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMR7 7 o)))))
-term (^o (const l 2400 (hbox (glyph CMSY10 10 34) (rise -2 (string CMR7 7 o)))))
+term (1o (const (hbox (string CMR10 10 1) (rise -2 (string CMR7 7 o)))))
+term (2o (const (hbox (string CMR10 10 2) (rise -2 (string CMR7 7 o)))))
+opr (+o (infix l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMR7 7 o)))))
+opr (-o (infix l 2200 (hbox (glyph CMSY10 10 0) (rise -2 (string CMR7 7 o)))))
+opr (.o (infix l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMR7 7 o)))))
+opr (^o (infix l 2400 (hbox (glyph CMSY10 10 34) (rise -2 (string CMR7 7 o)))))
hunk ./app/zfc-script 153
-term (+c (const l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMR7 7 c)))))
+opr (+c (infix l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMR7 7 c)))))
hunk ./app/zfc-script 155
-term (N. (const n 9999 (string CMSY10 10 N)))
-term (<N (const l 2200 (hbox (string CMMI10 10 <) (rise -2 (string CMSY7 7 N)))))
-term (+N (const l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMSY7 7 N)))))
-term (.N (const l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMSY7 7 N)))))
+term (N. (const (string CMSY10 10 N)))
+br (<N (infix l 2200 (hbox (string CMMI10 10 <) (rise -2 (string CMSY7 7 N)))))
+opr (+N (infix l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMSY7 7 N)))))
+opr (.N (infix l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMSY7 7 N)))))
hunk ./app/zfc-script 160
-term (Q. (const n 9999 (string CMSY10 10 Q)))
-term (~Q (const l 2300 (hbox (glyph MSBM10 10 115) (rise -2 (string CMSY7 7 Q)))))
-term (<Q (const l 2200 (hbox (string CMMI10 10 <) (rise -2 (string CMSY7 7 Q)))))
-term (+Q (const l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMSY7 7 Q)))))
-term (.Q (const l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMSY7 7 Q)))))
-term (*Q (const l 2200 (hbox (string CMR10 10 *) (rise -2 (string CMSY7 7 Q)))))
-term (1Q (const l 2200 (hbox (string CMR10 10 1) (rise -2 (string CMSY7 7 Q)))))
+term (Q. (const (string CMSY10 10 Q)))
+br (~Q (infix l 2300 (hbox (glyph MSBM10 10 115) (rise -2 (string CMSY7 7 Q)))))
+br (<Q (infix l 2200 (hbox (string CMMI10 10 <) (rise -2 (string CMSY7 7 Q)))))
+opr (+Q (infix l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMSY7 7 Q)))))
+opr (.Q (infix l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMSY7 7 Q)))))
+term (*Q (const (hbox (string CMR10 10 *) (rise -2 (string CMSY7 7 Q)))))
+term (1Q (const (hbox (string CMR10 10 1) (rise -2 (string CMSY7 7 Q)))))
hunk ./app/zfc-script 168
-term (P. (const n 9999 (string CMSY10 10 P)))
-term (<P (const l 2200 (hbox (string CMMI10 10 <) (rise -2 (string CMSY7 7 P)))))
-term (1P (const l 2200 (hbox (string CMR10 10 1) (rise -2 (string CMSY7 7 P)))))
-term (+P. (const l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMSY7 7 P)))))
-term (.P. (const l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMSY7 7 P)))))
+term (P. (const (string CMSY10 10 P)))
+br (<P (infix l 2200 (hbox (string CMMI10 10 <) (rise -2 (string CMSY7 7 P)))))
+term (1P (const (hbox (string CMR10 10 1) (rise -2 (string CMSY7 7 P)))))
+opr (+P. (infix l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMSY7 7 P)))))
+opr (.P. (infix l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMSY7 7 P)))))
hunk ./app/zfc-script 174
-term (R. (const n 9999 (string CMSY10 10 R)))
-term (~R (const l 2300 (hbox (glyph MSBM10 10 115) (rise -2 (string CMSY7 7 R)))))
-term (+R (const l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMSY7 7 R)))))
-term (.R (const l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMSY7 7 R)))))
-term (0R (const l 2200 (hbox (string CMR10 10 0) (rise -2 (string CMSY7 7 R)))))
-term (1R (const l 2200 (hbox (string CMR10 10 1) (rise -2 (string CMSY7 7 R)))))
-term (-1R (const l 2200 (hbox (glyph CMSY10 10 0) (string CMR10 10 1) (rise -2 (string CMSY7 7 R)))))
-term (<R (const l 2200 (hbox (string CMMI10 10 <) (rise -2 (string CMSY7 7 R)))))
+term (R. (const (string CMSY10 10 R)))
+br (~R (infix l 2300 (hbox (glyph MSBM10 10 115) (rise -2 (string CMSY7 7 R)))))
+opr (+R (infix l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMSY7 7 R)))))
+opr (.R (infix l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMSY7 7 R)))))
+term (0R (const (hbox (string CMR10 10 0) (rise -2 (string CMSY7 7 R)))))
+term (1R (const (hbox (string CMR10 10 1) (rise -2 (string CMSY7 7 R)))))
+term (-1R (const (hbox (glyph CMSY10 10 0) (string CMR10 10 1) (rise -2 (string CMSY7 7 R)))))
+br (<R (infix l 2200 (hbox (string CMMI10 10 <) (rise -2 (string CMSY7 7 R)))))
hunk ./app/zfc-script 183
-term (ZZ> (const n 1050 (hbox (string MSBM10 10 Z) (rise -2 (string CMMI10 7 >)))))
+term (ZZ> (const (hbox (string MSBM10 10 Z) (rise -2 (string CMMI10 7 >)))))
hunk ./app/zfc-script 185
-term (^m (const n 3500 (hbox (glyph CMSY10 10 34) (rise -2 (string CMMI10 7 m)))))
+opr (^m (infix n 3500 (hbox (glyph CMSY10 10 34) (rise -2 (string CMMI10 7 m)))))
hunk ./app/zfc-script 189
-term (sqr (const n 3900 (rise 8 (glyph CMSY10 10 112))))
+term (sqr (const (rise 8 (glyph CMSY10 10 112))))
hunk ./app/zfc-script 191
-term (+ (const l 2200 (string CMR10 10 +)))
-term (- (const l 2200 (glyph CMSY10 10 0)))
-term (x. (const l 2300 (glyph CMSY10 10 1)))
-term (/ (const l 2300 (string CMR10 10 /)))
-term (^ (const n 2400 (glyph CMSY10 10 34)))
+opr (+ (infix l 2200 (string CMR10 10 +)))
+opr (- (infix l 2200 (glyph CMSY10 10 0)))
+opr (x. (infix l 2300 (glyph CMSY10 10 1)))
+opr (/ (infix l 2300 (string CMR10 10 /)))
+opr (^ (infix n 2400 (glyph CMSY10 10 34)))
hunk ./app/zfc-script 197
-term (shift (const n 2050 (hbox (sp 1) (string CMR10 10 shift) (sp 1))))
-term (seq (const n 2050 (hbox (sp 1) (string CMR10 10 seq) (sp 1))))
-term (seq0 (const n 2050 (hbox (sp 1) (string CMR10 10 seq) (rise -2 (string CMR7 7 0)))))
-term (seq1 (const n 2050 (hbox (sp 1) (string CMR10 10 seq) (rise -2 (string CMR7 7 1)))))
+opr (shift (infix n 2050 (hbox (sp 1) (string CMR10 10 shift) (sp 1))))
+opr (seq (infix n 2050 (hbox (sp 1) (string CMR10 10 seq) (sp 1))))
+opr (seq0 (infix n 2050 (hbox (sp 1) (string CMR10 10 seq) (rise -2 (string CMR7 7 0)))))
+opr (seq1 (infix n 2050 (hbox (sp 1) (string CMR10 10 seq) (rise -2 (string CMR7 7 1)))))
hunk ./app/zfc-script 202
-term (i (const n 9999 (string CMMI10 10 i)))
-term (e (const n 9999 (string CMMI10 10 e)))
+term (i (const (string CMMI10 10 i)))
+term (e (const (string CMMI10 10 e)))
hunk ./app/zfc-script 205
-term (... (const n 2100 (string CMR10 10 ...)))
+opr (... (infix n 2100 (string CMR10 10 ...)))
hunk ./app/zfc-script 209
-term (_|_ (const n 9999 (glyph CMSY10 10 63)))
-term (H~ (const n 9999 (string Script 10 H)))
-term (C_H (const n 9999 (hbox (string CMMI10 10 C) (rise -2 (string Script7 7 H)))))
-term (CH (const n 9999 (hbox (string Script 10 C) (rise -2 (string Script7 7 H)))))
-term (SH (const n 9999 (hbox (string Script 10 S) (rise -2 (string Script7 7 H)))))
+term (_|_ (const (glyph CMSY10 10 63)))
+term (H~ (const (string Script 10 H)))
+term (C_H (const (hbox (string CMMI10 10 C) (rise -2 (string Script7 7 H)))))
+term (CH (const (hbox (string Script 10 C) (rise -2 (string Script7 7 H)))))
+term (SH (const (hbox (string Script 10 S) (rise -2 (string Script7 7 H)))))
hunk ./app/zfc-script 215
-term (+H (const l 2200 (hbox (string CMR10 10 +) (rise -2 (string Script7 7 H)))))
-term (+v (const l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMMI10 7 v)))))
-term (-v (const l 2200 (hbox (glyph CMSY10 10 0) (rise -2 (string CMMI10 7 v)))))(glyph CMSY10 10 95)
-term (~~>v (const n 1050 (hbox (glyph MSAM10 10 32) (rise -2 (string Script7 7 H))))))
-term (.s (const l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMMI10 7 s)))))
-term (.i (const l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMMI10 7 i)))))
-term (0H (const n 9999 (hbox (string CMR10 10 0) (rise -2 (string Script7 7 H)))))
-term (0v (const n 9999 (hbox (string CMR10 10 0) (rise -2 (string CMMI10 7 v)))))
-term (vH (const l 2200 (hbox (glyph CMSY10 10 95) (rise -2 (string Script7 7 H)))))
-term (\/H (const l 2200 (hbox (rise 7 (glyph CMEX10 8 87)) (rise -2 (string Script7 7 H)))))
-term (<o (const n 1050 (glyph MSBM10 10 108)))
+opr (+H (infix l 2200 (hbox (string CMR10 10 +) (rise -2 (string Script7 7 H)))))
+opr (+v (infix l 2200 (hbox (string CMR10 10 +) (rise -2 (string CMMI10 7 v)))))
+opr (-v (infix l 2200 (hbox (glyph CMSY10 10 0) (rise -2 (string CMMI10 7 v)))))(glyph CMSY10 10 95)
+br (~~>v (infix n 1050 (hbox (glyph MSAM10 10 32) (rise -2 (string Script7 7 H))))))
+opr (.s (infix l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMMI10 7 s)))))
+opr (.i (infix l 2300 (hbox (glyph CMSY10 10 1) (rise -2 (string CMMI10 7 i)))))
+term (0H (const (hbox (string CMR10 10 0) (rise -2 (string Script7 7 H)))))
+term (0v (const (hbox (string CMR10 10 0) (rise -2 (string CMMI10 7 v)))))
+opr (vH (infix l 2200 (hbox (glyph CMSY10 10 95) (rise -2 (string Script7 7 H)))))
+term (\/H (const (hbox (rise 7 (glyph CMEX10 8 87)) (rise -2 (string Script7 7 H)))))
+br (<o (infix n 1050 (glyph MSBM10 10 108)))
hunk ./app/zfc-script 227
-term (Lambda (const n 9999 (glyph CMR10 10 3)))
+term (Lambda (const (glyph CMR10 10 3)))
}
