modernc.org/knuth@v0.0.4/mft/mft.go (about) 1 // Code generated by '[/tmp/go-build277393041/b001/exe/generate]', DO NOT EDIT. 2 3 // % This program by D. E. Knuth is not copyrighted and can be used freely. 4 // % Version 0.0 was more-or-less debugged on June 4, 1985. 5 // % Version 0.1 improved formatting of : and added \\ (June 15, 1985). 6 // % Version 0.2 improved formatting of good, fixed @ bug (August 4, 1985). 7 // % Version 0.3 fixed minor bug in change_file move (August 30, 1985). 8 // % Version 0.4 fixed minor bug regarding empty comments (April 8, 1989). 9 // % Version 1.0 was tuned up for the METAFONTware report (April 16, 1989). 10 // % Version 1.1 ditto, with input handled by Hosek's idea (April 27, 1989). 11 // % Version 2 has the new primitives of METAFONT 2.0 (October 16, 1989). 12 // % Version 2.1 corrects two of those primitives (January 20, 2021). 13 // 14 // % Here is TeX material that gets inserted after \input webmac 15 // \def\hang[\hangindent 3em\indent\ignorespaces] 16 // \font\ninerm=cmr9 17 // \let\mc=\ninerm % medium caps for names like SAIL 18 // \def\PASCAL[Pascal] 19 // \font\logo=manfnt % font used for the METAFONT logo 20 // \def\MF[[\logo META]\-[\logo FONT]] 21 // \def\pb[$\.|\ldots\.|$] % MF brackets (|...|) 22 // \def\v[\.[\char'174]] % vertical (|) in typewriter font 23 // \def\dleft[[\![] \def\dright[]\!]] % double brackets 24 // \mathchardef\RA="3221 % right arrow 25 // \mathchardef\BA="3224 % double arrow 26 // \def\([] % kludge for alphabetizing certain module names 27 // 28 // \def\title[MFT] 29 // \def\contentspagenumber[401] 30 // \def\topofcontents[\null 31 // \titlefalse % include headline on the contents page 32 // \def\rheader[\mainfont\hfil \contentspagenumber] 33 // \vfill 34 // \centerline[\titlefont The [\ttitlefont MFT] processor] 35 // \vskip 15pt 36 // \centerline[(Version 2.1, January 2021)] 37 // \vfill] 38 // \def\botofcontents[\vfill 39 // \centerline[\hsize 5in\baselineskip9pt 40 // \vbox[\ninerm\noindent 41 // The preparation of this report 42 // was supported in part by the National Science 43 // Foundation under grants IST-8201926, MCS-8300984, and 44 // CCR-8610181, 45 // and by the System Development Foundation. `\TeX' is a 46 // trademark of the American Mathematical Society. 47 // `[\logo hijklmnj]\kern1pt' is a trademark of Addison-Wesley 48 // Publishing Company.]]] 49 // \pageno=\contentspagenumber \advance\pageno by 1 50 // 51 // 52 53 // 1. Introduction 54 55 // tangle:pos mft.web:49:17: 56 57 // This program converts a \MF\ source file to a \TeX\ file. It was written 58 // by D.~E. Knuth in June, 1985; a somewhat similar [\mc SAIL] program had 59 // \xref[Knuth, Donald Ervin] 60 // been developed in January, 1980. 61 // 62 // The general idea is to input a file called, say, \.[foo.mf] and to produce an 63 // output file called, say, \.[foo.tex]. The latter file, when processed by \TeX, 64 // will yield a ``prettyprinted'' representation of the input file. 65 // \xref[user manual] 66 // 67 // Line breaks in the input are carried over into the output; moreover, 68 // blank spaces at the beginning of a line are converted to quads of indentation 69 // in the output. Thus, the user has full control over the indentation and line 70 // breaks. Each line of input is translated independently of the others. 71 // 72 // A slight change to \MF's comment convention allows further control. 73 // Namely, `\.[\%\%]' indicates that the remainder of an input line should be 74 // copied verbatim to the output; this interrupts the translation and forces 75 // \.[MFT] to produce a certain result. 76 // 77 // Furthermore, `\.[\%\%\%] $\langle\,$token$_1\,\rangle\ldots 78 // \langle\,$token$_n\,\rangle$' 79 // introduces a change in \.[MFT]'s formatting rules; all tokens after the first 80 // will henceforth be translated according to the current conventions for 81 // $\langle\,$token$_1\,\rangle$. The tokens must be symbolic (i.e., not 82 // numeric or string tokens). For example, the input line 83 // $$\.[\%\%\% addto fill draw filldraw]$$ 84 // says that the `\.[fill]', `\.[draw]', and `\.[filldraw]' operations of 85 // plain \MF\ should be formatted as the primitive token `\.[addto]', i.e., 86 // in boldface type. (Without such reformatting commands, \.[MFT] would treat 87 // `\.[fill]' like an ordinary tag or variable name. In fact, you need 88 // a reformatting command even to get parentheses to act like delimiters!) 89 // 90 // \MF\ comments, which follow a single \.\% sign, should be valid \TeX\ 91 // input. But \MF\ material can be included in \pb\ within a comment; this 92 // will be translated by \.[MFT] as if it were not in a comment. For example, 93 // a phrase like `\.[make] \.[\v x2r\v] \.[zero]' will be translated into 94 // `\.[make \$x\_\[2r\]\$ zero]'. 95 // 96 // The rules just stated apply to lines that contain one, two, or three \.\% signs 97 // in a row. Comments to \.[MFT] can follow `\.[\%\%\%\%]'. 98 // Five or more \.\% signs should not be used. 99 // 100 // Beside the normal input file, \.[MFT] also looks for a change file 101 // (e.g., `\.[foo.ch]'), which allows substitutions to be made in the 102 // translation. The change file follows the conventions of \.[WEB], and 103 // it should be null if there are no changes. (Changes usually contain 104 // verbatim instructions to compensate for the fact that \.[MFT] cannot 105 // format everything in an optimum way.) 106 // 107 // There's also a third input file (e.g., `\.[plain.mft]'), which is 108 // input before the other two. This file normally contains the `\.[\%\%\%]' 109 // formatting commands that are necessary to tune \.[MFT] to a particular 110 // style of \MF\ code, so it is called the style file. 111 // 112 // The output of \.[MFT] should be accompanied by the macros in a small 113 // package called \.[mftmac.tex]. 114 // \xref[mftmac] 115 // 116 // Caveat: This program is not as ``bulletproof'' as the other routines 117 // produced by Stanford's \TeX\ project. It takes care of a great deal of 118 // tedious formatting, but it can produce strange output, because \MF\ is 119 // an extremely general language. Users should proofread their output carefully. 120 121 // 2. 122 123 // tangle:pos mft.web:114:3: 124 125 // \.[MFT] uses a few features of the local \PASCAL\ compiler that may 126 // need to be changed in other installations: 127 // 128 // \yskip\item[1)] Case statements have a default. 129 // \item[2)] Input-output routines may need to be adapted for use with a particular 130 // character set and/or for printing messages on the user's terminal. 131 // 132 // \yskip\noindent 133 // These features are also present in the \PASCAL\ version of \TeX, where they 134 // are used in a similar (but more complex) way. System-dependent portions 135 // of \.[MFT] can be identified by looking at the entries for `system 136 // dependencies' in the index below. 137 // \xref[system dependencies] 138 // 139 // The ``banner line'' defined here should be changed whenever \.[MFT] 140 // is modified. 141 142 // 3. 143 144 // tangle:pos mft.web:133:3: 145 146 // The program begins with a fairly normal header, made up of pieces that 147 // \xref[system dependencies] 148 // will mostly be filled in later. The \.[MF] input comes from files |mf_file|, 149 // |change_file|, and |style_file|; the \TeX\ output goes to file |tex_file|. 150 // 151 // If it is necessary to abort the job because of a fatal error, the program 152 // calls the `|jump_out|' procedure, which goes to the label |end_of_MFT|. 153 // \4 154 // Compiler directives 155 // $C+,A+,D- 156 // range check, catch arithmetic overflow, no debug overhead 157 158 package mft 159 160 import ( 161 "math" 162 "unsafe" 163 164 "modernc.org/knuth" 165 ) 166 167 var ( 168 _ = math.MaxInt32 169 _ unsafe.Pointer 170 ) 171 172 type ( 173 char = byte 174 signal int 175 ) 176 177 func strcopy(dst []char, src string) { 178 for i := 0; i < len(dst) && i < len(src); i++ { 179 dst[i] = src[i] 180 } 181 } 182 183 func arraystr(a []char) string { 184 b := make([]byte, len(a)) 185 for i, c := range a { 186 b[i] = c 187 } 188 return string(b) 189 } 190 191 func abs(n int32) int32 { 192 if n >= 0 { 193 return n 194 } 195 196 return -n 197 } 198 199 func fabs(f float64) float64 { 200 if f >= 0 { 201 return f 202 } 203 204 return -f 205 } 206 207 func round(f float64) int32 { 208 if f >= 0 { 209 return int32(f + 0.5) 210 } 211 212 return int32(f - 0.5) 213 } 214 215 const ( 216 endOfMft = 9999 /* go here to wrap it up */ 217 exit = 10 /* go here to leave a procedure */ 218 restart = 20 /* go here to start a procedure again */ 219 reswitch = 21 /* go here to start a case statement again */ 220 continue1 = 22 /* go here to resume a loop */ 221 done = 30 /* go here to exit a loop */ 222 found = 31 /* go here when you've found it */ 223 notFound = 32 /* go here when you've found something else */ 224 spotless = 0 /* |history| value for normal jobs */ 225 harmlessMessage = 1 /* |history| value when non-serious info was printed */ 226 errorMessage = 2 /* |history| value when an error was noted */ 227 fatalMessage = 3 /* |history| value when we had to stop prematurely */ 228 firstTextChar = 0 /* ordinal number of the smallest element of |text_char| */ 229 lastTextChar = 255 /* ordinal number of the largest element of |text_char| */ 230 indentation = 0 /* internal code for space at beginning of a line */ 231 endOfLine = 1 /* internal code for hypothetical token at end of a line */ 232 endOfFile = 2 /* internal code for hypothetical token at end of the input */ 233 verbatim = 3 /* internal code for the token `\.[\%\%]' */ 234 setFormat = 4 /* internal code for the token `\.[\%\%\%]' */ 235 mftComment = 5 /* internal code for the token `\.[\%\%\%\%]' */ 236 minActionType = 6 /* smallest code for tokens that produce ``real'' output */ 237 numericToken = 6 /* internal code for tokens like `\.[3.14159]' */ 238 stringToken = 7 /* internal code for tokens like `|"pie"|' */ 239 minSymbolicToken = 8 /* smallest internal code for a symbolic token */ 240 op = 8 /* internal code for tokens like `\.[sqrt]' */ 241 command = 9 /* internal code for tokens like `\.[addto]' */ 242 endit = 10 /* internal code for tokens like `\.[fi]' */ 243 binary = 11 /* internal code for tokens like `\.[and]' */ 244 abinary = 12 /* internal code for tokens like `\.[+]' */ 245 bbinary = 13 /* internal code for tokens like `\.[step]' */ 246 ampersand = 14 /* internal code for the token `\.[\char`\&]' */ 247 pythSub = 15 /* internal code for the token `\.[+-+]' */ 248 asIs = 16 /* internal code for tokens like `\.[]]' */ 249 bold = 17 /* internal code for tokens like `\.[nullpen]' */ 250 typeName = 18 /* internal code for tokens like `\.[numeric]' */ 251 pathJoin = 19 /* internal code for the token `\.[..]' */ 252 colon = 20 /* internal code for the token `\.:' */ 253 semicolon = 21 /* internal code for the token `\.;' */ 254 backslash = 22 /* internal code for the token `\.[\\]' */ 255 doubleBack = 23 /* internal code for the token `\.[\\\\]' */ 256 lessOrEqual = 24 /* internal code for the token `\.[<=]' */ 257 greaterOrEqual = 25 /* internal code for the token `\.[>=]' */ 258 notEqual = 26 /* internal code for the token `\.[<>]' */ 259 sharp = 27 /* internal code for the token `\.[\char`\#]' */ 260 comment = 28 /* internal code for the token `\.[\char`\%]' */ 261 recomment = 29 /* internal code used to resume a comment after `\pb' */ 262 minSuffix = 30 /* smallest code for symbolic tokens in suffixes */ 263 internal = 30 /* internal code for tokens like `\.[pausing]' */ 264 inputCommand = 31 /* internal code for tokens like `\.[input]' */ 265 specialTag = 32 /* internal code for tags that take at most one subscript */ 266 tag = 33 /* internal code for nonprimitive tokens */ 267 digitClass = 0 /* the class number of \.[0123456789] */ 268 periodClass = 1 /* the class number of `\..' */ 269 spaceClass = 2 /* the class number of spaces and nonstandard characters */ 270 percentClass = 3 /* the class number of `\.\%' */ 271 stringClass = 4 /* the class number of `\."' */ 272 rightParenClass = 8 /* the class number of `\.)' */ 273 letterClass = 9 /* letters and the underline character */ 274 leftBracketClass = 17 /* `\.[' */ 275 rightBracketClass = 18 /* `\.]' */ 276 invalidClass = 20 /* bad character in the input */ 277 endLineClass = 21 /* end of an input line (\.[MFT] only) */ 278 maxClass = 21 /* the largest class number */ 279 carriageReturn = 015 /* special code placed in |buffer[limit]| */ 280 switch1 = 25 /* a label in |get_next| */ 281 passDigits = 85 /* another */ 282 passFraction = 86 /* and still another, although |goto| is considered harmful */ 283 284 // Constants in the outer block 285 maxBytes = 10000 // the number of bytes in tokens; must be less than 65536 286 maxNames = 1000 // number of tokens 287 hashSize = 353 // should be prime 288 bufSize = 100 // maximum length of input line 289 lineLength = 79 // lines of \TeX\ output have at most this many characters, 290 // should be less than 256 291 ) 292 293 type ( 294 // Types in the outer block 295 asciiCode = /* 0..255 */ byte // eight-bit numbers 296 297 textFile = knuth.File 298 299 eightBits = /* 0..255 */ byte // unsigned one-byte quantity 300 sixteenBits = /* 0..65535 */ uint16 // unsigned two-byte quantity 301 302 namePointer = /* 0..maxNames */ uint16 // identifies a name 303 ) 304 305 type prg struct { 306 stdin, stdout, stderr knuth.File 307 /* Globals in the outer block */ history/* spotless..fatalMessage */ byte // how bad was this run? 308 309 xord [256]asciiCode 310 // specifies conversion of input characters 311 xchr [256]char 312 // specifies conversion of output characters 313 314 mfFile textFile // primary input 315 changeFile textFile // updates 316 styleFile textFile // formatting bootstrap 317 318 texFile textFile 319 320 buffer [101]asciiCode 321 322 line int32 // the number of the current line in the current file 323 otherLine int32 // the number of the current line in the input file that 324 // is not currently being read 325 326 tempLine int32 // used when interchanging |line| with |other_line| 327 limit/* 0..bufSize */ byte // the last character position occupied in the buffer 328 loc/* 0..bufSize */ byte // the next character position to be read from the buffer 329 inputHasEnded bool // if |true|, there is no more input 330 changing bool // if |true|, the current line is from |change_file| 331 styling bool // if |true|, the current line is from |style_file| 332 333 changeBuffer [101]asciiCode 334 changeLimit/* 0..bufSize */ byte // the last position occupied in |change_buffer| 335 336 byteMem [10001]asciiCode // characters of names 337 byteStart [1001]sixteenBits // directory into |byte_mem| 338 link [1001]sixteenBits // hash table links 339 ilk [1001]sixteenBits // type codes 340 341 namePtr namePointer // first unused position in |byte_start| 342 bytePtr/* 0..maxBytes */ uint16 // first unused position in |byte_mem| 343 344 idFirst/* 0..bufSize */ byte // where the current token begins in the buffer 345 idLoc/* 0..bufSize */ byte // just after the current token in the buffer 346 347 hash [354]sixteenBits // heads of hash lists 348 349 translation [256]namePointer 350 i asciiCode // index into |translation| 351 352 trLe, trGe, trNe, trAmp, trSharp, trSkip, trPs, 353 trQuad namePointer // special translations 354 355 curType eightBits // type of token just scanned 356 curTok int32 // hash table or buffer location 357 prevType eightBits // previous value of |cur_type| 358 prevTok int32 // previous value of |cur_tok| 359 360 startOfLine bool // has the current line had nothing but spaces so far? 361 emptyBuffer bool // is it time to input a new line? 362 363 charClass [256] /* 0..maxClass */ byte // the class numbers 364 365 outBuf [80]asciiCode // assembled characters 366 outPtr/* 0..lineLength */ byte // number of characters in |out_buf| 367 outLine int32 // coordinates of next line to be output 368 369 // Error handling procedures 370 } 371 372 func (prg *prg) error1() { // prints `\..' and location of error message 373 var ( 374 k, l /* 0..bufSize */ byte // indices into |buffer| 375 ) 376 { 377 if prg.styling { 378 prg.stdout.Write(". (style file ") 379 } else if prg.changing { 380 prg.stdout.Write(". (change file ") 381 } else { 382 prg.stdout.Write(". (") 383 } 384 prg.stdout.Writeln("l.", prg.line, knuth.WriteWidth(1), ")") 385 if int32(prg.loc) >= int32(prg.limit) { 386 l = prg.limit 387 } else { 388 l = prg.loc 389 } 390 for ii := int32(1); ii <= int32(l); ii++ { 391 k = byte(ii) 392 _ = k 393 prg.stdout.Write(string(rune(prg.xchr[prg.buffer[int32(k)-1]]))) 394 } // print the characters already read 395 prg.stdout.Writeln() 396 for ii := int32(1); ii <= int32(l); ii++ { 397 k = byte(ii) 398 _ = k 399 prg.stdout.Write(" ") 400 } // space out the next line 401 for ii := int32(l) + 1; ii <= int32(prg.limit); ii++ { 402 k = byte(ii) 403 _ = k 404 prg.stdout.Write(string(rune(prg.xchr[prg.buffer[int32(k)-1]]))) 405 } // print the part not yet read 406 } 407 prg.history = byte(errorMessage) 408 } 409 410 func (prg *prg) jumpOut() { 411 panic(signal(endOfMft)) 412 } 413 414 func (prg *prg) initialize() { 415 var ( 416 // Local variables for initialization 417 i/* 0..255 */ byte 418 419 h/* 0..hashSize */ uint16 // index into hash-head array 420 ) 421 prg.history = byte(spotless) 422 423 prg.xchr[040] = ' ' 424 prg.xchr[041] = '!' 425 prg.xchr[042] = '"' 426 prg.xchr[043] = '#' 427 prg.xchr[044] = '$' 428 prg.xchr[045] = '%' 429 prg.xchr[046] = '&' 430 prg.xchr[047] = '\'' 431 432 prg.xchr[050] = '(' 433 prg.xchr[051] = ')' 434 prg.xchr[052] = '*' 435 prg.xchr[053] = '+' 436 prg.xchr[054] = ',' 437 prg.xchr[055] = '-' 438 prg.xchr[056] = '.' 439 prg.xchr[057] = '/' 440 441 prg.xchr[060] = '0' 442 prg.xchr[061] = '1' 443 prg.xchr[062] = '2' 444 prg.xchr[063] = '3' 445 prg.xchr[064] = '4' 446 prg.xchr[065] = '5' 447 prg.xchr[066] = '6' 448 prg.xchr[067] = '7' 449 450 prg.xchr[070] = '8' 451 prg.xchr[071] = '9' 452 prg.xchr[072] = ':' 453 prg.xchr[073] = ';' 454 prg.xchr[074] = '<' 455 prg.xchr[075] = '=' 456 prg.xchr[076] = '>' 457 prg.xchr[077] = '?' 458 459 prg.xchr[0100] = '@' 460 prg.xchr[0101] = 'A' 461 prg.xchr[0102] = 'B' 462 prg.xchr[0103] = 'C' 463 prg.xchr[0104] = 'D' 464 prg.xchr[0105] = 'E' 465 prg.xchr[0106] = 'F' 466 prg.xchr[0107] = 'G' 467 468 prg.xchr[0110] = 'H' 469 prg.xchr[0111] = 'I' 470 prg.xchr[0112] = 'J' 471 prg.xchr[0113] = 'K' 472 prg.xchr[0114] = 'L' 473 prg.xchr[0115] = 'M' 474 prg.xchr[0116] = 'N' 475 prg.xchr[0117] = 'O' 476 477 prg.xchr[0120] = 'P' 478 prg.xchr[0121] = 'Q' 479 prg.xchr[0122] = 'R' 480 prg.xchr[0123] = 'S' 481 prg.xchr[0124] = 'T' 482 prg.xchr[0125] = 'U' 483 prg.xchr[0126] = 'V' 484 prg.xchr[0127] = 'W' 485 486 prg.xchr[0130] = 'X' 487 prg.xchr[0131] = 'Y' 488 prg.xchr[0132] = 'Z' 489 prg.xchr[0133] = '[' 490 prg.xchr[0134] = '\\' 491 prg.xchr[0135] = ']' 492 prg.xchr[0136] = '^' 493 prg.xchr[0137] = '_' 494 495 prg.xchr[0140] = '`' 496 prg.xchr[0141] = 'a' 497 prg.xchr[0142] = 'b' 498 prg.xchr[0143] = 'c' 499 prg.xchr[0144] = 'd' 500 prg.xchr[0145] = 'e' 501 prg.xchr[0146] = 'f' 502 prg.xchr[0147] = 'g' 503 504 prg.xchr[0150] = 'h' 505 prg.xchr[0151] = 'i' 506 prg.xchr[0152] = 'j' 507 prg.xchr[0153] = 'k' 508 prg.xchr[0154] = 'l' 509 prg.xchr[0155] = 'm' 510 prg.xchr[0156] = 'n' 511 prg.xchr[0157] = 'o' 512 513 prg.xchr[0160] = 'p' 514 prg.xchr[0161] = 'q' 515 prg.xchr[0162] = 'r' 516 prg.xchr[0163] = 's' 517 prg.xchr[0164] = 't' 518 prg.xchr[0165] = 'u' 519 prg.xchr[0166] = 'v' 520 prg.xchr[0167] = 'w' 521 522 prg.xchr[0170] = 'x' 523 prg.xchr[0171] = 'y' 524 prg.xchr[0172] = 'z' 525 prg.xchr[0173] = '{' 526 prg.xchr[0174] = '|' 527 prg.xchr[0175] = '}' 528 prg.xchr[0176] = '~' 529 530 for ii := int32(0); ii <= 037; ii++ { 531 i = byte(ii) 532 _ = i 533 prg.xchr[i] = ' ' 534 } 535 for ii := int32(0177); ii <= 0377; ii++ { 536 i = byte(ii) 537 _ = i 538 prg.xchr[i] = ' ' 539 } 540 541 for ii := int32(firstTextChar); ii <= lastTextChar; ii++ { 542 i = byte(ii) 543 _ = i 544 prg.xord[i] = 0177 545 } 546 for ii := int32(0200); ii <= 0377; ii++ { 547 i = byte(ii) 548 _ = i 549 prg.xord[prg.xchr[i]] = i 550 } 551 for ii := int32(1); ii <= 0176; ii++ { 552 i = byte(ii) 553 _ = i 554 prg.xord[prg.xchr[i]] = i 555 } 556 557 prg.texFile.Rewrite() 558 559 prg.byteStart[0] = 0 560 prg.bytePtr = 0 561 prg.byteStart[1] = 0 // this makes name 0 of length zero 562 prg.namePtr = 1 563 564 for ii := int32(0); ii <= hashSize-1; ii++ { 565 h = uint16(ii) 566 _ = h 567 prg.hash[h] = 0 568 } 569 570 prg.curType = byte(endOfLine) 571 prg.curTok = 0 572 573 for ii := int32('0'); ii <= '9'; ii++ { 574 i = byte(ii) 575 _ = i 576 prg.charClass[i] = byte(digitClass) 577 } 578 prg.charClass['.'] = byte(periodClass) 579 prg.charClass[' '] = byte(spaceClass) 580 prg.charClass['%'] = byte(percentClass) 581 prg.charClass['"'] = byte(stringClass) 582 583 prg.charClass[','] = 5 584 prg.charClass[';'] = 6 585 prg.charClass['('] = 7 586 prg.charClass[')'] = byte(rightParenClass) 587 for ii := int32('A'); ii <= 'Z'; ii++ { 588 i = byte(ii) 589 _ = i 590 prg.charClass[i] = byte(letterClass) 591 } 592 for ii := int32('a'); ii <= 'z'; ii++ { 593 i = byte(ii) 594 _ = i 595 prg.charClass[i] = byte(letterClass) 596 } 597 prg.charClass['_'] = byte(letterClass) 598 599 prg.charClass['<'] = 10 600 prg.charClass['='] = 10 601 prg.charClass['>'] = 10 602 prg.charClass[':'] = 10 603 prg.charClass['|'] = 10 604 605 prg.charClass['`'] = 11 606 prg.charClass['\''] = 11 607 608 prg.charClass['+'] = 12 609 prg.charClass['-'] = 12 610 611 prg.charClass['/'] = 13 612 prg.charClass['*'] = 13 613 prg.charClass['\\'] = 13 614 615 prg.charClass['!'] = 14 616 prg.charClass['?'] = 14 617 618 prg.charClass['#'] = 15 619 prg.charClass['&'] = 15 620 prg.charClass['@'] = 15 621 prg.charClass['$'] = 15 622 623 prg.charClass['^'] = 16 624 prg.charClass['~'] = 16 625 626 prg.charClass['['] = byte(leftBracketClass) 627 prg.charClass[']'] = byte(rightBracketClass) 628 629 prg.charClass['{'] = 19 630 prg.charClass['}'] = 19 631 632 for ii := int32(0); ii <= ' '-1; ii++ { 633 i = byte(ii) 634 _ = i 635 prg.charClass[i] = byte(invalidClass) 636 } 637 prg.charClass[carriageReturn] = byte(endLineClass) 638 639 for ii := int32(127); ii <= 255; ii++ { 640 i = byte(ii) 641 _ = i 642 prg.charClass[i] = byte(invalidClass) 643 } 644 645 prg.outPtr = 1 646 prg.outBuf[1] = ' ' 647 prg.outLine = 1 648 prg.texFile.Write("\\input mftmac") 649 650 prg.outBuf[0] = '\\' 651 652 } 653 654 // 5. 655 656 // tangle:pos mft.web:164:3: 657 658 // Labels are given symbolic names by the following definitions. We insert 659 // the label `|exit|:' just before the `\ignorespaces|end|\unskip' of a 660 // procedure in which we have used the `|return|' statement defined below; 661 // the label `|restart|' is occasionally used at the very beginning of a 662 // procedure; and the label `|reswitch|' is occasionally used just prior to 663 // a \&[case] statement in which some cases change the conditions and we wish to 664 // branch to the newly applicable case. 665 // Loops that are set up with the \&[loop] construction defined below are 666 // commonly exited by going to `|done|' or to `|found|' or to `|not_found|', 667 // and they are sometimes repeated by going to `|continue|'. 668 669 // 6. 670 671 // tangle:pos mft.web:183:3: 672 673 // Here are some macros for common programming idioms. 674 675 // 7. 676 677 // tangle:pos mft.web:193:3: 678 679 // We assume that |case| statements may include a default case that applies 680 // if no matching label is found. Thus, we shall use constructions like 681 // \xref[system dependencies] 682 // $$\vbox[\halign[#\hfil\cr 683 // |case x of|\cr 684 // 1: $\langle\,$code for $x=1\,\rangle$;\cr 685 // 3: $\langle\,$code for $x=3\,\rangle$;\cr 686 // |othercases| $\langle\,$code for |x<>1| and |x<>3|$\,\rangle$\cr 687 // |endcases|\cr]]$$ 688 // since most \PASCAL\ compilers have plugged this hole in the language by 689 // incorporating some sort of default mechanism. For example, the compiler 690 // used to develop \.[WEB] and \TeX\ allows `|others|:' as a default label, 691 // and other \PASCAL s allow syntaxes like `\ignorespaces|else|\unskip' or 692 // `\&[otherwise]' or `\\[otherwise]:', etc. The definitions of |othercases| 693 // and |endcases| should be changed to agree with local conventions. 694 // (Of course, if no default mechanism is available, the |case| statements of 695 // this program must be extended by listing all remaining cases.) 696 697 // 11. The character set 698 699 // tangle:pos mft.web:249:22: 700 701 // \.[MFT] works internally with ASCII codes, like all other programs 702 // associated with \TeX\ and \MF. The present section has been lifted 703 // almost verbatim from the \MF\ program. 704 // \xref[ASCII code] 705 706 // 19. Input and output 707 708 // tangle:pos mft.web:449:21: 709 710 // The I/O conventions of this program are essentially identical to those 711 // of \.[WEAVE]. Therefore people who need to make modifications should be 712 // able to do so without too many headaches. 713 714 // 22. 715 716 // tangle:pos mft.ch:67:3: 717 718 // The |update_terminal| procedure is called when we want 719 // to make sure that everything we have output to the terminal so far has 720 // actually left the computer's internal buffers and been sent. 721 // \xref[system dependencies] 722 723 // 24. 724 725 // tangle:pos mft.web:492:3: 726 727 // The following code opens the input files. Since these files were listed 728 // in the program header, we assume that the \PASCAL\ runtime system has 729 // already checked that suitable file names have been given; therefore no 730 // additional error checking needs to be done. 731 // \xref[system dependencies] 732 func (prg *prg) openInput() { 733 prg.mfFile.Reset() 734 prg.changeFile.Reset() 735 prg.styleFile.Reset() 736 } 737 738 // 28. 739 740 // tangle:pos mft.web:520:3: 741 742 // The |input_ln| procedure brings the next line of input from the specified 743 // file into the |buffer| array and returns the value |true|, unless the file has 744 // already been entirely read, in which case it returns |false|. The conventions 745 // of \TeX\ are followed; i.e., |ASCII_code| numbers representing the next line 746 // of the file are input into |buffer[0]|, |buffer[1]|, \dots, 747 // |buffer[limit-1]|; trailing blanks are ignored; 748 // and the global variable |limit| is set to the length of the 749 // \xref[system dependencies] 750 // line. The value of |limit| must be strictly less than |buf_size|. 751 func (prg *prg) inputLn(f textFile) (r bool) { 752 // inputs a line or returns |false| 753 var ( 754 finalLimit /* 0..bufSize */ byte // |limit| without trailing blanks 755 ) 756 prg.limit = 0 757 finalLimit = 0 758 if f.EOF() { 759 r = false 760 } else { 761 for !f.EOLN() { 762 prg.buffer[prg.limit] = prg.xord[*f.ByteP()] 763 f.Get() 764 prg.limit = byte(int32(prg.limit) + 1) 765 if int32(prg.buffer[int32(prg.limit)-1]) != ' ' { 766 finalLimit = prg.limit 767 } 768 if int32(prg.limit) == bufSize { 769 for !f.EOLN() { 770 f.Get() 771 } 772 prg.limit = byte(int32(prg.limit) - 1) // keep |buffer[buf_size]| empty 773 if int32(finalLimit) > int32(prg.limit) { 774 finalLimit = prg.limit 775 } 776 { 777 prg.stdout.Writeln() 778 prg.stdout.Write("! Input line too long") 779 } 780 prg.loc = 0 781 prg.error1() 782 // \xref[Input line too long] 783 } 784 } 785 f.Readln() 786 prg.limit = finalLimit 787 r = true 788 } 789 return r 790 } 791 792 // 32. 793 794 // tangle:pos mft.web:610:3: 795 796 // Sometimes the program's behavior is far different from what it should be, 797 // and \.[MFT] prints an error message that is really for the \.[MFT] 798 // maintenance person, not the user. In such cases the program says 799 // |confusion('indication of where we are')|. 800 801 // 33. 802 803 // tangle:pos mft.web:618:3: 804 805 // An overflow stop occurs if \.[MFT]'s tables aren't large enough. 806 807 // 35. 808 809 // tangle:pos mft.web:640:3: 810 811 // As we change |changing| from |true| to |false| and back again, we must 812 // remember to swap the values of |line| and |other_line| so that the |err_print| 813 // routine will be sure to report the correct line number. 814 815 // 37. 816 817 // tangle:pos mft.web:658:3: 818 819 // Here's a simple function that checks if the two buffers are different. 820 func (prg *prg) linesDontMatch() (r bool) { 821 var ( 822 k /* 0..bufSize */ byte // index into the buffers 823 ) 824 r = true 825 if int32(prg.changeLimit) != int32(prg.limit) { 826 goto exit 827 } 828 if int32(prg.limit) > 0 { 829 for ii := int32(0); ii <= int32(prg.limit)-1; ii++ { 830 k = byte(ii) 831 _ = k 832 if int32(prg.changeBuffer[k]) != int32(prg.buffer[k]) { 833 goto exit 834 } 835 } 836 } 837 r = false 838 839 exit: 840 ; 841 return r 842 } 843 844 // 38. 845 846 // tangle:pos mft.web:670:3: 847 848 // Procedure |prime_the_change_buffer| sets |change_buffer| in preparation 849 // for the next matching operation. Since blank lines in the change file are 850 // not used for matching, we have |(change_limit=0)and not changing| if and 851 // only if the change file is exhausted. This procedure is called only 852 // when |changing| is true; hence error messages will be reported correctly. 853 func (prg *prg) primeTheChangeBuffer() { 854 var ( 855 k /* 0..bufSize */ byte // index into the buffers 856 ) 857 prg.changeLimit = 0 // this value will be used if the change file ends 858 859 // Skip over comment lines in the change file; |return| if end of file 860 for true { 861 prg.line = prg.line + 1 862 if !prg.inputLn(prg.changeFile) { 863 goto exit 864 } 865 if int32(prg.limit) < 2 { 866 goto continue1 867 } 868 if int32(prg.buffer[0]) != '@' { 869 goto continue1 870 } 871 if int32(prg.buffer[1]) >= 'X' && int32(prg.buffer[1]) <= 'Z' { 872 prg.buffer[1] = byte(int32(prg.buffer[1]) + 'z' - 'Z') 873 } // lowercasify 874 if int32(prg.buffer[1]) == 'x' { 875 goto done 876 } 877 if int32(prg.buffer[1]) == 'y' || int32(prg.buffer[1]) == 'z' { 878 prg.loc = 2 879 { 880 prg.stdout.Writeln() 881 prg.stdout.Write("! Where is the matching @x?") 882 prg.error1() 883 } 884 // \xref[Where is the match...] 885 } 886 887 continue1: 888 } 889 890 done: 891 ; 892 893 // Skip to the next nonblank line; |return| if end of file 894 for { 895 prg.line = prg.line + 1 896 if !prg.inputLn(prg.changeFile) { 897 { 898 prg.stdout.Writeln() 899 prg.stdout.Write("! Change file ended after @x") 900 prg.error1() 901 } 902 // \xref[Change file ended...] 903 904 // \xref[Change file ended...] 905 goto exit 906 } 907 if int32(prg.limit) > 0 { 908 break 909 } 910 } 911 912 // Move |buffer| and |limit| to |change_buffer| and |change_limit| 913 { 914 prg.changeLimit = prg.limit 915 if int32(prg.limit) > 0 { 916 for ii := int32(0); ii <= int32(prg.limit)-1; ii++ { 917 k = byte(ii) 918 _ = k 919 prg.changeBuffer[k] = prg.buffer[k] 920 } 921 } 922 } 923 924 exit: 925 } 926 927 // 42. 928 929 // tangle:pos mft.web:721:3: 930 931 // The following procedure is used to see if the next change entry should 932 // go into effect; it is called only when |changing| is false. 933 // The idea is to test whether or not the current 934 // contents of |buffer| matches the current contents of |change_buffer|. 935 // If not, there's nothing more to do; but if so, a change is called for: 936 // All of the text down to the \.[@y] is supposed to match. An error 937 // message is issued if any discrepancy is found. Then the procedure 938 // prepares to read the next line from |change_file|. 939 func (prg *prg) checkChange() { 940 var ( 941 n int32 // the number of discrepancies found 942 k/* 0..bufSize */ byte // index into the buffers 943 ) 944 if prg.linesDontMatch() { 945 goto exit 946 } 947 n = 0 948 for true { 949 prg.changing = !prg.changing 950 prg.tempLine = prg.otherLine 951 prg.otherLine = prg.line 952 prg.line = prg.tempLine // now it's |true| 953 prg.line = prg.line + 1 954 if !prg.inputLn(prg.changeFile) { 955 { 956 prg.stdout.Writeln() 957 prg.stdout.Write("! Change file ended before @y") 958 prg.error1() 959 } 960 // \xref[Change file ended...] 961 prg.changeLimit = 0 962 prg.changing = !prg.changing 963 prg.tempLine = prg.otherLine 964 prg.otherLine = prg.line 965 prg.line = prg.tempLine // |false| again 966 // |false| again 967 goto exit 968 } 969 970 // If the current line starts with \.[@y], report any discrepancies and |return| 971 if int32(prg.limit) > 1 { 972 if int32(prg.buffer[0]) == '@' { 973 if int32(prg.buffer[1]) >= 'X' && int32(prg.buffer[1]) <= 'Z' { 974 prg.buffer[1] = byte(int32(prg.buffer[1]) + 'z' - 'Z') 975 } // lowercasify 976 if int32(prg.buffer[1]) == 'x' || int32(prg.buffer[1]) == 'z' { 977 prg.loc = 2 978 { 979 prg.stdout.Writeln() 980 prg.stdout.Write("! Where is the matching @y?") 981 prg.error1() 982 } 983 // \xref[Where is the match...] 984 } else if int32(prg.buffer[1]) == 'y' { 985 if n > 0 { 986 prg.loc = 2 987 { 988 prg.stdout.Writeln() 989 prg.stdout.Write("! Hmm... ", n, knuth.WriteWidth(1), 990 " of the preceding lines failed to match") 991 prg.error1() 992 } 993 // \xref[Hmm... n of the preceding...] 994 } 995 996 goto exit 997 } 998 } 999 } 1000 1001 // Move |buffer| and |limit|... 1002 { 1003 prg.changeLimit = prg.limit 1004 if int32(prg.limit) > 0 { 1005 for ii := int32(0); ii <= int32(prg.limit)-1; ii++ { 1006 k = byte(ii) 1007 _ = k 1008 prg.changeBuffer[k] = prg.buffer[k] 1009 } 1010 } 1011 } 1012 prg.changing = !prg.changing 1013 prg.tempLine = prg.otherLine 1014 prg.otherLine = prg.line 1015 prg.line = prg.tempLine // now it's |false| 1016 prg.line = prg.line + 1 1017 if !prg.inputLn(prg.mfFile) { 1018 { 1019 prg.stdout.Writeln() 1020 prg.stdout.Write("! MF file ended during a change") 1021 prg.error1() 1022 } 1023 // \xref[MF file ended...] 1024 prg.inputHasEnded = true 1025 goto exit 1026 } 1027 if prg.linesDontMatch() { 1028 n = n + 1 1029 } 1030 } 1031 1032 exit: 1033 } 1034 1035 // 45. 1036 1037 // tangle:pos mft.web:784:3: 1038 1039 // The |get_line| procedure is called when |loc>limit|; it puts the next 1040 // line of merged input into the buffer and updates the other variables 1041 // appropriately. 1042 func (prg *prg) getLine() { 1043 restart: 1044 if prg.styling { 1045 prg.line = prg.line + 1 1046 if !prg.inputLn(prg.styleFile) { 1047 prg.styling = false 1048 prg.line = 0 1049 } 1050 } 1051 if !prg.styling { 1052 if prg.changing { 1053 prg.line = prg.line + 1 1054 if !prg.inputLn(prg.changeFile) { 1055 { 1056 prg.stdout.Writeln() 1057 prg.stdout.Write("! Change file ended without @z") 1058 prg.error1() 1059 } 1060 // \xref[Change file ended...] 1061 prg.buffer[0] = '@' 1062 prg.buffer[1] = 'z' 1063 prg.limit = 2 1064 } 1065 if int32(prg.limit) > 1 { 1066 if int32(prg.buffer[0]) == '@' { 1067 if int32(prg.buffer[1]) >= 'X' && int32(prg.buffer[1]) <= 'Z' { 1068 prg.buffer[1] = byte(int32(prg.buffer[1]) + 'z' - 'Z') 1069 } // lowercasify 1070 if int32(prg.buffer[1]) == 'x' || int32(prg.buffer[1]) == 'y' { 1071 prg.loc = 2 1072 { 1073 prg.stdout.Writeln() 1074 prg.stdout.Write("! Where is the matching @z?") 1075 prg.error1() 1076 } 1077 // \xref[Where is the match...] 1078 } else if int32(prg.buffer[1]) == 'z' { 1079 prg.primeTheChangeBuffer() 1080 prg.changing = !prg.changing 1081 prg.tempLine = prg.otherLine 1082 prg.otherLine = prg.line 1083 prg.line = prg.tempLine 1084 } 1085 } 1086 } 1087 } 1088 if !prg.changing { 1089 { 1090 prg.line = prg.line + 1 1091 if !prg.inputLn(prg.mfFile) { 1092 prg.inputHasEnded = true 1093 } else if int32(prg.changeLimit) > 0 { 1094 prg.checkChange() 1095 } 1096 } 1097 if prg.changing { 1098 goto restart 1099 } 1100 } 1101 } 1102 } 1103 1104 // 58. 1105 1106 // tangle:pos mft.web:920:3: 1107 1108 // Here now is the main procedure for finding tokens. 1109 func (prg *prg) lookup() (r namePointer) { 1110 var ( 1111 i/* 0..bufSize */ byte // index into |buffer| 1112 h/* 0..hashSize */ uint16 // hash code 1113 k/* 0..maxBytes */ uint16 // index into |byte_mem| 1114 l/* 0..bufSize */ byte // length of the given token 1115 p namePointer // where the token is being sought 1116 ) 1117 l = byte(int32(prg.idLoc) - int32(prg.idFirst)) // compute the length 1118 1119 // Compute the hash code |h| 1120 h = uint16(prg.buffer[prg.idFirst]) 1121 i = byte(int32(prg.idFirst) + 1) 1122 for int32(i) < int32(prg.idLoc) { 1123 h = uint16((int32(h) + int32(h) + int32(prg.buffer[i])) % hashSize) 1124 i = byte(int32(i) + 1) 1125 } 1126 1127 // Compute the name location |p| 1128 p = prg.hash[h] 1129 for int32(p) != 0 { 1130 if int32(prg.byteStart[int32(p)+1])-int32(prg.byteStart[p]) == int32(l) { 1131 i = prg.idFirst 1132 k = prg.byteStart[p] 1133 for int32(i) < int32(prg.idLoc) && int32(prg.buffer[i]) == int32(prg.byteMem[k]) { 1134 i = byte(int32(i) + 1) 1135 k = uint16(int32(k) + 1) 1136 } 1137 if int32(i) == int32(prg.idLoc) { 1138 goto found 1139 } // all characters agree 1140 } 1141 p = prg.link[p] 1142 } 1143 p = prg.namePtr // the current token is new 1144 prg.link[p] = prg.hash[h] 1145 prg.hash[h] = p // insert |p| at beginning of hash list 1146 // insert |p| at beginning of hash list 1147 found: 1148 ; 1149 if int32(p) == int32(prg.namePtr) { 1150 if int32(prg.bytePtr)+int32(l) > maxBytes { 1151 prg.stdout.Writeln() 1152 prg.stdout.Write("! Sorry, ", "byte memory", " capacity exceeded") 1153 prg.error1() 1154 prg.history = byte(fatalMessage) 1155 prg.jumpOut() 1156 } 1157 if int32(prg.namePtr)+1 > maxNames { 1158 prg.stdout.Writeln() 1159 prg.stdout.Write("! Sorry, ", "name", " capacity exceeded") 1160 prg.error1() 1161 prg.history = byte(fatalMessage) 1162 prg.jumpOut() 1163 } 1164 i = prg.idFirst // get ready to move the token into |byte_mem| 1165 for int32(i) < int32(prg.idLoc) { 1166 prg.byteMem[prg.bytePtr] = prg.buffer[i] 1167 prg.bytePtr = uint16(int32(prg.bytePtr) + 1) 1168 i = byte(int32(i) + 1) 1169 } 1170 prg.namePtr = uint16(int32(prg.namePtr) + 1) 1171 prg.byteStart[prg.namePtr] = prg.bytePtr 1172 1173 // Assign the default value to |ilk[p]| 1174 prg.ilk[p] = uint16(tag) 1175 } 1176 r = p 1177 return r 1178 } 1179 1180 // 64. 1181 1182 // tangle:pos mft.web:1026:3: 1183 1184 // We have to get \MF's primitives into the hash table, and the 1185 // simplest way to do this is to insert them every time \.[MFT] is run. 1186 // 1187 // A few macros permit us to do the initialization with a compact program. 1188 // We use the fact that the longest primitive is \.[intersectiontimes], 1189 // which is 17 letters long. 1190 1191 // 80. 1192 1193 // tangle:pos mft.web:1489:3: 1194 1195 // And now we're ready to take the plunge into |get_next| itself. 1196 func (prg *prg) getNext() { 1197 var ( 1198 c asciiCode // the current character in the buffer 1199 class asciiCode // its class number 1200 ) 1201 prg.prevType = prg.curType 1202 prg.prevTok = prg.curTok 1203 if prg.emptyBuffer { 1204 prg.getLine() 1205 if prg.inputHasEnded { 1206 prg.curType = byte(endOfFile) 1207 prg.curTok = int32(prg.idFirst) 1208 goto exit 1209 } 1210 prg.buffer[prg.limit] = byte(carriageReturn) 1211 prg.loc = 0 1212 prg.startOfLine = true 1213 prg.emptyBuffer = false 1214 } 1215 1216 switch1: 1217 c = prg.buffer[prg.loc] 1218 prg.idFirst = prg.loc 1219 prg.loc = byte(int32(prg.loc) + 1) 1220 class = prg.charClass[c] 1221 1222 // Branch on the |class|, scan the token; |return| directly if the token is special, or |goto found| if it needs to be looked up 1223 switch class { 1224 case digitClass: 1225 goto passDigits 1226 case periodClass: 1227 class = prg.charClass[prg.buffer[prg.loc]] 1228 if int32(class) > periodClass { 1229 goto switch1 1230 } else if int32(class) < periodClass { 1231 goto passFraction 1232 } // |class=digit_class| 1233 1234 case spaceClass: 1235 if prg.startOfLine { 1236 prg.curType = byte(indentation) 1237 prg.curTok = int32(prg.idFirst) 1238 goto exit 1239 } else { 1240 goto switch1 1241 } 1242 case endLineClass: /* */ 1243 prg.curType = byte(endOfLine) 1244 prg.curTok = int32(prg.idFirst) 1245 goto exit 1246 case stringClass: 1247 // Get a string token and |return| 1248 for true { 1249 if int32(prg.buffer[prg.loc]) == '"' { 1250 prg.loc = byte(int32(prg.loc) + 1) /* */ 1251 { 1252 prg.curType = byte(stringToken) 1253 prg.curTok = int32(prg.idFirst) 1254 goto exit 1255 } 1256 } 1257 if int32(prg.loc) == int32(prg.limit) { 1258 { 1259 prg.stdout.Writeln() 1260 prg.stdout.Write("! Incomplete string will be ignored") 1261 prg.error1() 1262 } 1263 goto switch1 1264 // \xref[Incomplete string...] 1265 } 1266 prg.loc = byte(int32(prg.loc) + 1) 1267 } 1268 1269 case 5, 6, 7, 8: 1270 goto found 1271 case invalidClass: 1272 // Decry the invalid character and |goto switch| 1273 { 1274 prg.stdout.Writeln() 1275 prg.stdout.Write("! Invalid character will be ignored") 1276 prg.error1() 1277 } 1278 goto switch1 1279 // \xref[Invalid character...] 1280 1281 default: // letters, etc. 1282 } 1283 1284 for int32(prg.charClass[prg.buffer[prg.loc]]) == int32(class) { 1285 prg.loc = byte(int32(prg.loc) + 1) 1286 } 1287 1288 goto found 1289 1290 passDigits: 1291 for int32(prg.charClass[prg.buffer[prg.loc]]) == digitClass { 1292 prg.loc = byte(int32(prg.loc) + 1) 1293 } 1294 if int32(prg.buffer[prg.loc]) != '.' { 1295 goto done 1296 } 1297 if int32(prg.charClass[prg.buffer[int32(prg.loc)+1]]) != digitClass { 1298 goto done 1299 } 1300 prg.loc = byte(int32(prg.loc) + 1) 1301 1302 passFraction: 1303 for { 1304 prg.loc = byte(int32(prg.loc) + 1) 1305 if int32(prg.charClass[prg.buffer[prg.loc]]) != digitClass { 1306 break 1307 } 1308 } 1309 1310 done: 1311 { 1312 prg.curType = byte(numericToken) 1313 prg.curTok = int32(prg.idFirst) 1314 goto exit 1315 } 1316 1317 found: 1318 prg.idLoc = prg.loc 1319 prg.curTok = int32(prg.lookup()) 1320 prg.curType = byte(prg.ilk[prg.curTok]) 1321 1322 exit: 1323 } 1324 1325 // 87. 1326 1327 // tangle:pos mft.web:1571:3: 1328 1329 // The |flush_buffer| routine empties the buffer up to a given breakpoint, 1330 // and moves any remaining characters to the beginning of the next line. 1331 // If the |per_cent| parameter is |true|, a |"%"| is appended to the line 1332 // that is being output; in this case the breakpoint |b| should be strictly 1333 // less than |line_length|. If the |per_cent| parameter is |false|, 1334 // trailing blanks are suppressed. 1335 // The characters emptied from the buffer form a new line of output. 1336 func (prg *prg) flushBuffer(b eightBits, perCent bool) { 1337 var ( 1338 j, k /* 0..lineLength */ byte 1339 ) 1340 j = b 1341 if !perCent { 1342 for true { 1343 if int32(j) == 0 { 1344 goto done 1345 } 1346 if int32(prg.outBuf[j]) != ' ' { 1347 goto done 1348 } 1349 j = byte(int32(j) - 1) 1350 } 1351 } 1352 1353 done: 1354 for ii := int32(1); ii <= int32(j); ii++ { 1355 k = byte(ii) 1356 _ = k 1357 prg.texFile.Write(string(rune(prg.xchr[prg.outBuf[k]]))) 1358 } 1359 if perCent { 1360 prg.texFile.Write(string(rune(prg.xchr['%']))) 1361 } 1362 prg.texFile.Writeln() 1363 prg.outLine = prg.outLine + 1 1364 if int32(b) < int32(prg.outPtr) { 1365 for ii := int32(b) + 1; ii <= int32(prg.outPtr); ii++ { 1366 k = byte(ii) 1367 _ = k 1368 prg.outBuf[int32(k)-int32(b)] = prg.outBuf[k] 1369 } 1370 } 1371 prg.outPtr = byte(int32(prg.outPtr) - int32(b)) 1372 } 1373 1374 // 89. 1375 1376 // tangle:pos mft.web:1605:3: 1377 1378 // When we wish to append the character |c| to the output buffer, we write 1379 // `$|out|(c)$'; this will cause the buffer to be emptied if it was already 1380 // full. Similarly, `$|out2|(c_1)(c_2)$' appends a pair of characters. 1381 // A line break will occur at a space or after a single-nonletter 1382 // \TeX\ control sequence. 1383 1384 // 91. 1385 1386 // tangle:pos mft.web:1632:3: 1387 1388 // A long line is broken at a blank space or just before a backslash that isn't 1389 // preceded by another backslash. In the latter case, a |"%"| is output at 1390 // the break. (This policy has a known bug, in the rare situation that the 1391 // backslash was in a string constant that's being output ``verbatim.'') 1392 func (prg *prg) breakOut() { 1393 var ( 1394 k/* 0..lineLength */ byte // index into |out_buf| 1395 d asciiCode // character from the buffer 1396 ) 1397 k = prg.outPtr 1398 for true { 1399 if int32(k) == 0 { 1400 { 1401 prg.stdout.Writeln() 1402 prg.stdout.Write("! Line had to be broken (output l.", prg.outLine, knuth.WriteWidth(1)) 1403 } 1404 // \xref[Line had to be broken] 1405 prg.stdout.Writeln("):") 1406 for ii := int32(1); ii <= int32(prg.outPtr)-1; ii++ { 1407 k = byte(ii) 1408 _ = k 1409 prg.stdout.Write(string(rune(prg.xchr[prg.outBuf[k]]))) 1410 } 1411 prg.stdout.Writeln() /* */ 1412 if int32(prg.history) == spotless { 1413 prg.history = byte(harmlessMessage) 1414 } 1415 prg.flushBuffer(eightBits(int32(prg.outPtr)-1), true) 1416 goto exit 1417 } 1418 d = prg.outBuf[k] 1419 if int32(d) == ' ' { 1420 prg.flushBuffer(k, false) 1421 goto exit 1422 } 1423 if int32(d) == '\\' && int32(prg.outBuf[int32(k)-1]) != '\\' { 1424 prg.flushBuffer(eightBits(int32(k)-1), true) 1425 goto exit 1426 } 1427 k = byte(int32(k) - 1) 1428 } 1429 1430 exit: 1431 } 1432 1433 // 93. 1434 1435 // tangle:pos mft.web:1669:3: 1436 1437 // To output a string of bytes from |byte_mem|, we call |out_str|. 1438 func (prg *prg) outStr(p namePointer) { // outputs a string 1439 var ( 1440 k /* 0..maxBytes */ uint16 // index into |byte_mem| 1441 ) 1442 for ii := int32(prg.byteStart[p]); ii <= int32(prg.byteStart[int32(p)+1])-1; ii++ { 1443 k = uint16(ii) 1444 _ = k 1445 if int32(prg.outPtr) == lineLength { 1446 prg.breakOut() 1447 } 1448 prg.outPtr = byte(int32(prg.outPtr) + 1) 1449 prg.outBuf[prg.outPtr] = prg.byteMem[k] 1450 } 1451 } 1452 1453 // 94. 1454 1455 // tangle:pos mft.web:1676:3: 1456 1457 // The |out_name| subroutine is used to output a symbolic token. 1458 // Unusual characters are translated into forms that won't screw up. 1459 func (prg *prg) outName(p namePointer) { // outputs a name 1460 var ( 1461 k/* 0..maxBytes */ uint16 // index into |byte_mem| 1462 t namePointer // translation of character being output, if any 1463 ) 1464 for ii := int32(prg.byteStart[p]); ii <= int32(prg.byteStart[int32(p)+1])-1; ii++ { 1465 k = uint16(ii) 1466 _ = k 1467 t = prg.translation[prg.byteMem[k]] 1468 if int32(t) == 0 { 1469 if int32(prg.outPtr) == lineLength { 1470 prg.breakOut() 1471 } 1472 prg.outPtr = byte(int32(prg.outPtr) + 1) 1473 prg.outBuf[prg.outPtr] = prg.byteMem[k] 1474 } else { 1475 prg.outStr(t) 1476 } 1477 } 1478 } 1479 1480 // 95. 1481 1482 // tangle:pos mft.web:1689:3: 1483 1484 // We often want to output a name after calling a numeric macro 1485 // (e.g., `\.[\\1\[foo\]]'). 1486 func (prg *prg) outMacAndName(n asciiCode, p namePointer) { 1487 { 1488 if int32(prg.outPtr) == lineLength { 1489 prg.breakOut() 1490 } 1491 prg.outPtr = byte(int32(prg.outPtr) + 1) 1492 prg.outBuf[prg.outPtr] = '\\' 1493 } 1494 { 1495 if int32(prg.outPtr) == lineLength { 1496 prg.breakOut() 1497 } 1498 prg.outPtr = byte(int32(prg.outPtr) + 1) 1499 prg.outBuf[prg.outPtr] = n 1500 } 1501 if int32(prg.byteStart[int32(p)+1])-int32(prg.byteStart[p]) == 1 { 1502 prg.outName(p) 1503 } else { 1504 { 1505 if int32(prg.outPtr) == lineLength { 1506 prg.breakOut() 1507 } 1508 prg.outPtr = byte(int32(prg.outPtr) + 1) 1509 prg.outBuf[prg.outPtr] = '{' 1510 } 1511 prg.outName(p) 1512 { 1513 if int32(prg.outPtr) == lineLength { 1514 prg.breakOut() 1515 } 1516 prg.outPtr = byte(int32(prg.outPtr) + 1) 1517 prg.outBuf[prg.outPtr] = '}' 1518 } 1519 } 1520 } 1521 1522 // 96. 1523 1524 // tangle:pos mft.web:1699:3: 1525 1526 // Here's a routine that simply copies from the input buffer to the output 1527 // buffer. 1528 func (prg *prg) copy(firstLoc int32) { // output |buffer[first_loc..loc-1]| 1529 var ( 1530 k /* 0..bufSize */ byte // |buffer| location being copied 1531 ) 1532 for ii := firstLoc; ii <= int32(prg.loc)-1; ii++ { 1533 k = byte(ii) 1534 _ = k 1535 if int32(prg.outPtr) == lineLength { 1536 prg.breakOut() 1537 } 1538 prg.outPtr = byte(int32(prg.outPtr) + 1) 1539 prg.outBuf[prg.outPtr] = prg.buffer[k] 1540 } 1541 } 1542 1543 // 97. Translation 1544 1545 // tangle:pos mft.web:1707:16: 1546 1547 // The main work of \.[MFT] is accomplished by a routine that translates 1548 // the tokens, one by one, with a limited amount of lookahead/lookbehind. 1549 // Automata theorists might loosely call this a ``finite state transducer,'' 1550 // because the flow of control is comparatively simple. 1551 func (prg *prg) doTheTranslation() { 1552 var ( 1553 k/* 0..bufSize */ byte // looks ahead in the buffer 1554 t int32 // type that spreads to new tokens 1555 ) 1556 restart: 1557 if int32(prg.outPtr) > 0 { 1558 prg.flushBuffer(prg.outPtr, false) 1559 } 1560 prg.emptyBuffer = true 1561 for true { 1562 prg.getNext() 1563 if prg.startOfLine { 1564 if int32(prg.curType) >= minActionType { 1565 { 1566 if int32(prg.outPtr) == lineLength { 1567 prg.breakOut() 1568 } 1569 prg.outPtr = byte(int32(prg.outPtr) + 1) 1570 prg.outBuf[prg.outPtr] = '$' 1571 } 1572 prg.startOfLine = false 1573 switch prg.curType { 1574 case endit: 1575 if int32(prg.outPtr) == lineLength { 1576 prg.breakOut() 1577 } 1578 prg.outPtr = byte(int32(prg.outPtr) + 1) 1579 prg.outBuf[prg.outPtr] = '\\' 1580 if int32(prg.outPtr) == lineLength { 1581 prg.breakOut() 1582 } 1583 prg.outPtr = byte(int32(prg.outPtr) + 1) 1584 prg.outBuf[prg.outPtr] = '!' 1585 // \xref[\\!] 1586 case binary, abinary, bbinary, ampersand, 1587 pythSub: 1588 if int32(prg.outPtr) == lineLength { 1589 prg.breakOut() 1590 } 1591 prg.outPtr = byte(int32(prg.outPtr) + 1) 1592 prg.outBuf[prg.outPtr] = '{' 1593 if int32(prg.outPtr) == lineLength { 1594 prg.breakOut() 1595 } 1596 prg.outPtr = byte(int32(prg.outPtr) + 1) 1597 prg.outBuf[prg.outPtr] = '}' 1598 1599 // \xref[\[\]] 1600 default: 1601 } 1602 } else if int32(prg.curType) == endOfLine { 1603 prg.outStr(prg.trSkip) 1604 goto restart 1605 } else if int32(prg.curType) == mftComment { 1606 goto restart 1607 } 1608 } 1609 1610 reswitch: 1611 switch prg.curType { 1612 case numericToken: 1613 // Translate a numeric token or a fraction 1614 if int32(prg.buffer[prg.loc]) == '/' { 1615 if int32(prg.charClass[prg.buffer[int32(prg.loc)+1]]) == digitClass { 1616 { 1617 if int32(prg.outPtr) == lineLength { 1618 prg.breakOut() 1619 } 1620 prg.outPtr = byte(int32(prg.outPtr) + 1) 1621 prg.outBuf[prg.outPtr] = '\\' 1622 if int32(prg.outPtr) == lineLength { 1623 prg.breakOut() 1624 } 1625 prg.outPtr = byte(int32(prg.outPtr) + 1) 1626 prg.outBuf[prg.outPtr] = 'f' 1627 if int32(prg.outPtr) == lineLength { 1628 prg.breakOut() 1629 } 1630 prg.outPtr = byte(int32(prg.outPtr) + 1) 1631 prg.outBuf[prg.outPtr] = 'r' 1632 if int32(prg.outPtr) == lineLength { 1633 prg.breakOut() 1634 } 1635 prg.outPtr = byte(int32(prg.outPtr) + 1) 1636 prg.outBuf[prg.outPtr] = 'a' 1637 if int32(prg.outPtr) == lineLength { 1638 prg.breakOut() 1639 } 1640 prg.outPtr = byte(int32(prg.outPtr) + 1) 1641 prg.outBuf[prg.outPtr] = 'c' 1642 } 1643 prg.copy(prg.curTok) 1644 prg.getNext() 1645 // \xref[\\frac] 1646 { 1647 if int32(prg.outPtr) == lineLength { 1648 prg.breakOut() 1649 } 1650 prg.outPtr = byte(int32(prg.outPtr) + 1) 1651 prg.outBuf[prg.outPtr] = '/' 1652 if int32(prg.outPtr) == lineLength { 1653 prg.breakOut() 1654 } 1655 prg.outPtr = byte(int32(prg.outPtr) + 1) 1656 prg.outBuf[prg.outPtr] = '{' 1657 } 1658 prg.getNext() 1659 prg.copy(prg.curTok) 1660 { 1661 if int32(prg.outPtr) == lineLength { 1662 prg.breakOut() 1663 } 1664 prg.outPtr = byte(int32(prg.outPtr) + 1) 1665 prg.outBuf[prg.outPtr] = '}' 1666 } 1667 } else { 1668 prg.copy(prg.curTok) 1669 } 1670 } else { 1671 prg.copy(prg.curTok) 1672 } 1673 1674 case stringToken: 1675 // Translate a string token 1676 { 1677 if int32(prg.outPtr) == lineLength { 1678 prg.breakOut() 1679 } 1680 prg.outPtr = byte(int32(prg.outPtr) + 1) 1681 prg.outBuf[prg.outPtr] = '\\' 1682 if int32(prg.outPtr) == lineLength { 1683 prg.breakOut() 1684 } 1685 prg.outPtr = byte(int32(prg.outPtr) + 1) 1686 prg.outBuf[prg.outPtr] = '7' 1687 } 1688 prg.copy(prg.curTok) 1689 // \xref[\\7] 1690 1691 case indentation: 1692 prg.outStr(prg.trQuad) 1693 case endOfLine, mftComment: 1694 // Wind up a line of translation and |goto restart|, or finish a \pb\ segment and |goto reswitch| 1695 { 1696 if int32(prg.outPtr) == lineLength { 1697 prg.breakOut() 1698 } 1699 prg.outPtr = byte(int32(prg.outPtr) + 1) 1700 prg.outBuf[prg.outPtr] = '$' 1701 } 1702 if int32(prg.loc) < int32(prg.limit) && int32(prg.curType) == endOfLine { 1703 prg.curType = byte(recomment) 1704 goto reswitch 1705 } else { 1706 { 1707 if int32(prg.outPtr) == lineLength { 1708 prg.breakOut() 1709 } 1710 prg.outPtr = byte(int32(prg.outPtr) + 1) 1711 prg.outBuf[prg.outPtr] = '\\' 1712 if int32(prg.outPtr) == lineLength { 1713 prg.breakOut() 1714 } 1715 prg.outPtr = byte(int32(prg.outPtr) + 1) 1716 prg.outBuf[prg.outPtr] = 'p' 1717 if int32(prg.outPtr) == lineLength { 1718 prg.breakOut() 1719 } 1720 prg.outPtr = byte(int32(prg.outPtr) + 1) 1721 prg.outBuf[prg.outPtr] = 'a' 1722 if int32(prg.outPtr) == lineLength { 1723 prg.breakOut() 1724 } 1725 prg.outPtr = byte(int32(prg.outPtr) + 1) 1726 prg.outBuf[prg.outPtr] = 'r' 1727 } 1728 goto restart 1729 // \xref[\\par] 1730 } 1731 1732 case endOfFile: 1733 goto exit 1734 // \4 1735 // Cases that translate primitive tokens 1736 case op: 1737 prg.outMacAndName(asciiCode('1'), namePointer(prg.curTok)) 1738 // \xref[\\1] 1739 case command: 1740 prg.outMacAndName(asciiCode('2'), namePointer(prg.curTok)) 1741 // \xref[\\2] 1742 case typeName: 1743 if int32(prg.prevType) == command { 1744 prg.outMacAndName(asciiCode('1'), namePointer(prg.curTok)) 1745 } else { 1746 prg.outMacAndName(asciiCode('2'), namePointer(prg.curTok)) 1747 } 1748 case endit: 1749 prg.outMacAndName(asciiCode('3'), namePointer(prg.curTok)) 1750 // \xref[\\3] 1751 case bbinary: 1752 prg.outMacAndName(asciiCode('4'), namePointer(prg.curTok)) 1753 // \xref[\\4] 1754 case bold: 1755 prg.outMacAndName(asciiCode('5'), namePointer(prg.curTok)) 1756 // \xref[\\5] 1757 case binary: 1758 prg.outMacAndName(asciiCode('6'), namePointer(prg.curTok)) 1759 // \xref[\\6] 1760 case pathJoin: 1761 prg.outMacAndName(asciiCode('8'), namePointer(prg.curTok)) 1762 // \xref[\\8] 1763 case colon: 1764 prg.outMacAndName(asciiCode('?'), namePointer(prg.curTok)) 1765 // \xref[\\?] 1766 1767 case asIs, sharp, abinary: 1768 prg.outName(namePointer(prg.curTok)) 1769 case doubleBack: 1770 if int32(prg.outPtr) == lineLength { 1771 prg.breakOut() 1772 } 1773 prg.outPtr = byte(int32(prg.outPtr) + 1) 1774 prg.outBuf[prg.outPtr] = '\\' 1775 if int32(prg.outPtr) == lineLength { 1776 prg.breakOut() 1777 } 1778 prg.outPtr = byte(int32(prg.outPtr) + 1) 1779 prg.outBuf[prg.outPtr] = ';' 1780 // \xref[\\;] 1781 case semicolon: 1782 prg.outName(namePointer(prg.curTok)) 1783 prg.getNext() 1784 if int32(prg.curType) != endOfLine { 1785 if int32(prg.curType) != endit { 1786 if int32(prg.outPtr) == lineLength { 1787 prg.breakOut() 1788 } 1789 prg.outPtr = byte(int32(prg.outPtr) + 1) 1790 prg.outBuf[prg.outPtr] = '\\' 1791 if int32(prg.outPtr) == lineLength { 1792 prg.breakOut() 1793 } 1794 prg.outPtr = byte(int32(prg.outPtr) + 1) 1795 prg.outBuf[prg.outPtr] = ' ' 1796 } 1797 } 1798 // \xref[\\\char32] 1799 1800 // \xref[\\\char32] 1801 goto reswitch 1802 1803 case backslash: 1804 prg.outStr(prg.translation['\\']) 1805 case pythSub: 1806 prg.outStr(prg.trPs) 1807 case lessOrEqual: 1808 prg.outStr(prg.trLe) 1809 case greaterOrEqual: 1810 prg.outStr(prg.trGe) 1811 case notEqual: 1812 prg.outStr(prg.trNe) 1813 case ampersand: 1814 prg.outStr(prg.trAmp) 1815 1816 case inputCommand: 1817 prg.outMacAndName(asciiCode('2'), namePointer(prg.curTok)) 1818 { 1819 if int32(prg.outPtr) == lineLength { 1820 prg.breakOut() 1821 } 1822 prg.outPtr = byte(int32(prg.outPtr) + 1) 1823 prg.outBuf[prg.outPtr] = '\\' 1824 if int32(prg.outPtr) == lineLength { 1825 prg.breakOut() 1826 } 1827 prg.outPtr = byte(int32(prg.outPtr) + 1) 1828 prg.outBuf[prg.outPtr] = 'h' 1829 if int32(prg.outPtr) == lineLength { 1830 prg.breakOut() 1831 } 1832 prg.outPtr = byte(int32(prg.outPtr) + 1) 1833 prg.outBuf[prg.outPtr] = 'b' 1834 if int32(prg.outPtr) == lineLength { 1835 prg.breakOut() 1836 } 1837 prg.outPtr = byte(int32(prg.outPtr) + 1) 1838 prg.outBuf[prg.outPtr] = 'o' 1839 if int32(prg.outPtr) == lineLength { 1840 prg.breakOut() 1841 } 1842 prg.outPtr = byte(int32(prg.outPtr) + 1) 1843 prg.outBuf[prg.outPtr] = 'x' 1844 } 1845 1846 // Scan the file name and output it in \.[typewriter type] 1847 for int32(prg.buffer[prg.loc]) == ' ' { 1848 prg.loc = byte(int32(prg.loc) + 1) 1849 } 1850 { 1851 if int32(prg.outPtr) == lineLength { 1852 prg.breakOut() 1853 } 1854 prg.outPtr = byte(int32(prg.outPtr) + 1) 1855 prg.outBuf[prg.outPtr] = '{' 1856 if int32(prg.outPtr) == lineLength { 1857 prg.breakOut() 1858 } 1859 prg.outPtr = byte(int32(prg.outPtr) + 1) 1860 prg.outBuf[prg.outPtr] = '\\' 1861 if int32(prg.outPtr) == lineLength { 1862 prg.breakOut() 1863 } 1864 prg.outPtr = byte(int32(prg.outPtr) + 1) 1865 prg.outBuf[prg.outPtr] = 't' 1866 if int32(prg.outPtr) == lineLength { 1867 prg.breakOut() 1868 } 1869 prg.outPtr = byte(int32(prg.outPtr) + 1) 1870 prg.outBuf[prg.outPtr] = 't' 1871 if int32(prg.outPtr) == lineLength { 1872 prg.breakOut() 1873 } 1874 prg.outPtr = byte(int32(prg.outPtr) + 1) 1875 prg.outBuf[prg.outPtr] = ' ' 1876 } 1877 for int32(prg.buffer[prg.loc]) != ' ' && int32(prg.buffer[prg.loc]) != '%' && int32(prg.buffer[prg.loc]) != ';' && int32(prg.loc) < int32(prg.limit) { 1878 { 1879 if int32(prg.outPtr) == lineLength { 1880 prg.breakOut() 1881 } 1882 prg.outPtr = byte(int32(prg.outPtr) + 1) 1883 prg.outBuf[prg.outPtr] = prg.buffer[prg.loc] 1884 } 1885 prg.loc = byte(int32(prg.loc) + 1) 1886 } 1887 { 1888 if int32(prg.outPtr) == lineLength { 1889 prg.breakOut() 1890 } 1891 prg.outPtr = byte(int32(prg.outPtr) + 1) 1892 prg.outBuf[prg.outPtr] = '}' 1893 } 1894 1895 case comment, recomment: 1896 // Translate a comment and |goto restart|, unless there's a \pb\ segment 1897 if int32(prg.curType) == comment { 1898 if int32(prg.outPtr) == lineLength { 1899 prg.breakOut() 1900 } 1901 prg.outPtr = byte(int32(prg.outPtr) + 1) 1902 prg.outBuf[prg.outPtr] = '\\' 1903 if int32(prg.outPtr) == lineLength { 1904 prg.breakOut() 1905 } 1906 prg.outPtr = byte(int32(prg.outPtr) + 1) 1907 prg.outBuf[prg.outPtr] = '9' 1908 } 1909 // \xref[\\9] 1910 prg.idFirst = prg.loc 1911 for int32(prg.loc) < int32(prg.limit) && int32(prg.buffer[prg.loc]) != '|' { 1912 prg.loc = byte(int32(prg.loc) + 1) 1913 } 1914 prg.copy(int32(prg.idFirst)) 1915 if int32(prg.loc) < int32(prg.limit) { 1916 prg.startOfLine = true 1917 prg.loc = byte(int32(prg.loc) + 1) 1918 k = prg.loc 1919 for int32(k) < int32(prg.limit) && int32(prg.buffer[k]) != '|' { 1920 k = byte(int32(k) + 1) 1921 } 1922 prg.buffer[k] = byte(carriageReturn) 1923 } else { 1924 if int32(prg.outBuf[prg.outPtr]) == '\\' { 1925 if int32(prg.outPtr) == lineLength { 1926 prg.breakOut() 1927 } 1928 prg.outPtr = byte(int32(prg.outPtr) + 1) 1929 prg.outBuf[prg.outPtr] = ' ' 1930 } 1931 { 1932 if int32(prg.outPtr) == lineLength { 1933 prg.breakOut() 1934 } 1935 prg.outPtr = byte(int32(prg.outPtr) + 1) 1936 prg.outBuf[prg.outPtr] = '\\' 1937 if int32(prg.outPtr) == lineLength { 1938 prg.breakOut() 1939 } 1940 prg.outPtr = byte(int32(prg.outPtr) + 1) 1941 prg.outBuf[prg.outPtr] = 'p' 1942 if int32(prg.outPtr) == lineLength { 1943 prg.breakOut() 1944 } 1945 prg.outPtr = byte(int32(prg.outPtr) + 1) 1946 prg.outBuf[prg.outPtr] = 'a' 1947 if int32(prg.outPtr) == lineLength { 1948 prg.breakOut() 1949 } 1950 prg.outPtr = byte(int32(prg.outPtr) + 1) 1951 prg.outBuf[prg.outPtr] = 'r' 1952 } 1953 goto restart 1954 // \xref[\\par] 1955 } 1956 1957 case verbatim: 1958 // Copy the rest of the current input line to the output, then |goto restart| 1959 prg.idFirst = prg.loc 1960 prg.loc = prg.limit 1961 prg.copy(int32(prg.idFirst)) 1962 if int32(prg.outPtr) == 0 { 1963 prg.outPtr = 1 1964 prg.outBuf[1] = ' ' 1965 } 1966 1967 goto restart 1968 1969 case setFormat: 1970 // Change the translation format of tokens, and |goto restart| or |reswitch| 1971 prg.startOfLine = false 1972 prg.getNext() 1973 t = int32(prg.curType) 1974 for int32(prg.curType) >= minSymbolicToken { 1975 prg.getNext() 1976 if int32(prg.curType) >= minSymbolicToken { 1977 prg.ilk[prg.curTok] = uint16(t) 1978 } 1979 } 1980 if int32(prg.curType) != endOfLine { 1981 if int32(prg.curType) != mftComment { 1982 { 1983 prg.stdout.Writeln() 1984 prg.stdout.Write("! Only symbolic tokens should appear after %%%") 1985 prg.error1() 1986 } 1987 // \xref[Only symbolic tokens...] 1988 1989 // \xref[Only symbolic tokens...] 1990 goto reswitch 1991 } 1992 } 1993 prg.emptyBuffer = true 1994 goto restart 1995 1996 case internal, specialTag, tag: 1997 // Translate a tag and possible subscript 1998 if int32(prg.byteStart[prg.curTok+1])-int32(prg.byteStart[prg.curTok]) == 1 { 1999 prg.outName(namePointer(prg.curTok)) 2000 } else { 2001 prg.outMacAndName(asciiCode('\\'), namePointer(prg.curTok)) 2002 } 2003 // \xref[\\\\] 2004 prg.getNext() 2005 if int32(prg.byteMem[prg.byteStart[prg.prevTok]]) == '\'' { 2006 goto reswitch 2007 } 2008 switch prg.prevType { 2009 case internal: 2010 if int32(prg.curType) == numericToken || int32(prg.curType) >= minSuffix { 2011 if int32(prg.outPtr) == lineLength { 2012 prg.breakOut() 2013 } 2014 prg.outPtr = byte(int32(prg.outPtr) + 1) 2015 prg.outBuf[prg.outPtr] = '\\' 2016 if int32(prg.outPtr) == lineLength { 2017 prg.breakOut() 2018 } 2019 prg.outPtr = byte(int32(prg.outPtr) + 1) 2020 prg.outBuf[prg.outPtr] = ',' 2021 } 2022 // \xref[\\,] 2023 2024 // \xref[\\,] 2025 goto reswitch 2026 2027 case specialTag: 2028 if int32(prg.curType) < minSuffix { 2029 goto reswitch 2030 } else { 2031 { 2032 if int32(prg.outPtr) == lineLength { 2033 prg.breakOut() 2034 } 2035 prg.outPtr = byte(int32(prg.outPtr) + 1) 2036 prg.outBuf[prg.outPtr] = '.' 2037 } 2038 prg.curType = byte(internal) 2039 goto reswitch 2040 // \xref[.] 2041 } 2042 case tag: 2043 if int32(prg.curType) == tag { 2044 if int32(prg.byteMem[prg.byteStart[prg.curTok]]) == '\'' { 2045 goto reswitch 2046 } 2047 } // a sequence of primes goes on the main line 2048 if int32(prg.curType) == numericToken || int32(prg.curType) >= minSuffix { 2049 { 2050 if int32(prg.outPtr) == lineLength { 2051 prg.breakOut() 2052 } 2053 prg.outPtr = byte(int32(prg.outPtr) + 1) 2054 prg.outBuf[prg.outPtr] = '_' 2055 if int32(prg.outPtr) == lineLength { 2056 prg.breakOut() 2057 } 2058 prg.outPtr = byte(int32(prg.outPtr) + 1) 2059 prg.outBuf[prg.outPtr] = '{' 2060 } 2061 for true { 2062 if int32(prg.curType) >= minSuffix { 2063 prg.outName(namePointer(prg.curTok)) 2064 } else { 2065 prg.copy(prg.curTok) 2066 } 2067 if int32(prg.prevType) == specialTag { 2068 prg.getNext() 2069 goto done 2070 } 2071 prg.getNext() 2072 if int32(prg.curType) < minSuffix { 2073 if int32(prg.curType) != numericToken { 2074 goto done 2075 } 2076 } 2077 if int32(prg.curType) == int32(prg.prevType) { 2078 if int32(prg.curType) == numericToken { 2079 if int32(prg.outPtr) == lineLength { 2080 prg.breakOut() 2081 } 2082 prg.outPtr = byte(int32(prg.outPtr) + 1) 2083 prg.outBuf[prg.outPtr] = '\\' 2084 if int32(prg.outPtr) == lineLength { 2085 prg.breakOut() 2086 } 2087 prg.outPtr = byte(int32(prg.outPtr) + 1) 2088 prg.outBuf[prg.outPtr] = ',' 2089 } else if int32(prg.charClass[prg.byteMem[prg.byteStart[prg.curTok]]]) == int32(prg.charClass[prg.byteMem[prg.byteStart[prg.prevTok]]]) { 2090 if int32(prg.byteMem[prg.byteStart[prg.prevTok]]) != '.' { 2091 if int32(prg.outPtr) == lineLength { 2092 prg.breakOut() 2093 } 2094 prg.outPtr = byte(int32(prg.outPtr) + 1) 2095 prg.outBuf[prg.outPtr] = '.' 2096 } else { 2097 if int32(prg.outPtr) == lineLength { 2098 prg.breakOut() 2099 } 2100 prg.outPtr = byte(int32(prg.outPtr) + 1) 2101 prg.outBuf[prg.outPtr] = '\\' 2102 if int32(prg.outPtr) == lineLength { 2103 prg.breakOut() 2104 } 2105 prg.outPtr = byte(int32(prg.outPtr) + 1) 2106 prg.outBuf[prg.outPtr] = ',' 2107 } 2108 } 2109 } 2110 } 2111 2112 done: 2113 { 2114 if int32(prg.outPtr) == lineLength { 2115 prg.breakOut() 2116 } 2117 prg.outPtr = byte(int32(prg.outPtr) + 1) 2118 prg.outBuf[prg.outPtr] = '}' 2119 } 2120 goto reswitch 2121 } else if int32(prg.curType) == sharp { 2122 prg.outStr(prg.trSharp) 2123 } else { 2124 goto reswitch 2125 } 2126 2127 } // there are no other cases 2128 2129 } // all cases have been listed 2130 } 2131 2132 exit: 2133 } 2134 2135 // 112. The main program 2136 2137 // tangle:pos mft.ch:102:21: 2138 2139 // Let's put it all together now: \.[MFT] starts and ends here. 2140 // \xref[system dependencies] 2141 func (prg *prg) main() { 2142 defer func() { 2143 if prg.changeFile != nil { 2144 prg.changeFile.Close() 2145 } 2146 if prg.mfFile != nil { 2147 prg.mfFile.Close() 2148 } 2149 if prg.stderr != nil { 2150 prg.stderr.Close() 2151 } 2152 if prg.stdin != nil { 2153 prg.stdin.Close() 2154 } 2155 if prg.stdout != nil { 2156 prg.stdout.Close() 2157 } 2158 if prg.styleFile != nil { 2159 prg.styleFile.Close() 2160 } 2161 if prg.texFile != nil { 2162 prg.texFile.Close() 2163 } 2164 }() 2165 2166 prg.initialize() // beginning of the main program 2167 prg.stdout.Writeln("This is MFT, Version 2.1 (gomft v0.0-prerelease)") // print a ``banner line'' 2168 2169 // Store all the primitives 2170 prg.idLoc = 18 2171 2172 prg.idFirst = 16 2173 prg.buffer[16] = '.' 2174 prg.buffer[17] = '.' 2175 prg.curTok = int32(prg.lookup()) 2176 prg.ilk[prg.curTok] = uint16(pathJoin) 2177 2178 prg.idFirst = 17 2179 prg.buffer[17] = '[' 2180 prg.curTok = int32(prg.lookup()) 2181 prg.ilk[prg.curTok] = uint16(asIs) 2182 2183 prg.idFirst = 17 2184 prg.buffer[17] = ']' 2185 prg.curTok = int32(prg.lookup()) 2186 prg.ilk[prg.curTok] = uint16(asIs) 2187 2188 prg.idFirst = 17 2189 prg.buffer[17] = '}' 2190 prg.curTok = int32(prg.lookup()) 2191 prg.ilk[prg.curTok] = uint16(asIs) 2192 2193 prg.idFirst = 17 2194 prg.buffer[17] = '{' 2195 prg.curTok = int32(prg.lookup()) 2196 prg.ilk[prg.curTok] = uint16(asIs) 2197 2198 prg.idFirst = 17 2199 prg.buffer[17] = ':' 2200 prg.curTok = int32(prg.lookup()) 2201 prg.ilk[prg.curTok] = uint16(colon) 2202 2203 prg.idFirst = 16 2204 prg.buffer[16] = ':' 2205 prg.buffer[17] = ':' 2206 prg.curTok = int32(prg.lookup()) 2207 prg.ilk[prg.curTok] = uint16(colon) 2208 2209 prg.idFirst = 15 2210 prg.buffer[15] = '|' 2211 prg.buffer[16] = '|' 2212 prg.buffer[17] = ':' 2213 prg.curTok = int32(prg.lookup()) 2214 prg.ilk[prg.curTok] = uint16(colon) 2215 2216 prg.idFirst = 16 2217 prg.buffer[16] = ':' 2218 prg.buffer[17] = '=' 2219 prg.curTok = int32(prg.lookup()) 2220 prg.ilk[prg.curTok] = uint16(asIs) 2221 2222 prg.idFirst = 17 2223 prg.buffer[17] = ',' 2224 prg.curTok = int32(prg.lookup()) 2225 prg.ilk[prg.curTok] = uint16(asIs) 2226 2227 prg.idFirst = 17 2228 prg.buffer[17] = ';' 2229 prg.curTok = int32(prg.lookup()) 2230 prg.ilk[prg.curTok] = uint16(semicolon) 2231 2232 prg.idFirst = 17 2233 prg.buffer[17] = '\\' 2234 prg.curTok = int32(prg.lookup()) 2235 prg.ilk[prg.curTok] = uint16(backslash) 2236 2237 prg.idFirst = 16 2238 prg.buffer[16] = '\\' 2239 prg.buffer[17] = '\\' 2240 prg.curTok = int32(prg.lookup()) 2241 prg.ilk[prg.curTok] = uint16(doubleBack) 2242 2243 prg.idFirst = 13 2244 prg.buffer[13] = 'a' 2245 prg.buffer[14] = 'd' 2246 prg.buffer[15] = 'd' 2247 prg.buffer[16] = 't' 2248 prg.buffer[17] = 'o' 2249 prg.curTok = int32(prg.lookup()) 2250 prg.ilk[prg.curTok] = uint16(command) 2251 2252 prg.idFirst = 16 2253 prg.buffer[16] = 'a' 2254 prg.buffer[17] = 't' 2255 prg.curTok = int32(prg.lookup()) 2256 prg.ilk[prg.curTok] = uint16(bbinary) 2257 2258 prg.idFirst = 11 2259 prg.buffer[11] = 'a' 2260 prg.buffer[12] = 't' 2261 prg.buffer[13] = 'l' 2262 prg.buffer[14] = 'e' 2263 prg.buffer[15] = 'a' 2264 prg.buffer[16] = 's' 2265 prg.buffer[17] = 't' 2266 prg.curTok = int32(prg.lookup()) 2267 prg.ilk[prg.curTok] = uint16(op) 2268 2269 prg.idFirst = 8 2270 prg.buffer[8] = 'b' 2271 prg.buffer[9] = 'e' 2272 prg.buffer[10] = 'g' 2273 prg.buffer[11] = 'i' 2274 prg.buffer[12] = 'n' 2275 prg.buffer[13] = 'g' 2276 prg.buffer[14] = 'r' 2277 prg.buffer[15] = 'o' 2278 prg.buffer[16] = 'u' 2279 prg.buffer[17] = 'p' 2280 prg.curTok = int32(prg.lookup()) 2281 prg.ilk[prg.curTok] = uint16(command) 2282 prg.idFirst = 10 2283 prg.buffer[10] = 'c' 2284 prg.buffer[11] = 'o' 2285 prg.buffer[12] = 'n' 2286 prg.buffer[13] = 't' 2287 prg.buffer[14] = 'r' 2288 prg.buffer[15] = 'o' 2289 prg.buffer[16] = 'l' 2290 prg.buffer[17] = 's' 2291 prg.curTok = int32(prg.lookup()) 2292 prg.ilk[prg.curTok] = uint16(op) 2293 2294 prg.idFirst = 14 2295 prg.buffer[14] = 'c' 2296 prg.buffer[15] = 'u' 2297 prg.buffer[16] = 'l' 2298 prg.buffer[17] = 'l' 2299 prg.curTok = int32(prg.lookup()) 2300 prg.ilk[prg.curTok] = uint16(command) 2301 2302 prg.idFirst = 14 2303 prg.buffer[14] = 'c' 2304 prg.buffer[15] = 'u' 2305 prg.buffer[16] = 'r' 2306 prg.buffer[17] = 'l' 2307 prg.curTok = int32(prg.lookup()) 2308 prg.ilk[prg.curTok] = uint16(op) 2309 2310 prg.idFirst = 8 2311 prg.buffer[8] = 'd' 2312 prg.buffer[9] = 'e' 2313 prg.buffer[10] = 'l' 2314 prg.buffer[11] = 'i' 2315 prg.buffer[12] = 'm' 2316 prg.buffer[13] = 'i' 2317 prg.buffer[14] = 't' 2318 prg.buffer[15] = 'e' 2319 prg.buffer[16] = 'r' 2320 prg.buffer[17] = 's' 2321 prg.curTok = int32(prg.lookup()) 2322 prg.ilk[prg.curTok] = uint16(command) 2323 2324 prg.idFirst = 11 2325 prg.buffer[11] = 'd' 2326 prg.buffer[12] = 'i' 2327 prg.buffer[13] = 's' 2328 prg.buffer[14] = 'p' 2329 prg.buffer[15] = 'l' 2330 prg.buffer[16] = 'a' 2331 prg.buffer[17] = 'y' 2332 prg.curTok = int32(prg.lookup()) 2333 prg.ilk[prg.curTok] = uint16(command) 2334 2335 prg.idFirst = 10 2336 prg.buffer[10] = 'e' 2337 prg.buffer[11] = 'n' 2338 prg.buffer[12] = 'd' 2339 prg.buffer[13] = 'g' 2340 prg.buffer[14] = 'r' 2341 prg.buffer[15] = 'o' 2342 prg.buffer[16] = 'u' 2343 prg.buffer[17] = 'p' 2344 prg.curTok = int32(prg.lookup()) 2345 prg.ilk[prg.curTok] = uint16(endit) 2346 2347 prg.idFirst = 10 2348 prg.buffer[10] = 'e' 2349 prg.buffer[11] = 'v' 2350 prg.buffer[12] = 'e' 2351 prg.buffer[13] = 'r' 2352 prg.buffer[14] = 'y' 2353 prg.buffer[15] = 'j' 2354 prg.buffer[16] = 'o' 2355 prg.buffer[17] = 'b' 2356 prg.curTok = int32(prg.lookup()) 2357 prg.ilk[prg.curTok] = uint16(command) 2358 2359 prg.idFirst = 12 2360 prg.buffer[12] = 'e' 2361 prg.buffer[13] = 'x' 2362 prg.buffer[14] = 'i' 2363 prg.buffer[15] = 't' 2364 prg.buffer[16] = 'i' 2365 prg.buffer[17] = 'f' 2366 prg.curTok = int32(prg.lookup()) 2367 prg.ilk[prg.curTok] = uint16(command) 2368 2369 prg.idFirst = 7 2370 prg.buffer[7] = 'e' 2371 prg.buffer[8] = 'x' 2372 prg.buffer[9] = 'p' 2373 prg.buffer[10] = 'a' 2374 prg.buffer[11] = 'n' 2375 prg.buffer[12] = 'd' 2376 prg.buffer[13] = 'a' 2377 prg.buffer[14] = 'f' 2378 prg.buffer[15] = 't' 2379 prg.buffer[16] = 'e' 2380 prg.buffer[17] = 'r' 2381 prg.curTok = int32(prg.lookup()) 2382 prg.ilk[prg.curTok] = uint16(command) 2383 2384 prg.idFirst = 14 2385 prg.buffer[14] = 'f' 2386 prg.buffer[15] = 'r' 2387 prg.buffer[16] = 'o' 2388 prg.buffer[17] = 'm' 2389 prg.curTok = int32(prg.lookup()) 2390 prg.ilk[prg.curTok] = uint16(bbinary) 2391 2392 prg.idFirst = 10 2393 prg.buffer[10] = 'i' 2394 prg.buffer[11] = 'n' 2395 prg.buffer[12] = 'w' 2396 prg.buffer[13] = 'i' 2397 prg.buffer[14] = 'n' 2398 prg.buffer[15] = 'd' 2399 prg.buffer[16] = 'o' 2400 prg.buffer[17] = 'w' 2401 prg.curTok = int32(prg.lookup()) 2402 prg.ilk[prg.curTok] = uint16(bbinary) 2403 2404 prg.idFirst = 11 2405 prg.buffer[11] = 'i' 2406 prg.buffer[12] = 'n' 2407 prg.buffer[13] = 't' 2408 prg.buffer[14] = 'e' 2409 prg.buffer[15] = 'r' 2410 prg.buffer[16] = 'i' 2411 prg.buffer[17] = 'm' 2412 prg.curTok = int32(prg.lookup()) 2413 prg.ilk[prg.curTok] = uint16(command) 2414 2415 prg.idFirst = 15 2416 prg.buffer[15] = 'l' 2417 prg.buffer[16] = 'e' 2418 prg.buffer[17] = 't' 2419 prg.curTok = int32(prg.lookup()) 2420 prg.ilk[prg.curTok] = uint16(command) 2421 2422 prg.idFirst = 7 2423 prg.buffer[7] = 'n' 2424 prg.buffer[8] = 'e' 2425 prg.buffer[9] = 'w' 2426 prg.buffer[10] = 'i' 2427 prg.buffer[11] = 'n' 2428 prg.buffer[12] = 't' 2429 prg.buffer[13] = 'e' 2430 prg.buffer[14] = 'r' 2431 prg.buffer[15] = 'n' 2432 prg.buffer[16] = 'a' 2433 prg.buffer[17] = 'l' 2434 prg.curTok = int32(prg.lookup()) 2435 prg.ilk[prg.curTok] = uint16(command) 2436 2437 prg.idFirst = 16 2438 prg.buffer[16] = 'o' 2439 prg.buffer[17] = 'f' 2440 prg.curTok = int32(prg.lookup()) 2441 prg.ilk[prg.curTok] = uint16(command) 2442 2443 prg.idFirst = 8 2444 prg.buffer[8] = 'o' 2445 prg.buffer[9] = 'p' 2446 prg.buffer[10] = 'e' 2447 prg.buffer[11] = 'n' 2448 prg.buffer[12] = 'w' 2449 prg.buffer[13] = 'i' 2450 prg.buffer[14] = 'n' 2451 prg.buffer[15] = 'd' 2452 prg.buffer[16] = 'o' 2453 prg.buffer[17] = 'w' 2454 prg.curTok = int32(prg.lookup()) 2455 prg.ilk[prg.curTok] = uint16(command) 2456 2457 prg.idFirst = 8 2458 prg.buffer[8] = 'r' 2459 prg.buffer[9] = 'a' 2460 prg.buffer[10] = 'n' 2461 prg.buffer[11] = 'd' 2462 prg.buffer[12] = 'o' 2463 prg.buffer[13] = 'm' 2464 prg.buffer[14] = 's' 2465 prg.buffer[15] = 'e' 2466 prg.buffer[16] = 'e' 2467 prg.buffer[17] = 'd' 2468 prg.curTok = int32(prg.lookup()) 2469 prg.ilk[prg.curTok] = uint16(command) 2470 2471 prg.idFirst = 14 2472 prg.buffer[14] = 's' 2473 prg.buffer[15] = 'a' 2474 prg.buffer[16] = 'v' 2475 prg.buffer[17] = 'e' 2476 prg.curTok = int32(prg.lookup()) 2477 prg.ilk[prg.curTok] = uint16(command) 2478 2479 prg.idFirst = 8 2480 prg.buffer[8] = 's' 2481 prg.buffer[9] = 'c' 2482 prg.buffer[10] = 'a' 2483 prg.buffer[11] = 'n' 2484 prg.buffer[12] = 't' 2485 prg.buffer[13] = 'o' 2486 prg.buffer[14] = 'k' 2487 prg.buffer[15] = 'e' 2488 prg.buffer[16] = 'n' 2489 prg.buffer[17] = 's' 2490 prg.curTok = int32(prg.lookup()) 2491 prg.ilk[prg.curTok] = uint16(command) 2492 2493 prg.idFirst = 11 2494 prg.buffer[11] = 's' 2495 prg.buffer[12] = 'h' 2496 prg.buffer[13] = 'i' 2497 prg.buffer[14] = 'p' 2498 prg.buffer[15] = 'o' 2499 prg.buffer[16] = 'u' 2500 prg.buffer[17] = 't' 2501 prg.curTok = int32(prg.lookup()) 2502 prg.ilk[prg.curTok] = uint16(command) 2503 2504 prg.idFirst = 14 2505 prg.buffer[14] = 's' 2506 prg.buffer[15] = 't' 2507 prg.buffer[16] = 'e' 2508 prg.buffer[17] = 'p' 2509 prg.curTok = int32(prg.lookup()) 2510 prg.ilk[prg.curTok] = uint16(bbinary) 2511 2512 prg.idFirst = 15 2513 prg.buffer[15] = 's' 2514 prg.buffer[16] = 't' 2515 prg.buffer[17] = 'r' 2516 prg.curTok = int32(prg.lookup()) 2517 prg.ilk[prg.curTok] = uint16(command) 2518 2519 prg.idFirst = 11 2520 prg.buffer[11] = 't' 2521 prg.buffer[12] = 'e' 2522 prg.buffer[13] = 'n' 2523 prg.buffer[14] = 's' 2524 prg.buffer[15] = 'i' 2525 prg.buffer[16] = 'o' 2526 prg.buffer[17] = 'n' 2527 prg.curTok = int32(prg.lookup()) 2528 prg.ilk[prg.curTok] = uint16(op) 2529 2530 prg.idFirst = 16 2531 prg.buffer[16] = 't' 2532 prg.buffer[17] = 'o' 2533 prg.curTok = int32(prg.lookup()) 2534 prg.ilk[prg.curTok] = uint16(bbinary) 2535 2536 prg.idFirst = 13 2537 prg.buffer[13] = 'u' 2538 prg.buffer[14] = 'n' 2539 prg.buffer[15] = 't' 2540 prg.buffer[16] = 'i' 2541 prg.buffer[17] = 'l' 2542 prg.curTok = int32(prg.lookup()) 2543 prg.ilk[prg.curTok] = uint16(bbinary) 2544 2545 prg.idFirst = 15 2546 prg.buffer[15] = 'd' 2547 prg.buffer[16] = 'e' 2548 prg.buffer[17] = 'f' 2549 prg.curTok = int32(prg.lookup()) 2550 prg.ilk[prg.curTok] = uint16(command) 2551 2552 prg.idFirst = 12 2553 prg.buffer[12] = 'v' 2554 prg.buffer[13] = 'a' 2555 prg.buffer[14] = 'r' 2556 prg.buffer[15] = 'd' 2557 prg.buffer[16] = 'e' 2558 prg.buffer[17] = 'f' 2559 prg.curTok = int32(prg.lookup()) 2560 prg.ilk[prg.curTok] = uint16(command) 2561 2562 prg.idFirst = 8 2563 prg.buffer[8] = 'p' 2564 prg.buffer[9] = 'r' 2565 prg.buffer[10] = 'i' 2566 prg.buffer[11] = 'm' 2567 prg.buffer[12] = 'a' 2568 prg.buffer[13] = 'r' 2569 prg.buffer[14] = 'y' 2570 prg.buffer[15] = 'd' 2571 prg.buffer[16] = 'e' 2572 prg.buffer[17] = 'f' 2573 prg.curTok = int32(prg.lookup()) 2574 prg.ilk[prg.curTok] = uint16(command) 2575 2576 prg.idFirst = 6 2577 prg.buffer[6] = 's' 2578 prg.buffer[7] = 'e' 2579 prg.buffer[8] = 'c' 2580 prg.buffer[9] = 'o' 2581 prg.buffer[10] = 'n' 2582 prg.buffer[11] = 'd' 2583 prg.buffer[12] = 'a' 2584 prg.buffer[13] = 'r' 2585 prg.buffer[14] = 'y' 2586 prg.buffer[15] = 'd' 2587 prg.buffer[16] = 'e' 2588 prg.buffer[17] = 'f' 2589 prg.curTok = int32(prg.lookup()) 2590 prg.ilk[prg.curTok] = uint16(command) 2591 2592 prg.idFirst = 7 2593 prg.buffer[7] = 't' 2594 prg.buffer[8] = 'e' 2595 prg.buffer[9] = 'r' 2596 prg.buffer[10] = 't' 2597 prg.buffer[11] = 'i' 2598 prg.buffer[12] = 'a' 2599 prg.buffer[13] = 'r' 2600 prg.buffer[14] = 'y' 2601 prg.buffer[15] = 'd' 2602 prg.buffer[16] = 'e' 2603 prg.buffer[17] = 'f' 2604 prg.curTok = int32(prg.lookup()) 2605 prg.ilk[prg.curTok] = uint16(command) 2606 2607 prg.idFirst = 12 2608 prg.buffer[12] = 'e' 2609 prg.buffer[13] = 'n' 2610 prg.buffer[14] = 'd' 2611 prg.buffer[15] = 'd' 2612 prg.buffer[16] = 'e' 2613 prg.buffer[17] = 'f' 2614 prg.curTok = int32(prg.lookup()) 2615 prg.ilk[prg.curTok] = uint16(endit) 2616 2617 prg.idFirst = 15 2618 prg.buffer[15] = 'f' 2619 prg.buffer[16] = 'o' 2620 prg.buffer[17] = 'r' 2621 prg.curTok = int32(prg.lookup()) 2622 prg.ilk[prg.curTok] = uint16(command) 2623 2624 prg.idFirst = 7 2625 prg.buffer[7] = 'f' 2626 prg.buffer[8] = 'o' 2627 prg.buffer[9] = 'r' 2628 prg.buffer[10] = 's' 2629 prg.buffer[11] = 'u' 2630 prg.buffer[12] = 'f' 2631 prg.buffer[13] = 'f' 2632 prg.buffer[14] = 'i' 2633 prg.buffer[15] = 'x' 2634 prg.buffer[16] = 'e' 2635 prg.buffer[17] = 's' 2636 prg.curTok = int32(prg.lookup()) 2637 prg.ilk[prg.curTok] = uint16(command) 2638 2639 prg.idFirst = 11 2640 prg.buffer[11] = 'f' 2641 prg.buffer[12] = 'o' 2642 prg.buffer[13] = 'r' 2643 prg.buffer[14] = 'e' 2644 prg.buffer[15] = 'v' 2645 prg.buffer[16] = 'e' 2646 prg.buffer[17] = 'r' 2647 prg.curTok = int32(prg.lookup()) 2648 prg.ilk[prg.curTok] = uint16(command) 2649 2650 prg.idFirst = 12 2651 prg.buffer[12] = 'e' 2652 prg.buffer[13] = 'n' 2653 prg.buffer[14] = 'd' 2654 prg.buffer[15] = 'f' 2655 prg.buffer[16] = 'o' 2656 prg.buffer[17] = 'r' 2657 prg.curTok = int32(prg.lookup()) 2658 prg.ilk[prg.curTok] = uint16(endit) 2659 2660 prg.idFirst = 13 2661 prg.buffer[13] = 'q' 2662 prg.buffer[14] = 'u' 2663 prg.buffer[15] = 'o' 2664 prg.buffer[16] = 't' 2665 prg.buffer[17] = 'e' 2666 prg.curTok = int32(prg.lookup()) 2667 prg.ilk[prg.curTok] = uint16(command) 2668 2669 prg.idFirst = 14 2670 prg.buffer[14] = 'e' 2671 prg.buffer[15] = 'x' 2672 prg.buffer[16] = 'p' 2673 prg.buffer[17] = 'r' 2674 prg.curTok = int32(prg.lookup()) 2675 prg.ilk[prg.curTok] = uint16(command) 2676 2677 prg.idFirst = 12 2678 prg.buffer[12] = 's' 2679 prg.buffer[13] = 'u' 2680 prg.buffer[14] = 'f' 2681 prg.buffer[15] = 'f' 2682 prg.buffer[16] = 'i' 2683 prg.buffer[17] = 'x' 2684 prg.curTok = int32(prg.lookup()) 2685 prg.ilk[prg.curTok] = uint16(command) 2686 2687 prg.idFirst = 14 2688 prg.buffer[14] = 't' 2689 prg.buffer[15] = 'e' 2690 prg.buffer[16] = 'x' 2691 prg.buffer[17] = 't' 2692 prg.curTok = int32(prg.lookup()) 2693 prg.ilk[prg.curTok] = uint16(command) 2694 2695 prg.idFirst = 11 2696 prg.buffer[11] = 'p' 2697 prg.buffer[12] = 'r' 2698 prg.buffer[13] = 'i' 2699 prg.buffer[14] = 'm' 2700 prg.buffer[15] = 'a' 2701 prg.buffer[16] = 'r' 2702 prg.buffer[17] = 'y' 2703 prg.curTok = int32(prg.lookup()) 2704 prg.ilk[prg.curTok] = uint16(command) 2705 2706 prg.idFirst = 9 2707 prg.buffer[9] = 's' 2708 prg.buffer[10] = 'e' 2709 prg.buffer[11] = 'c' 2710 prg.buffer[12] = 'o' 2711 prg.buffer[13] = 'n' 2712 prg.buffer[14] = 'd' 2713 prg.buffer[15] = 'a' 2714 prg.buffer[16] = 'r' 2715 prg.buffer[17] = 'y' 2716 prg.curTok = int32(prg.lookup()) 2717 prg.ilk[prg.curTok] = uint16(command) 2718 2719 prg.idFirst = 10 2720 prg.buffer[10] = 't' 2721 prg.buffer[11] = 'e' 2722 prg.buffer[12] = 'r' 2723 prg.buffer[13] = 't' 2724 prg.buffer[14] = 'i' 2725 prg.buffer[15] = 'a' 2726 prg.buffer[16] = 'r' 2727 prg.buffer[17] = 'y' 2728 prg.curTok = int32(prg.lookup()) 2729 prg.ilk[prg.curTok] = uint16(command) 2730 2731 prg.idFirst = 13 2732 prg.buffer[13] = 'i' 2733 prg.buffer[14] = 'n' 2734 prg.buffer[15] = 'p' 2735 prg.buffer[16] = 'u' 2736 prg.buffer[17] = 't' 2737 prg.curTok = int32(prg.lookup()) 2738 prg.ilk[prg.curTok] = uint16(inputCommand) 2739 2740 prg.idFirst = 10 2741 prg.buffer[10] = 'e' 2742 prg.buffer[11] = 'n' 2743 prg.buffer[12] = 'd' 2744 prg.buffer[13] = 'i' 2745 prg.buffer[14] = 'n' 2746 prg.buffer[15] = 'p' 2747 prg.buffer[16] = 'u' 2748 prg.buffer[17] = 't' 2749 prg.curTok = int32(prg.lookup()) 2750 prg.ilk[prg.curTok] = uint16(bold) 2751 2752 prg.idFirst = 16 2753 prg.buffer[16] = 'i' 2754 prg.buffer[17] = 'f' 2755 prg.curTok = int32(prg.lookup()) 2756 prg.ilk[prg.curTok] = uint16(command) 2757 2758 prg.idFirst = 16 2759 prg.buffer[16] = 'f' 2760 prg.buffer[17] = 'i' 2761 prg.curTok = int32(prg.lookup()) 2762 prg.ilk[prg.curTok] = uint16(endit) 2763 2764 prg.idFirst = 14 2765 prg.buffer[14] = 'e' 2766 prg.buffer[15] = 'l' 2767 prg.buffer[16] = 's' 2768 prg.buffer[17] = 'e' 2769 prg.curTok = int32(prg.lookup()) 2770 prg.ilk[prg.curTok] = uint16(command) 2771 2772 prg.idFirst = 12 2773 prg.buffer[12] = 'e' 2774 prg.buffer[13] = 'l' 2775 prg.buffer[14] = 's' 2776 prg.buffer[15] = 'e' 2777 prg.buffer[16] = 'i' 2778 prg.buffer[17] = 'f' 2779 prg.curTok = int32(prg.lookup()) 2780 prg.ilk[prg.curTok] = uint16(command) 2781 2782 prg.idFirst = 14 2783 prg.buffer[14] = 't' 2784 prg.buffer[15] = 'r' 2785 prg.buffer[16] = 'u' 2786 prg.buffer[17] = 'e' 2787 prg.curTok = int32(prg.lookup()) 2788 prg.ilk[prg.curTok] = uint16(bold) 2789 2790 prg.idFirst = 13 2791 prg.buffer[13] = 'f' 2792 prg.buffer[14] = 'a' 2793 prg.buffer[15] = 'l' 2794 prg.buffer[16] = 's' 2795 prg.buffer[17] = 'e' 2796 prg.curTok = int32(prg.lookup()) 2797 prg.ilk[prg.curTok] = uint16(bold) 2798 2799 prg.idFirst = 7 2800 prg.buffer[7] = 'n' 2801 prg.buffer[8] = 'u' 2802 prg.buffer[9] = 'l' 2803 prg.buffer[10] = 'l' 2804 prg.buffer[11] = 'p' 2805 prg.buffer[12] = 'i' 2806 prg.buffer[13] = 'c' 2807 prg.buffer[14] = 't' 2808 prg.buffer[15] = 'u' 2809 prg.buffer[16] = 'r' 2810 prg.buffer[17] = 'e' 2811 prg.curTok = int32(prg.lookup()) 2812 prg.ilk[prg.curTok] = uint16(bold) 2813 2814 prg.idFirst = 11 2815 prg.buffer[11] = 'n' 2816 prg.buffer[12] = 'u' 2817 prg.buffer[13] = 'l' 2818 prg.buffer[14] = 'l' 2819 prg.buffer[15] = 'p' 2820 prg.buffer[16] = 'e' 2821 prg.buffer[17] = 'n' 2822 prg.curTok = int32(prg.lookup()) 2823 prg.ilk[prg.curTok] = uint16(bold) 2824 2825 prg.idFirst = 11 2826 prg.buffer[11] = 'j' 2827 prg.buffer[12] = 'o' 2828 prg.buffer[13] = 'b' 2829 prg.buffer[14] = 'n' 2830 prg.buffer[15] = 'a' 2831 prg.buffer[16] = 'm' 2832 prg.buffer[17] = 'e' 2833 prg.curTok = int32(prg.lookup()) 2834 prg.ilk[prg.curTok] = uint16(bold) 2835 2836 prg.idFirst = 8 2837 prg.buffer[8] = 'r' 2838 prg.buffer[9] = 'e' 2839 prg.buffer[10] = 'a' 2840 prg.buffer[11] = 'd' 2841 prg.buffer[12] = 's' 2842 prg.buffer[13] = 't' 2843 prg.buffer[14] = 'r' 2844 prg.buffer[15] = 'i' 2845 prg.buffer[16] = 'n' 2846 prg.buffer[17] = 'g' 2847 prg.curTok = int32(prg.lookup()) 2848 prg.ilk[prg.curTok] = uint16(bold) 2849 2850 prg.idFirst = 9 2851 prg.buffer[9] = 'p' 2852 prg.buffer[10] = 'e' 2853 prg.buffer[11] = 'n' 2854 prg.buffer[12] = 'c' 2855 prg.buffer[13] = 'i' 2856 prg.buffer[14] = 'r' 2857 prg.buffer[15] = 'c' 2858 prg.buffer[16] = 'l' 2859 prg.buffer[17] = 'e' 2860 prg.curTok = int32(prg.lookup()) 2861 prg.ilk[prg.curTok] = uint16(bold) 2862 2863 prg.idFirst = 14 2864 prg.buffer[14] = 'g' 2865 prg.buffer[15] = 'o' 2866 prg.buffer[16] = 'o' 2867 prg.buffer[17] = 'd' 2868 prg.curTok = int32(prg.lookup()) 2869 prg.ilk[prg.curTok] = uint16(specialTag) 2870 2871 prg.idFirst = 16 2872 prg.buffer[16] = '=' 2873 prg.buffer[17] = ':' 2874 prg.curTok = int32(prg.lookup()) 2875 prg.ilk[prg.curTok] = uint16(asIs) 2876 2877 prg.idFirst = 15 2878 prg.buffer[15] = '=' 2879 prg.buffer[16] = ':' 2880 prg.buffer[17] = '|' 2881 prg.curTok = int32(prg.lookup()) 2882 prg.ilk[prg.curTok] = uint16(asIs) 2883 2884 prg.idFirst = 14 2885 prg.buffer[14] = '=' 2886 prg.buffer[15] = ':' 2887 prg.buffer[16] = '|' 2888 prg.buffer[17] = '>' 2889 prg.curTok = int32(prg.lookup()) 2890 prg.ilk[prg.curTok] = uint16(asIs) 2891 2892 prg.idFirst = 15 2893 prg.buffer[15] = '|' 2894 prg.buffer[16] = '=' 2895 prg.buffer[17] = ':' 2896 prg.curTok = int32(prg.lookup()) 2897 prg.ilk[prg.curTok] = uint16(asIs) 2898 2899 prg.idFirst = 14 2900 prg.buffer[14] = '|' 2901 prg.buffer[15] = '=' 2902 prg.buffer[16] = ':' 2903 prg.buffer[17] = '>' 2904 prg.curTok = int32(prg.lookup()) 2905 prg.ilk[prg.curTok] = uint16(asIs) 2906 2907 prg.idFirst = 14 2908 prg.buffer[14] = '|' 2909 prg.buffer[15] = '=' 2910 prg.buffer[16] = ':' 2911 prg.buffer[17] = '|' 2912 prg.curTok = int32(prg.lookup()) 2913 prg.ilk[prg.curTok] = uint16(asIs) 2914 2915 prg.idFirst = 13 2916 prg.buffer[13] = '|' 2917 prg.buffer[14] = '=' 2918 prg.buffer[15] = ':' 2919 prg.buffer[16] = '|' 2920 prg.buffer[17] = '>' 2921 prg.curTok = int32(prg.lookup()) 2922 prg.ilk[prg.curTok] = uint16(asIs) 2923 2924 prg.idFirst = 12 2925 prg.buffer[12] = '|' 2926 prg.buffer[13] = '=' 2927 prg.buffer[14] = ':' 2928 prg.buffer[15] = '|' 2929 prg.buffer[16] = '>' 2930 prg.buffer[17] = '>' 2931 prg.curTok = int32(prg.lookup()) 2932 prg.ilk[prg.curTok] = uint16(asIs) 2933 2934 prg.idFirst = 14 2935 prg.buffer[14] = 'k' 2936 prg.buffer[15] = 'e' 2937 prg.buffer[16] = 'r' 2938 prg.buffer[17] = 'n' 2939 prg.curTok = int32(prg.lookup()) 2940 prg.ilk[prg.curTok] = uint16(binary) 2941 prg.idFirst = 12 2942 prg.buffer[12] = 's' 2943 prg.buffer[13] = 'k' 2944 prg.buffer[14] = 'i' 2945 prg.buffer[15] = 'p' 2946 prg.buffer[16] = 't' 2947 prg.buffer[17] = 'o' 2948 prg.curTok = int32(prg.lookup()) 2949 prg.ilk[prg.curTok] = uint16(command) 2950 2951 prg.idFirst = 5 2952 prg.buffer[5] = 'n' 2953 prg.buffer[6] = 'o' 2954 prg.buffer[7] = 'r' 2955 prg.buffer[8] = 'm' 2956 prg.buffer[9] = 'a' 2957 prg.buffer[10] = 'l' 2958 prg.buffer[11] = 'd' 2959 prg.buffer[12] = 'e' 2960 prg.buffer[13] = 'v' 2961 prg.buffer[14] = 'i' 2962 prg.buffer[15] = 'a' 2963 prg.buffer[16] = 't' 2964 prg.buffer[17] = 'e' 2965 prg.curTok = int32(prg.lookup()) 2966 prg.ilk[prg.curTok] = uint16(op) 2967 2968 prg.idFirst = 15 2969 prg.buffer[15] = 'o' 2970 prg.buffer[16] = 'd' 2971 prg.buffer[17] = 'd' 2972 prg.curTok = int32(prg.lookup()) 2973 prg.ilk[prg.curTok] = uint16(op) 2974 2975 prg.idFirst = 13 2976 prg.buffer[13] = 'k' 2977 prg.buffer[14] = 'n' 2978 prg.buffer[15] = 'o' 2979 prg.buffer[16] = 'w' 2980 prg.buffer[17] = 'n' 2981 prg.curTok = int32(prg.lookup()) 2982 prg.ilk[prg.curTok] = uint16(op) 2983 2984 prg.idFirst = 11 2985 prg.buffer[11] = 'u' 2986 prg.buffer[12] = 'n' 2987 prg.buffer[13] = 'k' 2988 prg.buffer[14] = 'n' 2989 prg.buffer[15] = 'o' 2990 prg.buffer[16] = 'w' 2991 prg.buffer[17] = 'n' 2992 prg.curTok = int32(prg.lookup()) 2993 prg.ilk[prg.curTok] = uint16(op) 2994 2995 prg.idFirst = 15 2996 prg.buffer[15] = 'n' 2997 prg.buffer[16] = 'o' 2998 prg.buffer[17] = 't' 2999 prg.curTok = int32(prg.lookup()) 3000 prg.ilk[prg.curTok] = uint16(op) 3001 3002 prg.idFirst = 11 3003 prg.buffer[11] = 'd' 3004 prg.buffer[12] = 'e' 3005 prg.buffer[13] = 'c' 3006 prg.buffer[14] = 'i' 3007 prg.buffer[15] = 'm' 3008 prg.buffer[16] = 'a' 3009 prg.buffer[17] = 'l' 3010 prg.curTok = int32(prg.lookup()) 3011 prg.ilk[prg.curTok] = uint16(op) 3012 3013 prg.idFirst = 11 3014 prg.buffer[11] = 'r' 3015 prg.buffer[12] = 'e' 3016 prg.buffer[13] = 'v' 3017 prg.buffer[14] = 'e' 3018 prg.buffer[15] = 'r' 3019 prg.buffer[16] = 's' 3020 prg.buffer[17] = 'e' 3021 prg.curTok = int32(prg.lookup()) 3022 prg.ilk[prg.curTok] = uint16(op) 3023 3024 prg.idFirst = 10 3025 prg.buffer[10] = 'm' 3026 prg.buffer[11] = 'a' 3027 prg.buffer[12] = 'k' 3028 prg.buffer[13] = 'e' 3029 prg.buffer[14] = 'p' 3030 prg.buffer[15] = 'a' 3031 prg.buffer[16] = 't' 3032 prg.buffer[17] = 'h' 3033 prg.curTok = int32(prg.lookup()) 3034 prg.ilk[prg.curTok] = uint16(op) 3035 3036 prg.idFirst = 11 3037 prg.buffer[11] = 'm' 3038 prg.buffer[12] = 'a' 3039 prg.buffer[13] = 'k' 3040 prg.buffer[14] = 'e' 3041 prg.buffer[15] = 'p' 3042 prg.buffer[16] = 'e' 3043 prg.buffer[17] = 'n' 3044 prg.curTok = int32(prg.lookup()) 3045 prg.ilk[prg.curTok] = uint16(op) 3046 3047 prg.idFirst = 7 3048 prg.buffer[7] = 't' 3049 prg.buffer[8] = 'o' 3050 prg.buffer[9] = 't' 3051 prg.buffer[10] = 'a' 3052 prg.buffer[11] = 'l' 3053 prg.buffer[12] = 'w' 3054 prg.buffer[13] = 'e' 3055 prg.buffer[14] = 'i' 3056 prg.buffer[15] = 'g' 3057 prg.buffer[16] = 'h' 3058 prg.buffer[17] = 't' 3059 prg.curTok = int32(prg.lookup()) 3060 prg.ilk[prg.curTok] = uint16(op) 3061 3062 prg.idFirst = 15 3063 prg.buffer[15] = 'o' 3064 prg.buffer[16] = 'c' 3065 prg.buffer[17] = 't' 3066 prg.curTok = int32(prg.lookup()) 3067 prg.ilk[prg.curTok] = uint16(op) 3068 3069 prg.idFirst = 15 3070 prg.buffer[15] = 'h' 3071 prg.buffer[16] = 'e' 3072 prg.buffer[17] = 'x' 3073 prg.curTok = int32(prg.lookup()) 3074 prg.ilk[prg.curTok] = uint16(op) 3075 3076 prg.idFirst = 13 3077 prg.buffer[13] = 'A' 3078 prg.buffer[14] = 'S' 3079 prg.buffer[15] = 'C' 3080 prg.buffer[16] = 'I' 3081 prg.buffer[17] = 'I' 3082 prg.curTok = int32(prg.lookup()) 3083 prg.ilk[prg.curTok] = uint16(op) 3084 3085 prg.idFirst = 14 3086 prg.buffer[14] = 'c' 3087 prg.buffer[15] = 'h' 3088 prg.buffer[16] = 'a' 3089 prg.buffer[17] = 'r' 3090 prg.curTok = int32(prg.lookup()) 3091 prg.ilk[prg.curTok] = uint16(op) 3092 3093 prg.idFirst = 12 3094 prg.buffer[12] = 'l' 3095 prg.buffer[13] = 'e' 3096 prg.buffer[14] = 'n' 3097 prg.buffer[15] = 'g' 3098 prg.buffer[16] = 't' 3099 prg.buffer[17] = 'h' 3100 prg.curTok = int32(prg.lookup()) 3101 prg.ilk[prg.curTok] = uint16(op) 3102 3103 prg.idFirst = 5 3104 prg.buffer[5] = 't' 3105 prg.buffer[6] = 'u' 3106 prg.buffer[7] = 'r' 3107 prg.buffer[8] = 'n' 3108 prg.buffer[9] = 'i' 3109 prg.buffer[10] = 'n' 3110 prg.buffer[11] = 'g' 3111 prg.buffer[12] = 'n' 3112 prg.buffer[13] = 'u' 3113 prg.buffer[14] = 'm' 3114 prg.buffer[15] = 'b' 3115 prg.buffer[16] = 'e' 3116 prg.buffer[17] = 'r' 3117 prg.curTok = int32(prg.lookup()) 3118 prg.ilk[prg.curTok] = uint16(op) 3119 3120 prg.idFirst = 13 3121 prg.buffer[13] = 'x' 3122 prg.buffer[14] = 'p' 3123 prg.buffer[15] = 'a' 3124 prg.buffer[16] = 'r' 3125 prg.buffer[17] = 't' 3126 prg.curTok = int32(prg.lookup()) 3127 prg.ilk[prg.curTok] = uint16(op) 3128 3129 prg.idFirst = 13 3130 prg.buffer[13] = 'y' 3131 prg.buffer[14] = 'p' 3132 prg.buffer[15] = 'a' 3133 prg.buffer[16] = 'r' 3134 prg.buffer[17] = 't' 3135 prg.curTok = int32(prg.lookup()) 3136 prg.ilk[prg.curTok] = uint16(op) 3137 3138 prg.idFirst = 12 3139 prg.buffer[12] = 'x' 3140 prg.buffer[13] = 'x' 3141 prg.buffer[14] = 'p' 3142 prg.buffer[15] = 'a' 3143 prg.buffer[16] = 'r' 3144 prg.buffer[17] = 't' 3145 prg.curTok = int32(prg.lookup()) 3146 prg.ilk[prg.curTok] = uint16(op) 3147 3148 prg.idFirst = 12 3149 prg.buffer[12] = 'x' 3150 prg.buffer[13] = 'y' 3151 prg.buffer[14] = 'p' 3152 prg.buffer[15] = 'a' 3153 prg.buffer[16] = 'r' 3154 prg.buffer[17] = 't' 3155 prg.curTok = int32(prg.lookup()) 3156 prg.ilk[prg.curTok] = uint16(op) 3157 3158 prg.idFirst = 12 3159 prg.buffer[12] = 'y' 3160 prg.buffer[13] = 'x' 3161 prg.buffer[14] = 'p' 3162 prg.buffer[15] = 'a' 3163 prg.buffer[16] = 'r' 3164 prg.buffer[17] = 't' 3165 prg.curTok = int32(prg.lookup()) 3166 prg.ilk[prg.curTok] = uint16(op) 3167 3168 prg.idFirst = 12 3169 prg.buffer[12] = 'y' 3170 prg.buffer[13] = 'y' 3171 prg.buffer[14] = 'p' 3172 prg.buffer[15] = 'a' 3173 prg.buffer[16] = 'r' 3174 prg.buffer[17] = 't' 3175 prg.curTok = int32(prg.lookup()) 3176 prg.ilk[prg.curTok] = uint16(op) 3177 3178 prg.idFirst = 14 3179 prg.buffer[14] = 's' 3180 prg.buffer[15] = 'q' 3181 prg.buffer[16] = 'r' 3182 prg.buffer[17] = 't' 3183 prg.curTok = int32(prg.lookup()) 3184 prg.ilk[prg.curTok] = uint16(op) 3185 3186 prg.idFirst = 14 3187 prg.buffer[14] = 'm' 3188 prg.buffer[15] = 'e' 3189 prg.buffer[16] = 'x' 3190 prg.buffer[17] = 'p' 3191 prg.curTok = int32(prg.lookup()) 3192 prg.ilk[prg.curTok] = uint16(op) 3193 3194 prg.idFirst = 14 3195 prg.buffer[14] = 'm' 3196 prg.buffer[15] = 'l' 3197 prg.buffer[16] = 'o' 3198 prg.buffer[17] = 'g' 3199 prg.curTok = int32(prg.lookup()) 3200 prg.ilk[prg.curTok] = uint16(op) 3201 3202 prg.idFirst = 14 3203 prg.buffer[14] = 's' 3204 prg.buffer[15] = 'i' 3205 prg.buffer[16] = 'n' 3206 prg.buffer[17] = 'd' 3207 prg.curTok = int32(prg.lookup()) 3208 prg.ilk[prg.curTok] = uint16(op) 3209 3210 prg.idFirst = 14 3211 prg.buffer[14] = 'c' 3212 prg.buffer[15] = 'o' 3213 prg.buffer[16] = 's' 3214 prg.buffer[17] = 'd' 3215 prg.curTok = int32(prg.lookup()) 3216 prg.ilk[prg.curTok] = uint16(op) 3217 3218 prg.idFirst = 13 3219 prg.buffer[13] = 'f' 3220 prg.buffer[14] = 'l' 3221 prg.buffer[15] = 'o' 3222 prg.buffer[16] = 'o' 3223 prg.buffer[17] = 'r' 3224 prg.curTok = int32(prg.lookup()) 3225 prg.ilk[prg.curTok] = uint16(op) 3226 3227 prg.idFirst = 4 3228 prg.buffer[4] = 'u' 3229 prg.buffer[5] = 'n' 3230 prg.buffer[6] = 'i' 3231 prg.buffer[7] = 'f' 3232 prg.buffer[8] = 'o' 3233 prg.buffer[9] = 'r' 3234 prg.buffer[10] = 'm' 3235 prg.buffer[11] = 'd' 3236 prg.buffer[12] = 'e' 3237 prg.buffer[13] = 'v' 3238 prg.buffer[14] = 'i' 3239 prg.buffer[15] = 'a' 3240 prg.buffer[16] = 't' 3241 prg.buffer[17] = 'e' 3242 prg.curTok = int32(prg.lookup()) 3243 prg.ilk[prg.curTok] = uint16(op) 3244 3245 prg.idFirst = 8 3246 prg.buffer[8] = 'c' 3247 prg.buffer[9] = 'h' 3248 prg.buffer[10] = 'a' 3249 prg.buffer[11] = 'r' 3250 prg.buffer[12] = 'e' 3251 prg.buffer[13] = 'x' 3252 prg.buffer[14] = 'i' 3253 prg.buffer[15] = 's' 3254 prg.buffer[16] = 't' 3255 prg.buffer[17] = 's' 3256 prg.curTok = int32(prg.lookup()) 3257 prg.ilk[prg.curTok] = uint16(op) 3258 3259 prg.idFirst = 13 3260 prg.buffer[13] = 'a' 3261 prg.buffer[14] = 'n' 3262 prg.buffer[15] = 'g' 3263 prg.buffer[16] = 'l' 3264 prg.buffer[17] = 'e' 3265 prg.curTok = int32(prg.lookup()) 3266 prg.ilk[prg.curTok] = uint16(op) 3267 3268 prg.idFirst = 13 3269 prg.buffer[13] = 'c' 3270 prg.buffer[14] = 'y' 3271 prg.buffer[15] = 'c' 3272 prg.buffer[16] = 'l' 3273 prg.buffer[17] = 'e' 3274 prg.curTok = int32(prg.lookup()) 3275 prg.ilk[prg.curTok] = uint16(op) 3276 3277 prg.idFirst = 5 3278 prg.buffer[5] = 't' 3279 prg.buffer[6] = 'r' 3280 prg.buffer[7] = 'a' 3281 prg.buffer[8] = 'c' 3282 prg.buffer[9] = 'i' 3283 prg.buffer[10] = 'n' 3284 prg.buffer[11] = 'g' 3285 prg.buffer[12] = 't' 3286 prg.buffer[13] = 'i' 3287 prg.buffer[14] = 't' 3288 prg.buffer[15] = 'l' 3289 prg.buffer[16] = 'e' 3290 prg.buffer[17] = 's' 3291 prg.curTok = int32(prg.lookup()) 3292 prg.ilk[prg.curTok] = uint16(internal) 3293 3294 prg.idFirst = 2 3295 prg.buffer[2] = 't' 3296 prg.buffer[3] = 'r' 3297 prg.buffer[4] = 'a' 3298 prg.buffer[5] = 'c' 3299 prg.buffer[6] = 'i' 3300 prg.buffer[7] = 'n' 3301 prg.buffer[8] = 'g' 3302 prg.buffer[9] = 'e' 3303 prg.buffer[10] = 'q' 3304 prg.buffer[11] = 'u' 3305 prg.buffer[12] = 'a' 3306 prg.buffer[13] = 't' 3307 prg.buffer[14] = 'i' 3308 prg.buffer[15] = 'o' 3309 prg.buffer[16] = 'n' 3310 prg.buffer[17] = 's' 3311 prg.curTok = int32(prg.lookup()) 3312 prg.ilk[prg.curTok] = uint16(internal) 3313 3314 prg.idFirst = 3 3315 prg.buffer[3] = 't' 3316 prg.buffer[4] = 'r' 3317 prg.buffer[5] = 'a' 3318 prg.buffer[6] = 'c' 3319 prg.buffer[7] = 'i' 3320 prg.buffer[8] = 'n' 3321 prg.buffer[9] = 'g' 3322 prg.buffer[10] = 'c' 3323 prg.buffer[11] = 'a' 3324 prg.buffer[12] = 'p' 3325 prg.buffer[13] = 's' 3326 prg.buffer[14] = 'u' 3327 prg.buffer[15] = 'l' 3328 prg.buffer[16] = 'e' 3329 prg.buffer[17] = 's' 3330 prg.curTok = int32(prg.lookup()) 3331 prg.ilk[prg.curTok] = uint16(internal) 3332 3333 prg.idFirst = 4 3334 prg.buffer[4] = 't' 3335 prg.buffer[5] = 'r' 3336 prg.buffer[6] = 'a' 3337 prg.buffer[7] = 'c' 3338 prg.buffer[8] = 'i' 3339 prg.buffer[9] = 'n' 3340 prg.buffer[10] = 'g' 3341 prg.buffer[11] = 'c' 3342 prg.buffer[12] = 'h' 3343 prg.buffer[13] = 'o' 3344 prg.buffer[14] = 'i' 3345 prg.buffer[15] = 'c' 3346 prg.buffer[16] = 'e' 3347 prg.buffer[17] = 's' 3348 prg.curTok = int32(prg.lookup()) 3349 prg.ilk[prg.curTok] = uint16(internal) 3350 3351 prg.idFirst = 6 3352 prg.buffer[6] = 't' 3353 prg.buffer[7] = 'r' 3354 prg.buffer[8] = 'a' 3355 prg.buffer[9] = 'c' 3356 prg.buffer[10] = 'i' 3357 prg.buffer[11] = 'n' 3358 prg.buffer[12] = 'g' 3359 prg.buffer[13] = 's' 3360 prg.buffer[14] = 'p' 3361 prg.buffer[15] = 'e' 3362 prg.buffer[16] = 'c' 3363 prg.buffer[17] = 's' 3364 prg.curTok = int32(prg.lookup()) 3365 prg.ilk[prg.curTok] = uint16(internal) 3366 3367 prg.idFirst = 7 3368 prg.buffer[7] = 't' 3369 prg.buffer[8] = 'r' 3370 prg.buffer[9] = 'a' 3371 prg.buffer[10] = 'c' 3372 prg.buffer[11] = 'i' 3373 prg.buffer[12] = 'n' 3374 prg.buffer[13] = 'g' 3375 prg.buffer[14] = 'p' 3376 prg.buffer[15] = 'e' 3377 prg.buffer[16] = 'n' 3378 prg.buffer[17] = 's' 3379 prg.curTok = int32(prg.lookup()) 3380 prg.ilk[prg.curTok] = uint16(internal) 3381 3382 prg.idFirst = 3 3383 prg.buffer[3] = 't' 3384 prg.buffer[4] = 'r' 3385 prg.buffer[5] = 'a' 3386 prg.buffer[6] = 'c' 3387 prg.buffer[7] = 'i' 3388 prg.buffer[8] = 'n' 3389 prg.buffer[9] = 'g' 3390 prg.buffer[10] = 'c' 3391 prg.buffer[11] = 'o' 3392 prg.buffer[12] = 'm' 3393 prg.buffer[13] = 'm' 3394 prg.buffer[14] = 'a' 3395 prg.buffer[15] = 'n' 3396 prg.buffer[16] = 'd' 3397 prg.buffer[17] = 's' 3398 prg.curTok = int32(prg.lookup()) 3399 prg.ilk[prg.curTok] = uint16(internal) 3400 3401 prg.idFirst = 5 3402 prg.buffer[5] = 't' 3403 prg.buffer[6] = 'r' 3404 prg.buffer[7] = 'a' 3405 prg.buffer[8] = 'c' 3406 prg.buffer[9] = 'i' 3407 prg.buffer[10] = 'n' 3408 prg.buffer[11] = 'g' 3409 prg.buffer[12] = 'm' 3410 prg.buffer[13] = 'a' 3411 prg.buffer[14] = 'c' 3412 prg.buffer[15] = 'r' 3413 prg.buffer[16] = 'o' 3414 prg.buffer[17] = 's' 3415 prg.curTok = int32(prg.lookup()) 3416 prg.ilk[prg.curTok] = uint16(internal) 3417 3418 prg.idFirst = 6 3419 prg.buffer[6] = 't' 3420 prg.buffer[7] = 'r' 3421 prg.buffer[8] = 'a' 3422 prg.buffer[9] = 'c' 3423 prg.buffer[10] = 'i' 3424 prg.buffer[11] = 'n' 3425 prg.buffer[12] = 'g' 3426 prg.buffer[13] = 'e' 3427 prg.buffer[14] = 'd' 3428 prg.buffer[15] = 'g' 3429 prg.buffer[16] = 'e' 3430 prg.buffer[17] = 's' 3431 prg.curTok = int32(prg.lookup()) 3432 prg.ilk[prg.curTok] = uint16(internal) 3433 3434 prg.idFirst = 5 3435 prg.buffer[5] = 't' 3436 prg.buffer[6] = 'r' 3437 prg.buffer[7] = 'a' 3438 prg.buffer[8] = 'c' 3439 prg.buffer[9] = 'i' 3440 prg.buffer[10] = 'n' 3441 prg.buffer[11] = 'g' 3442 prg.buffer[12] = 'o' 3443 prg.buffer[13] = 'u' 3444 prg.buffer[14] = 't' 3445 prg.buffer[15] = 'p' 3446 prg.buffer[16] = 'u' 3447 prg.buffer[17] = 't' 3448 prg.curTok = int32(prg.lookup()) 3449 prg.ilk[prg.curTok] = uint16(internal) 3450 3451 prg.idFirst = 6 3452 prg.buffer[6] = 't' 3453 prg.buffer[7] = 'r' 3454 prg.buffer[8] = 'a' 3455 prg.buffer[9] = 'c' 3456 prg.buffer[10] = 'i' 3457 prg.buffer[11] = 'n' 3458 prg.buffer[12] = 'g' 3459 prg.buffer[13] = 's' 3460 prg.buffer[14] = 't' 3461 prg.buffer[15] = 'a' 3462 prg.buffer[16] = 't' 3463 prg.buffer[17] = 's' 3464 prg.curTok = int32(prg.lookup()) 3465 prg.ilk[prg.curTok] = uint16(internal) 3466 3467 prg.idFirst = 5 3468 prg.buffer[5] = 't' 3469 prg.buffer[6] = 'r' 3470 prg.buffer[7] = 'a' 3471 prg.buffer[8] = 'c' 3472 prg.buffer[9] = 'i' 3473 prg.buffer[10] = 'n' 3474 prg.buffer[11] = 'g' 3475 prg.buffer[12] = 'o' 3476 prg.buffer[13] = 'n' 3477 prg.buffer[14] = 'l' 3478 prg.buffer[15] = 'i' 3479 prg.buffer[16] = 'n' 3480 prg.buffer[17] = 'e' 3481 prg.curTok = int32(prg.lookup()) 3482 prg.ilk[prg.curTok] = uint16(internal) 3483 3484 prg.idFirst = 3 3485 prg.buffer[3] = 't' 3486 prg.buffer[4] = 'r' 3487 prg.buffer[5] = 'a' 3488 prg.buffer[6] = 'c' 3489 prg.buffer[7] = 'i' 3490 prg.buffer[8] = 'n' 3491 prg.buffer[9] = 'g' 3492 prg.buffer[10] = 'r' 3493 prg.buffer[11] = 'e' 3494 prg.buffer[12] = 's' 3495 prg.buffer[13] = 't' 3496 prg.buffer[14] = 'o' 3497 prg.buffer[15] = 'r' 3498 prg.buffer[16] = 'e' 3499 prg.buffer[17] = 's' 3500 prg.curTok = int32(prg.lookup()) 3501 prg.ilk[prg.curTok] = uint16(internal) 3502 3503 prg.idFirst = 14 3504 prg.buffer[14] = 'y' 3505 prg.buffer[15] = 'e' 3506 prg.buffer[16] = 'a' 3507 prg.buffer[17] = 'r' 3508 prg.curTok = int32(prg.lookup()) 3509 prg.ilk[prg.curTok] = uint16(internal) 3510 3511 prg.idFirst = 13 3512 prg.buffer[13] = 'm' 3513 prg.buffer[14] = 'o' 3514 prg.buffer[15] = 'n' 3515 prg.buffer[16] = 't' 3516 prg.buffer[17] = 'h' 3517 prg.curTok = int32(prg.lookup()) 3518 prg.ilk[prg.curTok] = uint16(internal) 3519 3520 prg.idFirst = 15 3521 prg.buffer[15] = 'd' 3522 prg.buffer[16] = 'a' 3523 prg.buffer[17] = 'y' 3524 prg.curTok = int32(prg.lookup()) 3525 prg.ilk[prg.curTok] = uint16(internal) 3526 3527 prg.idFirst = 14 3528 prg.buffer[14] = 't' 3529 prg.buffer[15] = 'i' 3530 prg.buffer[16] = 'm' 3531 prg.buffer[17] = 'e' 3532 prg.curTok = int32(prg.lookup()) 3533 prg.ilk[prg.curTok] = uint16(internal) 3534 3535 prg.idFirst = 10 3536 prg.buffer[10] = 'c' 3537 prg.buffer[11] = 'h' 3538 prg.buffer[12] = 'a' 3539 prg.buffer[13] = 'r' 3540 prg.buffer[14] = 'c' 3541 prg.buffer[15] = 'o' 3542 prg.buffer[16] = 'd' 3543 prg.buffer[17] = 'e' 3544 prg.curTok = int32(prg.lookup()) 3545 prg.ilk[prg.curTok] = uint16(internal) 3546 3547 prg.idFirst = 11 3548 prg.buffer[11] = 'c' 3549 prg.buffer[12] = 'h' 3550 prg.buffer[13] = 'a' 3551 prg.buffer[14] = 'r' 3552 prg.buffer[15] = 'e' 3553 prg.buffer[16] = 'x' 3554 prg.buffer[17] = 't' 3555 prg.curTok = int32(prg.lookup()) 3556 prg.ilk[prg.curTok] = uint16(internal) 3557 3558 prg.idFirst = 12 3559 prg.buffer[12] = 'c' 3560 prg.buffer[13] = 'h' 3561 prg.buffer[14] = 'a' 3562 prg.buffer[15] = 'r' 3563 prg.buffer[16] = 'w' 3564 prg.buffer[17] = 'd' 3565 prg.curTok = int32(prg.lookup()) 3566 prg.ilk[prg.curTok] = uint16(internal) 3567 3568 prg.idFirst = 12 3569 prg.buffer[12] = 'c' 3570 prg.buffer[13] = 'h' 3571 prg.buffer[14] = 'a' 3572 prg.buffer[15] = 'r' 3573 prg.buffer[16] = 'h' 3574 prg.buffer[17] = 't' 3575 prg.curTok = int32(prg.lookup()) 3576 prg.ilk[prg.curTok] = uint16(internal) 3577 3578 prg.idFirst = 12 3579 prg.buffer[12] = 'c' 3580 prg.buffer[13] = 'h' 3581 prg.buffer[14] = 'a' 3582 prg.buffer[15] = 'r' 3583 prg.buffer[16] = 'd' 3584 prg.buffer[17] = 'p' 3585 prg.curTok = int32(prg.lookup()) 3586 prg.ilk[prg.curTok] = uint16(internal) 3587 3588 prg.idFirst = 12 3589 prg.buffer[12] = 'c' 3590 prg.buffer[13] = 'h' 3591 prg.buffer[14] = 'a' 3592 prg.buffer[15] = 'r' 3593 prg.buffer[16] = 'i' 3594 prg.buffer[17] = 'c' 3595 prg.curTok = int32(prg.lookup()) 3596 prg.ilk[prg.curTok] = uint16(internal) 3597 3598 prg.idFirst = 12 3599 prg.buffer[12] = 'c' 3600 prg.buffer[13] = 'h' 3601 prg.buffer[14] = 'a' 3602 prg.buffer[15] = 'r' 3603 prg.buffer[16] = 'd' 3604 prg.buffer[17] = 'x' 3605 prg.curTok = int32(prg.lookup()) 3606 prg.ilk[prg.curTok] = uint16(internal) 3607 3608 prg.idFirst = 12 3609 prg.buffer[12] = 'c' 3610 prg.buffer[13] = 'h' 3611 prg.buffer[14] = 'a' 3612 prg.buffer[15] = 'r' 3613 prg.buffer[16] = 'd' 3614 prg.buffer[17] = 'y' 3615 prg.curTok = int32(prg.lookup()) 3616 prg.ilk[prg.curTok] = uint16(internal) 3617 3618 prg.idFirst = 8 3619 prg.buffer[8] = 'd' 3620 prg.buffer[9] = 'e' 3621 prg.buffer[10] = 's' 3622 prg.buffer[11] = 'i' 3623 prg.buffer[12] = 'g' 3624 prg.buffer[13] = 'n' 3625 prg.buffer[14] = 's' 3626 prg.buffer[15] = 'i' 3627 prg.buffer[16] = 'z' 3628 prg.buffer[17] = 'e' 3629 prg.curTok = int32(prg.lookup()) 3630 prg.ilk[prg.curTok] = uint16(internal) 3631 3632 prg.idFirst = 14 3633 prg.buffer[14] = 'h' 3634 prg.buffer[15] = 'p' 3635 prg.buffer[16] = 'p' 3636 prg.buffer[17] = 'p' 3637 prg.curTok = int32(prg.lookup()) 3638 prg.ilk[prg.curTok] = uint16(internal) 3639 3640 prg.idFirst = 14 3641 prg.buffer[14] = 'v' 3642 prg.buffer[15] = 'p' 3643 prg.buffer[16] = 'p' 3644 prg.buffer[17] = 'p' 3645 prg.curTok = int32(prg.lookup()) 3646 prg.ilk[prg.curTok] = uint16(internal) 3647 3648 prg.idFirst = 11 3649 prg.buffer[11] = 'x' 3650 prg.buffer[12] = 'o' 3651 prg.buffer[13] = 'f' 3652 prg.buffer[14] = 'f' 3653 prg.buffer[15] = 's' 3654 prg.buffer[16] = 'e' 3655 prg.buffer[17] = 't' 3656 prg.curTok = int32(prg.lookup()) 3657 prg.ilk[prg.curTok] = uint16(internal) 3658 3659 prg.idFirst = 11 3660 prg.buffer[11] = 'y' 3661 prg.buffer[12] = 'o' 3662 prg.buffer[13] = 'f' 3663 prg.buffer[14] = 'f' 3664 prg.buffer[15] = 's' 3665 prg.buffer[16] = 'e' 3666 prg.buffer[17] = 't' 3667 prg.curTok = int32(prg.lookup()) 3668 prg.ilk[prg.curTok] = uint16(internal) 3669 3670 prg.idFirst = 11 3671 prg.buffer[11] = 'p' 3672 prg.buffer[12] = 'a' 3673 prg.buffer[13] = 'u' 3674 prg.buffer[14] = 's' 3675 prg.buffer[15] = 'i' 3676 prg.buffer[16] = 'n' 3677 prg.buffer[17] = 'g' 3678 prg.curTok = int32(prg.lookup()) 3679 prg.ilk[prg.curTok] = uint16(internal) 3680 3681 prg.idFirst = 6 3682 prg.buffer[6] = 's' 3683 prg.buffer[7] = 'h' 3684 prg.buffer[8] = 'o' 3685 prg.buffer[9] = 'w' 3686 prg.buffer[10] = 's' 3687 prg.buffer[11] = 't' 3688 prg.buffer[12] = 'o' 3689 prg.buffer[13] = 'p' 3690 prg.buffer[14] = 'p' 3691 prg.buffer[15] = 'i' 3692 prg.buffer[16] = 'n' 3693 prg.buffer[17] = 'g' 3694 prg.curTok = int32(prg.lookup()) 3695 prg.ilk[prg.curTok] = uint16(internal) 3696 3697 prg.idFirst = 8 3698 prg.buffer[8] = 'f' 3699 prg.buffer[9] = 'o' 3700 prg.buffer[10] = 'n' 3701 prg.buffer[11] = 't' 3702 prg.buffer[12] = 'm' 3703 prg.buffer[13] = 'a' 3704 prg.buffer[14] = 'k' 3705 prg.buffer[15] = 'i' 3706 prg.buffer[16] = 'n' 3707 prg.buffer[17] = 'g' 3708 prg.curTok = int32(prg.lookup()) 3709 prg.ilk[prg.curTok] = uint16(internal) 3710 3711 prg.idFirst = 10 3712 prg.buffer[10] = 'p' 3713 prg.buffer[11] = 'r' 3714 prg.buffer[12] = 'o' 3715 prg.buffer[13] = 'o' 3716 prg.buffer[14] = 'f' 3717 prg.buffer[15] = 'i' 3718 prg.buffer[16] = 'n' 3719 prg.buffer[17] = 'g' 3720 prg.curTok = int32(prg.lookup()) 3721 prg.ilk[prg.curTok] = uint16(internal) 3722 3723 prg.idFirst = 9 3724 prg.buffer[9] = 's' 3725 prg.buffer[10] = 'm' 3726 prg.buffer[11] = 'o' 3727 prg.buffer[12] = 'o' 3728 prg.buffer[13] = 't' 3729 prg.buffer[14] = 'h' 3730 prg.buffer[15] = 'i' 3731 prg.buffer[16] = 'n' 3732 prg.buffer[17] = 'g' 3733 prg.curTok = int32(prg.lookup()) 3734 prg.ilk[prg.curTok] = uint16(internal) 3735 3736 prg.idFirst = 6 3737 prg.buffer[6] = 'a' 3738 prg.buffer[7] = 'u' 3739 prg.buffer[8] = 't' 3740 prg.buffer[9] = 'o' 3741 prg.buffer[10] = 'r' 3742 prg.buffer[11] = 'o' 3743 prg.buffer[12] = 'u' 3744 prg.buffer[13] = 'n' 3745 prg.buffer[14] = 'd' 3746 prg.buffer[15] = 'i' 3747 prg.buffer[16] = 'n' 3748 prg.buffer[17] = 'g' 3749 prg.curTok = int32(prg.lookup()) 3750 prg.ilk[prg.curTok] = uint16(internal) 3751 3752 prg.idFirst = 7 3753 prg.buffer[7] = 'g' 3754 prg.buffer[8] = 'r' 3755 prg.buffer[9] = 'a' 3756 prg.buffer[10] = 'n' 3757 prg.buffer[11] = 'u' 3758 prg.buffer[12] = 'l' 3759 prg.buffer[13] = 'a' 3760 prg.buffer[14] = 'r' 3761 prg.buffer[15] = 'i' 3762 prg.buffer[16] = 't' 3763 prg.buffer[17] = 'y' 3764 prg.curTok = int32(prg.lookup()) 3765 prg.ilk[prg.curTok] = uint16(internal) 3766 3767 prg.idFirst = 12 3768 prg.buffer[12] = 'f' 3769 prg.buffer[13] = 'i' 3770 prg.buffer[14] = 'l' 3771 prg.buffer[15] = 'l' 3772 prg.buffer[16] = 'i' 3773 prg.buffer[17] = 'n' 3774 prg.curTok = int32(prg.lookup()) 3775 prg.ilk[prg.curTok] = uint16(internal) 3776 3777 prg.idFirst = 6 3778 prg.buffer[6] = 't' 3779 prg.buffer[7] = 'u' 3780 prg.buffer[8] = 'r' 3781 prg.buffer[9] = 'n' 3782 prg.buffer[10] = 'i' 3783 prg.buffer[11] = 'n' 3784 prg.buffer[12] = 'g' 3785 prg.buffer[13] = 'c' 3786 prg.buffer[14] = 'h' 3787 prg.buffer[15] = 'e' 3788 prg.buffer[16] = 'c' 3789 prg.buffer[17] = 'k' 3790 prg.curTok = int32(prg.lookup()) 3791 prg.ilk[prg.curTok] = uint16(internal) 3792 3793 prg.idFirst = 6 3794 prg.buffer[6] = 'w' 3795 prg.buffer[7] = 'a' 3796 prg.buffer[8] = 'r' 3797 prg.buffer[9] = 'n' 3798 prg.buffer[10] = 'i' 3799 prg.buffer[11] = 'n' 3800 prg.buffer[12] = 'g' 3801 prg.buffer[13] = 'c' 3802 prg.buffer[14] = 'h' 3803 prg.buffer[15] = 'e' 3804 prg.buffer[16] = 'c' 3805 prg.buffer[17] = 'k' 3806 prg.curTok = int32(prg.lookup()) 3807 prg.ilk[prg.curTok] = uint16(internal) 3808 3809 prg.idFirst = 6 3810 prg.buffer[6] = 'b' 3811 prg.buffer[7] = 'o' 3812 prg.buffer[8] = 'u' 3813 prg.buffer[9] = 'n' 3814 prg.buffer[10] = 'd' 3815 prg.buffer[11] = 'a' 3816 prg.buffer[12] = 'r' 3817 prg.buffer[13] = 'y' 3818 prg.buffer[14] = 'c' 3819 prg.buffer[15] = 'h' 3820 prg.buffer[16] = 'a' 3821 prg.buffer[17] = 'r' 3822 prg.curTok = int32(prg.lookup()) 3823 prg.ilk[prg.curTok] = uint16(internal) 3824 3825 prg.idFirst = 17 3826 prg.buffer[17] = '+' 3827 prg.curTok = int32(prg.lookup()) 3828 prg.ilk[prg.curTok] = uint16(abinary) 3829 3830 prg.idFirst = 17 3831 prg.buffer[17] = '-' 3832 prg.curTok = int32(prg.lookup()) 3833 prg.ilk[prg.curTok] = uint16(abinary) 3834 3835 prg.idFirst = 17 3836 prg.buffer[17] = '*' 3837 prg.curTok = int32(prg.lookup()) 3838 prg.ilk[prg.curTok] = uint16(abinary) 3839 3840 prg.idFirst = 17 3841 prg.buffer[17] = '/' 3842 prg.curTok = int32(prg.lookup()) 3843 prg.ilk[prg.curTok] = uint16(asIs) 3844 3845 prg.idFirst = 16 3846 prg.buffer[16] = '+' 3847 prg.buffer[17] = '+' 3848 prg.curTok = int32(prg.lookup()) 3849 prg.ilk[prg.curTok] = uint16(binary) 3850 3851 prg.idFirst = 15 3852 prg.buffer[15] = '+' 3853 prg.buffer[16] = '-' 3854 prg.buffer[17] = '+' 3855 prg.curTok = int32(prg.lookup()) 3856 prg.ilk[prg.curTok] = uint16(pythSub) 3857 3858 prg.idFirst = 15 3859 prg.buffer[15] = 'a' 3860 prg.buffer[16] = 'n' 3861 prg.buffer[17] = 'd' 3862 prg.curTok = int32(prg.lookup()) 3863 prg.ilk[prg.curTok] = uint16(binary) 3864 3865 prg.idFirst = 16 3866 prg.buffer[16] = 'o' 3867 prg.buffer[17] = 'r' 3868 prg.curTok = int32(prg.lookup()) 3869 prg.ilk[prg.curTok] = uint16(binary) 3870 3871 prg.idFirst = 17 3872 prg.buffer[17] = '<' 3873 prg.curTok = int32(prg.lookup()) 3874 prg.ilk[prg.curTok] = uint16(asIs) 3875 3876 prg.idFirst = 16 3877 prg.buffer[16] = '<' 3878 prg.buffer[17] = '=' 3879 prg.curTok = int32(prg.lookup()) 3880 prg.ilk[prg.curTok] = uint16(lessOrEqual) 3881 3882 prg.idFirst = 17 3883 prg.buffer[17] = '>' 3884 prg.curTok = int32(prg.lookup()) 3885 prg.ilk[prg.curTok] = uint16(asIs) 3886 3887 prg.idFirst = 16 3888 prg.buffer[16] = '>' 3889 prg.buffer[17] = '=' 3890 prg.curTok = int32(prg.lookup()) 3891 prg.ilk[prg.curTok] = uint16(greaterOrEqual) 3892 3893 prg.idFirst = 17 3894 prg.buffer[17] = '=' 3895 prg.curTok = int32(prg.lookup()) 3896 prg.ilk[prg.curTok] = uint16(asIs) 3897 3898 prg.idFirst = 16 3899 prg.buffer[16] = '<' 3900 prg.buffer[17] = '>' 3901 prg.curTok = int32(prg.lookup()) 3902 prg.ilk[prg.curTok] = uint16(notEqual) 3903 3904 prg.idFirst = 9 3905 prg.buffer[9] = 's' 3906 prg.buffer[10] = 'u' 3907 prg.buffer[11] = 'b' 3908 prg.buffer[12] = 's' 3909 prg.buffer[13] = 't' 3910 prg.buffer[14] = 'r' 3911 prg.buffer[15] = 'i' 3912 prg.buffer[16] = 'n' 3913 prg.buffer[17] = 'g' 3914 prg.curTok = int32(prg.lookup()) 3915 prg.ilk[prg.curTok] = uint16(command) 3916 3917 prg.idFirst = 11 3918 prg.buffer[11] = 's' 3919 prg.buffer[12] = 'u' 3920 prg.buffer[13] = 'b' 3921 prg.buffer[14] = 'p' 3922 prg.buffer[15] = 'a' 3923 prg.buffer[16] = 't' 3924 prg.buffer[17] = 'h' 3925 prg.curTok = int32(prg.lookup()) 3926 prg.ilk[prg.curTok] = uint16(command) 3927 3928 prg.idFirst = 5 3929 prg.buffer[5] = 'd' 3930 prg.buffer[6] = 'i' 3931 prg.buffer[7] = 'r' 3932 prg.buffer[8] = 'e' 3933 prg.buffer[9] = 'c' 3934 prg.buffer[10] = 't' 3935 prg.buffer[11] = 'i' 3936 prg.buffer[12] = 'o' 3937 prg.buffer[13] = 'n' 3938 prg.buffer[14] = 't' 3939 prg.buffer[15] = 'i' 3940 prg.buffer[16] = 'm' 3941 prg.buffer[17] = 'e' 3942 prg.curTok = int32(prg.lookup()) 3943 prg.ilk[prg.curTok] = uint16(command) 3944 3945 prg.idFirst = 13 3946 prg.buffer[13] = 'p' 3947 prg.buffer[14] = 'o' 3948 prg.buffer[15] = 'i' 3949 prg.buffer[16] = 'n' 3950 prg.buffer[17] = 't' 3951 prg.curTok = int32(prg.lookup()) 3952 prg.ilk[prg.curTok] = uint16(command) 3953 3954 prg.idFirst = 8 3955 prg.buffer[8] = 'p' 3956 prg.buffer[9] = 'r' 3957 prg.buffer[10] = 'e' 3958 prg.buffer[11] = 'c' 3959 prg.buffer[12] = 'o' 3960 prg.buffer[13] = 'n' 3961 prg.buffer[14] = 't' 3962 prg.buffer[15] = 'r' 3963 prg.buffer[16] = 'o' 3964 prg.buffer[17] = 'l' 3965 prg.curTok = int32(prg.lookup()) 3966 prg.ilk[prg.curTok] = uint16(command) 3967 3968 prg.idFirst = 7 3969 prg.buffer[7] = 'p' 3970 prg.buffer[8] = 'o' 3971 prg.buffer[9] = 's' 3972 prg.buffer[10] = 't' 3973 prg.buffer[11] = 'c' 3974 prg.buffer[12] = 'o' 3975 prg.buffer[13] = 'n' 3976 prg.buffer[14] = 't' 3977 prg.buffer[15] = 'r' 3978 prg.buffer[16] = 'o' 3979 prg.buffer[17] = 'l' 3980 prg.curTok = int32(prg.lookup()) 3981 prg.ilk[prg.curTok] = uint16(command) 3982 3983 prg.idFirst = 9 3984 prg.buffer[9] = 'p' 3985 prg.buffer[10] = 'e' 3986 prg.buffer[11] = 'n' 3987 prg.buffer[12] = 'o' 3988 prg.buffer[13] = 'f' 3989 prg.buffer[14] = 'f' 3990 prg.buffer[15] = 's' 3991 prg.buffer[16] = 'e' 3992 prg.buffer[17] = 't' 3993 prg.curTok = int32(prg.lookup()) 3994 prg.ilk[prg.curTok] = uint16(command) 3995 3996 prg.idFirst = 17 3997 prg.buffer[17] = '&' 3998 prg.curTok = int32(prg.lookup()) 3999 prg.ilk[prg.curTok] = uint16(ampersand) 4000 4001 prg.idFirst = 11 4002 prg.buffer[11] = 'r' 4003 prg.buffer[12] = 'o' 4004 prg.buffer[13] = 't' 4005 prg.buffer[14] = 'a' 4006 prg.buffer[15] = 't' 4007 prg.buffer[16] = 'e' 4008 prg.buffer[17] = 'd' 4009 prg.curTok = int32(prg.lookup()) 4010 prg.ilk[prg.curTok] = uint16(binary) 4011 4012 prg.idFirst = 11 4013 prg.buffer[11] = 's' 4014 prg.buffer[12] = 'l' 4015 prg.buffer[13] = 'a' 4016 prg.buffer[14] = 'n' 4017 prg.buffer[15] = 't' 4018 prg.buffer[16] = 'e' 4019 prg.buffer[17] = 'd' 4020 prg.curTok = int32(prg.lookup()) 4021 prg.ilk[prg.curTok] = uint16(binary) 4022 4023 prg.idFirst = 12 4024 prg.buffer[12] = 's' 4025 prg.buffer[13] = 'c' 4026 prg.buffer[14] = 'a' 4027 prg.buffer[15] = 'l' 4028 prg.buffer[16] = 'e' 4029 prg.buffer[17] = 'd' 4030 prg.curTok = int32(prg.lookup()) 4031 prg.ilk[prg.curTok] = uint16(binary) 4032 4033 prg.idFirst = 11 4034 prg.buffer[11] = 's' 4035 prg.buffer[12] = 'h' 4036 prg.buffer[13] = 'i' 4037 prg.buffer[14] = 'f' 4038 prg.buffer[15] = 't' 4039 prg.buffer[16] = 'e' 4040 prg.buffer[17] = 'd' 4041 prg.curTok = int32(prg.lookup()) 4042 prg.ilk[prg.curTok] = uint16(binary) 4043 4044 prg.idFirst = 7 4045 prg.buffer[7] = 't' 4046 prg.buffer[8] = 'r' 4047 prg.buffer[9] = 'a' 4048 prg.buffer[10] = 'n' 4049 prg.buffer[11] = 's' 4050 prg.buffer[12] = 'f' 4051 prg.buffer[13] = 'o' 4052 prg.buffer[14] = 'r' 4053 prg.buffer[15] = 'm' 4054 prg.buffer[16] = 'e' 4055 prg.buffer[17] = 'd' 4056 prg.curTok = int32(prg.lookup()) 4057 prg.ilk[prg.curTok] = uint16(binary) 4058 4059 prg.idFirst = 11 4060 prg.buffer[11] = 'x' 4061 prg.buffer[12] = 's' 4062 prg.buffer[13] = 'c' 4063 prg.buffer[14] = 'a' 4064 prg.buffer[15] = 'l' 4065 prg.buffer[16] = 'e' 4066 prg.buffer[17] = 'd' 4067 prg.curTok = int32(prg.lookup()) 4068 prg.ilk[prg.curTok] = uint16(binary) 4069 4070 prg.idFirst = 11 4071 prg.buffer[11] = 'y' 4072 prg.buffer[12] = 's' 4073 prg.buffer[13] = 'c' 4074 prg.buffer[14] = 'a' 4075 prg.buffer[15] = 'l' 4076 prg.buffer[16] = 'e' 4077 prg.buffer[17] = 'd' 4078 prg.curTok = int32(prg.lookup()) 4079 prg.ilk[prg.curTok] = uint16(binary) 4080 4081 prg.idFirst = 11 4082 prg.buffer[11] = 'z' 4083 prg.buffer[12] = 's' 4084 prg.buffer[13] = 'c' 4085 prg.buffer[14] = 'a' 4086 prg.buffer[15] = 'l' 4087 prg.buffer[16] = 'e' 4088 prg.buffer[17] = 'd' 4089 prg.curTok = int32(prg.lookup()) 4090 prg.ilk[prg.curTok] = uint16(binary) 4091 4092 prg.idFirst = 1 4093 prg.buffer[1] = 'i' 4094 prg.buffer[2] = 'n' 4095 prg.buffer[3] = 't' 4096 prg.buffer[4] = 'e' 4097 prg.buffer[5] = 'r' 4098 prg.buffer[6] = 's' 4099 prg.buffer[7] = 'e' 4100 prg.buffer[8] = 'c' 4101 prg.buffer[9] = 't' 4102 prg.buffer[10] = 'i' 4103 prg.buffer[11] = 'o' 4104 prg.buffer[12] = 'n' 4105 prg.buffer[13] = 't' 4106 prg.buffer[14] = 'i' 4107 prg.buffer[15] = 'm' 4108 prg.buffer[16] = 'e' 4109 prg.buffer[17] = 's' 4110 prg.curTok = int32(prg.lookup()) 4111 prg.ilk[prg.curTok] = uint16(binary) 4112 4113 prg.idFirst = 11 4114 prg.buffer[11] = 'n' 4115 prg.buffer[12] = 'u' 4116 prg.buffer[13] = 'm' 4117 prg.buffer[14] = 'e' 4118 prg.buffer[15] = 'r' 4119 prg.buffer[16] = 'i' 4120 prg.buffer[17] = 'c' 4121 prg.curTok = int32(prg.lookup()) 4122 prg.ilk[prg.curTok] = uint16(typeName) 4123 4124 prg.idFirst = 12 4125 prg.buffer[12] = 's' 4126 prg.buffer[13] = 't' 4127 prg.buffer[14] = 'r' 4128 prg.buffer[15] = 'i' 4129 prg.buffer[16] = 'n' 4130 prg.buffer[17] = 'g' 4131 prg.curTok = int32(prg.lookup()) 4132 prg.ilk[prg.curTok] = uint16(typeName) 4133 4134 prg.idFirst = 11 4135 prg.buffer[11] = 'b' 4136 prg.buffer[12] = 'o' 4137 prg.buffer[13] = 'o' 4138 prg.buffer[14] = 'l' 4139 prg.buffer[15] = 'e' 4140 prg.buffer[16] = 'a' 4141 prg.buffer[17] = 'n' 4142 prg.curTok = int32(prg.lookup()) 4143 prg.ilk[prg.curTok] = uint16(typeName) 4144 4145 prg.idFirst = 14 4146 prg.buffer[14] = 'p' 4147 prg.buffer[15] = 'a' 4148 prg.buffer[16] = 't' 4149 prg.buffer[17] = 'h' 4150 prg.curTok = int32(prg.lookup()) 4151 prg.ilk[prg.curTok] = uint16(typeName) 4152 4153 prg.idFirst = 15 4154 prg.buffer[15] = 'p' 4155 prg.buffer[16] = 'e' 4156 prg.buffer[17] = 'n' 4157 prg.curTok = int32(prg.lookup()) 4158 prg.ilk[prg.curTok] = uint16(typeName) 4159 4160 prg.idFirst = 11 4161 prg.buffer[11] = 'p' 4162 prg.buffer[12] = 'i' 4163 prg.buffer[13] = 'c' 4164 prg.buffer[14] = 't' 4165 prg.buffer[15] = 'u' 4166 prg.buffer[16] = 'r' 4167 prg.buffer[17] = 'e' 4168 prg.curTok = int32(prg.lookup()) 4169 prg.ilk[prg.curTok] = uint16(typeName) 4170 4171 prg.idFirst = 9 4172 prg.buffer[9] = 't' 4173 prg.buffer[10] = 'r' 4174 prg.buffer[11] = 'a' 4175 prg.buffer[12] = 'n' 4176 prg.buffer[13] = 's' 4177 prg.buffer[14] = 'f' 4178 prg.buffer[15] = 'o' 4179 prg.buffer[16] = 'r' 4180 prg.buffer[17] = 'm' 4181 prg.curTok = int32(prg.lookup()) 4182 prg.ilk[prg.curTok] = uint16(typeName) 4183 4184 prg.idFirst = 14 4185 prg.buffer[14] = 'p' 4186 prg.buffer[15] = 'a' 4187 prg.buffer[16] = 'i' 4188 prg.buffer[17] = 'r' 4189 prg.curTok = int32(prg.lookup()) 4190 prg.ilk[prg.curTok] = uint16(typeName) 4191 4192 prg.idFirst = 15 4193 prg.buffer[15] = 'e' 4194 prg.buffer[16] = 'n' 4195 prg.buffer[17] = 'd' 4196 prg.curTok = int32(prg.lookup()) 4197 prg.ilk[prg.curTok] = uint16(endit) 4198 4199 prg.idFirst = 14 4200 prg.buffer[14] = 'd' 4201 prg.buffer[15] = 'u' 4202 prg.buffer[16] = 'm' 4203 prg.buffer[17] = 'p' 4204 prg.curTok = int32(prg.lookup()) 4205 prg.ilk[prg.curTok] = uint16(endit) 4206 4207 prg.idFirst = 9 4208 prg.buffer[9] = 'b' 4209 prg.buffer[10] = 'a' 4210 prg.buffer[11] = 't' 4211 prg.buffer[12] = 'c' 4212 prg.buffer[13] = 'h' 4213 prg.buffer[14] = 'm' 4214 prg.buffer[15] = 'o' 4215 prg.buffer[16] = 'd' 4216 prg.buffer[17] = 'e' 4217 prg.curTok = int32(prg.lookup()) 4218 prg.ilk[prg.curTok] = uint16(bold) 4219 prg.idFirst = 7 4220 prg.buffer[7] = 'n' 4221 prg.buffer[8] = 'o' 4222 prg.buffer[9] = 'n' 4223 prg.buffer[10] = 's' 4224 prg.buffer[11] = 't' 4225 prg.buffer[12] = 'o' 4226 prg.buffer[13] = 'p' 4227 prg.buffer[14] = 'm' 4228 prg.buffer[15] = 'o' 4229 prg.buffer[16] = 'd' 4230 prg.buffer[17] = 'e' 4231 prg.curTok = int32(prg.lookup()) 4232 prg.ilk[prg.curTok] = uint16(bold) 4233 prg.idFirst = 8 4234 prg.buffer[8] = 's' 4235 prg.buffer[9] = 'c' 4236 prg.buffer[10] = 'r' 4237 prg.buffer[11] = 'o' 4238 prg.buffer[12] = 'l' 4239 prg.buffer[13] = 'l' 4240 prg.buffer[14] = 'm' 4241 prg.buffer[15] = 'o' 4242 prg.buffer[16] = 'd' 4243 prg.buffer[17] = 'e' 4244 prg.curTok = int32(prg.lookup()) 4245 prg.ilk[prg.curTok] = uint16(bold) 4246 prg.idFirst = 5 4247 prg.buffer[5] = 'e' 4248 prg.buffer[6] = 'r' 4249 prg.buffer[7] = 'r' 4250 prg.buffer[8] = 'o' 4251 prg.buffer[9] = 'r' 4252 prg.buffer[10] = 's' 4253 prg.buffer[11] = 't' 4254 prg.buffer[12] = 'o' 4255 prg.buffer[13] = 'p' 4256 prg.buffer[14] = 'm' 4257 prg.buffer[15] = 'o' 4258 prg.buffer[16] = 'd' 4259 prg.buffer[17] = 'e' 4260 prg.curTok = int32(prg.lookup()) 4261 prg.ilk[prg.curTok] = uint16(bold) 4262 prg.idFirst = 13 4263 prg.buffer[13] = 'i' 4264 prg.buffer[14] = 'n' 4265 prg.buffer[15] = 'n' 4266 prg.buffer[16] = 'e' 4267 prg.buffer[17] = 'r' 4268 prg.curTok = int32(prg.lookup()) 4269 prg.ilk[prg.curTok] = uint16(command) 4270 4271 prg.idFirst = 13 4272 prg.buffer[13] = 'o' 4273 prg.buffer[14] = 'u' 4274 prg.buffer[15] = 't' 4275 prg.buffer[16] = 'e' 4276 prg.buffer[17] = 'r' 4277 prg.curTok = int32(prg.lookup()) 4278 prg.ilk[prg.curTok] = uint16(command) 4279 4280 prg.idFirst = 9 4281 prg.buffer[9] = 's' 4282 prg.buffer[10] = 'h' 4283 prg.buffer[11] = 'o' 4284 prg.buffer[12] = 'w' 4285 prg.buffer[13] = 't' 4286 prg.buffer[14] = 'o' 4287 prg.buffer[15] = 'k' 4288 prg.buffer[16] = 'e' 4289 prg.buffer[17] = 'n' 4290 prg.curTok = int32(prg.lookup()) 4291 prg.ilk[prg.curTok] = uint16(command) 4292 4293 prg.idFirst = 9 4294 prg.buffer[9] = 's' 4295 prg.buffer[10] = 'h' 4296 prg.buffer[11] = 'o' 4297 prg.buffer[12] = 'w' 4298 prg.buffer[13] = 's' 4299 prg.buffer[14] = 't' 4300 prg.buffer[15] = 'a' 4301 prg.buffer[16] = 't' 4302 prg.buffer[17] = 's' 4303 prg.curTok = int32(prg.lookup()) 4304 prg.ilk[prg.curTok] = uint16(bold) 4305 4306 prg.idFirst = 14 4307 prg.buffer[14] = 's' 4308 prg.buffer[15] = 'h' 4309 prg.buffer[16] = 'o' 4310 prg.buffer[17] = 'w' 4311 prg.curTok = int32(prg.lookup()) 4312 prg.ilk[prg.curTok] = uint16(command) 4313 4314 prg.idFirst = 6 4315 prg.buffer[6] = 's' 4316 prg.buffer[7] = 'h' 4317 prg.buffer[8] = 'o' 4318 prg.buffer[9] = 'w' 4319 prg.buffer[10] = 'v' 4320 prg.buffer[11] = 'a' 4321 prg.buffer[12] = 'r' 4322 prg.buffer[13] = 'i' 4323 prg.buffer[14] = 'a' 4324 prg.buffer[15] = 'b' 4325 prg.buffer[16] = 'l' 4326 prg.buffer[17] = 'e' 4327 prg.curTok = int32(prg.lookup()) 4328 prg.ilk[prg.curTok] = uint16(command) 4329 4330 prg.idFirst = 2 4331 prg.buffer[2] = 's' 4332 prg.buffer[3] = 'h' 4333 prg.buffer[4] = 'o' 4334 prg.buffer[5] = 'w' 4335 prg.buffer[6] = 'd' 4336 prg.buffer[7] = 'e' 4337 prg.buffer[8] = 'p' 4338 prg.buffer[9] = 'e' 4339 prg.buffer[10] = 'n' 4340 prg.buffer[11] = 'd' 4341 prg.buffer[12] = 'e' 4342 prg.buffer[13] = 'n' 4343 prg.buffer[14] = 'c' 4344 prg.buffer[15] = 'i' 4345 prg.buffer[16] = 'e' 4346 prg.buffer[17] = 's' 4347 prg.curTok = int32(prg.lookup()) 4348 prg.ilk[prg.curTok] = uint16(bold) 4349 4350 prg.idFirst = 11 4351 prg.buffer[11] = 'c' 4352 prg.buffer[12] = 'o' 4353 prg.buffer[13] = 'n' 4354 prg.buffer[14] = 't' 4355 prg.buffer[15] = 'o' 4356 prg.buffer[16] = 'u' 4357 prg.buffer[17] = 'r' 4358 prg.curTok = int32(prg.lookup()) 4359 prg.ilk[prg.curTok] = uint16(command) 4360 4361 prg.idFirst = 8 4362 prg.buffer[8] = 'd' 4363 prg.buffer[9] = 'o' 4364 prg.buffer[10] = 'u' 4365 prg.buffer[11] = 'b' 4366 prg.buffer[12] = 'l' 4367 prg.buffer[13] = 'e' 4368 prg.buffer[14] = 'p' 4369 prg.buffer[15] = 'a' 4370 prg.buffer[16] = 't' 4371 prg.buffer[17] = 'h' 4372 prg.curTok = int32(prg.lookup()) 4373 prg.ilk[prg.curTok] = uint16(command) 4374 4375 prg.idFirst = 14 4376 prg.buffer[14] = 'a' 4377 prg.buffer[15] = 'l' 4378 prg.buffer[16] = 's' 4379 prg.buffer[17] = 'o' 4380 prg.curTok = int32(prg.lookup()) 4381 prg.ilk[prg.curTok] = uint16(command) 4382 4383 prg.idFirst = 11 4384 prg.buffer[11] = 'w' 4385 prg.buffer[12] = 'i' 4386 prg.buffer[13] = 't' 4387 prg.buffer[14] = 'h' 4388 prg.buffer[15] = 'p' 4389 prg.buffer[16] = 'e' 4390 prg.buffer[17] = 'n' 4391 prg.curTok = int32(prg.lookup()) 4392 prg.ilk[prg.curTok] = uint16(command) 4393 4394 prg.idFirst = 8 4395 prg.buffer[8] = 'w' 4396 prg.buffer[9] = 'i' 4397 prg.buffer[10] = 't' 4398 prg.buffer[11] = 'h' 4399 prg.buffer[12] = 'w' 4400 prg.buffer[13] = 'e' 4401 prg.buffer[14] = 'i' 4402 prg.buffer[15] = 'g' 4403 prg.buffer[16] = 'h' 4404 prg.buffer[17] = 't' 4405 prg.curTok = int32(prg.lookup()) 4406 prg.ilk[prg.curTok] = uint16(command) 4407 4408 prg.idFirst = 10 4409 prg.buffer[10] = 'd' 4410 prg.buffer[11] = 'r' 4411 prg.buffer[12] = 'o' 4412 prg.buffer[13] = 'p' 4413 prg.buffer[14] = 'p' 4414 prg.buffer[15] = 'i' 4415 prg.buffer[16] = 'n' 4416 prg.buffer[17] = 'g' 4417 prg.curTok = int32(prg.lookup()) 4418 prg.ilk[prg.curTok] = uint16(command) 4419 4420 prg.idFirst = 11 4421 prg.buffer[11] = 'k' 4422 prg.buffer[12] = 'e' 4423 prg.buffer[13] = 'e' 4424 prg.buffer[14] = 'p' 4425 prg.buffer[15] = 'i' 4426 prg.buffer[16] = 'n' 4427 prg.buffer[17] = 'g' 4428 prg.curTok = int32(prg.lookup()) 4429 prg.ilk[prg.curTok] = uint16(command) 4430 4431 prg.idFirst = 11 4432 prg.buffer[11] = 'm' 4433 prg.buffer[12] = 'e' 4434 prg.buffer[13] = 's' 4435 prg.buffer[14] = 's' 4436 prg.buffer[15] = 'a' 4437 prg.buffer[16] = 'g' 4438 prg.buffer[17] = 'e' 4439 prg.curTok = int32(prg.lookup()) 4440 prg.ilk[prg.curTok] = uint16(command) 4441 4442 prg.idFirst = 8 4443 prg.buffer[8] = 'e' 4444 prg.buffer[9] = 'r' 4445 prg.buffer[10] = 'r' 4446 prg.buffer[11] = 'm' 4447 prg.buffer[12] = 'e' 4448 prg.buffer[13] = 's' 4449 prg.buffer[14] = 's' 4450 prg.buffer[15] = 'a' 4451 prg.buffer[16] = 'g' 4452 prg.buffer[17] = 'e' 4453 prg.curTok = int32(prg.lookup()) 4454 prg.ilk[prg.curTok] = uint16(command) 4455 4456 prg.idFirst = 11 4457 prg.buffer[11] = 'e' 4458 prg.buffer[12] = 'r' 4459 prg.buffer[13] = 'r' 4460 prg.buffer[14] = 'h' 4461 prg.buffer[15] = 'e' 4462 prg.buffer[16] = 'l' 4463 prg.buffer[17] = 'p' 4464 prg.curTok = int32(prg.lookup()) 4465 prg.ilk[prg.curTok] = uint16(command) 4466 4467 prg.idFirst = 10 4468 prg.buffer[10] = 'c' 4469 prg.buffer[11] = 'h' 4470 prg.buffer[12] = 'a' 4471 prg.buffer[13] = 'r' 4472 prg.buffer[14] = 'l' 4473 prg.buffer[15] = 'i' 4474 prg.buffer[16] = 's' 4475 prg.buffer[17] = 't' 4476 prg.curTok = int32(prg.lookup()) 4477 prg.ilk[prg.curTok] = uint16(command) 4478 4479 prg.idFirst = 10 4480 prg.buffer[10] = 'l' 4481 prg.buffer[11] = 'i' 4482 prg.buffer[12] = 'g' 4483 prg.buffer[13] = 't' 4484 prg.buffer[14] = 'a' 4485 prg.buffer[15] = 'b' 4486 prg.buffer[16] = 'l' 4487 prg.buffer[17] = 'e' 4488 prg.curTok = int32(prg.lookup()) 4489 prg.ilk[prg.curTok] = uint16(command) 4490 4491 prg.idFirst = 8 4492 prg.buffer[8] = 'e' 4493 prg.buffer[9] = 'x' 4494 prg.buffer[10] = 't' 4495 prg.buffer[11] = 'e' 4496 prg.buffer[12] = 'n' 4497 prg.buffer[13] = 's' 4498 prg.buffer[14] = 'i' 4499 prg.buffer[15] = 'b' 4500 prg.buffer[16] = 'l' 4501 prg.buffer[17] = 'e' 4502 prg.curTok = int32(prg.lookup()) 4503 prg.ilk[prg.curTok] = uint16(command) 4504 4505 prg.idFirst = 8 4506 prg.buffer[8] = 'h' 4507 prg.buffer[9] = 'e' 4508 prg.buffer[10] = 'a' 4509 prg.buffer[11] = 'd' 4510 prg.buffer[12] = 'e' 4511 prg.buffer[13] = 'r' 4512 prg.buffer[14] = 'b' 4513 prg.buffer[15] = 'y' 4514 prg.buffer[16] = 't' 4515 prg.buffer[17] = 'e' 4516 prg.curTok = int32(prg.lookup()) 4517 prg.ilk[prg.curTok] = uint16(command) 4518 4519 prg.idFirst = 9 4520 prg.buffer[9] = 'f' 4521 prg.buffer[10] = 'o' 4522 prg.buffer[11] = 'n' 4523 prg.buffer[12] = 't' 4524 prg.buffer[13] = 'd' 4525 prg.buffer[14] = 'i' 4526 prg.buffer[15] = 'm' 4527 prg.buffer[16] = 'e' 4528 prg.buffer[17] = 'n' 4529 prg.curTok = int32(prg.lookup()) 4530 prg.ilk[prg.curTok] = uint16(command) 4531 4532 prg.idFirst = 11 4533 prg.buffer[11] = 's' 4534 prg.buffer[12] = 'p' 4535 prg.buffer[13] = 'e' 4536 prg.buffer[14] = 'c' 4537 prg.buffer[15] = 'i' 4538 prg.buffer[16] = 'a' 4539 prg.buffer[17] = 'l' 4540 prg.curTok = int32(prg.lookup()) 4541 prg.ilk[prg.curTok] = uint16(command) 4542 4543 prg.idFirst = 8 4544 prg.buffer[8] = 'n' 4545 prg.buffer[9] = 'u' 4546 prg.buffer[10] = 'm' 4547 prg.buffer[11] = 's' 4548 prg.buffer[12] = 'p' 4549 prg.buffer[13] = 'e' 4550 prg.buffer[14] = 'c' 4551 prg.buffer[15] = 'i' 4552 prg.buffer[16] = 'a' 4553 prg.buffer[17] = 'l' 4554 prg.curTok = int32(prg.lookup()) 4555 prg.ilk[prg.curTok] = uint16(command) 4556 4557 prg.idFirst = 17 4558 prg.buffer[17] = '%' 4559 prg.curTok = int32(prg.lookup()) 4560 prg.ilk[prg.curTok] = uint16(comment) 4561 4562 prg.idFirst = 16 4563 prg.buffer[16] = '%' 4564 prg.buffer[17] = '%' 4565 prg.curTok = int32(prg.lookup()) 4566 prg.ilk[prg.curTok] = uint16(verbatim) 4567 4568 prg.idFirst = 15 4569 prg.buffer[15] = '%' 4570 prg.buffer[16] = '%' 4571 prg.buffer[17] = '%' 4572 prg.curTok = int32(prg.lookup()) 4573 prg.ilk[prg.curTok] = uint16(setFormat) 4574 4575 prg.idFirst = 14 4576 prg.buffer[14] = '%' 4577 prg.buffer[15] = '%' 4578 prg.buffer[16] = '%' 4579 prg.buffer[17] = '%' 4580 prg.curTok = int32(prg.lookup()) 4581 prg.ilk[prg.curTok] = uint16(mftComment) 4582 4583 prg.idFirst = 17 4584 prg.buffer[17] = '#' 4585 prg.curTok = int32(prg.lookup()) 4586 prg.ilk[prg.curTok] = uint16(sharp) 4587 4588 // Store all the translations 4589 for ii := int32(0); ii <= 255; ii++ { 4590 prg.i = asciiCode(ii) 4591 _ = prg.i 4592 prg.translation[prg.i] = 0 4593 } 4594 prg.bytePtr = uint16(int32(prg.bytePtr) + 2) 4595 prg.byteMem[int32(prg.bytePtr)-2] = '\\' 4596 prg.byteMem[int32(prg.bytePtr)-1] = '$' 4597 prg.curTok = int32(prg.namePtr) 4598 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4599 prg.byteStart[prg.namePtr] = prg.bytePtr 4600 prg.translation['$'] = uint16(prg.curTok) 4601 4602 prg.bytePtr = uint16(int32(prg.bytePtr) + 2) 4603 prg.byteMem[int32(prg.bytePtr)-2] = '\\' 4604 prg.byteMem[int32(prg.bytePtr)-1] = '#' 4605 prg.curTok = int32(prg.namePtr) 4606 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4607 prg.byteStart[prg.namePtr] = prg.bytePtr 4608 prg.translation['#'] = uint16(prg.curTok) 4609 4610 prg.bytePtr = uint16(int32(prg.bytePtr) + 2) 4611 prg.byteMem[int32(prg.bytePtr)-2] = '\\' 4612 prg.byteMem[int32(prg.bytePtr)-1] = '&' 4613 prg.curTok = int32(prg.namePtr) 4614 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4615 prg.byteStart[prg.namePtr] = prg.bytePtr 4616 prg.translation['&'] = uint16(prg.curTok) 4617 4618 prg.bytePtr = uint16(int32(prg.bytePtr) + 2) 4619 prg.byteMem[int32(prg.bytePtr)-2] = '\\' 4620 prg.byteMem[int32(prg.bytePtr)-1] = '{' 4621 prg.curTok = int32(prg.namePtr) 4622 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4623 prg.byteStart[prg.namePtr] = prg.bytePtr 4624 prg.translation['{'] = uint16(prg.curTok) 4625 4626 prg.bytePtr = uint16(int32(prg.bytePtr) + 2) 4627 prg.byteMem[int32(prg.bytePtr)-2] = '\\' 4628 prg.byteMem[int32(prg.bytePtr)-1] = '}' 4629 prg.curTok = int32(prg.namePtr) 4630 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4631 prg.byteStart[prg.namePtr] = prg.bytePtr 4632 prg.translation['}'] = uint16(prg.curTok) 4633 4634 prg.bytePtr = uint16(int32(prg.bytePtr) + 2) 4635 prg.byteMem[int32(prg.bytePtr)-2] = '\\' 4636 prg.byteMem[int32(prg.bytePtr)-1] = '_' 4637 prg.curTok = int32(prg.namePtr) 4638 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4639 prg.byteStart[prg.namePtr] = prg.bytePtr 4640 prg.translation['_'] = uint16(prg.curTok) 4641 4642 prg.bytePtr = uint16(int32(prg.bytePtr) + 2) 4643 prg.byteMem[int32(prg.bytePtr)-2] = '\\' 4644 prg.byteMem[int32(prg.bytePtr)-1] = '%' 4645 prg.curTok = int32(prg.namePtr) 4646 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4647 prg.byteStart[prg.namePtr] = prg.bytePtr 4648 prg.translation['%'] = uint16(prg.curTok) 4649 4650 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4651 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4652 prg.byteMem[int32(prg.bytePtr)-3] = 'B' 4653 prg.byteMem[int32(prg.bytePtr)-2] = 'S' 4654 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4655 prg.curTok = int32(prg.namePtr) 4656 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4657 prg.byteStart[prg.namePtr] = prg.bytePtr 4658 prg.translation['\\'] = uint16(prg.curTok) 4659 4660 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4661 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4662 prg.byteMem[int32(prg.bytePtr)-3] = 'H' 4663 prg.byteMem[int32(prg.bytePtr)-2] = 'A' 4664 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4665 prg.curTok = int32(prg.namePtr) 4666 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4667 prg.byteStart[prg.namePtr] = prg.bytePtr 4668 prg.translation['^'] = uint16(prg.curTok) 4669 4670 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4671 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4672 prg.byteMem[int32(prg.bytePtr)-3] = 'T' 4673 prg.byteMem[int32(prg.bytePtr)-2] = 'I' 4674 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4675 prg.curTok = int32(prg.namePtr) 4676 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4677 prg.byteStart[prg.namePtr] = prg.bytePtr 4678 prg.translation['~'] = uint16(prg.curTok) 4679 4680 prg.bytePtr = uint16(int32(prg.bytePtr) + 5) 4681 prg.byteMem[int32(prg.bytePtr)-5] = '\\' 4682 prg.byteMem[int32(prg.bytePtr)-4] = 'a' 4683 prg.byteMem[int32(prg.bytePtr)-3] = 's' 4684 prg.byteMem[int32(prg.bytePtr)-2] = 't' 4685 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4686 prg.curTok = int32(prg.namePtr) 4687 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4688 prg.byteStart[prg.namePtr] = prg.bytePtr 4689 prg.translation['*'] = uint16(prg.curTok) 4690 4691 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4692 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4693 prg.byteMem[int32(prg.bytePtr)-3] = 'A' 4694 prg.byteMem[int32(prg.bytePtr)-2] = 'M' 4695 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4696 prg.curTok = int32(prg.namePtr) 4697 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4698 prg.byteStart[prg.namePtr] = prg.bytePtr 4699 prg.trAmp = uint16(prg.curTok) 4700 4701 // \xref[\\AM, etc] 4702 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4703 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4704 prg.byteMem[int32(prg.bytePtr)-3] = 'B' 4705 prg.byteMem[int32(prg.bytePtr)-2] = 'L' 4706 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4707 prg.curTok = int32(prg.namePtr) 4708 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4709 prg.byteStart[prg.namePtr] = prg.bytePtr 4710 prg.trSkip = uint16(prg.curTok) 4711 4712 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4713 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4714 prg.byteMem[int32(prg.bytePtr)-3] = 'S' 4715 prg.byteMem[int32(prg.bytePtr)-2] = 'H' 4716 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4717 prg.curTok = int32(prg.namePtr) 4718 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4719 prg.byteStart[prg.namePtr] = prg.bytePtr 4720 prg.trSharp = uint16(prg.curTok) 4721 4722 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4723 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4724 prg.byteMem[int32(prg.bytePtr)-3] = 'P' 4725 prg.byteMem[int32(prg.bytePtr)-2] = 'S' 4726 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4727 prg.curTok = int32(prg.namePtr) 4728 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4729 prg.byteStart[prg.namePtr] = prg.bytePtr 4730 prg.trPs = uint16(prg.curTok) 4731 4732 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4733 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4734 prg.byteMem[int32(prg.bytePtr)-3] = 'l' 4735 prg.byteMem[int32(prg.bytePtr)-2] = 'e' 4736 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4737 prg.curTok = int32(prg.namePtr) 4738 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4739 prg.byteStart[prg.namePtr] = prg.bytePtr 4740 prg.trLe = uint16(prg.curTok) 4741 4742 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4743 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4744 prg.byteMem[int32(prg.bytePtr)-3] = 'g' 4745 prg.byteMem[int32(prg.bytePtr)-2] = 'e' 4746 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4747 prg.curTok = int32(prg.namePtr) 4748 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4749 prg.byteStart[prg.namePtr] = prg.bytePtr 4750 prg.trGe = uint16(prg.curTok) 4751 4752 prg.bytePtr = uint16(int32(prg.bytePtr) + 4) 4753 prg.byteMem[int32(prg.bytePtr)-4] = '\\' 4754 prg.byteMem[int32(prg.bytePtr)-3] = 'n' 4755 prg.byteMem[int32(prg.bytePtr)-2] = 'e' 4756 prg.byteMem[int32(prg.bytePtr)-1] = ' ' 4757 prg.curTok = int32(prg.namePtr) 4758 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4759 prg.byteStart[prg.namePtr] = prg.bytePtr 4760 prg.trNe = uint16(prg.curTok) 4761 4762 prg.bytePtr = uint16(int32(prg.bytePtr) + 5) 4763 prg.byteMem[int32(prg.bytePtr)-5] = '\\' 4764 prg.byteMem[int32(prg.bytePtr)-4] = 'q' 4765 prg.byteMem[int32(prg.bytePtr)-3] = 'u' 4766 prg.byteMem[int32(prg.bytePtr)-2] = 'a' 4767 prg.byteMem[int32(prg.bytePtr)-1] = 'd' 4768 prg.curTok = int32(prg.namePtr) 4769 prg.namePtr = uint16(int32(prg.namePtr) + 1) 4770 prg.byteStart[prg.namePtr] = prg.bytePtr 4771 prg.trQuad = uint16(prg.curTok) 4772 4773 // Initialize the input... 4774 { 4775 prg.openInput() 4776 prg.line = 0 4777 prg.otherLine = 0 4778 4779 prg.changing = true 4780 prg.primeTheChangeBuffer() 4781 prg.changing = !prg.changing 4782 prg.tempLine = prg.otherLine 4783 prg.otherLine = prg.line 4784 prg.line = prg.tempLine 4785 4786 prg.styling = true 4787 prg.limit = 0 4788 prg.loc = 1 4789 prg.buffer[0] = ' ' 4790 prg.inputHasEnded = false 4791 } 4792 prg.doTheTranslation() 4793 4794 // Check that all changes have been read 4795 if int32(prg.changeLimit) != 0 { 4796 for ii := int32(0); ii <= int32(prg.changeLimit)-1; ii++ { 4797 prg.loc = byte(ii) 4798 _ = prg.loc 4799 prg.buffer[prg.loc] = prg.changeBuffer[prg.loc] 4800 } 4801 prg.limit = prg.changeLimit 4802 prg.changing = true 4803 prg.line = prg.otherLine 4804 prg.loc = prg.changeLimit 4805 { 4806 prg.stdout.Writeln() 4807 prg.stdout.Write("! Change file entry did not match") 4808 prg.error1() 4809 } 4810 // \xref[Change file entry did not match] 4811 } 4812 4813 // Print the job |history| 4814 switch prg.history { 4815 case spotless: 4816 prg.stdout.Writeln() 4817 prg.stdout.Write("(No errors were found.)") 4818 case harmlessMessage: 4819 prg.stdout.Writeln() 4820 prg.stdout.Write("(Did you see the warning message above?)") 4821 case errorMessage: 4822 prg.stdout.Writeln() 4823 prg.stdout.Write("(Pardon me, but I think I spotted something wrong.)") 4824 case fatalMessage: 4825 prg.stdout.Writeln() 4826 prg.stdout.Write("(That was a fatal error, my friend.)") 4827 } // there are no other cases 4828 prg.stdout.Writeln("") 4829 4830 } 4831 4832 // 114. System-dependent changes 4833 4834 // tangle:pos mft.web:1970:29: 4835 4836 // This module should be replaced, if necessary, by changes to the program 4837 // that are necessary to make \.[MFT] work at a particular installation. 4838 // It is usually best to design your change file so that all changes to 4839 // previous modules preserve the module numbering; then everybody's version 4840 // will be consistent with the printed program. More extensive changes, 4841 // which introduce new modules, can be inserted here; then only the index 4842 // itself will get a new module number. 4843 // \xref[system dependencies] 4844 4845 // 115. Index