@x \def\title{TANGLE} @y \def\title{MANGLE} @z @x \centerline{\titlefont The {\ttitlefont TANGLE} processor} @y \centerline{\titlefont The {\ttitlefont MANGLE} processor} @z @x @d banner=='This is TANGLE, Version 2.8' @y For the Modula-2 versions of \.{TANGLE}, we add a second decimal point and number to the main version number, so we can differentiate between changes to the standard \.{TANGLE}\ and changes local to the Modula-2 version. @d banner=='This is MANGLE, Modula-2 TANGLE, Version 2.8.0' @z @x @!max_id_length=12; {long identifiers are chopped to this length, which must not exceed |line_length|} @!unambig_length=7; {identifiers must be unique if chopped to this length} {note that 7 is more strict than \PASCAL's 8, but this can be varied} @y @!max_id_length=31; {long identifiers are chopped to this length, which must not exceed |line_length|} @!unambig_length=20; {identifiers must be unique if chopped to this length} @z @x @d check_sum=@'175 {will not be confused with right brace} @y @d check_sum=1 {this control code should not appear in normal text} @z @x @= "!","""","#","$","%","&","(",")","*",",","/",":",";","<","=",">","?", "@@","[","\","]","^","_","`","{","|" @y @= "!","""","#","$","%","&","(",")","*",",","/",":",";","<","=",">","?", "@@","[","\","]","^","_","`","{","}","|","~" @z @x In such cases the statement `|send_out(misc,"{")|' that appears here should be replaced by `\ignorespaces|begin out_contrib[1]:="("; out_contrib[2]:="*"; send_out(str,2); end|', and a similar change should be made to `|send_out(misc,"}")|'. @y In such cases the statement `|send_out(misc,"{")|' that appears here should be replaced by `\ignorespaces|begin out_contrib[1]:="("; out_contrib[2]:="*"; send_out(str,2); end|', and a similar change should be made to `|send_out(misc,"}")|'. Note: This is definitely the case with Modula-2, so the change must be made. @d send_left_comment==begin out_contrib[1]:="("; out_contrib[2]:="*"; send_out(str,2); end @d send_right_comment==begin out_contrib[1]:="*"; out_contrib[2]:=")"; send_out(str,2); end @z @x begin_comment: begin if brace_level=0 then send_out(misc,"{") else send_out(misc,"["); @y begin_comment: begin send_left_comment; @z @x if brace_level=0 then send_out(misc,"}") else send_out(misc,"]"); @y send_right_comment; @z @x module_number: begin if brace_level=0 then send_out(misc,"{") else send_out(misc,"["); @y module_number: begin send_left_comment; @z @x if brace_level=0 then send_out(misc,"}") else send_out(misc,"]"); @y send_right_comment; @z @x else if c="{" then incr(bal) else if c="}" then begin if bal=0 then return; decr(bal); end @y else if (c="(") and (buffer[loc] = "*") then begin incr(bal); incr(loc); end else if (c="*") and (buffer[loc] = ")") then begin incr(loc); if bal=0 then return; decr(bal); end @z @x "{": begin skip_comment; goto restart; end; @y @z @x "(": if buffer[loc]="*" then compress(begin_comment) else if buffer[loc]="." then compress("["); "*": if buffer[loc]=")" then compress(end_comment); @y "(": if buffer[loc]="*" then begin incr(loc); skip_comment; goto restart; end else if buffer[loc]="." then compress("["); @z