home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / perl / mac-perl / mcprl402.bin / Perl_src / regcomp.h < prev    next >
MacBinary  |  1992-01-05  |  7.8 KB  |  [TEXT/□□□□]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Jan 5 00:10:33 1992, modified Sun Jan 5 00:10:33 1992, type ASCII, 7190 bytes "regcomp.h" , at 0x1c96 420 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[□□□□]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 72 65 67 63 6f 6d | 70 2e 68 00 00 00 00 00 |..regcom|p.h.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 00 00 00 | 00 00 00 00 00 00 00 00 |.TEXT...|........|
|00000050| 00 00 00 00 00 1c 16 00 | 00 01 a4 a5 8c 43 c9 a5 |........|.....C..|
|00000060| 8c 43 c9 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.C......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 bc a7 00 00 |........|........|
|00000080| 2f 2a 20 24 52 43 53 66 | 69 6c 65 3a 20 72 65 67 |/* $RCSf|ile: reg|
|00000090| 63 6f 6d 70 2e 68 2c 76 | 20 24 24 52 65 76 69 73 |comp.h,v| $$Revis|
|000000a0| 69 6f 6e 3a 20 34 2e 30 | 2e 31 2e 31 20 24 24 44 |ion: 4.0|.1.1 $$D|
|000000b0| 61 74 65 3a 20 39 31 2f | 30 36 2f 30 37 20 31 31 |ate: 91/|06/07 11|
|000000c0| 3a 34 39 3a 34 30 20 24 | 0d 20 2a 0d 20 2a 20 24 |:49:40 $|. *. * $|
|000000d0| 4c 6f 67 3a 09 72 65 67 | 63 6f 6d 70 2e 68 2c 76 |Log:.reg|comp.h,v|
|000000e0| 20 24 0d 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 34 | $. * Re|vision 4|
|000000f0| 2e 30 2e 31 2e 31 20 20 | 39 31 2f 30 36 2f 30 37 |.0.1.1 |91/06/07|
|00000100| 20 20 31 31 3a 34 39 3a | 34 30 20 20 6c 77 61 6c | 11:49:|40 lwal|
|00000110| 6c 0d 20 2a 20 70 61 74 | 63 68 34 3a 20 6e 6f 20 |l. * pat|ch4: no |
|00000120| 63 68 61 6e 67 65 0d 20 | 2a 20 0d 20 2a 20 52 65 |change. |* . * Re|
|00000130| 76 69 73 69 6f 6e 20 34 | 2e 30 20 20 39 31 2f 30 |vision 4|.0 91/0|
|00000140| 33 2f 32 30 20 20 30 31 | 3a 33 39 3a 30 39 20 20 |3/20 01|:39:09 |
|00000150| 6c 77 61 6c 6c 0d 20 2a | 20 34 2e 30 20 62 61 73 |lwall. *| 4.0 bas|
|00000160| 65 6c 69 6e 65 2e 0d 20 | 2a 20 0d 20 2a 2f 0d 0d |eline.. |* . */..|
|00000170| 2f 2a 0d 20 2a 20 54 68 | 65 20 22 69 6e 74 65 72 |/*. * Th|e "inter|
|00000180| 6e 61 6c 20 75 73 65 20 | 6f 6e 6c 79 22 20 66 69 |nal use |only" fi|
|00000190| 65 6c 64 73 20 69 6e 20 | 72 65 67 65 78 70 2e 68 |elds in |regexp.h|
|000001a0| 20 61 72 65 20 70 72 65 | 73 65 6e 74 20 74 6f 20 | are pre|sent to |
|000001b0| 70 61 73 73 20 69 6e 66 | 6f 20 66 72 6f 6d 0d 20 |pass inf|o from. |
|000001c0| 2a 20 63 6f 6d 70 69 6c | 65 20 74 6f 20 65 78 65 |* compil|e to exe|
|000001d0| 63 75 74 65 20 74 68 61 | 74 20 70 65 72 6d 69 74 |cute tha|t permit|
|000001e0| 73 20 74 68 65 20 65 78 | 65 63 75 74 65 20 70 68 |s the ex|ecute ph|
|000001f0| 61 73 65 20 74 6f 20 72 | 75 6e 20 6c 6f 74 73 20 |ase to r|un lots |
|00000200| 66 61 73 74 65 72 20 6f | 6e 0d 20 2a 20 73 69 6d |faster o|n. * sim|
|00000210| 70 6c 65 20 63 61 73 65 | 73 2e 20 20 54 68 65 79 |ple case|s. They|
|00000220| 20 61 72 65 3a 0d 20 2a | 0d 20 2a 20 72 65 67 73 | are:. *|. * regs|
|00000230| 74 61 72 74 09 73 74 72 | 20 74 68 61 74 20 6d 75 |tart.str| that mu|
|00000240| 73 74 20 62 65 67 69 6e | 20 61 20 6d 61 74 63 68 |st begin| a match|
|00000250| 3b 20 4e 75 6c 6c 63 68 | 20 69 66 20 6e 6f 6e 65 |; Nullch| if none|
|00000260| 20 6f 62 76 69 6f 75 73 | 0d 20 2a 20 72 65 67 61 | obvious|. * rega|
|00000270| 6e 63 68 09 69 73 20 74 | 68 65 20 6d 61 74 63 68 |nch.is t|he match|
|00000280| 20 61 6e 63 68 6f 72 65 | 64 20 28 61 74 20 62 65 | anchore|d (at be|
|00000290| 67 69 6e 6e 69 6e 67 2d | 6f 66 2d 6c 69 6e 65 20 |ginning-|of-line |
|000002a0| 6f 6e 6c 79 29 3f 0d 20 | 2a 20 72 65 67 6d 75 73 |only)?. |* regmus|
|000002b0| 74 09 73 74 72 69 6e 67 | 20 28 70 6f 69 6e 74 65 |t.string| (pointe|
|000002c0| 72 20 69 6e 74 6f 20 70 | 72 6f 67 72 61 6d 29 20 |r into p|rogram) |
|000002d0| 74 68 61 74 20 6d 61 74 | 63 68 20 6d 75 73 74 20 |that mat|ch must |
|000002e0| 69 6e 63 6c 75 64 65 2c | 20 6f 72 20 4e 55 4c 4c |include,| or NULL|
|000002f0| 0d 20 2a 20 20 5b 72 65 | 67 6d 75 73 74 20 63 68 |. * [re|gmust ch|
|00000300| 61 6e 67 65 64 20 74 6f | 20 53 54 52 2a 20 66 6f |anged to| STR* fo|
|00000310| 72 20 62 6d 69 6e 73 74 | 72 28 29 2d 2d 6c 61 77 |r bminst|r()--law|
|00000320| 5d 0d 20 2a 20 72 65 67 | 6d 6c 65 6e 09 6c 65 6e |]. * reg|mlen.len|
|00000330| 67 74 68 20 6f 66 20 72 | 65 67 6d 75 73 74 20 73 |gth of r|egmust s|
|00000340| 74 72 69 6e 67 0d 20 2a | 20 20 5b 72 65 67 6d 6c |tring. *| [regml|
|00000350| 65 6e 20 6e 6f 74 20 75 | 73 65 64 20 63 75 72 72 |en not u|sed curr|
|00000360| 65 6e 74 6c 79 5d 0d 20 | 2a 0d 20 2a 20 52 65 67 |ently]. |*. * Reg|
|00000370| 73 74 61 72 74 20 61 6e | 64 20 72 65 67 61 6e 63 |start an|d reganc|
|00000380| 68 20 70 65 72 6d 69 74 | 20 76 65 72 79 20 66 61 |h permit| very fa|
|00000390| 73 74 20 64 65 63 69 73 | 69 6f 6e 73 20 6f 6e 20 |st decis|ions on |
|000003a0| 73 75 69 74 61 62 6c 65 | 20 73 74 61 72 74 69 6e |suitable| startin|
|000003b0| 67 20 70 6f 69 6e 74 73 | 0d 20 2a 20 66 6f 72 20 |g points|. * for |
|000003c0| 61 20 6d 61 74 63 68 2c | 20 63 75 74 74 69 6e 67 |a match,| cutting|
|000003d0| 20 64 6f 77 6e 20 74 68 | 65 20 77 6f 72 6b 20 61 | down th|e work a|
|000003e0| 20 6c 6f 74 2e 20 20 52 | 65 67 6d 75 73 74 20 70 | lot. R|egmust p|
|000003f0| 65 72 6d 69 74 73 20 66 | 61 73 74 20 72 65 6a 65 |ermits f|ast reje|
|00000400| 63 74 69 6f 6e 0d 20 2a | 20 6f 66 20 6c 69 6e 65 |ction. *| of line|
|00000410| 73 20 74 68 61 74 20 63 | 61 6e 6e 6f 74 20 70 6f |s that c|annot po|
|00000420| 73 73 69 62 6c 79 20 6d | 61 74 63 68 2e 20 20 54 |ssibly m|atch. T|
|00000430| 68 65 20 72 65 67 6d 75 | 73 74 20 74 65 73 74 73 |he regmu|st tests|
|00000440| 20 61 72 65 20 63 6f 73 | 74 6c 79 20 65 6e 6f 75 | are cos|tly enou|
|00000450| 67 68 0d 20 2a 20 74 68 | 61 74 20 72 65 67 63 6f |gh. * th|at regco|
|00000460| 6d 70 28 29 20 73 75 70 | 70 6c 69 65 73 20 61 20 |mp() sup|plies a |
|00000470| 72 65 67 6d 75 73 74 20 | 6f 6e 6c 79 20 69 66 20 |regmust |only if |
|00000480| 74 68 65 20 72 2e 65 2e | 20 63 6f 6e 74 61 69 6e |the r.e.| contain|
|00000490| 73 20 73 6f 6d 65 74 68 | 69 6e 67 0d 20 2a 20 70 |s someth|ing. * p|
|000004a0| 6f 74 65 6e 74 69 61 6c | 6c 79 20 65 78 70 65 6e |otential|ly expen|
|000004b0| 73 69 76 65 20 28 61 74 | 20 70 72 65 73 65 6e 74 |sive (at| present|
|000004c0| 2c 20 74 68 65 20 6f 6e | 6c 79 20 73 75 63 68 20 |, the on|ly such |
|000004d0| 74 68 69 6e 67 20 64 65 | 74 65 63 74 65 64 20 69 |thing de|tected i|
|000004e0| 73 20 2a 20 6f 72 20 2b | 0d 20 2a 20 61 74 20 74 |s * or +|. * at t|
|000004f0| 68 65 20 73 74 61 72 74 | 20 6f 66 20 74 68 65 20 |he start| of the |
|00000500| 72 2e 65 2e 2c 20 77 68 | 69 63 68 20 63 61 6e 20 |r.e., wh|ich can |
|00000510| 69 6e 76 6f 6c 76 65 20 | 61 20 6c 6f 74 20 6f 66 |involve |a lot of|
|00000520| 20 62 61 63 6b 75 70 29 | 2e 20 20 52 65 67 6d 6c | backup)|. Regml|
|00000530| 65 6e 20 69 73 0d 20 2a | 20 73 75 70 70 6c 69 65 |en is. *| supplie|
|00000540| 64 20 62 65 63 61 75 73 | 65 20 74 68 65 20 74 65 |d becaus|e the te|
|00000550| 73 74 20 69 6e 20 72 65 | 67 65 78 65 63 28 29 20 |st in re|gexec() |
|00000560| 6e 65 65 64 73 20 69 74 | 20 61 6e 64 20 72 65 67 |needs it| and reg|
|00000570| 63 6f 6d 70 28 29 20 69 | 73 20 63 6f 6d 70 75 74 |comp() i|s comput|
|00000580| 69 6e 67 0d 20 2a 20 69 | 74 20 61 6e 79 77 61 79 |ing. * i|t anyway|
|00000590| 2e 0d 20 2a 20 5b 72 65 | 67 6d 75 73 74 20 69 73 |.. * [re|gmust is|
|000005a0| 20 6e 6f 77 20 73 75 70 | 70 6c 69 65 64 20 61 6c | now sup|plied al|
|000005b0| 77 61 79 73 2e 20 20 54 | 68 65 20 74 65 73 74 73 |ways. T|he tests|
|000005c0| 20 74 68 61 74 20 75 73 | 65 20 72 65 67 6d 75 73 | that us|e regmus|
|000005d0| 74 20 68 61 76 65 20 61 | 0d 20 2a 20 68 65 75 72 |t have a|. * heur|
|000005e0| 69 73 74 69 63 20 74 68 | 61 74 20 64 69 73 61 62 |istic th|at disab|
|000005f0| 6c 65 73 20 74 68 65 20 | 74 65 73 74 20 69 66 20 |les the |test if |
|00000600| 69 74 20 75 73 75 61 6c | 6c 79 20 6d 61 74 63 68 |it usual|ly match|
|00000610| 65 73 2e 5d 0d 20 2a 0d | 20 2a 20 5b 49 6e 20 66 |es.]. *.| * [In f|
|00000620| 61 63 74 2c 20 77 65 20 | 6e 6f 77 20 75 73 65 20 |act, we |now use |
|00000630| 72 65 67 6d 75 73 74 20 | 69 6e 20 6d 61 6e 79 20 |regmust |in many |
|00000640| 63 61 73 65 73 20 74 6f | 20 6c 6f 63 61 74 65 20 |cases to| locate |
|00000650| 77 68 65 72 65 20 74 68 | 65 20 73 65 61 72 63 68 |where th|e search|
|00000660| 0d 20 2a 20 73 74 61 72 | 74 73 20 69 6e 20 74 68 |. * star|ts in th|
|00000670| 65 20 73 74 72 69 6e 67 | 2c 20 73 6f 20 69 66 20 |e string|, so if |
|00000680| 72 65 67 62 61 63 6b 20 | 69 73 20 3e 3d 20 30 2c |regback |is >= 0,|
|00000690| 20 74 68 65 20 72 65 67 | 6d 75 73 74 20 73 65 61 | the reg|must sea|
|000006a0| 72 63 68 20 69 73 20 6e | 65 76 65 72 0d 20 2a 20 |rch is n|ever. * |
|000006b0| 77 61 73 74 65 64 20 65 | 66 66 6f 72 74 2e 20 20 |wasted e|ffort. |
|000006c0| 54 68 65 20 72 65 67 62 | 61 63 6b 20 76 61 72 69 |The regb|ack vari|
|000006d0| 61 62 6c 65 20 73 61 79 | 73 20 68 6f 77 20 6d 61 |able say|s how ma|
|000006e0| 6e 79 20 63 68 61 72 61 | 63 74 65 72 73 20 62 61 |ny chara|cters ba|
|000006f0| 63 6b 20 66 72 6f 6d 0d | 20 2a 20 77 68 65 72 65 |ck from.| * where|
|00000700| 20 72 65 67 6d 75 73 74 | 20 6d 61 74 63 68 65 64 | regmust| matched|
|00000710| 20 69 73 20 74 68 65 20 | 65 61 72 6c 69 65 73 74 | is the |earliest|
|00000720| 20 70 6f 73 73 69 62 6c | 65 20 73 74 61 72 74 20 | possibl|e start |
|00000730| 6f 66 20 74 68 65 20 6d | 61 74 63 68 2e 0d 20 2a |of the m|atch.. *|
|00000740| 20 46 6f 72 20 69 6e 73 | 74 61 6e 63 65 2c 20 2f | For ins|tance, /|
|00000750| 5b 61 2d 7a 5d 2e 66 6f | 6f 2f 20 68 61 73 20 61 |[a-z].fo|o/ has a|
|00000760| 20 72 65 67 6d 75 73 74 | 20 6f 66 20 27 66 6f 6f | regmust| of 'foo|
|00000770| 27 20 61 6e 64 20 61 20 | 72 65 67 62 61 63 6b 20 |' and a |regback |
|00000780| 6f 66 20 32 2e 5d 0d 20 | 2a 2f 0d 0d 2f 2a 0d 20 |of 2.]. |*/../*. |
|00000790| 2a 20 53 74 72 75 63 74 | 75 72 65 20 66 6f 72 20 |* Struct|ure for |
|000007a0| 72 65 67 65 78 70 20 22 | 70 72 6f 67 72 61 6d 22 |regexp "|program"|
|000007b0| 2e 20 20 54 68 69 73 20 | 69 73 20 65 73 73 65 6e |. This |is essen|
|000007c0| 74 69 61 6c 6c 79 20 61 | 20 6c 69 6e 65 61 72 20 |tially a| linear |
|000007d0| 65 6e 63 6f 64 69 6e 67 | 0d 20 2a 20 6f 66 20 61 |encoding|. * of a|
|000007e0| 20 6e 6f 6e 64 65 74 65 | 72 6d 69 6e 69 73 74 69 | nondete|rministi|
|000007f0| 63 20 66 69 6e 69 74 65 | 2d 73 74 61 74 65 20 6d |c finite|-state m|
|00000800| 61 63 68 69 6e 65 20 28 | 61 6b 61 20 73 79 6e 74 |achine (|aka synt|
|00000810| 61 78 20 63 68 61 72 74 | 73 20 6f 72 0d 20 2a 20 |ax chart|s or. * |
|00000820| 22 72 61 69 6c 72 6f 61 | 64 20 6e 6f 72 6d 61 6c |"railroa|d normal|
|00000830| 20 66 6f 72 6d 22 20 69 | 6e 20 70 61 72 73 69 6e | form" i|n parsin|
|00000840| 67 20 74 65 63 68 6e 6f | 6c 6f 67 79 29 2e 20 20 |g techno|logy). |
|00000850| 45 61 63 68 20 6e 6f 64 | 65 20 69 73 20 61 6e 20 |Each nod|e is an |
|00000860| 6f 70 63 6f 64 65 0d 20 | 2a 20 70 6c 75 73 20 61 |opcode. |* plus a|
|00000870| 20 22 6e 65 78 74 22 20 | 70 6f 69 6e 74 65 72 2c | "next" |pointer,|
|00000880| 20 70 6f 73 73 69 62 6c | 79 20 70 6c 75 73 20 61 | possibl|y plus a|
|00000890| 6e 20 6f 70 65 72 61 6e | 64 2e 20 20 22 4e 65 78 |n operan|d. "Nex|
|000008a0| 74 22 20 70 6f 69 6e 74 | 65 72 73 20 6f 66 0d 20 |t" point|ers of. |
|000008b0| 2a 20 61 6c 6c 20 6e 6f | 64 65 73 20 65 78 63 65 |* all no|des exce|
|000008c0| 70 74 20 42 52 41 4e 43 | 48 20 69 6d 70 6c 65 6d |pt BRANC|H implem|
|000008d0| 65 6e 74 20 63 6f 6e 63 | 61 74 65 6e 61 74 69 6f |ent conc|atenatio|
|000008e0| 6e 3b 20 61 20 22 6e 65 | 78 74 22 20 70 6f 69 6e |n; a "ne|xt" poin|
|000008f0| 74 65 72 20 77 69 74 68 | 0d 20 2a 20 61 20 42 52 |ter with|. * a BR|
|00000900| 41 4e 43 48 20 6f 6e 20 | 62 6f 74 68 20 65 6e 64 |ANCH on |both end|
|00000910| 73 20 6f 66 20 69 74 20 | 69 73 20 63 6f 6e 6e 65 |s of it |is conne|
|00000920| 63 74 69 6e 67 20 74 77 | 6f 20 61 6c 74 65 72 6e |cting tw|o altern|
|00000930| 61 74 69 76 65 73 2e 20 | 20 28 48 65 72 65 20 77 |atives. | (Here w|
|00000940| 65 0d 20 2a 20 68 61 76 | 65 20 6f 6e 65 20 6f 66 |e. * hav|e one of|
|00000950| 20 74 68 65 20 73 75 62 | 74 6c 65 20 73 79 6e 74 | the sub|tle synt|
|00000960| 61 78 20 64 65 70 65 6e | 64 65 6e 63 69 65 73 3a |ax depen|dencies:|
|00000970| 20 20 61 6e 20 69 6e 64 | 69 76 69 64 75 61 6c 20 | an ind|ividual |
|00000980| 42 52 41 4e 43 48 20 28 | 61 73 0d 20 2a 20 6f 70 |BRANCH (|as. * op|
|00000990| 70 6f 73 65 64 20 74 6f | 20 61 20 63 6f 6c 6c 65 |posed to| a colle|
|000009a0| 63 74 69 6f 6e 20 6f 66 | 20 74 68 65 6d 29 20 69 |ction of| them) i|
|000009b0| 73 20 6e 65 76 65 72 20 | 63 6f 6e 63 61 74 65 6e |s never |concaten|
|000009c0| 61 74 65 64 20 77 69 74 | 68 20 61 6e 79 74 68 69 |ated wit|h anythi|
|000009d0| 6e 67 0d 20 2a 20 62 65 | 63 61 75 73 65 20 6f 66 |ng. * be|cause of|
|000009e0| 20 6f 70 65 72 61 74 6f | 72 20 70 72 65 63 65 64 | operato|r preced|
|000009f0| 65 6e 63 65 2e 29 20 20 | 54 68 65 20 6f 70 65 72 |ence.) |The oper|
|00000a00| 61 6e 64 20 6f 66 20 73 | 6f 6d 65 20 74 79 70 65 |and of s|ome type|
|00000a10| 73 20 6f 66 20 6e 6f 64 | 65 20 69 73 0d 20 2a 20 |s of nod|e is. * |
|00000a20| 61 20 6c 69 74 65 72 61 | 6c 20 73 74 72 69 6e 67 |a litera|l string|
|00000a30| 3b 20 66 6f 72 20 6f 74 | 68 65 72 73 2c 20 69 74 |; for ot|hers, it|
|00000a40| 20 69 73 20 61 20 6e 6f | 64 65 20 6c 65 61 64 69 | is a no|de leadi|
|00000a50| 6e 67 20 69 6e 74 6f 20 | 61 20 73 75 62 2d 46 53 |ng into |a sub-FS|
|00000a60| 4d 2e 20 20 49 6e 0d 20 | 2a 20 70 61 72 74 69 63 |M. In. |* partic|
|00000a70| 75 6c 61 72 2c 20 74 68 | 65 20 6f 70 65 72 61 6e |ular, th|e operan|
|00000a80| 64 20 6f 66 20 61 20 42 | 52 41 4e 43 48 20 6e 6f |d of a B|RANCH no|
|00000a90| 64 65 20 69 73 20 74 68 | 65 20 66 69 72 73 74 20 |de is th|e first |
|00000aa0| 6e 6f 64 65 20 6f 66 20 | 74 68 65 20 62 72 61 6e |node of |the bran|
|00000ab0| 63 68 2e 0d 20 2a 20 28 | 4e 42 20 74 68 69 73 20 |ch.. * (|NB this |
|00000ac0| 69 73 20 2a 6e 6f 74 2a | 20 61 20 74 72 65 65 20 |is *not*| a tree |
|00000ad0| 73 74 72 75 63 74 75 72 | 65 3a 20 20 74 68 65 20 |structur|e: the |
|00000ae0| 74 61 69 6c 20 6f 66 20 | 74 68 65 20 62 72 61 6e |tail of |the bran|
|00000af0| 63 68 20 63 6f 6e 6e 65 | 63 74 73 0d 20 2a 20 74 |ch conne|cts. * t|
|00000b00| 6f 20 74 68 65 20 74 68 | 69 6e 67 20 66 6f 6c 6c |o the th|ing foll|
|00000b10| 6f 77 69 6e 67 20 74 68 | 65 20 73 65 74 20 6f 66 |owing th|e set of|
|00000b20| 20 42 52 41 4e 43 48 65 | 73 2e 29 20 20 54 68 65 | BRANCHe|s.) The|
|00000b30| 20 6f 70 63 6f 64 65 73 | 20 61 72 65 3a 0d 20 2a | opcodes| are:. *|
|00000b40| 2f 0d 0d 2f 2a 20 64 65 | 66 69 6e 69 74 69 6f 6e |/../* de|finition|
|00000b50| 09 6e 75 6d 62 65 72 09 | 6f 70 6e 64 3f 09 6d 65 |.number.|opnd?.me|
|00000b60| 61 6e 69 6e 67 20 2a 2f | 0d 23 64 65 66 69 6e 65 |aning */|.#define|
|00000b70| 09 45 4e 44 09 30 09 2f | 2a 20 6e 6f 09 45 6e 64 |.END.0./|* no.End|
|00000b80| 20 6f 66 20 70 72 6f 67 | 72 61 6d 2e 20 2a 2f 0d | of prog|ram. */.|
|00000b90| 23 64 65 66 69 6e 65 09 | 42 4f 4c 09 31 09 2f 2a |#define.|BOL.1./*|
|00000ba0| 20 6e 6f 09 4d 61 74 63 | 68 20 22 22 20 61 74 20 | no.Matc|h "" at |
|00000bb0| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 6c 69 6e |beginnin|g of lin|
|00000bc0| 65 2e 20 2a 2f 0d 23 64 | 65 66 69 6e 65 09 45 4f |e. */.#d|efine.EO|
|00000bd0| 4c 09 32 09 2f 2a 20 6e | 6f 09 4d 61 74 63 68 20 |L.2./* n|o.Match |
|00000be0| 22 22 20 61 74 20 65 6e | 64 20 6f 66 20 6c 69 6e |"" at en|d of lin|
|00000bf0| 65 2e 20 2a 2f 0d 23 64 | 65 66 69 6e 65 09 41 4e |e. */.#d|efine.AN|
|00000c00| 59 09 33 09 2f 2a 20 6e | 6f 09 4d 61 74 63 68 20 |Y.3./* n|o.Match |
|00000c10| 61 6e 79 20 6f 6e 65 20 | 63 68 61 72 61 63 74 65 |any one |characte|
|00000c20| 72 2e 20 2a 2f 0d 23 64 | 65 66 69 6e 65 09 41 4e |r. */.#d|efine.AN|
|00000c30| 59 4f 46 09 34 09 2f 2a | 20 73 74 72 09 4d 61 74 |YOF.4./*| str.Mat|
|00000c40| 63 68 20 63 68 61 72 61 | 63 74 65 72 20 69 6e 20 |ch chara|cter in |
|00000c50| 28 6f 72 20 6e 6f 74 20 | 69 6e 29 20 74 68 69 73 |(or not |in) this|
|00000c60| 20 63 6c 61 73 73 2e 20 | 2a 2f 0d 23 64 65 66 69 | class. |*/.#defi|
|00000c70| 6e 65 09 43 55 52 4c 59 | 09 35 09 2f 2a 20 73 74 |ne.CURLY|.5./* st|
|00000c80| 72 09 4d 61 74 63 68 20 | 74 68 69 73 20 73 69 6d |r.Match |this sim|
|00000c90| 70 6c 65 20 74 68 69 6e | 67 20 7b 6e 2c 6d 7d 20 |ple thin|g {n,m} |
|00000ca0| 74 69 6d 65 73 2e 20 2a | 2f 0d 23 64 65 66 69 6e |times. *|/.#defin|
|00000cb0| 65 09 42 52 41 4e 43 48 | 09 36 09 2f 2a 20 6e 6f |e.BRANCH|.6./* no|
|00000cc0| 64 65 09 4d 61 74 63 68 | 20 74 68 69 73 20 61 6c |de.Match| this al|
|00000cd0| 74 65 72 6e 61 74 69 76 | 65 2c 20 6f 72 20 74 68 |ternativ|e, or th|
|00000ce0| 65 20 6e 65 78 74 2e 2e | 2e 20 2a 2f 0d 23 64 65 |e next..|. */.#de|
|00000cf0| 66 69 6e 65 09 42 41 43 | 4b 09 37 09 2f 2a 20 6e |fine.BAC|K.7./* n|
|00000d00| 6f 09 4d 61 74 63 68 20 | 22 22 2c 20 22 6e 65 78 |o.Match |"", "nex|
|00000d10| 74 22 20 70 74 72 20 70 | 6f 69 6e 74 73 20 62 61 |t" ptr p|oints ba|
|00000d20| 63 6b 77 61 72 64 2e 20 | 2a 2f 0d 23 64 65 66 69 |ckward. |*/.#defi|
|00000d30| 6e 65 09 45 58 41 43 54 | 4c 59 09 38 09 2f 2a 20 |ne.EXACT|LY.8./* |
|00000d40| 73 74 72 09 4d 61 74 63 | 68 20 74 68 69 73 20 73 |str.Matc|h this s|
|00000d50| 74 72 69 6e 67 20 28 70 | 72 65 63 65 64 65 64 20 |tring (p|receded |
|00000d60| 62 79 20 6c 65 6e 67 74 | 68 29 2e 20 2a 2f 0d 23 |by lengt|h). */.#|
|00000d70| 64 65 66 69 6e 65 09 4e | 4f 54 48 49 4e 47 09 39 |define.N|OTHING.9|
|00000d80| 09 2f 2a 20 6e 6f 09 4d | 61 74 63 68 20 65 6d 70 |./* no.M|atch emp|
|00000d90| 74 79 20 73 74 72 69 6e | 67 2e 20 2a 2f 0d 23 64 |ty strin|g. */.#d|
|00000da0| 65 66 69 6e 65 09 53 54 | 41 52 09 31 30 09 2f 2a |efine.ST|AR.10./*|
|00000db0| 20 6e 6f 64 65 09 4d 61 | 74 63 68 20 74 68 69 73 | node.Ma|tch this|
|00000dc0| 20 28 73 69 6d 70 6c 65 | 29 20 74 68 69 6e 67 20 | (simple|) thing |
|00000dd0| 30 20 6f 72 20 6d 6f 72 | 65 20 74 69 6d 65 73 2e |0 or mor|e times.|
|00000de0| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 09 50 4c 55 53 | */.#def|ine.PLUS|
|00000df0| 09 31 31 09 2f 2a 20 6e | 6f 64 65 09 4d 61 74 63 |.11./* n|ode.Matc|
|00000e00| 68 20 74 68 69 73 20 28 | 73 69 6d 70 6c 65 29 20 |h this (|simple) |
|00000e10| 74 68 69 6e 67 20 31 20 | 6f 72 20 6d 6f 72 65 20 |thing 1 |or more |
|00000e20| 74 69 6d 65 73 2e 20 2a | 2f 0d 23 64 65 66 69 6e |times. *|/.#defin|
|00000e30| 65 20 41 4c 4e 55 4d 09 | 31 32 09 2f 2a 20 6e 6f |e ALNUM.|12./* no|
|00000e40| 09 4d 61 74 63 68 20 61 | 6e 79 20 61 6c 70 68 61 |.Match a|ny alpha|
|00000e50| 6e 75 6d 65 72 69 63 20 | 63 68 61 72 61 63 74 65 |numeric |characte|
|00000e60| 72 20 2a 2f 0d 23 64 65 | 66 69 6e 65 20 4e 41 4c |r */.#de|fine NAL|
|00000e70| 4e 55 4d 09 31 33 09 2f | 2a 20 6e 6f 09 4d 61 74 |NUM.13./|* no.Mat|
|00000e80| 63 68 20 61 6e 79 20 6e | 6f 6e 2d 61 6c 70 68 61 |ch any n|on-alpha|
|00000e90| 6e 75 6d 65 72 69 63 20 | 63 68 61 72 61 63 74 65 |numeric |characte|
|00000ea0| 72 20 2a 2f 0d 23 64 65 | 66 69 6e 65 20 42 4f 55 |r */.#de|fine BOU|
|00000eb0| 4e 44 09 31 34 09 2f 2a | 20 6e 6f 09 4d 61 74 63 |ND.14./*| no.Matc|
|00000ec0| 68 20 22 22 20 61 74 20 | 61 6e 79 20 77 6f 72 64 |h "" at |any word|
|00000ed0| 20 62 6f 75 6e 64 61 72 | 79 20 2a 2f 0d 23 64 65 | boundar|y */.#de|
|00000ee0| 66 69 6e 65 20 4e 42 4f | 55 4e 44 09 31 35 09 2f |fine NBO|UND.15./|
|00000ef0| 2a 20 6e 6f 09 4d 61 74 | 63 68 20 22 22 20 61 74 |* no.Mat|ch "" at|
|00000f00| 20 61 6e 79 20 77 6f 72 | 64 20 6e 6f 6e 2d 62 6f | any wor|d non-bo|
|00000f10| 75 6e 64 61 72 79 20 2a | 2f 0d 23 64 65 66 69 6e |undary *|/.#defin|
|00000f20| 65 20 53 50 41 43 45 09 | 31 36 09 2f 2a 20 6e 6f |e SPACE.|16./* no|
|00000f30| 09 4d 61 74 63 68 20 61 | 6e 79 20 77 68 69 74 65 |.Match a|ny white|
|00000f40| 73 70 61 63 65 20 63 68 | 61 72 61 63 74 65 72 20 |space ch|aracter |
|00000f50| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 4e 53 50 41 43 |*/.#defi|ne NSPAC|
|00000f60| 45 09 31 37 09 2f 2a 20 | 6e 6f 09 4d 61 74 63 68 |E.17./* |no.Match|
|00000f70| 20 61 6e 79 20 6e 6f 6e | 2d 77 68 69 74 65 73 70 | any non|-whitesp|
|00000f80| 61 63 65 20 63 68 61 72 | 61 63 74 65 72 20 2a 2f |ace char|acter */|
|00000f90| 0d 23 64 65 66 69 6e 65 | 20 44 49 47 49 54 09 31 |.#define| DIGIT.1|
|00000fa0| 38 09 2f 2a 20 6e 6f 09 | 4d 61 74 63 68 20 61 6e |8./* no.|Match an|
|00000fb0| 79 20 6e 75 6d 65 72 69 | 63 20 63 68 61 72 61 63 |y numeri|c charac|
|00000fc0| 74 65 72 20 2a 2f 0d 23 | 64 65 66 69 6e 65 20 4e |ter */.#|define N|
|00000fd0| 44 49 47 49 54 09 31 39 | 09 2f 2a 20 6e 6f 09 4d |DIGIT.19|./* no.M|
|00000fe0| 61 74 63 68 20 61 6e 79 | 20 6e 6f 6e 2d 6e 75 6d |atch any| non-num|
|00000ff0| 65 72 69 63 20 63 68 61 | 72 61 63 74 65 72 20 2a |eric cha|racter *|
|00001000| 2f 0d 23 64 65 66 69 6e | 65 20 52 45 46 09 32 30 |/.#defin|e REF.20|
|00001010| 09 2f 2a 20 6e 75 6d 09 | 4d 61 74 63 68 20 73 6f |./* num.|Match so|
|00001020| 6d 65 20 61 6c 72 65 61 | 64 79 20 6d 61 74 63 68 |me alrea|dy match|
|00001030| 65 64 20 73 74 72 69 6e | 67 20 2a 2f 0d 23 64 65 |ed strin|g */.#de|
|00001040| 66 69 6e 65 09 4f 50 45 | 4e 09 32 31 09 2f 2a 20 |fine.OPE|N.21./* |
|00001050| 6e 75 6d 09 4d 61 72 6b | 20 74 68 69 73 20 70 6f |num.Mark| this po|
|00001060| 69 6e 74 20 69 6e 20 69 | 6e 70 75 74 20 61 73 20 |int in i|nput as |
|00001070| 73 74 61 72 74 20 6f 66 | 20 23 6e 2e 20 2a 2f 0d |start of| #n. */.|
|00001080| 23 64 65 66 69 6e 65 09 | 43 4c 4f 53 45 09 32 32 |#define.|CLOSE.22|
|00001090| 09 2f 2a 20 6e 75 6d 09 | 41 6e 61 6c 6f 67 6f 75 |./* num.|Analogou|
|000010a0| 73 20 74 6f 20 4f 50 45 | 4e 2e 20 2a 2f 0d 0d 2f |s to OPE|N. */../|
|000010b0| 2a 0d 20 2a 20 4f 70 63 | 6f 64 65 20 6e 6f 74 65 |*. * Opc|ode note|
|000010c0| 73 3a 0d 20 2a 0d 20 2a | 20 42 52 41 4e 43 48 09 |s:. *. *| BRANCH.|
|000010d0| 54 68 65 20 73 65 74 20 | 6f 66 20 62 72 61 6e 63 |The set |of branc|
|000010e0| 68 65 73 20 63 6f 6e 73 | 74 69 74 75 74 69 6e 67 |hes cons|tituting|
|000010f0| 20 61 20 73 69 6e 67 6c | 65 20 63 68 6f 69 63 65 | a singl|e choice|
|00001100| 20 61 72 65 20 68 6f 6f | 6b 65 64 0d 20 2a 09 09 | are hoo|ked. *..|
|00001110| 74 6f 67 65 74 68 65 72 | 20 77 69 74 68 20 74 68 |together| with th|
|00001120| 65 69 72 20 22 6e 65 78 | 74 22 20 70 6f 69 6e 74 |eir "nex|t" point|
|00001130| 65 72 73 2c 20 73 69 6e | 63 65 20 70 72 65 63 65 |ers, sin|ce prece|
|00001140| 64 65 6e 63 65 20 70 72 | 65 76 65 6e 74 73 0d 20 |dence pr|events. |
|00001150| 2a 09 09 61 6e 79 74 68 | 69 6e 67 20 62 65 69 6e |*..anyth|ing bein|
|00001160| 67 20 63 6f 6e 63 61 74 | 65 6e 61 74 65 64 20 74 |g concat|enated t|
|00001170| 6f 20 61 6e 79 20 69 6e | 64 69 76 69 64 75 61 6c |o any in|dividual|
|00001180| 20 62 72 61 6e 63 68 2e | 20 20 54 68 65 0d 20 2a | branch.| The. *|
|00001190| 09 09 22 6e 65 78 74 22 | 20 70 6f 69 6e 74 65 72 |.."next"| pointer|
|000011a0| 20 6f 66 20 74 68 65 20 | 6c 61 73 74 20 42 52 41 | of the |last BRA|
|000011b0| 4e 43 48 20 69 6e 20 61 | 20 63 68 6f 69 63 65 20 |NCH in a| choice |
|000011c0| 70 6f 69 6e 74 73 20 74 | 6f 20 74 68 65 0d 20 2a |points t|o the. *|
|000011d0| 09 09 74 68 69 6e 67 20 | 66 6f 6c 6c 6f 77 69 6e |..thing |followin|
|000011e0| 67 20 74 68 65 20 77 68 | 6f 6c 65 20 63 68 6f 69 |g the wh|ole choi|
|000011f0| 63 65 2e 20 20 54 68 69 | 73 20 69 73 20 61 6c 73 |ce. Thi|s is als|
|00001200| 6f 20 77 68 65 72 65 20 | 74 68 65 0d 20 2a 09 09 |o where |the. *..|
|00001210| 66 69 6e 61 6c 20 22 6e | 65 78 74 22 20 70 6f 69 |final "n|ext" poi|
|00001220| 6e 74 65 72 20 6f 66 20 | 65 61 63 68 20 69 6e 64 |nter of |each ind|
|00001230| 69 76 69 64 75 61 6c 20 | 62 72 61 6e 63 68 20 70 |ividual |branch p|
|00001240| 6f 69 6e 74 73 3b 20 65 | 61 63 68 0d 20 2a 09 09 |oints; e|ach. *..|
|00001250| 62 72 61 6e 63 68 20 73 | 74 61 72 74 73 20 77 69 |branch s|tarts wi|
|00001260| 74 68 20 74 68 65 20 6f | 70 65 72 61 6e 64 20 6e |th the o|perand n|
|00001270| 6f 64 65 20 6f 66 20 61 | 20 42 52 41 4e 43 48 20 |ode of a| BRANCH |
|00001280| 6e 6f 64 65 2e 0d 20 2a | 0d 20 2a 20 42 41 43 4b |node.. *|. * BACK|
|00001290| 09 09 4e 6f 72 6d 61 6c | 20 22 6e 65 78 74 22 20 |..Normal| "next" |
|000012a0| 70 6f 69 6e 74 65 72 73 | 20 61 6c 6c 20 69 6d 70 |pointers| all imp|
|000012b0| 6c 69 63 69 74 6c 79 20 | 70 6f 69 6e 74 20 66 6f |licitly |point fo|
|000012c0| 72 77 61 72 64 3b 20 42 | 41 43 4b 0d 20 2a 09 09 |rward; B|ACK. *..|
|000012d0| 65 78 69 73 74 73 20 74 | 6f 20 6d 61 6b 65 20 6c |exists t|o make l|
|000012e0| 6f 6f 70 20 73 74 72 75 | 63 74 75 72 65 73 20 70 |oop stru|ctures p|
|000012f0| 6f 73 73 69 62 6c 65 2e | 0d 20 2a 0d 20 2a 20 53 |ossible.|. *. * S|
|00001300| 54 41 52 2c 50 4c 55 53 | 09 27 3f 27 2c 20 61 6e |TAR,PLUS|.'?', an|
|00001310| 64 20 63 6f 6d 70 6c 65 | 78 20 27 2a 27 20 61 6e |d comple|x '*' an|
|00001320| 64 20 27 2b 27 2c 20 61 | 72 65 20 69 6d 70 6c 65 |d '+', a|re imple|
|00001330| 6d 65 6e 74 65 64 20 61 | 73 20 63 69 72 63 75 6c |mented a|s circul|
|00001340| 61 72 0d 20 2a 09 09 42 | 52 41 4e 43 48 20 73 74 |ar. *..B|RANCH st|
|00001350| 72 75 63 74 75 72 65 73 | 20 75 73 69 6e 67 20 42 |ructures| using B|
|00001360| 41 43 4b 2e 20 20 53 69 | 6d 70 6c 65 20 63 61 73 |ACK. Si|mple cas|
|00001370| 65 73 20 28 6f 6e 65 20 | 63 68 61 72 61 63 74 65 |es (one |characte|
|00001380| 72 0d 20 2a 09 09 70 65 | 72 20 6d 61 74 63 68 29 |r. *..pe|r match)|
|00001390| 20 61 72 65 20 69 6d 70 | 6c 65 6d 65 6e 74 65 64 | are imp|lemented|
|000013a0| 20 77 69 74 68 20 53 54 | 41 52 20 61 6e 64 20 50 | with ST|AR and P|
|000013b0| 4c 55 53 20 66 6f 72 20 | 73 70 65 65 64 0d 20 2a |LUS for |speed. *|
|000013c0| 09 09 61 6e 64 20 74 6f | 20 6d 69 6e 69 6d 69 7a |..and to| minimiz|
|000013d0| 65 20 72 65 63 75 72 73 | 69 76 65 20 70 6c 75 6e |e recurs|ive plun|
|000013e0| 67 65 73 2e 0d 20 2a 0d | 20 2a 20 4f 50 45 4e 2c |ges.. *.| * OPEN,|
|000013f0| 43 4c 4f 53 45 09 2e 2e | 2e 61 72 65 20 6e 75 6d |CLOSE...|.are num|
|00001400| 62 65 72 65 64 20 61 74 | 20 63 6f 6d 70 69 6c 65 |bered at| compile|
|00001410| 20 74 69 6d 65 2e 0d 20 | 2a 2f 0d 0d 23 69 66 6e | time.. |*/..#ifn|
|00001420| 64 65 66 20 44 4f 49 4e | 49 54 0d 65 78 74 65 72 |def DOIN|IT.exter|
|00001430| 6e 20 63 68 61 72 20 72 | 65 67 61 72 67 6c 65 6e |n char r|egarglen|
|00001440| 5b 5d 3b 0d 23 65 6c 73 | 65 0d 63 68 61 72 20 72 |[];.#els|e.char r|
|00001450| 65 67 61 72 67 6c 65 6e | 5b 5d 20 3d 20 7b 30 2c |egarglen|[] = {0,|
|00001460| 30 2c 30 2c 30 2c 30 2c | 34 2c 30 2c 30 2c 30 2c |0,0,0,0,|4,0,0,0,|
|00001470| 30 2c 30 2c 30 2c 30 2c | 30 2c 30 2c 30 2c 30 2c |0,0,0,0,|0,0,0,0,|
|00001480| 30 2c 30 2c 30 2c 32 2c | 32 2c 32 7d 3b 0d 23 65 |0,0,0,2,|2,2};.#e|
|00001490| 6e 64 69 66 0d 0d 2f 2a | 20 54 68 65 20 66 6f 6c |ndif../*| The fol|
|000014a0| 6c 6f 77 69 6e 67 20 68 | 61 76 65 20 6e 6f 20 66 |lowing h|ave no f|
|000014b0| 69 78 65 64 20 6c 65 6e | 67 74 68 2e 20 2a 2f 0d |ixed len|gth. */.|
|000014c0| 23 69 66 6e 64 65 66 20 | 44 4f 49 4e 49 54 0d 65 |#ifndef |DOINIT.e|
|000014d0| 78 74 65 72 6e 20 63 68 | 61 72 20 76 61 72 69 65 |xtern ch|ar varie|
|000014e0| 73 5b 5d 3b 0d 23 65 6c | 73 65 0d 63 68 61 72 20 |s[];.#el|se.char |
|000014f0| 76 61 72 69 65 73 5b 5d | 20 3d 20 7b 42 52 41 4e |varies[]| = {BRAN|
|00001500| 43 48 2c 42 41 43 4b 2c | 53 54 41 52 2c 50 4c 55 |CH,BACK,|STAR,PLU|
|00001510| 53 2c 43 55 52 4c 59 2c | 52 45 46 2c 30 7d 3b 0d |S,CURLY,|REF,0};.|
|00001520| 23 65 6e 64 69 66 0d 0d | 2f 2a 20 54 68 65 20 66 |#endif..|/* The f|
|00001530| 6f 6c 6c 6f 77 69 6e 67 | 20 61 6c 77 61 79 73 20 |ollowing| always |
|00001540| 68 61 76 65 20 61 20 6c | 65 6e 67 74 68 20 6f 66 |have a l|ength of|
|00001550| 20 31 2e 20 2a 2f 0d 23 | 69 66 6e 64 65 66 20 44 | 1. */.#|ifndef D|
|00001560| 4f 49 4e 49 54 0d 65 78 | 74 65 72 6e 20 63 68 61 |OINIT.ex|tern cha|
|00001570| 72 20 73 69 6d 70 6c 65 | 5b 5d 3b 0d 23 65 6c 73 |r simple|[];.#els|
|00001580| 65 0d 63 68 61 72 20 73 | 69 6d 70 6c 65 5b 5d 20 |e.char s|imple[] |
|00001590| 3d 20 7b 41 4e 59 2c 41 | 4e 59 4f 46 2c 41 4c 4e |= {ANY,A|NYOF,ALN|
|000015a0| 55 4d 2c 4e 41 4c 4e 55 | 4d 2c 53 50 41 43 45 2c |UM,NALNU|M,SPACE,|
|000015b0| 4e 53 50 41 43 45 2c 44 | 49 47 49 54 2c 4e 44 49 |NSPACE,D|IGIT,NDI|
|000015c0| 47 49 54 2c 30 7d 3b 0d | 23 65 6e 64 69 66 0d 0d |GIT,0};.|#endif..|
|000015d0| 45 58 54 20 63 68 61 72 | 20 72 65 67 64 75 6d 6d |EXT char| regdumm|
|000015e0| 79 3b 0d 0d 2f 2a 0d 20 | 2a 20 41 20 6e 6f 64 65 |y;../*. |* A node|
|000015f0| 20 69 73 20 6f 6e 65 20 | 63 68 61 72 20 6f 66 20 | is one |char of |
|00001600| 6f 70 63 6f 64 65 20 66 | 6f 6c 6c 6f 77 65 64 20 |opcode f|ollowed |
|00001610| 62 79 20 74 77 6f 20 63 | 68 61 72 73 20 6f 66 20 |by two c|hars of |
|00001620| 22 6e 65 78 74 22 20 70 | 6f 69 6e 74 65 72 2e 0d |"next" p|ointer..|
|00001630| 20 2a 20 22 4e 65 78 74 | 22 20 70 6f 69 6e 74 65 | * "Next|" pointe|
|00001640| 72 73 20 61 72 65 20 73 | 74 6f 72 65 64 20 61 73 |rs are s|tored as|
|00001650| 20 74 77 6f 20 38 2d 62 | 69 74 20 70 69 65 63 65 | two 8-b|it piece|
|00001660| 73 2c 20 68 69 67 68 20 | 6f 72 64 65 72 20 66 69 |s, high |order fi|
|00001670| 72 73 74 2e 20 20 54 68 | 65 0d 20 2a 20 76 61 6c |rst. Th|e. * val|
|00001680| 75 65 20 69 73 20 61 20 | 70 6f 73 69 74 69 76 65 |ue is a |positive|
|00001690| 20 6f 66 66 73 65 74 20 | 66 72 6f 6d 20 74 68 65 | offset |from the|
|000016a0| 20 6f 70 63 6f 64 65 20 | 6f 66 20 74 68 65 20 6e | opcode |of the n|
|000016b0| 6f 64 65 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 69 |ode cont|aining i|
|000016c0| 74 2e 0d 20 2a 20 41 6e | 20 6f 70 65 72 61 6e 64 |t.. * An| operand|
|000016d0| 2c 20 69 66 20 61 6e 79 | 2c 20 73 69 6d 70 6c 79 |, if any|, simply|
|000016e0| 20 66 6f 6c 6c 6f 77 73 | 20 74 68 65 20 6e 6f 64 | follows| the nod|
|000016f0| 65 2e 20 20 28 4e 6f 74 | 65 20 74 68 61 74 20 6d |e. (Not|e that m|
|00001700| 75 63 68 20 6f 66 20 74 | 68 65 0d 20 2a 20 63 6f |uch of t|he. * co|
|00001710| 64 65 20 67 65 6e 65 72 | 61 74 69 6f 6e 20 6b 6e |de gener|ation kn|
|00001720| 6f 77 73 20 61 62 6f 75 | 74 20 74 68 69 73 20 69 |ows abou|t this i|
|00001730| 6d 70 6c 69 63 69 74 20 | 72 65 6c 61 74 69 6f 6e |mplicit |relation|
|00001740| 73 68 69 70 2e 29 0d 20 | 2a 0d 20 2a 20 55 73 69 |ship.). |*. * Usi|
|00001750| 6e 67 20 74 77 6f 20 62 | 79 74 65 73 20 66 6f 72 |ng two b|ytes for|
|00001760| 20 74 68 65 20 22 6e 65 | 78 74 22 20 70 6f 69 6e | the "ne|xt" poin|
|00001770| 74 65 72 20 69 73 20 76 | 61 73 74 20 6f 76 65 72 |ter is v|ast over|
|00001780| 6b 69 6c 6c 20 66 6f 72 | 20 6d 6f 73 74 20 74 68 |kill for| most th|
|00001790| 69 6e 67 73 2c 0d 20 2a | 20 62 75 74 20 61 6c 6c |ings,. *| but all|
|000017a0| 6f 77 73 20 70 61 74 74 | 65 72 6e 73 20 74 6f 20 |ows patt|erns to |
|000017b0| 67 65 74 20 62 69 67 20 | 77 69 74 68 6f 75 74 20 |get big |without |
|000017c0| 64 69 73 61 73 74 65 72 | 73 2e 0d 20 2a 0d 20 2a |disaster|s.. *. *|
|000017d0| 20 5b 49 66 20 52 45 47 | 41 4c 49 47 4e 20 69 73 | [If REG|ALIGN is|
|000017e0| 20 64 65 66 69 6e 65 64 | 2c 20 74 68 65 20 22 6e | defined|, the "n|
|000017f0| 65 78 74 22 20 70 6f 69 | 6e 74 65 72 20 69 73 20 |ext" poi|nter is |
|00001800| 61 6c 77 61 79 73 20 61 | 6c 69 67 6e 65 64 20 6f |always a|ligned o|
|00001810| 6e 20 61 6e 20 65 76 65 | 6e 0d 20 2a 20 62 6f 75 |n an eve|n. * bou|
|00001820| 6e 64 61 72 79 2c 20 61 | 6e 64 20 72 65 61 64 73 |ndary, a|nd reads|
|00001830| 20 74 68 65 20 6f 66 66 | 73 65 74 20 64 69 72 65 | the off|set dire|
|00001840| 63 74 6c 79 20 61 73 20 | 61 20 73 68 6f 72 74 2e |ctly as |a short.|
|00001850| 20 20 41 6c 73 6f 2c 20 | 74 68 65 72 65 20 69 73 | Also, |there is|
|00001860| 20 6e 6f 0d 20 2a 20 73 | 70 65 63 69 61 6c 20 74 | no. * s|pecial t|
|00001870| 65 73 74 20 74 6f 20 72 | 65 76 65 72 73 65 20 74 |est to r|everse t|
|00001880| 68 65 20 73 69 67 6e 20 | 6f 66 20 42 41 43 4b 20 |he sign |of BACK |
|00001890| 70 6f 69 6e 74 65 72 73 | 20 73 69 6e 63 65 20 74 |pointers| since t|
|000018a0| 68 65 20 6f 66 66 73 65 | 74 20 69 73 0d 20 2a 20 |he offse|t is. * |
|000018b0| 73 74 6f 72 65 64 20 6e | 65 67 61 74 69 76 65 2e |stored n|egative.|
|000018c0| 5d 0d 20 2a 2f 0d 0d 23 | 69 66 6e 64 65 66 20 67 |]. */..#|ifndef g|
|000018d0| 6f 75 6c 64 0d 23 69 66 | 6e 64 65 66 20 63 72 61 |ould.#if|ndef cra|
|000018e0| 79 0d 23 69 66 6e 64 65 | 66 20 65 74 61 31 30 0d |y.#ifnde|f eta10.|
|000018f0| 23 64 65 66 69 6e 65 20 | 52 45 47 41 4c 49 47 4e |#define |REGALIGN|
|00001900| 0d 23 65 6e 64 69 66 0d | 23 65 6e 64 69 66 0d 23 |.#endif.|#endif.#|
|00001910| 65 6e 64 69 66 0d 0d 23 | 64 65 66 69 6e 65 09 4f |endif..#|define.O|
|00001920| 50 28 70 29 09 28 2a 28 | 70 29 29 0d 0d 23 69 66 |P(p).(*(|p))..#if|
|00001930| 6e 64 65 66 20 6c 69 6e | 74 0d 23 69 66 64 65 66 |ndef lin|t.#ifdef|
|00001940| 20 52 45 47 41 4c 49 47 | 4e 0d 23 64 65 66 69 6e | REGALIG|N.#defin|
|00001950| 65 20 4e 45 58 54 28 70 | 29 20 28 2a 28 73 68 6f |e NEXT(p|) (*(sho|
|00001960| 72 74 2a 29 28 70 2b 31 | 29 29 0d 23 64 65 66 69 |rt*)(p+1|)).#defi|
|00001970| 6e 65 20 41 52 47 31 28 | 70 29 20 28 2a 28 75 6e |ne ARG1(|p) (*(un|
|00001980| 73 69 67 6e 65 64 20 73 | 68 6f 72 74 2a 29 28 70 |signed s|hort*)(p|
|00001990| 2b 33 29 29 0d 23 64 65 | 66 69 6e 65 20 41 52 47 |+3)).#de|fine ARG|
|000019a0| 32 28 70 29 20 28 2a 28 | 75 6e 73 69 67 6e 65 64 |2(p) (*(|unsigned|
|000019b0| 20 73 68 6f 72 74 2a 29 | 28 70 2b 35 29 29 0d 23 | short*)|(p+5)).#|
|000019c0| 65 6c 73 65 0d 23 64 65 | 66 69 6e 65 09 4e 45 58 |else.#de|fine.NEX|
|000019d0| 54 28 70 29 09 28 28 28 | 2a 28 28 70 29 2b 31 29 |T(p).(((|*((p)+1)|
|000019e0| 26 30 33 37 37 29 3c 3c | 38 29 20 2b 20 28 2a 28 |&0377)<<|8) + (*(|
|000019f0| 28 70 29 2b 32 29 26 30 | 33 37 37 29 29 0d 23 64 |(p)+2)&0|377)).#d|
|00001a00| 65 66 69 6e 65 09 41 52 | 47 31 28 70 29 09 28 28 |efine.AR|G1(p).((|
|00001a10| 28 2a 28 28 70 29 2b 33 | 29 26 30 33 37 37 29 3c |(*((p)+3|)&0377)<|
|00001a20| 3c 38 29 20 2b 20 28 2a | 28 28 70 29 2b 34 29 26 |<8) + (*|((p)+4)&|
|00001a30| 30 33 37 37 29 29 0d 23 | 64 65 66 69 6e 65 09 41 |0377)).#|define.A|
|00001a40| 52 47 32 28 70 29 09 28 | 28 28 2a 28 28 70 29 2b |RG2(p).(|((*((p)+|
|00001a50| 35 29 26 30 33 37 37 29 | 3c 3c 38 29 20 2b 20 28 |5)&0377)|<<8) + (|
|00001a60| 2a 28 28 70 29 2b 36 29 | 26 30 33 37 37 29 29 0d |*((p)+6)|&0377)).|
|00001a70| 23 65 6e 64 69 66 0d 23 | 65 6c 73 65 20 2f 2a 20 |#endif.#|else /* |
|00001a80| 6c 69 6e 74 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |lint */.|#define |
|00001a90| 4e 45 58 54 28 70 29 20 | 30 0d 23 65 6e 64 69 66 |NEXT(p) |0.#endif|
|00001aa0| 20 2f 2a 20 6c 69 6e 74 | 20 2a 2f 0d 0d 23 64 65 | /* lint| */..#de|
|00001ab0| 66 69 6e 65 09 4f 50 45 | 52 41 4e 44 28 70 29 09 |fine.OPE|RAND(p).|
|00001ac0| 28 28 70 29 20 2b 20 33 | 29 0d 0d 23 69 66 64 65 |((p) + 3|)..#ifde|
|00001ad0| 66 20 52 45 47 41 4c 49 | 47 4e 0d 23 64 65 66 69 |f REGALI|GN.#defi|
|00001ae0| 6e 65 09 4e 45 58 54 4f | 50 45 52 28 70 29 09 28 |ne.NEXTO|PER(p).(|
|00001af0| 28 70 29 20 2b 20 34 29 | 0d 23 65 6c 73 65 0d 23 |(p) + 4)|.#else.#|
|00001b00| 64 65 66 69 6e 65 09 4e | 45 58 54 4f 50 45 52 28 |define.N|EXTOPER(|
|00001b10| 70 29 09 28 28 70 29 20 | 2b 20 33 29 0d 23 65 6e |p).((p) |+ 3).#en|
|00001b20| 64 69 66 0d 0d 23 64 65 | 66 69 6e 65 20 4d 41 47 |dif..#de|fine MAG|
|00001b30| 49 43 20 30 32 33 34 0d | 0d 2f 2a 0d 20 2a 20 55 |IC 0234.|./*. * U|
|00001b40| 74 69 6c 69 74 79 20 64 | 65 66 69 6e 69 74 69 6f |tility d|efinitio|
|00001b50| 6e 73 2e 0d 20 2a 2f 0d | 23 69 66 6e 64 65 66 20 |ns.. */.|#ifndef |
|00001b60| 6c 69 6e 74 0d 23 69 66 | 6e 64 65 66 20 43 48 41 |lint.#if|ndef CHA|
|00001b70| 52 42 49 54 53 0d 23 64 | 65 66 69 6e 65 09 55 43 |RBITS.#d|efine.UC|
|00001b80| 48 41 52 41 54 28 70 29 | 09 28 28 69 6e 74 29 2a |HARAT(p)|.((int)*|
|00001b90| 28 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 20 2a |(unsigne|d char *|
|00001ba0| 29 28 70 29 29 0d 23 65 | 6c 73 65 0d 23 64 65 66 |)(p)).#e|lse.#def|
|00001bb0| 69 6e 65 09 55 43 48 41 | 52 41 54 28 70 29 09 28 |ine.UCHA|RAT(p).(|
|00001bc0| 28 69 6e 74 29 2a 28 70 | 29 26 43 48 41 52 42 49 |(int)*(p|)&CHARBI|
|00001bd0| 54 53 29 0d 23 65 6e 64 | 69 66 0d 23 65 6c 73 65 |TS).#end|if.#else|
|00001be0| 20 2f 2a 20 6c 69 6e 74 | 20 2a 2f 0d 23 64 65 66 | /* lint| */.#def|
|00001bf0| 69 6e 65 20 55 43 48 41 | 52 41 54 28 70 29 09 72 |ine UCHA|RAT(p).r|
|00001c00| 65 67 64 75 6d 6d 79 0d | 23 65 6e 64 69 66 20 2f |egdummy.|#endif /|
|00001c10| 2a 20 6c 69 6e 74 20 2a | 2f 0d 0d 23 64 65 66 69 |* lint *|/..#defi|
|00001c20| 6e 65 09 46 41 49 4c 28 | 6d 29 09 66 61 74 61 6c |ne.FAIL(|m).fatal|
|00001c30| 28 22 2f 25 73 2f 3a 20 | 25 73 22 2c 72 65 67 70 |("/%s/: |%s",regp|
|00001c40| 72 65 63 6f 6d 70 2c 6d | 29 0d 0d 63 68 61 72 20 |recomp,m|)..char |
|00001c50| 2a 72 65 67 6e 65 78 74 | 28 29 3b 0d 23 69 66 64 |*regnext|();.#ifd|
|00001c60| 65 66 20 44 45 42 55 47 | 47 49 4e 47 0d 76 6f 69 |ef DEBUG|GING.voi|
|00001c70| 64 20 72 65 67 64 75 6d | 70 28 29 3b 0d 63 68 61 |d regdum|p();.cha|
|00001c80| 72 20 2a 72 65 67 70 72 | 6f 70 28 29 3b 0d 23 65 |r *regpr|op();.#e|
|00001c90| 6e 64 69 66 0d 0d 00 00 | 00 00 00 00 00 00 00 00 |ndif....|........|
|00001ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d00| 00 00 01 00 00 00 01 68 | 00 00 00 68 00 00 00 3c |.......h|...h...<|
|00001d10| 00 00 00 16 00 4d 03 00 | 00 00 00 00 00 00 00 00 |.....M..|........|
|00001d20| 00 00 00 12 07 4d 50 57 | 20 34 31 31 00 00 00 00 |.....MPW| 411....|
|00001d30| 09 72 65 67 63 6f 6d 70 | 2e 68 02 00 00 00 54 45 |.regcomp|.h....TE|
|00001d40| 58 54 00 00 00 00 00 00 | 02 70 00 c0 00 00 00 00 |XT......|.p......|
|00001d50| 00 00 54 45 58 54 00 00 | 00 00 00 00 02 70 00 c0 |..TEXT..|.....p..|
|00001d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d70| 00 00 a5 8c 0b 88 00 00 | 1c 16 00 00 01 a4 01 e9 |........|........|
|00001d80| 00 00 28 00 a4 26 35 f0 | a4 26 35 f0 00 00 00 00 |..(..&5.|.&5.....|
|00001d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001da0| 00 00 2b b4 01 35 00 00 | 00 00 00 00 00 00 2b b3 |..+..5..|......+.|
|00001db0| 00 01 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e00| 00 00 00 64 71 ff f9 1e | 3f e5 32 30 00 04 00 00 |...dq...|?.20....|
|00001e10| 00 00 00 00 00 00 a5 b2 | 22 af a5 8c 0b 89 a5 b2 |........|".......|
|00001e20| 21 a8 00 09 0e f1 00 01 | 00 2c 00 01 05 50 65 72 |!.......|.,...Per|
|00001e30| 6c ba 00 08 4d 61 74 74 | 68 69 61 73 00 01 31 00 |l...Matt|hias..1.|
|00001e40| 09 72 65 67 63 6f 6d 70 | 2e 68 00 00 00 00 18 49 |.regcomp|.h.....I|
|00001e50| 6e 69 74 69 61 6c 20 43 | 68 65 63 6b 69 6e 20 2d |nitial C|heckin -|
|00001e60| 3e 20 34 2e 30 2e 32 00 | 00 00 01 00 00 00 01 68 |> 4.0.2.|.......h|
|00001e70| 00 00 00 68 00 00 00 3c | 00 2b 7f 3c 0c 7e 00 00 |...h...<|.+.<.~..|
|00001e80| 00 1c 00 32 00 00 63 6b | 69 64 00 00 00 0a 00 80 |...2..ck|id......|
|00001e90| 00 00 00 00 00 00 00 31 | 8a e0 09 50 72 6f 6a 65 |.......1|...Proje|
|00001ea0| 63 74 6f 72 00 00 00 00 | 00 00 00 00 00 00 00 00 |ctor....|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+