-LIST LEFT &stlimit = 1000000 &anchor = 1 &dump = 1 &trim = 1 &ftrace = 1000 &trace = 1000 indentcomment = 4 indentbody = 12 indentgoto = 56 labchr1 = "abcdefghijklmnopqrstuvwxyz" labchr2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" labchr3 = "0123456789_-:" lc = labchr1 labchr2 labchr3 lstartbody = lc "&$" matchlabel = (span(lc) | "") matchbody_and_goto = ((arb . body) ((any(" ") ":" any("(sf")) rem) . goto) * THIS IS COMMENT 1 comp = INPUT progin = INPUT progout = INPUT ident(comp,"spitbol") :s(spitbol) INPUT(.INFILE,11,2048,progin) OUTPUT(.OUTFILE,12,2048,progout) OUTPUT(.ERRFILE,13,2048,progout ".dbg.txt") :(snobol) spitbol INPUT(.INFILE,11,progin) OUTPUT(.OUTFILE,12,progout) OUTPUT(.ERRFILE,13,progout "dbg.txt") snobol * SKIP "- list left" DEFINE('build(label,body,goto)sz1,sz2,body2,part1,goto2') DEFINE('build2(label,body)sz1,body2,part1') DEFINE('buildcomment(line)it') line = infile outfile = line loop line = infile :f(end) ERRFILE = "**LINEIN** = " LINE line "*DJDSTOP" :s(loop) LINE "*DJDSTART" :s(loop) IDENT(LINE,"") :s(loop) line "*" :f(notcomment) buildcomment(line) :(skip) notcomment line matchlabel . label matchbody_and_goto :f(nogoto) errfile = "label = " label " body = " body " goto = " goto build(label,body,goto) :(skip) nogoto line matchlabel . label rem . body errfile = "label = " label " body = " body " goto = none" build2(label,body) skip errfile = "**LINEOUT* = " lineout :(loop) build sz1 = indentbody - size(label) sz1 = lt(sz1,2) 2 skipsz body (span(" ") rem . body2) | rem . body2 body3 = trim(body2) part1 = label dupl(" ",sz1) body3 sz2 = size(part1) goto break(":") rem . goto2 sz2 = indentgoto - sz2 sz2 = lt(sz2,2) 2 it = part1 dupl(" ",sz2) goto2 errfile = "**LINEOUT* = " it outfile = it :(return) build2 label = trim(label) sz1 = indentbody - size(label) sz1 = lt(sz1,2) 2 body span(" ") (rem . body2) part1 = label dupl(" ",sz1) body2 it = part1 errfile = "**LINEOUT* = " it outfile = it :(return) buildcomment line "*" = errfile = "**COMMENT ONLY**" line span(" ") = it = "*" dupl(" ", indentcomment) line errfile = "**LINEOUT* = " it outfile = it :(return) error errfile = "**ERROR** line = " line :(loop) END