home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail, ASCII text
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 31 37 69 30 39 |Subject:| v17i09|
|00000010| 39 3a 20 20 47 6e 75 20 | 45 3f 47 52 45 50 20 28 |9: Gnu |E?GREP (|
|00000020| 69 74 27 73 20 66 61 73 | 74 29 2c 20 50 61 72 74 |it's fas|t), Part|
|00000030| 30 32 2f 30 35 0a 4e 65 | 77 73 67 72 6f 75 70 73 |02/05.Ne|wsgroups|
|00000040| 3a 20 63 6f 6d 70 2e 73 | 6f 75 72 63 65 73 2e 75 |: comp.s|ources.u|
|00000050| 6e 69 78 0a 53 65 6e 64 | 65 72 3a 20 73 6f 75 72 |nix.Send|er: sour|
|00000060| 63 65 73 0a 41 70 70 72 | 6f 76 65 64 3a 20 72 73 |ces.Appr|oved: rs|
|00000070| 61 6c 7a 40 75 75 6e 65 | 74 2e 55 55 2e 4e 45 54 |alz@uune|t.UU.NET|
|00000080| 0a 0a 53 75 62 6d 69 74 | 74 65 64 2d 62 79 3a 20 |..Submit|ted-by: |
|00000090| 4d 69 6b 65 20 48 61 65 | 72 74 65 6c 20 3c 6d 69 |Mike Hae|rtel <mi|
|000000a0| 6b 65 40 77 68 65 61 74 | 69 65 73 2e 61 69 2e 6d |ke@wheat|ies.ai.m|
|000000b0| 69 74 2e 65 64 75 3e 0a | 50 6f 73 74 69 6e 67 2d |it.edu>.|Posting-|
|000000c0| 6e 75 6d 62 65 72 3a 20 | 56 6f 6c 75 6d 65 20 31 |number: |Volume 1|
|000000d0| 37 2c 20 49 73 73 75 65 | 20 39 39 0a 41 72 63 68 |7, Issue| 99.Arch|
|000000e0| 69 76 65 2d 6e 61 6d 65 | 3a 20 67 6e 75 67 72 65 |ive-name|: gnugre|
|000000f0| 70 2f 70 61 72 74 30 32 | 0a 0a 23 21 20 2f 62 69 |p/part02|..#! /bi|
|00000100| 6e 2f 73 68 0a 23 20 54 | 68 69 73 20 69 73 20 61 |n/sh.# T|his is a|
|00000110| 20 73 68 65 6c 6c 20 61 | 72 63 68 69 76 65 2e 20 | shell a|rchive. |
|00000120| 20 52 65 6d 6f 76 65 20 | 61 6e 79 74 68 69 6e 67 | Remove |anything|
|00000130| 20 62 65 66 6f 72 65 20 | 74 68 69 73 20 6c 69 6e | before |this lin|
|00000140| 65 2c 20 74 68 65 6e 20 | 75 6e 70 61 63 6b 0a 23 |e, then |unpack.#|
|00000150| 20 69 74 20 62 79 20 73 | 61 76 69 6e 67 20 69 74 | it by s|aving it|
|00000160| 20 69 6e 74 6f 20 61 20 | 66 69 6c 65 20 61 6e 64 | into a |file and|
|00000170| 20 74 79 70 69 6e 67 20 | 22 73 68 20 66 69 6c 65 | typing |"sh file|
|00000180| 22 2e 20 20 54 6f 20 6f | 76 65 72 77 72 69 74 65 |". To o|verwrite|
|00000190| 20 65 78 69 73 74 69 6e | 67 0a 23 20 66 69 6c 65 | existin|g.# file|
|000001a0| 73 2c 20 74 79 70 65 20 | 22 73 68 20 66 69 6c 65 |s, type |"sh file|
|000001b0| 20 2d 63 22 2e 20 20 59 | 6f 75 20 63 61 6e 20 61 | -c". Y|ou can a|
|000001c0| 6c 73 6f 20 66 65 65 64 | 20 74 68 69 73 20 61 73 |lso feed| this as|
|000001d0| 20 73 74 61 6e 64 61 72 | 64 20 69 6e 70 75 74 20 | standar|d input |
|000001e0| 76 69 61 0a 23 20 75 6e | 73 68 61 72 2c 20 6f 72 |via.# un|shar, or|
|000001f0| 20 62 79 20 74 79 70 69 | 6e 67 20 22 73 68 20 3c | by typi|ng "sh <|
|00000200| 66 69 6c 65 22 2c 20 65 | 2e 67 2e 2e 20 20 49 66 |file", e|.g.. If|
|00000210| 20 74 68 69 73 20 61 72 | 63 68 69 76 65 20 69 73 | this ar|chive is|
|00000220| 20 63 6f 6d 70 6c 65 74 | 65 2c 20 79 6f 75 0a 23 | complet|e, you.#|
|00000230| 20 77 69 6c 6c 20 73 65 | 65 20 74 68 65 20 66 6f | will se|e the fo|
|00000240| 6c 6c 6f 77 69 6e 67 20 | 6d 65 73 73 61 67 65 20 |llowing |message |
|00000250| 61 74 20 74 68 65 20 65 | 6e 64 3a 0a 23 09 09 22 |at the e|nd:.#.."|
|00000260| 45 6e 64 20 6f 66 20 73 | 68 65 6c 6c 20 61 72 63 |End of s|hell arc|
|00000270| 68 69 76 65 2e 22 0a 23 | 20 43 6f 6e 74 65 6e 74 |hive.".#| Content|
|00000280| 73 3a 20 20 64 66 61 2e | 68 20 67 72 65 70 2e 63 |s: dfa.|h grep.c|
|00000290| 0a 23 20 57 72 61 70 70 | 65 64 20 62 79 20 6d 69 |.# Wrapp|ed by mi|
|000002a0| 6b 65 40 6f 64 69 6e 20 | 6f 6e 20 57 65 64 20 44 |ke@odin |on Wed D|
|000002b0| 65 63 20 31 34 20 32 31 | 3a 32 35 3a 34 37 20 31 |ec 14 21|:25:47 1|
|000002c0| 39 38 38 0a 50 41 54 48 | 3d 2f 62 69 6e 3a 2f 75 |988.PATH|=/bin:/u|
|000002d0| 73 72 2f 62 69 6e 3a 2f | 75 73 72 2f 75 63 62 20 |sr/bin:/|usr/ucb |
|000002e0| 3b 20 65 78 70 6f 72 74 | 20 50 41 54 48 0a 69 66 |; export| PATH.if|
|000002f0| 20 74 65 73 74 20 2d 66 | 20 27 64 66 61 2e 68 27 | test -f| 'dfa.h'|
|00000300| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00000310| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00000320| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00000330| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00000340| 67 20 66 69 6c 65 20 5c | 22 27 64 66 61 2e 68 27 |g file \|"'dfa.h'|
|00000350| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|00000360| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00000370| 27 64 66 61 2e 68 27 5c | 22 20 5c 28 32 32 34 32 |'dfa.h'\|" \(2242|
|00000380| 37 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |7 charac|ters\).s|
|00000390| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 64 66 |ed "s/^X|//" >'df|
|000003a0| 61 2e 68 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |a.h' <<'|END_OF_F|
|000003b0| 49 4c 45 27 0a 58 2f 2a | 20 64 66 61 2e 68 20 2d |ILE'.X/*| dfa.h -|
|000003c0| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 73 20 66 6f | declara|tions fo|
|000003d0| 72 20 47 4e 55 20 64 65 | 74 65 72 6d 69 6e 69 73 |r GNU de|terminis|
|000003e0| 74 69 63 20 72 65 67 65 | 78 70 20 63 6f 6d 70 69 |tic rege|xp compi|
|000003f0| 6c 65 72 0a 58 20 20 20 | 43 6f 70 79 72 69 67 68 |ler.X |Copyrigh|
|00000400| 74 20 28 43 29 20 31 39 | 38 38 20 46 72 65 65 20 |t (C) 19|88 Free |
|00000410| 53 6f 66 74 77 61 72 65 | 20 46 6f 75 6e 64 61 74 |Software| Foundat|
|00000420| 69 6f 6e 2c 20 49 6e 63 | 2e 0a 58 20 20 20 20 20 |ion, Inc|..X |
|00000430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000440| 20 57 72 69 74 74 65 6e | 20 4a 75 6e 65 2c 20 31 | Written| June, 1|
|00000450| 39 38 38 20 62 79 20 4d | 69 6b 65 20 48 61 65 72 |988 by M|ike Haer|
|00000460| 74 65 6c 0a 58 0a 58 09 | 09 20 20 20 20 20 20 20 |tel.X.X.|. |
|00000470| 4e 4f 20 57 41 52 52 41 | 4e 54 59 0a 58 0a 58 20 |NO WARRA|NTY.X.X |
|00000480| 20 42 45 43 41 55 53 45 | 20 54 48 49 53 20 50 52 | BECAUSE| THIS PR|
|00000490| 4f 47 52 41 4d 20 49 53 | 20 4c 49 43 45 4e 53 45 |OGRAM IS| LICENSE|
|000004a0| 44 20 46 52 45 45 20 4f | 46 20 43 48 41 52 47 45 |D FREE O|F CHARGE|
|000004b0| 2c 20 57 45 20 50 52 4f | 56 49 44 45 20 41 42 53 |, WE PRO|VIDE ABS|
|000004c0| 4f 4c 55 54 45 4c 59 0a | 58 4e 4f 20 57 41 52 52 |OLUTELY.|XNO WARR|
|000004d0| 41 4e 54 59 2c 20 54 4f | 20 54 48 45 20 45 58 54 |ANTY, TO| THE EXT|
|000004e0| 45 4e 54 20 50 45 52 4d | 49 54 54 45 44 20 42 59 |ENT PERM|ITTED BY|
|000004f0| 20 41 50 50 4c 49 43 41 | 42 4c 45 20 53 54 41 54 | APPLICA|BLE STAT|
|00000500| 45 20 4c 41 57 2e 20 20 | 45 58 43 45 50 54 0a 58 |E LAW. |EXCEPT.X|
|00000510| 57 48 45 4e 20 4f 54 48 | 45 52 57 49 53 45 20 53 |WHEN OTH|ERWISE S|
|00000520| 54 41 54 45 44 20 49 4e | 20 57 52 49 54 49 4e 47 |TATED IN| WRITING|
|00000530| 2c 20 46 52 45 45 20 53 | 4f 46 54 57 41 52 45 20 |, FREE S|OFTWARE |
|00000540| 46 4f 55 4e 44 41 54 49 | 4f 4e 2c 20 49 4e 43 2c |FOUNDATI|ON, INC,|
|00000550| 0a 58 52 49 43 48 41 52 | 44 20 4d 2e 20 53 54 41 |.XRICHAR|D M. STA|
|00000560| 4c 4c 4d 41 4e 20 41 4e | 44 2f 4f 52 20 4f 54 48 |LLMAN AN|D/OR OTH|
|00000570| 45 52 20 50 41 52 54 49 | 45 53 20 50 52 4f 56 49 |ER PARTI|ES PROVI|
|00000580| 44 45 20 54 48 49 53 20 | 50 52 4f 47 52 41 4d 20 |DE THIS |PROGRAM |
|00000590| 22 41 53 20 49 53 22 0a | 58 57 49 54 48 4f 55 54 |"AS IS".|XWITHOUT|
|000005a0| 20 57 41 52 52 41 4e 54 | 59 20 4f 46 20 41 4e 59 | WARRANT|Y OF ANY|
|000005b0| 20 4b 49 4e 44 2c 20 45 | 49 54 48 45 52 20 45 58 | KIND, E|ITHER EX|
|000005c0| 50 52 45 53 53 45 44 20 | 4f 52 20 49 4d 50 4c 49 |PRESSED |OR IMPLI|
|000005d0| 45 44 2c 20 49 4e 43 4c | 55 44 49 4e 47 2c 0a 58 |ED, INCL|UDING,.X|
|000005e0| 42 55 54 20 4e 4f 54 20 | 4c 49 4d 49 54 45 44 20 |BUT NOT |LIMITED |
|000005f0| 54 4f 2c 20 54 48 45 20 | 49 4d 50 4c 49 45 44 20 |TO, THE |IMPLIED |
|00000600| 57 41 52 52 41 4e 54 49 | 45 53 20 4f 46 20 4d 45 |WARRANTI|ES OF ME|
|00000610| 52 43 48 41 4e 54 41 42 | 49 4c 49 54 59 20 41 4e |RCHANTAB|ILITY AN|
|00000620| 44 0a 58 46 49 54 4e 45 | 53 53 20 46 4f 52 20 41 |D.XFITNE|SS FOR A|
|00000630| 20 50 41 52 54 49 43 55 | 4c 41 52 20 50 55 52 50 | PARTICU|LAR PURP|
|00000640| 4f 53 45 2e 20 20 54 48 | 45 20 45 4e 54 49 52 45 |OSE. TH|E ENTIRE|
|00000650| 20 52 49 53 4b 20 41 53 | 20 54 4f 20 54 48 45 20 | RISK AS| TO THE |
|00000660| 51 55 41 4c 49 54 59 0a | 58 41 4e 44 20 50 45 52 |QUALITY.|XAND PER|
|00000670| 46 4f 52 4d 41 4e 43 45 | 20 4f 46 20 54 48 45 20 |FORMANCE| OF THE |
|00000680| 50 52 4f 47 52 41 4d 20 | 49 53 20 57 49 54 48 20 |PROGRAM |IS WITH |
|00000690| 59 4f 55 2e 20 20 53 48 | 4f 55 4c 44 20 54 48 45 |YOU. SH|OULD THE|
|000006a0| 20 50 52 4f 47 52 41 4d | 20 50 52 4f 56 45 0a 58 | PROGRAM| PROVE.X|
|000006b0| 44 45 46 45 43 54 49 56 | 45 2c 20 59 4f 55 20 41 |DEFECTIV|E, YOU A|
|000006c0| 53 53 55 4d 45 20 54 48 | 45 20 43 4f 53 54 20 4f |SSUME TH|E COST O|
|000006d0| 46 20 41 4c 4c 20 4e 45 | 43 45 53 53 41 52 59 20 |F ALL NE|CESSARY |
|000006e0| 53 45 52 56 49 43 49 4e | 47 2c 20 52 45 50 41 49 |SERVICIN|G, REPAI|
|000006f0| 52 20 4f 52 0a 58 43 4f | 52 52 45 43 54 49 4f 4e |R OR.XCO|RRECTION|
|00000700| 2e 0a 58 0a 58 20 49 4e | 20 4e 4f 20 45 56 45 4e |..X.X IN| NO EVEN|
|00000710| 54 20 55 4e 4c 45 53 53 | 20 52 45 51 55 49 52 45 |T UNLESS| REQUIRE|
|00000720| 44 20 42 59 20 41 50 50 | 4c 49 43 41 42 4c 45 20 |D BY APP|LICABLE |
|00000730| 4c 41 57 20 57 49 4c 4c | 20 52 49 43 48 41 52 44 |LAW WILL| RICHARD|
|00000740| 20 4d 2e 0a 58 53 54 41 | 4c 4c 4d 41 4e 2c 20 54 | M..XSTA|LLMAN, T|
|00000750| 48 45 20 46 52 45 45 20 | 53 4f 46 54 57 41 52 45 |HE FREE |SOFTWARE|
|00000760| 20 46 4f 55 4e 44 41 54 | 49 4f 4e 2c 20 49 4e 43 | FOUNDAT|ION, INC|
|00000770| 2e 2c 20 41 4e 44 2f 4f | 52 20 41 4e 59 20 4f 54 |., AND/O|R ANY OT|
|00000780| 48 45 52 20 50 41 52 54 | 59 0a 58 57 48 4f 20 4d |HER PART|Y.XWHO M|
|00000790| 41 59 20 4d 4f 44 49 46 | 59 20 41 4e 44 20 52 45 |AY MODIF|Y AND RE|
|000007a0| 44 49 53 54 52 49 42 55 | 54 45 20 54 48 49 53 20 |DISTRIBU|TE THIS |
|000007b0| 50 52 4f 47 52 41 4d 20 | 41 53 20 50 45 52 4d 49 |PROGRAM |AS PERMI|
|000007c0| 54 54 45 44 20 42 45 4c | 4f 57 2c 20 42 45 0a 58 |TTED BEL|OW, BE.X|
|000007d0| 4c 49 41 42 4c 45 20 54 | 4f 20 59 4f 55 20 46 4f |LIABLE T|O YOU FO|
|000007e0| 52 20 44 41 4d 41 47 45 | 53 2c 20 49 4e 43 4c 55 |R DAMAGE|S, INCLU|
|000007f0| 44 49 4e 47 20 41 4e 59 | 20 4c 4f 53 54 20 50 52 |DING ANY| LOST PR|
|00000800| 4f 46 49 54 53 2c 20 4c | 4f 53 54 20 4d 4f 4e 49 |OFITS, L|OST MONI|
|00000810| 45 53 2c 20 4f 52 0a 58 | 4f 54 48 45 52 20 53 50 |ES, OR.X|OTHER SP|
|00000820| 45 43 49 41 4c 2c 20 49 | 4e 43 49 44 45 4e 54 41 |ECIAL, I|NCIDENTA|
|00000830| 4c 20 4f 52 20 43 4f 4e | 53 45 51 55 45 4e 54 49 |L OR CON|SEQUENTI|
|00000840| 41 4c 20 44 41 4d 41 47 | 45 53 20 41 52 49 53 49 |AL DAMAG|ES ARISI|
|00000850| 4e 47 20 4f 55 54 20 4f | 46 20 54 48 45 0a 58 55 |NG OUT O|F THE.XU|
|00000860| 53 45 20 4f 52 20 49 4e | 41 42 49 4c 49 54 59 20 |SE OR IN|ABILITY |
|00000870| 54 4f 20 55 53 45 20 28 | 49 4e 43 4c 55 44 49 4e |TO USE (|INCLUDIN|
|00000880| 47 20 42 55 54 20 4e 4f | 54 20 4c 49 4d 49 54 45 |G BUT NO|T LIMITE|
|00000890| 44 20 54 4f 20 4c 4f 53 | 53 20 4f 46 20 44 41 54 |D TO LOS|S OF DAT|
|000008a0| 41 20 4f 52 0a 58 44 41 | 54 41 20 42 45 49 4e 47 |A OR.XDA|TA BEING|
|000008b0| 20 52 45 4e 44 45 52 45 | 44 20 49 4e 41 43 43 55 | RENDERE|D INACCU|
|000008c0| 52 41 54 45 20 4f 52 20 | 4c 4f 53 53 45 53 20 53 |RATE OR |LOSSES S|
|000008d0| 55 53 54 41 49 4e 45 44 | 20 42 59 20 54 48 49 52 |USTAINED| BY THIR|
|000008e0| 44 20 50 41 52 54 49 45 | 53 20 4f 52 0a 58 41 20 |D PARTIE|S OR.XA |
|000008f0| 46 41 49 4c 55 52 45 20 | 4f 46 20 54 48 45 20 50 |FAILURE |OF THE P|
|00000900| 52 4f 47 52 41 4d 20 54 | 4f 20 4f 50 45 52 41 54 |ROGRAM T|O OPERAT|
|00000910| 45 20 57 49 54 48 20 41 | 4e 59 20 4f 54 48 45 52 |E WITH A|NY OTHER|
|00000920| 20 50 52 4f 47 52 41 4d | 53 29 20 54 48 49 53 0a | PROGRAM|S) THIS.|
|00000930| 58 50 52 4f 47 52 41 4d | 2c 20 45 56 45 4e 20 49 |XPROGRAM|, EVEN I|
|00000940| 46 20 59 4f 55 20 48 41 | 56 45 20 42 45 45 4e 20 |F YOU HA|VE BEEN |
|00000950| 41 44 56 49 53 45 44 20 | 4f 46 20 54 48 45 20 50 |ADVISED |OF THE P|
|00000960| 4f 53 53 49 42 49 4c 49 | 54 59 20 4f 46 20 53 55 |OSSIBILI|TY OF SU|
|00000970| 43 48 0a 58 44 41 4d 41 | 47 45 53 2c 20 4f 52 20 |CH.XDAMA|GES, OR |
|00000980| 46 4f 52 20 41 4e 59 20 | 43 4c 41 49 4d 20 42 59 |FOR ANY |CLAIM BY|
|00000990| 20 41 4e 59 20 4f 54 48 | 45 52 20 50 41 52 54 59 | ANY OTH|ER PARTY|
|000009a0| 2e 0a 58 0a 58 09 09 47 | 45 4e 45 52 41 4c 20 50 |..X.X..G|ENERAL P|
|000009b0| 55 42 4c 49 43 20 4c 49 | 43 45 4e 53 45 20 54 4f |UBLIC LI|CENSE TO|
|000009c0| 20 43 4f 50 59 0a 58 0a | 58 20 20 31 2e 20 59 6f | COPY.X.|X 1. Yo|
|000009d0| 75 20 6d 61 79 20 63 6f | 70 79 20 61 6e 64 20 64 |u may co|py and d|
|000009e0| 69 73 74 72 69 62 75 74 | 65 20 76 65 72 62 61 74 |istribut|e verbat|
|000009f0| 69 6d 20 63 6f 70 69 65 | 73 20 6f 66 20 74 68 69 |im copie|s of thi|
|00000a00| 73 20 73 6f 75 72 63 65 | 20 66 69 6c 65 0a 58 61 |s source| file.Xa|
|00000a10| 73 20 79 6f 75 20 72 65 | 63 65 69 76 65 20 69 74 |s you re|ceive it|
|00000a20| 2c 20 69 6e 20 61 6e 79 | 20 6d 65 64 69 75 6d 2c |, in any| medium,|
|00000a30| 20 70 72 6f 76 69 64 65 | 64 20 74 68 61 74 20 79 | provide|d that y|
|00000a40| 6f 75 20 63 6f 6e 73 70 | 69 63 75 6f 75 73 6c 79 |ou consp|icuously|
|00000a50| 20 61 6e 64 0a 58 61 70 | 70 72 6f 70 72 69 61 74 | and.Xap|propriat|
|00000a60| 65 6c 79 20 70 75 62 6c | 69 73 68 20 6f 6e 20 65 |ely publ|ish on e|
|00000a70| 61 63 68 20 63 6f 70 79 | 20 61 20 76 61 6c 69 64 |ach copy| a valid|
|00000a80| 20 63 6f 70 79 72 69 67 | 68 74 20 6e 6f 74 69 63 | copyrig|ht notic|
|00000a90| 65 20 22 43 6f 70 79 72 | 69 67 68 74 0a 58 20 28 |e "Copyr|ight.X (|
|00000aa0| 43 29 20 31 39 38 38 20 | 46 72 65 65 20 53 6f 66 |C) 1988 |Free Sof|
|00000ab0| 74 77 61 72 65 20 46 6f | 75 6e 64 61 74 69 6f 6e |tware Fo|undation|
|00000ac0| 2c 20 49 6e 63 2e 22 3b | 20 61 6e 64 20 69 6e 63 |, Inc.";| and inc|
|00000ad0| 6c 75 64 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 74 |lude fol|lowing t|
|00000ae0| 68 65 0a 58 63 6f 70 79 | 72 69 67 68 74 20 6e 6f |he.Xcopy|right no|
|00000af0| 74 69 63 65 20 61 20 76 | 65 72 62 61 74 69 6d 20 |tice a v|erbatim |
|00000b00| 63 6f 70 79 20 6f 66 20 | 74 68 65 20 61 62 6f 76 |copy of |the abov|
|00000b10| 65 20 64 69 73 63 6c 61 | 69 6d 65 72 20 6f 66 20 |e discla|imer of |
|00000b20| 77 61 72 72 61 6e 74 79 | 0a 58 61 6e 64 20 6f 66 |warranty|.Xand of|
|00000b30| 20 74 68 69 73 20 4c 69 | 63 65 6e 73 65 2e 20 20 | this Li|cense. |
|00000b40| 59 6f 75 20 6d 61 79 20 | 63 68 61 72 67 65 20 61 |You may |charge a|
|00000b50| 20 64 69 73 74 72 69 62 | 75 74 69 6f 6e 20 66 65 | distrib|ution fe|
|00000b60| 65 20 66 6f 72 20 74 68 | 65 0a 58 70 68 79 73 69 |e for th|e.Xphysi|
|00000b70| 63 61 6c 20 61 63 74 20 | 6f 66 20 74 72 61 6e 73 |cal act |of trans|
|00000b80| 66 65 72 72 69 6e 67 20 | 61 20 63 6f 70 79 2e 0a |ferring |a copy..|
|00000b90| 58 0a 58 20 20 32 2e 20 | 59 6f 75 20 6d 61 79 20 |X.X 2. |You may |
|00000ba0| 6d 6f 64 69 66 79 20 79 | 6f 75 72 20 63 6f 70 79 |modify y|our copy|
|00000bb0| 20 6f 72 20 63 6f 70 69 | 65 73 20 6f 66 20 74 68 | or copi|es of th|
|00000bc0| 69 73 20 73 6f 75 72 63 | 65 20 66 69 6c 65 20 6f |is sourc|e file o|
|00000bd0| 72 0a 58 61 6e 79 20 70 | 6f 72 74 69 6f 6e 20 6f |r.Xany p|ortion o|
|00000be0| 66 20 69 74 2c 20 61 6e | 64 20 63 6f 70 79 20 61 |f it, an|d copy a|
|00000bf0| 6e 64 20 64 69 73 74 72 | 69 62 75 74 65 20 73 75 |nd distr|ibute su|
|00000c00| 63 68 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 73 |ch modif|ications|
|00000c10| 20 75 6e 64 65 72 0a 58 | 74 68 65 20 74 65 72 6d | under.X|the term|
|00000c20| 73 20 6f 66 20 50 61 72 | 61 67 72 61 70 68 20 31 |s of Par|agraph 1|
|00000c30| 20 61 62 6f 76 65 2c 20 | 70 72 6f 76 69 64 65 64 | above, |provided|
|00000c40| 20 74 68 61 74 20 79 6f | 75 20 61 6c 73 6f 20 64 | that yo|u also d|
|00000c50| 6f 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 3a |o the fo|llowing:|
|00000c60| 0a 58 0a 58 20 20 20 20 | 61 29 20 63 61 75 73 65 |.X.X |a) cause|
|00000c70| 20 74 68 65 20 6d 6f 64 | 69 66 69 65 64 20 66 69 | the mod|ified fi|
|00000c80| 6c 65 73 20 74 6f 20 63 | 61 72 72 79 20 70 72 6f |les to c|arry pro|
|00000c90| 6d 69 6e 65 6e 74 20 6e | 6f 74 69 63 65 73 20 73 |minent n|otices s|
|00000ca0| 74 61 74 69 6e 67 0a 58 | 20 20 20 20 74 68 61 74 |tating.X| that|
|00000cb0| 20 79 6f 75 20 63 68 61 | 6e 67 65 64 20 74 68 65 | you cha|nged the|
|00000cc0| 20 66 69 6c 65 73 20 61 | 6e 64 20 74 68 65 20 64 | files a|nd the d|
|00000cd0| 61 74 65 20 6f 66 20 61 | 6e 79 20 63 68 61 6e 67 |ate of a|ny chang|
|00000ce0| 65 3b 20 61 6e 64 0a 58 | 0a 58 20 20 20 20 62 29 |e; and.X|.X b)|
|00000cf0| 20 63 61 75 73 65 20 74 | 68 65 20 77 68 6f 6c 65 | cause t|he whole|
|00000d00| 20 6f 66 20 61 6e 79 20 | 77 6f 72 6b 20 74 68 61 | of any |work tha|
|00000d10| 74 20 79 6f 75 20 64 69 | 73 74 72 69 62 75 74 65 |t you di|stribute|
|00000d20| 20 6f 72 20 70 75 62 6c | 69 73 68 2c 0a 58 20 20 | or publ|ish,.X |
|00000d30| 20 20 74 68 61 74 20 69 | 6e 20 77 68 6f 6c 65 20 | that i|n whole |
|00000d40| 6f 72 20 69 6e 20 70 61 | 72 74 20 63 6f 6e 74 61 |or in pa|rt conta|
|00000d50| 69 6e 73 20 6f 72 20 69 | 73 20 61 20 64 65 72 69 |ins or i|s a deri|
|00000d60| 76 61 74 69 76 65 20 6f | 66 20 74 68 69 73 0a 58 |vative o|f this.X|
|00000d70| 20 20 20 20 70 72 6f 67 | 72 61 6d 20 6f 72 20 61 | prog|ram or a|
|00000d80| 6e 79 20 70 61 72 74 20 | 74 68 65 72 65 6f 66 2c |ny part |thereof,|
|00000d90| 20 74 6f 20 62 65 20 6c | 69 63 65 6e 73 65 64 20 | to be l|icensed |
|00000da0| 61 74 20 6e 6f 20 63 68 | 61 72 67 65 20 74 6f 20 |at no ch|arge to |
|00000db0| 61 6c 6c 0a 58 20 20 20 | 20 74 68 69 72 64 20 70 |all.X | third p|
|00000dc0| 61 72 74 69 65 73 20 6f | 6e 20 74 65 72 6d 73 20 |arties o|n terms |
|00000dd0| 69 64 65 6e 74 69 63 61 | 6c 20 74 6f 20 74 68 6f |identica|l to tho|
|00000de0| 73 65 20 63 6f 6e 74 61 | 69 6e 65 64 20 69 6e 20 |se conta|ined in |
|00000df0| 74 68 69 73 0a 58 20 20 | 20 20 4c 69 63 65 6e 73 |this.X | Licens|
|00000e00| 65 20 41 67 72 65 65 6d | 65 6e 74 20 28 65 78 63 |e Agreem|ent (exc|
|00000e10| 65 70 74 20 74 68 61 74 | 20 79 6f 75 20 6d 61 79 |ept that| you may|
|00000e20| 20 63 68 6f 6f 73 65 20 | 74 6f 20 67 72 61 6e 74 | choose |to grant|
|00000e30| 20 6d 6f 72 65 20 65 78 | 74 65 6e 73 69 76 65 0a | more ex|tensive.|
|00000e40| 58 20 20 20 20 77 61 72 | 72 61 6e 74 79 20 70 72 |X war|ranty pr|
|00000e50| 6f 74 65 63 74 69 6f 6e | 20 74 6f 20 73 6f 6d 65 |otection| to some|
|00000e60| 20 6f 72 20 61 6c 6c 20 | 74 68 69 72 64 20 70 61 | or all |third pa|
|00000e70| 72 74 69 65 73 2c 20 61 | 74 20 79 6f 75 72 20 6f |rties, a|t your o|
|00000e80| 70 74 69 6f 6e 29 2e 0a | 58 0a 58 20 20 20 20 63 |ption)..|X.X c|
|00000e90| 29 20 59 6f 75 20 6d 61 | 79 20 63 68 61 72 67 65 |) You ma|y charge|
|00000ea0| 20 61 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 | a distr|ibution |
|00000eb0| 66 65 65 20 66 6f 72 20 | 74 68 65 20 70 68 79 73 |fee for |the phys|
|00000ec0| 69 63 61 6c 20 61 63 74 | 20 6f 66 0a 58 20 20 20 |ical act| of.X |
|00000ed0| 20 74 72 61 6e 73 66 65 | 72 72 69 6e 67 20 61 20 | transfe|rring a |
|00000ee0| 63 6f 70 79 2c 20 61 6e | 64 20 79 6f 75 20 6d 61 |copy, an|d you ma|
|00000ef0| 79 20 61 74 20 79 6f 75 | 72 20 6f 70 74 69 6f 6e |y at you|r option|
|00000f00| 20 6f 66 66 65 72 20 77 | 61 72 72 61 6e 74 79 0a | offer w|arranty.|
|00000f10| 58 20 20 20 20 70 72 6f | 74 65 63 74 69 6f 6e 20 |X pro|tection |
|00000f20| 69 6e 20 65 78 63 68 61 | 6e 67 65 20 66 6f 72 20 |in excha|nge for |
|00000f30| 61 20 66 65 65 2e 0a 58 | 0a 58 4d 65 72 65 20 61 |a fee..X|.XMere a|
|00000f40| 67 67 72 65 67 61 74 69 | 6f 6e 20 6f 66 20 61 6e |ggregati|on of an|
|00000f50| 6f 74 68 65 72 20 75 6e | 72 65 6c 61 74 65 64 20 |other un|related |
|00000f60| 70 72 6f 67 72 61 6d 20 | 77 69 74 68 20 74 68 69 |program |with thi|
|00000f70| 73 20 70 72 6f 67 72 61 | 6d 20 28 6f 72 20 69 74 |s progra|m (or it|
|00000f80| 73 0a 58 64 65 72 69 76 | 61 74 69 76 65 29 20 6f |s.Xderiv|ative) o|
|00000f90| 6e 20 61 20 76 6f 6c 75 | 6d 65 20 6f 66 20 61 20 |n a volu|me of a |
|00000fa0| 73 74 6f 72 61 67 65 20 | 6f 72 20 64 69 73 74 72 |storage |or distr|
|00000fb0| 69 62 75 74 69 6f 6e 20 | 6d 65 64 69 75 6d 20 64 |ibution |medium d|
|00000fc0| 6f 65 73 20 6e 6f 74 20 | 62 72 69 6e 67 0a 58 74 |oes not |bring.Xt|
|00000fd0| 68 65 20 6f 74 68 65 72 | 20 70 72 6f 67 72 61 6d |he other| program|
|00000fe0| 20 75 6e 64 65 72 20 74 | 68 65 20 73 63 6f 70 65 | under t|he scope|
|00000ff0| 20 6f 66 20 74 68 65 73 | 65 20 74 65 72 6d 73 2e | of thes|e terms.|
|00001000| 0a 58 0a 58 20 20 33 2e | 20 59 6f 75 20 6d 61 79 |.X.X 3.| You may|
|00001010| 20 63 6f 70 79 20 61 6e | 64 20 64 69 73 74 72 69 | copy an|d distri|
|00001020| 62 75 74 65 20 74 68 69 | 73 20 70 72 6f 67 72 61 |bute thi|s progra|
|00001030| 6d 20 6f 72 20 61 6e 79 | 20 70 6f 72 74 69 6f 6e |m or any| portion|
|00001040| 20 6f 66 20 69 74 20 69 | 6e 0a 58 63 6f 6d 70 69 | of it i|n.Xcompi|
|00001050| 6c 65 64 2c 20 65 78 65 | 63 75 74 61 62 6c 65 20 |led, exe|cutable |
|00001060| 6f 72 20 6f 62 6a 65 63 | 74 20 63 6f 64 65 20 66 |or objec|t code f|
|00001070| 6f 72 6d 20 75 6e 64 65 | 72 20 74 68 65 20 74 65 |orm unde|r the te|
|00001080| 72 6d 73 20 6f 66 20 50 | 61 72 61 67 72 61 70 68 |rms of P|aragraph|
|00001090| 73 0a 58 31 20 61 6e 64 | 20 32 20 61 62 6f 76 65 |s.X1 and| 2 above|
|000010a0| 20 70 72 6f 76 69 64 65 | 64 20 74 68 61 74 20 79 | provide|d that y|
|000010b0| 6f 75 20 64 6f 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |ou do th|e follow|
|000010c0| 69 6e 67 3a 0a 58 0a 58 | 20 20 20 20 61 29 20 61 |ing:.X.X| a) a|
|000010d0| 63 63 6f 6d 70 61 6e 79 | 20 69 74 20 77 69 74 68 |ccompany| it with|
|000010e0| 20 74 68 65 20 63 6f 6d | 70 6c 65 74 65 20 63 6f | the com|plete co|
|000010f0| 72 72 65 73 70 6f 6e 64 | 69 6e 67 20 6d 61 63 68 |rrespond|ing mach|
|00001100| 69 6e 65 2d 72 65 61 64 | 61 62 6c 65 0a 58 20 20 |ine-read|able.X |
|00001110| 20 20 73 6f 75 72 63 65 | 20 63 6f 64 65 2c 20 77 | source| code, w|
|00001120| 68 69 63 68 20 6d 75 73 | 74 20 62 65 20 64 69 73 |hich mus|t be dis|
|00001130| 74 72 69 62 75 74 65 64 | 20 75 6e 64 65 72 20 74 |tributed| under t|
|00001140| 68 65 20 74 65 72 6d 73 | 20 6f 66 0a 58 20 20 20 |he terms| of.X |
|00001150| 20 50 61 72 61 67 72 61 | 70 68 73 20 31 20 61 6e | Paragra|phs 1 an|
|00001160| 64 20 32 20 61 62 6f 76 | 65 3b 20 6f 72 2c 0a 58 |d 2 abov|e; or,.X|
|00001170| 0a 58 20 20 20 20 62 29 | 20 61 63 63 6f 6d 70 61 |.X b)| accompa|
|00001180| 6e 79 20 69 74 20 77 69 | 74 68 20 61 20 77 72 69 |ny it wi|th a wri|
|00001190| 74 74 65 6e 20 6f 66 66 | 65 72 2c 20 76 61 6c 69 |tten off|er, vali|
|000011a0| 64 20 66 6f 72 20 61 74 | 20 6c 65 61 73 74 20 74 |d for at| least t|
|000011b0| 68 72 65 65 0a 58 20 20 | 20 20 79 65 61 72 73 2c |hree.X | years,|
|000011c0| 20 74 6f 20 67 69 76 65 | 20 61 6e 79 20 74 68 69 | to give| any thi|
|000011d0| 72 64 20 70 61 72 74 79 | 20 66 72 65 65 20 28 65 |rd party| free (e|
|000011e0| 78 63 65 70 74 20 66 6f | 72 20 61 20 6e 6f 6d 69 |xcept fo|r a nomi|
|000011f0| 6e 61 6c 0a 58 20 20 20 | 20 73 68 69 70 70 69 6e |nal.X | shippin|
|00001200| 67 20 63 68 61 72 67 65 | 29 20 61 20 63 6f 6d 70 |g charge|) a comp|
|00001210| 6c 65 74 65 20 6d 61 63 | 68 69 6e 65 2d 72 65 61 |lete mac|hine-rea|
|00001220| 64 61 62 6c 65 20 63 6f | 70 79 20 6f 66 20 74 68 |dable co|py of th|
|00001230| 65 0a 58 20 20 20 20 63 | 6f 72 72 65 73 70 6f 6e |e.X c|orrespon|
|00001240| 64 69 6e 67 20 73 6f 75 | 72 63 65 20 63 6f 64 65 |ding sou|rce code|
|00001250| 2c 20 74 6f 20 62 65 20 | 64 69 73 74 72 69 62 75 |, to be |distribu|
|00001260| 74 65 64 20 75 6e 64 65 | 72 20 74 68 65 20 74 65 |ted unde|r the te|
|00001270| 72 6d 73 20 6f 66 0a 58 | 20 20 20 20 50 61 72 61 |rms of.X| Para|
|00001280| 67 72 61 70 68 73 20 31 | 20 61 6e 64 20 32 20 61 |graphs 1| and 2 a|
|00001290| 62 6f 76 65 3b 20 6f 72 | 2c 0a 58 0a 58 20 20 20 |bove; or|,.X.X |
|000012a0| 20 63 29 20 61 63 63 6f | 6d 70 61 6e 79 20 69 74 | c) acco|mpany it|
|000012b0| 20 77 69 74 68 20 74 68 | 65 20 69 6e 66 6f 72 6d | with th|e inform|
|000012c0| 61 74 69 6f 6e 20 79 6f | 75 20 72 65 63 65 69 76 |ation yo|u receiv|
|000012d0| 65 64 20 61 73 20 74 6f | 20 77 68 65 72 65 20 74 |ed as to| where t|
|000012e0| 68 65 0a 58 20 20 20 20 | 63 6f 72 72 65 73 70 6f |he.X |correspo|
|000012f0| 6e 64 69 6e 67 20 73 6f | 75 72 63 65 20 63 6f 64 |nding so|urce cod|
|00001300| 65 20 6d 61 79 20 62 65 | 20 6f 62 74 61 69 6e 65 |e may be| obtaine|
|00001310| 64 2e 20 20 28 54 68 69 | 73 20 61 6c 74 65 72 6e |d. (Thi|s altern|
|00001320| 61 74 69 76 65 20 69 73 | 0a 58 20 20 20 20 61 6c |ative is|.X al|
|00001330| 6c 6f 77 65 64 20 6f 6e | 6c 79 20 66 6f 72 20 6e |lowed on|ly for n|
|00001340| 6f 6e 63 6f 6d 6d 65 72 | 63 69 61 6c 20 64 69 73 |oncommer|cial dis|
|00001350| 74 72 69 62 75 74 69 6f | 6e 20 61 6e 64 20 6f 6e |tributio|n and on|
|00001360| 6c 79 20 69 66 20 79 6f | 75 0a 58 20 20 20 20 72 |ly if yo|u.X r|
|00001370| 65 63 65 69 76 65 64 20 | 74 68 65 20 70 72 6f 67 |eceived |the prog|
|00001380| 72 61 6d 20 69 6e 20 6f | 62 6a 65 63 74 20 63 6f |ram in o|bject co|
|00001390| 64 65 20 6f 72 20 65 78 | 65 63 75 74 61 62 6c 65 |de or ex|ecutable|
|000013a0| 20 66 6f 72 6d 20 61 6c | 6f 6e 65 2e 29 0a 58 0a | form al|one.).X.|
|000013b0| 58 46 6f 72 20 61 6e 20 | 65 78 65 63 75 74 61 62 |XFor an |executab|
|000013c0| 6c 65 20 66 69 6c 65 2c | 20 63 6f 6d 70 6c 65 74 |le file,| complet|
|000013d0| 65 20 73 6f 75 72 63 65 | 20 63 6f 64 65 20 6d 65 |e source| code me|
|000013e0| 61 6e 73 20 61 6c 6c 20 | 74 68 65 20 73 6f 75 72 |ans all |the sour|
|000013f0| 63 65 20 63 6f 64 65 20 | 66 6f 72 0a 58 61 6c 6c |ce code |for.Xall|
|00001400| 20 6d 6f 64 75 6c 65 73 | 20 69 74 20 63 6f 6e 74 | modules| it cont|
|00001410| 61 69 6e 73 3b 20 62 75 | 74 2c 20 61 73 20 61 20 |ains; bu|t, as a |
|00001420| 73 70 65 63 69 61 6c 20 | 65 78 63 65 70 74 69 6f |special |exceptio|
|00001430| 6e 2c 20 69 74 20 6e 65 | 65 64 20 6e 6f 74 20 69 |n, it ne|ed not i|
|00001440| 6e 63 6c 75 64 65 0a 58 | 73 6f 75 72 63 65 20 63 |nclude.X|source c|
|00001450| 6f 64 65 20 66 6f 72 20 | 6d 6f 64 75 6c 65 73 20 |ode for |modules |
|00001460| 77 68 69 63 68 20 61 72 | 65 20 73 74 61 6e 64 61 |which ar|e standa|
|00001470| 72 64 20 6c 69 62 72 61 | 72 69 65 73 20 74 68 61 |rd libra|ries tha|
|00001480| 74 20 61 63 63 6f 6d 70 | 61 6e 79 20 74 68 65 0a |t accomp|any the.|
|00001490| 58 6f 70 65 72 61 74 69 | 6e 67 20 73 79 73 74 65 |Xoperati|ng syste|
|000014a0| 6d 20 6f 6e 20 77 68 69 | 63 68 20 74 68 65 20 65 |m on whi|ch the e|
|000014b0| 78 65 63 75 74 61 62 6c | 65 20 66 69 6c 65 20 72 |xecutabl|e file r|
|000014c0| 75 6e 73 2e 0a 58 0a 58 | 20 20 34 2e 20 59 6f 75 |uns..X.X| 4. You|
|000014d0| 20 6d 61 79 20 6e 6f 74 | 20 63 6f 70 79 2c 20 73 | may not| copy, s|
|000014e0| 75 62 6c 69 63 65 6e 73 | 65 2c 20 64 69 73 74 72 |ublicens|e, distr|
|000014f0| 69 62 75 74 65 20 6f 72 | 20 74 72 61 6e 73 66 65 |ibute or| transfe|
|00001500| 72 20 74 68 69 73 20 70 | 72 6f 67 72 61 6d 0a 58 |r this p|rogram.X|
|00001510| 65 78 63 65 70 74 20 61 | 73 20 65 78 70 72 65 73 |except a|s expres|
|00001520| 73 6c 79 20 70 72 6f 76 | 69 64 65 64 20 75 6e 64 |sly prov|ided und|
|00001530| 65 72 20 74 68 69 73 20 | 4c 69 63 65 6e 73 65 20 |er this |License |
|00001540| 41 67 72 65 65 6d 65 6e | 74 2e 20 20 41 6e 79 20 |Agreemen|t. Any |
|00001550| 61 74 74 65 6d 70 74 0a | 58 6f 74 68 65 72 77 69 |attempt.|Xotherwi|
|00001560| 73 65 20 74 6f 20 63 6f | 70 79 2c 20 73 75 62 6c |se to co|py, subl|
|00001570| 69 63 65 6e 73 65 2c 20 | 64 69 73 74 72 69 62 75 |icense, |distribu|
|00001580| 74 65 20 6f 72 20 74 72 | 61 6e 73 66 65 72 20 74 |te or tr|ansfer t|
|00001590| 68 69 73 20 70 72 6f 67 | 72 61 6d 20 69 73 20 76 |his prog|ram is v|
|000015a0| 6f 69 64 20 61 6e 64 0a | 58 79 6f 75 72 20 72 69 |oid and.|Xyour ri|
|000015b0| 67 68 74 73 20 74 6f 20 | 75 73 65 20 74 68 65 20 |ghts to |use the |
|000015c0| 70 72 6f 67 72 61 6d 20 | 75 6e 64 65 72 20 74 68 |program |under th|
|000015d0| 69 73 20 4c 69 63 65 6e | 73 65 20 61 67 72 65 65 |is Licen|se agree|
|000015e0| 6d 65 6e 74 20 73 68 61 | 6c 6c 20 62 65 0a 58 61 |ment sha|ll be.Xa|
|000015f0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 74 65 72 |utomatic|ally ter|
|00001600| 6d 69 6e 61 74 65 64 2e | 20 20 48 6f 77 65 76 65 |minated.| Howeve|
|00001610| 72 2c 20 70 61 72 74 69 | 65 73 20 77 68 6f 20 68 |r, parti|es who h|
|00001620| 61 76 65 20 72 65 63 65 | 69 76 65 64 20 63 6f 6d |ave rece|ived com|
|00001630| 70 75 74 65 72 0a 58 73 | 6f 66 74 77 61 72 65 20 |puter.Xs|oftware |
|00001640| 70 72 6f 67 72 61 6d 73 | 20 66 72 6f 6d 20 79 6f |programs| from yo|
|00001650| 75 20 77 69 74 68 20 74 | 68 69 73 20 4c 69 63 65 |u with t|his Lice|
|00001660| 6e 73 65 20 41 67 72 65 | 65 6d 65 6e 74 20 77 69 |nse Agre|ement wi|
|00001670| 6c 6c 20 6e 6f 74 20 68 | 61 76 65 0a 58 74 68 65 |ll not h|ave.Xthe|
|00001680| 69 72 20 6c 69 63 65 6e | 73 65 73 20 74 65 72 6d |ir licen|ses term|
|00001690| 69 6e 61 74 65 64 20 73 | 6f 20 6c 6f 6e 67 20 61 |inated s|o long a|
|000016a0| 73 20 73 75 63 68 20 70 | 61 72 74 69 65 73 20 72 |s such p|arties r|
|000016b0| 65 6d 61 69 6e 20 69 6e | 20 66 75 6c 6c 20 63 6f |emain in| full co|
|000016c0| 6d 70 6c 69 61 6e 63 65 | 2e 0a 58 0a 58 20 20 35 |mpliance|..X.X 5|
|000016d0| 2e 20 49 66 20 79 6f 75 | 20 77 69 73 68 20 74 6f |. If you| wish to|
|000016e0| 20 69 6e 63 6f 72 70 6f | 72 61 74 65 20 70 61 72 | incorpo|rate par|
|000016f0| 74 73 20 6f 66 20 74 68 | 69 73 20 70 72 6f 67 72 |ts of th|is progr|
|00001700| 61 6d 20 69 6e 74 6f 20 | 6f 74 68 65 72 20 66 72 |am into |other fr|
|00001710| 65 65 0a 58 70 72 6f 67 | 72 61 6d 73 20 77 68 6f |ee.Xprog|rams who|
|00001720| 73 65 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |se distr|ibution |
|00001730| 63 6f 6e 64 69 74 69 6f | 6e 73 20 61 72 65 20 64 |conditio|ns are d|
|00001740| 69 66 66 65 72 65 6e 74 | 2c 20 77 72 69 74 65 20 |ifferent|, write |
|00001750| 74 6f 20 74 68 65 20 46 | 72 65 65 0a 58 53 6f 66 |to the F|ree.XSof|
|00001760| 74 77 61 72 65 20 46 6f | 75 6e 64 61 74 69 6f 6e |tware Fo|undation|
|00001770| 20 61 74 20 36 37 35 20 | 4d 61 73 73 20 41 76 65 | at 675 |Mass Ave|
|00001780| 2c 20 43 61 6d 62 72 69 | 64 67 65 2c 20 4d 41 20 |, Cambri|dge, MA |
|00001790| 30 32 31 33 39 2e 20 20 | 57 65 20 68 61 76 65 20 |02139. |We have |
|000017a0| 6e 6f 74 20 79 65 74 0a | 58 77 6f 72 6b 65 64 20 |not yet.|Xworked |
|000017b0| 6f 75 74 20 61 20 73 69 | 6d 70 6c 65 20 72 75 6c |out a si|mple rul|
|000017c0| 65 20 74 68 61 74 20 63 | 61 6e 20 62 65 20 73 74 |e that c|an be st|
|000017d0| 61 74 65 64 20 68 65 72 | 65 2c 20 62 75 74 20 77 |ated her|e, but w|
|000017e0| 65 20 77 69 6c 6c 20 6f | 66 74 65 6e 20 70 65 72 |e will o|ften per|
|000017f0| 6d 69 74 0a 58 74 68 69 | 73 2e 20 20 57 65 20 77 |mit.Xthi|s. We w|
|00001800| 69 6c 6c 20 62 65 20 67 | 75 69 64 65 64 20 62 79 |ill be g|uided by|
|00001810| 20 74 68 65 20 74 77 6f | 20 67 6f 61 6c 73 20 6f | the two| goals o|
|00001820| 66 20 70 72 65 73 65 72 | 76 69 6e 67 20 74 68 65 |f preser|ving the|
|00001830| 20 66 72 65 65 20 73 74 | 61 74 75 73 20 6f 66 0a | free st|atus of.|
|00001840| 58 61 6c 6c 20 64 65 72 | 69 76 61 74 69 76 65 73 |Xall der|ivatives|
|00001850| 20 6f 75 72 20 66 72 65 | 65 20 73 6f 66 74 77 61 | our fre|e softwa|
|00001860| 72 65 20 61 6e 64 20 6f | 66 20 70 72 6f 6d 6f 74 |re and o|f promot|
|00001870| 69 6e 67 20 74 68 65 20 | 73 68 61 72 69 6e 67 20 |ing the |sharing |
|00001880| 61 6e 64 20 72 65 75 73 | 65 20 6f 66 0a 58 73 6f |and reus|e of.Xso|
|00001890| 66 74 77 61 72 65 2e 0a | 58 0a 58 0a 58 49 6e 20 |ftware..|X.X.XIn |
|000018a0| 6f 74 68 65 72 20 77 6f | 72 64 73 2c 20 79 6f 75 |other wo|rds, you|
|000018b0| 20 61 72 65 20 77 65 6c | 63 6f 6d 65 20 74 6f 20 | are wel|come to |
|000018c0| 75 73 65 2c 20 73 68 61 | 72 65 20 61 6e 64 20 69 |use, sha|re and i|
|000018d0| 6d 70 72 6f 76 65 20 74 | 68 69 73 20 70 72 6f 67 |mprove t|his prog|
|000018e0| 72 61 6d 2e 0a 58 59 6f | 75 20 61 72 65 20 66 6f |ram..XYo|u are fo|
|000018f0| 72 62 69 64 64 65 6e 20 | 74 6f 20 66 6f 72 62 69 |rbidden |to forbi|
|00001900| 64 20 61 6e 79 6f 6e 65 | 20 65 6c 73 65 20 74 6f |d anyone| else to|
|00001910| 20 75 73 65 2c 20 73 68 | 61 72 65 20 61 6e 64 20 | use, sh|are and |
|00001920| 69 6d 70 72 6f 76 65 0a | 58 77 68 61 74 20 79 6f |improve.|Xwhat yo|
|00001930| 75 20 67 69 76 65 20 74 | 68 65 6d 2e 20 20 20 48 |u give t|hem. H|
|00001940| 65 6c 70 20 73 74 61 6d | 70 20 6f 75 74 20 73 6f |elp stam|p out so|
|00001950| 66 74 77 61 72 65 2d 68 | 6f 61 72 64 69 6e 67 21 |ftware-h|oarding!|
|00001960| 20 20 2a 2f 0a 58 0c 0a | 58 23 69 66 64 65 66 20 | */.X..|X#ifdef |
|00001970| 5f 5f 53 54 44 43 5f 5f | 0a 58 0a 58 2f 2a 20 4d |__STDC__|.X.X/* M|
|00001980| 69 73 73 69 6e 67 20 69 | 6e 63 6c 75 64 65 20 66 |issing i|nclude f|
|00001990| 69 6c 65 73 20 66 6f 72 | 20 47 4e 55 20 43 2e 20 |iles for| GNU C. |
|000019a0| 2a 2f 0a 58 2f 2a 20 23 | 69 6e 63 6c 75 64 65 20 |*/.X/* #|include |
|000019b0| 3c 73 74 64 6c 69 62 2e | 68 3e 20 2a 2f 0a 58 74 |<stdlib.|h> */.Xt|
|000019c0| 79 70 65 64 65 66 20 69 | 6e 74 20 73 69 7a 65 5f |ypedef i|nt size_|
|000019d0| 74 3b 0a 58 65 78 74 65 | 72 6e 20 76 6f 69 64 20 |t;.Xexte|rn void |
|000019e0| 2a 63 61 6c 6c 6f 63 28 | 69 6e 74 2c 20 73 69 7a |*calloc(|int, siz|
|000019f0| 65 5f 74 29 3b 0a 58 65 | 78 74 65 72 6e 20 76 6f |e_t);.Xe|xtern vo|
|00001a00| 69 64 20 2a 6d 61 6c 6c | 6f 63 28 73 69 7a 65 5f |id *mall|oc(size_|
|00001a10| 74 29 3b 0a 58 65 78 74 | 65 72 6e 20 76 6f 69 64 |t);.Xext|ern void|
|00001a20| 20 2a 72 65 61 6c 6c 6f | 63 28 76 6f 69 64 20 2a | *reallo|c(void *|
|00001a30| 2c 20 73 69 7a 65 5f 74 | 29 3b 0a 58 65 78 74 65 |, size_t|);.Xexte|
|00001a40| 72 6e 20 76 6f 69 64 20 | 66 72 65 65 28 76 6f 69 |rn void |free(voi|
|00001a50| 64 20 2a 29 3b 0a 58 0a | 58 23 69 66 6e 64 65 66 |d *);.X.|X#ifndef|
|00001a60| 20 55 53 47 0a 58 65 78 | 74 65 72 6e 20 63 68 61 | USG.Xex|tern cha|
|00001a70| 72 20 2a 73 74 72 63 68 | 72 28 29 2c 20 2a 73 74 |r *strch|r(), *st|
|00001a80| 72 72 63 68 72 28 29 2c | 20 2a 6d 65 6d 63 70 79 |rrchr(),| *memcpy|
|00001a90| 28 29 3b 0a 58 23 65 6c | 73 65 0a 58 65 78 74 65 |();.X#el|se.Xexte|
|00001aa0| 72 6e 20 63 68 61 72 20 | 2a 69 6e 64 65 78 28 29 |rn char |*index()|
|00001ab0| 3b 0a 58 23 65 6e 64 69 | 66 0a 58 0a 58 65 78 74 |;.X#endi|f.X.Xext|
|00001ac0| 65 72 6e 20 63 68 61 72 | 20 2a 62 63 6f 70 79 28 |ern char| *bcopy(|
|00001ad0| 29 2c 20 2a 62 7a 65 72 | 6f 28 29 3b 0a 58 0a 58 |), *bzer|o();.X.X|
|00001ae0| 23 69 66 64 65 66 20 53 | 4f 4d 45 44 41 59 0a 58 |#ifdef S|OMEDAY.X|
|00001af0| 23 64 65 66 69 6e 65 20 | 49 53 41 4c 4e 55 4d 28 |#define |ISALNUM(|
|00001b00| 63 29 20 69 73 61 6c 6e | 75 6d 28 63 29 0a 58 23 |c) isaln|um(c).X#|
|00001b10| 64 65 66 69 6e 65 20 49 | 53 41 4c 50 48 41 28 63 |define I|SALPHA(c|
|00001b20| 29 20 69 73 61 6c 70 68 | 61 28 63 29 0a 58 23 65 |) isalph|a(c).X#e|
|00001b30| 6c 73 65 0a 58 23 64 65 | 66 69 6e 65 20 49 53 41 |lse.X#de|fine ISA|
|00001b40| 4c 4e 55 4d 28 63 29 20 | 28 69 73 61 73 63 69 69 |LNUM(c) |(isascii|
|00001b50| 28 63 29 20 26 26 20 69 | 73 61 6c 6e 75 6d 28 63 |(c) && i|salnum(c|
|00001b60| 29 29 0a 58 23 64 65 66 | 69 6e 65 20 49 53 41 4c |)).X#def|ine ISAL|
|00001b70| 50 48 41 28 63 29 20 28 | 69 73 61 73 63 69 69 28 |PHA(c) (|isascii(|
|00001b80| 63 29 20 26 26 20 69 73 | 61 6c 70 68 61 28 63 29 |c) && is|alpha(c)|
|00001b90| 29 0a 58 23 65 6e 64 69 | 66 0a 58 0a 58 23 65 6c |).X#endi|f.X.X#el|
|00001ba0| 73 65 20 2f 2a 20 21 20 | 5f 5f 53 54 44 43 5f 5f |se /* ! |__STDC__|
|00001bb0| 20 2a 2f 0a 58 0a 58 23 | 64 65 66 69 6e 65 20 63 | */.X.X#|define c|
|00001bc0| 6f 6e 73 74 0a 58 74 79 | 70 65 64 65 66 20 69 6e |onst.Xty|pedef in|
|00001bd0| 74 20 73 69 7a 65 5f 74 | 3b 0a 58 65 78 74 65 72 |t size_t|;.Xexter|
|00001be0| 6e 20 63 68 61 72 20 2a | 63 61 6c 6c 6f 63 28 29 |n char *|calloc()|
|00001bf0| 2c 20 2a 6d 61 6c 6c 6f | 63 28 29 2c 20 2a 72 65 |, *mallo|c(), *re|
|00001c00| 61 6c 6c 6f 63 28 29 3b | 0a 58 65 78 74 65 72 6e |alloc();|.Xextern|
|00001c10| 20 76 6f 69 64 20 66 72 | 65 65 28 29 3b 0a 58 0a | void fr|ee();.X.|
|00001c20| 58 23 69 66 6e 64 65 66 | 20 55 53 47 0a 58 65 78 |X#ifndef| USG.Xex|
|00001c30| 74 65 72 6e 20 63 68 61 | 72 20 2a 73 74 72 63 68 |tern cha|r *strch|
|00001c40| 72 28 29 2c 20 2a 73 74 | 72 72 63 68 72 28 29 2c |r(), *st|rrchr(),|
|00001c50| 20 2a 6d 65 6d 63 70 79 | 28 29 3b 0a 58 23 65 6c | *memcpy|();.X#el|
|00001c60| 73 65 0a 58 65 78 74 65 | 72 6e 20 63 68 61 72 20 |se.Xexte|rn char |
|00001c70| 2a 69 6e 64 65 78 28 29 | 3b 0a 58 23 65 6e 64 69 |*index()|;.X#endi|
|00001c80| 66 0a 58 0a 58 65 78 74 | 65 72 6e 20 63 68 61 72 |f.X.Xext|ern char|
|00001c90| 20 2a 62 63 6f 70 79 28 | 29 2c 20 2a 62 7a 65 72 | *bcopy(|), *bzer|
|00001ca0| 6f 28 29 3b 0a 58 0a 58 | 23 64 65 66 69 6e 65 20 |o();.X.X|#define |
|00001cb0| 49 53 41 4c 4e 55 4d 28 | 63 29 20 28 69 73 61 73 |ISALNUM(|c) (isas|
|00001cc0| 63 69 69 28 63 29 20 26 | 26 20 69 73 61 6c 6e 75 |cii(c) &|& isalnu|
|00001cd0| 6d 28 63 29 29 0a 58 23 | 64 65 66 69 6e 65 20 49 |m(c)).X#|define I|
|00001ce0| 53 41 4c 50 48 41 28 63 | 29 20 28 69 73 61 73 63 |SALPHA(c|) (isasc|
|00001cf0| 69 69 28 63 29 20 26 26 | 20 69 73 61 6c 70 68 61 |ii(c) &&| isalpha|
|00001d00| 28 63 29 29 0a 58 0a 58 | 23 65 6e 64 69 66 20 2f |(c)).X.X|#endif /|
|00001d10| 2a 20 21 20 5f 5f 53 54 | 44 43 5f 5f 20 2a 2f 0a |* ! __ST|DC__ */.|
|00001d20| 58 0a 58 2f 2a 20 31 20 | 6d 65 61 6e 73 20 70 6c |X.X/* 1 |means pl|
|00001d30| 61 69 6e 20 70 61 72 65 | 6e 74 68 65 73 65 73 20 |ain pare|ntheses |
|00001d40| 73 65 72 76 65 20 61 73 | 20 67 72 6f 75 70 69 6e |serve as| groupin|
|00001d50| 67 2c 20 61 6e 64 20 62 | 61 63 6b 73 6c 61 73 68 |g, and b|ackslash|
|00001d60| 0a 58 20 20 20 20 20 70 | 61 72 65 6e 74 68 65 73 |.X p|arenthes|
|00001d70| 65 73 20 61 72 65 20 6e | 65 65 64 65 64 20 66 6f |es are n|eeded fo|
|00001d80| 72 20 6c 69 74 65 72 61 | 6c 20 73 65 61 72 63 68 |r litera|l search|
|00001d90| 69 6e 67 2e 0a 58 20 20 | 20 30 20 6d 65 61 6e 73 |ing..X | 0 means|
|00001da0| 20 62 61 63 6b 73 6c 61 | 73 68 2d 70 61 72 65 6e | backsla|sh-paren|
|00001db0| 74 68 65 73 65 73 20 61 | 72 65 20 67 72 6f 75 70 |theses a|re group|
|00001dc0| 69 6e 67 2c 20 61 6e 64 | 20 70 6c 61 69 6e 20 70 |ing, and| plain p|
|00001dd0| 61 72 65 6e 74 68 65 73 | 65 73 0a 58 20 20 20 20 |arenthes|es.X |
|00001de0| 20 61 72 65 20 66 6f 72 | 20 6c 69 74 65 72 61 6c | are for| literal|
|00001df0| 20 73 65 61 72 63 68 69 | 6e 67 2e 20 20 2a 2f 0a | searchi|ng. */.|
|00001e00| 58 23 64 65 66 69 6e 65 | 20 52 45 5f 4e 4f 5f 42 |X#define| RE_NO_B|
|00001e10| 4b 5f 50 41 52 45 4e 53 | 20 31 0a 58 0a 58 2f 2a |K_PARENS| 1.X.X/*|
|00001e20| 20 31 20 6d 65 61 6e 73 | 20 70 6c 61 69 6e 20 7c | 1 means| plain ||
|00001e30| 20 73 65 72 76 65 73 20 | 61 73 20 74 68 65 20 22 | serves |as the "|
|00001e40| 6f 72 22 2d 6f 70 65 72 | 61 74 6f 72 2c 20 61 6e |or"-oper|ator, an|
|00001e50| 64 20 5c 7c 20 69 73 20 | 61 20 6c 69 74 65 72 61 |d \| is |a litera|
|00001e60| 6c 2e 0a 58 20 20 20 30 | 20 6d 65 61 6e 73 20 5c |l..X 0| means \|
|00001e70| 7c 20 73 65 72 76 65 73 | 20 61 73 20 74 68 65 20 || serves| as the |
|00001e80| 22 6f 72 22 2d 6f 70 65 | 72 61 74 6f 72 2c 20 61 |"or"-ope|rator, a|
|00001e90| 6e 64 20 7c 20 69 73 20 | 61 20 6c 69 74 65 72 61 |nd | is |a litera|
|00001ea0| 6c 2e 20 20 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |l. */.X|#define |
|00001eb0| 52 45 5f 4e 4f 5f 42 4b | 5f 56 42 41 52 20 32 0a |RE_NO_BK|_VBAR 2.|
|00001ec0| 58 0a 58 2f 2a 20 30 20 | 6d 65 61 6e 73 20 70 6c |X.X/* 0 |means pl|
|00001ed0| 61 69 6e 20 2b 20 6f 72 | 20 3f 20 73 65 72 76 65 |ain + or| ? serve|
|00001ee0| 73 20 61 73 20 61 6e 20 | 6f 70 65 72 61 74 6f 72 |s as an |operator|
|00001ef0| 2c 20 61 6e 64 20 5c 2b | 2c 20 5c 3f 20 61 72 65 |, and \+|, \? are|
|00001f00| 20 6c 69 74 65 72 61 6c | 73 2e 0a 58 20 20 20 31 | literal|s..X 1|
|00001f10| 20 6d 65 61 6e 73 20 5c | 2b 2c 20 5c 3f 20 61 72 | means \|+, \? ar|
|00001f20| 65 20 6f 70 65 72 61 74 | 6f 72 73 20 61 6e 64 20 |e operat|ors and |
|00001f30| 70 6c 61 69 6e 20 2b 2c | 20 3f 20 61 72 65 20 6c |plain +,| ? are l|
|00001f40| 69 74 65 72 61 6c 73 2e | 20 20 2a 2f 0a 58 23 64 |iterals.| */.X#d|
|00001f50| 65 66 69 6e 65 20 52 45 | 5f 42 4b 5f 50 4c 55 53 |efine RE|_BK_PLUS|
|00001f60| 5f 51 4d 20 34 0a 58 0a | 58 2f 2a 20 31 20 6d 65 |_QM 4.X.|X/* 1 me|
|00001f70| 61 6e 73 20 7c 20 62 69 | 6e 64 73 20 74 69 67 68 |ans | bi|nds tigh|
|00001f80| 74 65 72 20 74 68 61 6e | 20 5e 20 6f 72 20 24 2e |ter than| ^ or $.|
|00001f90| 0a 58 20 20 20 30 20 6d | 65 61 6e 73 20 74 68 65 |.X 0 m|eans the|
|00001fa0| 20 63 6f 6e 74 72 61 72 | 79 2e 20 20 2a 2f 0a 58 | contrar|y. */.X|
|00001fb0| 23 64 65 66 69 6e 65 20 | 52 45 5f 54 49 47 48 54 |#define |RE_TIGHT|
|00001fc0| 5f 56 42 41 52 20 38 0a | 58 0a 58 2f 2a 20 31 20 |_VBAR 8.|X.X/* 1 |
|00001fd0| 6d 65 61 6e 73 20 74 72 | 65 61 74 20 5c 6e 20 61 |means tr|eat \n a|
|00001fe0| 73 20 61 6e 20 5f 4f 52 | 20 6f 70 65 72 61 74 6f |s an _OR| operato|
|00001ff0| 72 0a 58 20 20 20 30 20 | 6d 65 61 6e 73 20 74 72 |r.X 0 |means tr|
|00002000| 65 61 74 20 69 74 20 61 | 73 20 61 20 6e 6f 72 6d |eat it a|s a norm|
|00002010| 61 6c 20 63 68 61 72 61 | 63 74 65 72 20 2a 2f 0a |al chara|cter */.|
|00002020| 58 23 64 65 66 69 6e 65 | 20 52 45 5f 4e 45 57 4c |X#define| RE_NEWL|
|00002030| 49 4e 45 5f 4f 52 20 31 | 36 0a 58 0a 58 2f 2a 20 |INE_OR 1|6.X.X/* |
|00002040| 30 20 6d 65 61 6e 73 20 | 74 68 61 74 20 61 20 73 |0 means |that a s|
|00002050| 70 65 63 69 61 6c 20 63 | 68 61 72 61 63 74 65 72 |pecial c|haracter|
|00002060| 73 20 28 73 75 63 68 20 | 61 73 20 2a 2c 20 5e 2c |s (such |as *, ^,|
|00002070| 20 61 6e 64 20 24 29 20 | 61 6c 77 61 79 73 20 68 | and $) |always h|
|00002080| 61 76 65 0a 58 20 20 20 | 20 20 74 68 65 69 72 20 |ave.X | their |
|00002090| 73 70 65 63 69 61 6c 20 | 6d 65 61 6e 69 6e 67 20 |special |meaning |
|000020a0| 72 65 67 61 72 64 6c 65 | 73 73 20 6f 66 20 74 68 |regardle|ss of th|
|000020b0| 65 20 73 75 72 72 6f 75 | 6e 64 69 6e 67 20 63 6f |e surrou|nding co|
|000020c0| 6e 74 65 78 74 2e 0a 58 | 20 20 20 31 20 6d 65 61 |ntext..X| 1 mea|
|000020d0| 6e 73 20 74 68 61 74 20 | 73 70 65 63 69 61 6c 20 |ns that |special |
|000020e0| 63 68 61 72 61 63 74 65 | 72 73 20 6d 61 79 20 61 |characte|rs may a|
|000020f0| 63 74 20 61 73 20 6e 6f | 72 6d 61 6c 20 63 68 61 |ct as no|rmal cha|
|00002100| 72 61 63 74 65 72 73 20 | 69 6e 20 73 6f 6d 65 0a |racters |in some.|
|00002110| 58 20 20 20 20 20 63 6f | 6e 74 65 78 74 73 2e 20 |X co|ntexts. |
|00002120| 20 53 70 65 63 69 66 69 | 63 61 6c 6c 79 2c 20 74 | Specifi|cally, t|
|00002130| 68 69 73 20 61 70 70 6c | 69 65 73 20 74 6f 3a 0a |his appl|ies to:.|
|00002140| 58 09 5e 20 2d 20 6f 6e | 6c 79 20 73 70 65 63 69 |X.^ - on|ly speci|
|00002150| 61 6c 20 61 74 20 74 68 | 65 20 62 65 67 69 6e 6e |al at th|e beginn|
|00002160| 69 6e 67 2c 20 6f 72 20 | 61 66 74 65 72 20 28 20 |ing, or |after ( |
|00002170| 6f 72 20 7c 0a 58 09 24 | 20 2d 20 6f 6e 6c 79 20 |or |.X.$| - only |
|00002180| 73 70 65 63 69 61 6c 20 | 61 74 20 74 68 65 20 65 |special |at the e|
|00002190| 6e 64 2c 20 6f 72 20 62 | 65 66 6f 72 65 20 29 20 |nd, or b|efore ) |
|000021a0| 6f 72 20 7c 0a 58 09 2a | 2c 20 2b 2c 20 3f 20 2d |or |.X.*|, +, ? -|
|000021b0| 20 6f 6e 6c 79 20 73 70 | 65 63 69 61 6c 20 77 68 | only sp|ecial wh|
|000021c0| 65 6e 20 6e 6f 74 20 61 | 66 74 65 72 20 74 68 65 |en not a|fter the|
|000021d0| 20 62 65 67 69 6e 6e 69 | 6e 67 2c 20 28 2c 20 6f | beginni|ng, (, o|
|000021e0| 72 20 7c 20 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |r | */.X|#define |
|000021f0| 52 45 5f 43 4f 4e 54 45 | 58 54 5f 49 4e 44 45 50 |RE_CONTE|XT_INDEP|
|00002200| 5f 4f 50 53 20 33 32 0a | 58 0a 58 2f 2a 20 4e 6f |_OPS 32.|X.X/* No|
|00002210| 77 20 64 65 66 69 6e 65 | 20 63 6f 6d 62 69 6e 61 |w define| combina|
|00002220| 74 69 6f 6e 73 20 6f 66 | 20 62 69 74 73 20 66 6f |tions of| bits fo|
|00002230| 72 20 74 68 65 20 73 74 | 61 6e 64 61 72 64 20 70 |r the st|andard p|
|00002240| 6f 73 73 69 62 69 6c 69 | 74 69 65 73 2e 20 20 2a |ossibili|ties. *|
|00002250| 2f 0a 58 23 64 65 66 69 | 6e 65 20 52 45 5f 53 59 |/.X#defi|ne RE_SY|
|00002260| 4e 54 41 58 5f 41 57 4b | 20 28 52 45 5f 4e 4f 5f |NTAX_AWK| (RE_NO_|
|00002270| 42 4b 5f 50 41 52 45 4e | 53 20 7c 20 52 45 5f 4e |BK_PAREN|S | RE_N|
|00002280| 4f 5f 42 4b 5f 56 42 41 | 52 20 7c 20 52 45 5f 43 |O_BK_VBA|R | RE_C|
|00002290| 4f 4e 54 45 58 54 5f 49 | 4e 44 45 50 5f 4f 50 53 |ONTEXT_I|NDEP_OPS|
|000022a0| 29 0a 58 23 64 65 66 69 | 6e 65 20 52 45 5f 53 59 |).X#defi|ne RE_SY|
|000022b0| 4e 54 41 58 5f 45 47 52 | 45 50 20 28 52 45 5f 53 |NTAX_EGR|EP (RE_S|
|000022c0| 59 4e 54 41 58 5f 41 57 | 4b 20 7c 20 52 45 5f 4e |YNTAX_AW|K | RE_N|
|000022d0| 45 57 4c 49 4e 45 5f 4f | 52 29 0a 58 23 64 65 66 |EWLINE_O|R).X#def|
|000022e0| 69 6e 65 20 52 45 5f 53 | 59 4e 54 41 58 5f 47 52 |ine RE_S|YNTAX_GR|
|000022f0| 45 50 20 28 52 45 5f 42 | 4b 5f 50 4c 55 53 5f 51 |EP (RE_B|K_PLUS_Q|
|00002300| 4d 20 7c 20 52 45 5f 4e | 45 57 4c 49 4e 45 5f 4f |M | RE_N|EWLINE_O|
|00002310| 52 29 0a 58 23 64 65 66 | 69 6e 65 20 52 45 5f 53 |R).X#def|ine RE_S|
|00002320| 59 4e 54 41 58 5f 45 4d | 41 43 53 20 30 0a 58 0a |YNTAX_EM|ACS 0.X.|
|00002330| 58 2f 2a 20 54 68 65 20 | 4e 55 4c 4c 20 70 6f 69 |X/* The |NULL poi|
|00002340| 6e 74 65 72 2e 20 2a 2f | 0a 58 23 64 65 66 69 6e |nter. */|.X#defin|
|00002350| 65 20 4e 55 4c 4c 20 30 | 0a 58 0a 58 2f 2a 20 4e |e NULL 0|.X.X/* N|
|00002360| 75 6d 62 65 72 20 6f 66 | 20 62 69 74 73 20 69 6e |umber of| bits in|
|00002370| 20 61 6e 20 75 6e 73 69 | 67 6e 65 64 20 63 68 61 | an unsi|gned cha|
|00002380| 72 2e 20 2a 2f 0a 58 23 | 64 65 66 69 6e 65 20 43 |r. */.X#|define C|
|00002390| 48 41 52 42 49 54 53 20 | 38 0a 58 0a 58 2f 2a 20 |HARBITS |8.X.X/* |
|000023a0| 46 69 72 73 74 20 69 6e | 74 65 67 65 72 20 76 61 |First in|teger va|
|000023b0| 6c 75 65 20 74 68 61 74 | 20 69 73 20 67 72 65 61 |lue that| is grea|
|000023c0| 74 65 72 20 74 68 61 6e | 20 61 6e 79 20 63 68 61 |ter than| any cha|
|000023d0| 72 61 63 74 65 72 20 63 | 6f 64 65 2e 20 2a 2f 0a |racter c|ode. */.|
|000023e0| 58 23 64 65 66 69 6e 65 | 20 5f 4e 4f 54 43 48 41 |X#define| _NOTCHA|
|000023f0| 52 20 28 31 20 3c 3c 20 | 43 48 41 52 42 49 54 53 |R (1 << |CHARBITS|
|00002400| 29 0a 58 0a 58 2f 2a 20 | 49 4e 54 42 49 54 53 20 |).X.X/* |INTBITS |
|00002410| 6e 65 65 64 20 6e 6f 74 | 20 62 65 20 65 78 61 63 |need not| be exac|
|00002420| 74 2c 20 6a 75 73 74 20 | 61 20 6c 6f 77 65 72 20 |t, just |a lower |
|00002430| 62 6f 75 6e 64 2e 20 2a | 2f 0a 58 23 64 65 66 69 |bound. *|/.X#defi|
|00002440| 6e 65 20 49 4e 54 42 49 | 54 53 20 28 43 48 41 52 |ne INTBI|TS (CHAR|
|00002450| 42 49 54 53 20 2a 20 73 | 69 7a 65 6f 66 20 28 69 |BITS * s|izeof (i|
|00002460| 6e 74 29 29 0a 58 0a 58 | 2f 2a 20 4e 75 6d 62 65 |nt)).X.X|/* Numbe|
|00002470| 72 20 6f 66 20 69 6e 74 | 73 20 72 65 71 75 69 72 |r of int|s requir|
|00002480| 65 64 20 74 6f 20 68 6f | 6c 64 20 61 20 62 69 74 |ed to ho|ld a bit|
|00002490| 20 66 6f 72 20 65 76 65 | 72 79 20 63 68 61 72 61 | for eve|ry chara|
|000024a0| 63 74 65 72 2e 20 2a 2f | 0a 58 23 64 65 66 69 6e |cter. */|.X#defin|
|000024b0| 65 20 5f 43 48 41 52 53 | 45 54 5f 49 4e 54 53 20 |e _CHARS|ET_INTS |
|000024c0| 28 28 5f 4e 4f 54 43 48 | 41 52 20 2b 20 49 4e 54 |((_NOTCH|AR + INT|
|000024d0| 42 49 54 53 20 2d 20 31 | 29 20 2f 20 49 4e 54 42 |BITS - 1|) / INTB|
|000024e0| 49 54 53 29 0a 58 0a 58 | 2f 2a 20 53 65 74 73 20 |ITS).X.X|/* Sets |
|000024f0| 6f 66 20 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |of unsig|ned char|
|00002500| 61 63 74 65 72 73 20 61 | 72 65 20 73 74 6f 72 65 |acters a|re store|
|00002510| 64 20 61 73 20 62 69 74 | 20 76 65 63 74 6f 72 73 |d as bit| vectors|
|00002520| 20 69 6e 20 61 72 72 61 | 79 73 20 6f 66 20 69 6e | in arra|ys of in|
|00002530| 74 73 2e 20 2a 2f 0a 58 | 74 79 70 65 64 65 66 20 |ts. */.X|typedef |
|00002540| 69 6e 74 20 5f 63 68 61 | 72 73 65 74 5b 5f 43 48 |int _cha|rset[_CH|
|00002550| 41 52 53 45 54 5f 49 4e | 54 53 5d 3b 0a 58 0a 58 |ARSET_IN|TS];.X.X|
|00002560| 2f 2a 20 54 68 65 20 72 | 65 67 65 78 70 20 69 73 |/* The r|egexp is|
|00002570| 20 70 61 72 73 65 64 20 | 69 6e 74 6f 20 61 6e 20 | parsed |into an |
|00002580| 61 72 72 61 79 20 6f 66 | 20 74 6f 6b 65 6e 73 20 |array of| tokens |
|00002590| 69 6e 20 70 6f 73 74 66 | 69 78 20 66 6f 72 6d 2e |in postf|ix form.|
|000025a0| 20 20 53 6f 6d 65 20 74 | 6f 6b 65 6e 73 0a 58 20 | Some t|okens.X |
|000025b0| 20 20 61 72 65 20 6f 70 | 65 72 61 74 6f 72 73 20 | are op|erators |
|000025c0| 61 6e 64 20 6f 74 68 65 | 72 73 20 61 72 65 20 74 |and othe|rs are t|
|000025d0| 65 72 6d 69 6e 61 6c 20 | 73 79 6d 62 6f 6c 73 2e |erminal |symbols.|
|000025e0| 20 20 4d 6f 73 74 20 28 | 62 75 74 20 6e 6f 74 20 | Most (|but not |
|000025f0| 61 6c 6c 29 20 6f 66 20 | 74 68 65 73 65 0a 58 20 |all) of |these.X |
|00002600| 20 20 63 6f 64 65 73 20 | 61 72 65 20 72 65 74 75 | codes |are retu|
|00002610| 72 6e 65 64 20 62 79 20 | 74 68 65 20 6c 65 78 69 |rned by |the lexi|
|00002620| 63 61 6c 20 61 6e 61 6c | 79 7a 65 72 2e 20 2a 2f |cal anal|yzer. */|
|00002630| 0a 58 23 69 66 64 65 66 | 20 5f 5f 53 54 44 43 5f |.X#ifdef| __STDC_|
|00002640| 5f 0a 58 0a 58 74 79 70 | 65 64 65 66 20 65 6e 75 |_.X.Xtyp|edef enu|
|00002650| 6d 0a 58 7b 0a 58 20 20 | 5f 45 4e 44 20 3d 20 2d |m.X{.X |_END = -|
|00002660| 31 2c 09 09 09 2f 2a 20 | 5f 45 4e 44 20 69 73 20 |1,.../* |_END is |
|00002670| 61 20 74 65 72 6d 69 6e | 61 6c 20 73 79 6d 62 6f |a termin|al symbo|
|00002680| 6c 20 74 68 61 74 20 6d | 61 74 63 68 65 73 20 74 |l that m|atches t|
|00002690| 68 65 0a 58 09 09 09 09 | 20 20 20 65 6e 64 20 6f |he.X....| end o|
|000026a0| 66 20 69 6e 70 75 74 3b | 20 61 6e 79 20 76 61 6c |f input;| any val|
|000026b0| 75 65 20 6f 66 20 5f 45 | 4e 44 20 6f 72 20 6c 65 |ue of _E|ND or le|
|000026c0| 73 73 20 69 6e 0a 58 09 | 09 09 09 20 20 20 74 68 |ss in.X.|... th|
|000026d0| 65 20 70 61 72 73 65 20 | 74 72 65 65 20 69 73 20 |e parse |tree is |
|000026e0| 73 75 63 68 20 61 20 73 | 79 6d 62 6f 6c 2e 20 20 |such a s|ymbol. |
|000026f0| 41 63 63 65 70 74 69 6e | 67 0a 58 09 09 09 09 20 |Acceptin|g.X.... |
|00002700| 20 20 73 74 61 74 65 73 | 20 6f 66 20 74 68 65 20 | states| of the |
|00002710| 44 46 41 20 61 72 65 20 | 74 68 6f 73 65 20 74 68 |DFA are |those th|
|00002720| 61 74 20 77 6f 75 6c 64 | 20 68 61 76 65 0a 58 09 |at would| have.X.|
|00002730| 09 09 09 20 20 20 61 20 | 74 72 61 6e 73 69 74 69 |... a |transiti|
|00002740| 6f 6e 20 6f 6e 20 5f 45 | 4e 44 2e 20 2a 2f 0a 58 |on on _E|ND. */.X|
|00002750| 0a 58 20 20 2f 2a 20 4f | 72 64 69 6e 61 72 79 20 |.X /* O|rdinary |
|00002760| 63 68 61 72 61 63 74 65 | 72 20 76 61 6c 75 65 73 |characte|r values|
|00002770| 20 61 72 65 20 74 65 72 | 6d 69 6e 61 6c 20 73 79 | are ter|minal sy|
|00002780| 6d 62 6f 6c 73 20 74 68 | 61 74 20 6d 61 74 63 68 |mbols th|at match|
|00002790| 20 74 68 65 6d 73 65 6c | 76 65 73 2e 20 2a 2f 0a | themsel|ves. */.|
|000027a0| 58 0a 58 20 20 5f 45 4d | 50 54 59 20 3d 20 5f 4e |X.X _EM|PTY = _N|
|000027b0| 4f 54 43 48 41 52 2c 09 | 09 2f 2a 20 5f 45 4d 50 |OTCHAR,.|./* _EMP|
|000027c0| 54 59 20 69 73 20 61 20 | 74 65 72 6d 69 6e 61 6c |TY is a |terminal|
|000027d0| 20 73 79 6d 62 6f 6c 20 | 74 68 61 74 20 6d 61 74 | symbol |that mat|
|000027e0| 63 68 65 73 0a 58 09 09 | 09 09 20 20 20 74 68 65 |ches.X..|.. the|
|000027f0| 20 65 6d 70 74 79 20 73 | 74 72 69 6e 67 2e 20 2a | empty s|tring. *|
|00002800| 2f 0a 58 0a 58 20 20 5f | 42 41 43 4b 52 45 46 2c |/.X.X _|BACKREF,|
|00002810| 09 09 09 2f 2a 20 5f 42 | 41 43 4b 52 45 46 20 69 |.../* _B|ACKREF i|
|00002820| 73 20 67 65 6e 65 72 61 | 74 65 64 20 62 79 20 5c |s genera|ted by \|
|00002830| 3c 64 69 67 69 74 3e 3b | 20 69 74 0a 58 09 09 09 |<digit>;| it.X...|
|00002840| 09 20 20 20 69 74 20 6e | 6f 74 20 63 6f 6d 70 6c |. it n|ot compl|
|00002850| 65 74 65 6c 79 20 68 61 | 6e 64 6c 65 64 2e 20 20 |etely ha|ndled. |
|00002860| 49 66 20 74 68 65 20 73 | 63 61 6e 6e 65 72 0a 58 |If the s|canner.X|
|00002870| 09 09 09 09 20 20 20 64 | 65 74 65 63 74 73 20 61 |.... d|etects a|
|00002880| 20 74 72 61 6e 73 69 74 | 69 6f 6e 20 6f 6e 20 62 | transit|ion on b|
|00002890| 61 63 6b 72 65 66 2c 20 | 69 74 20 72 65 74 75 72 |ackref, |it retur|
|000028a0| 6e 73 0a 58 09 09 09 09 | 20 20 20 61 20 6b 69 6e |ns.X....| a kin|
|000028b0| 64 20 6f 66 20 22 73 65 | 6d 69 2d 73 75 63 63 65 |d of "se|mi-succe|
|000028c0| 73 73 22 20 69 6e 64 69 | 63 61 74 69 6e 67 20 74 |ss" indi|cating t|
|000028d0| 68 61 74 0a 58 09 09 09 | 09 20 20 20 74 68 65 20 |hat.X...|. the |
|000028e0| 6d 61 74 63 68 20 77 69 | 6c 6c 20 68 61 76 65 20 |match wi|ll have |
|000028f0| 74 6f 20 62 65 20 76 65 | 72 69 66 69 65 64 20 77 |to be ve|rified w|
|00002900| 69 74 68 0a 58 09 09 09 | 09 20 20 20 61 20 62 61 |ith.X...|. a ba|
|00002910| 63 6b 74 72 61 63 6b 69 | 6e 67 20 6d 61 74 63 68 |cktracki|ng match|
|00002920| 65 72 2e 20 2a 2f 0a 58 | 0a 58 20 20 5f 42 45 47 |er. */.X|.X _BEG|
|00002930| 4c 49 4e 45 2c 09 09 09 | 2f 2a 20 5f 42 45 47 4c |LINE,...|/* _BEGL|
|00002940| 49 4e 45 20 69 73 20 61 | 20 74 65 72 6d 69 6e 61 |INE is a| termina|
|00002950| 6c 20 73 79 6d 62 6f 6c | 20 74 68 61 74 20 6d 61 |l symbol| that ma|
|00002960| 74 63 68 65 73 0a 58 09 | 09 09 09 20 20 20 74 68 |tches.X.|... th|
|00002970| 65 20 65 6d 70 74 79 20 | 73 74 72 69 6e 67 20 69 |e empty |string i|
|00002980| 66 20 69 74 20 69 73 20 | 61 74 20 74 68 65 20 62 |f it is |at the b|
|00002990| 65 67 69 6e 6e 69 6e 67 | 0a 58 09 09 09 09 20 20 |eginning|.X.... |
|000029a0| 20 6f 66 20 61 20 6c 69 | 6e 65 2e 20 2a 2f 0a 58 | of a li|ne. */.X|
|000029b0| 0a 58 20 20 5f 41 4c 4c | 42 45 47 4c 49 4e 45 2c |.X _ALL|BEGLINE,|
|000029c0| 09 09 09 2f 2a 20 5f 41 | 4c 4c 42 45 47 4c 49 4e |.../* _A|LLBEGLIN|
|000029d0| 45 20 69 73 20 61 20 74 | 65 72 6d 69 6e 61 6c 20 |E is a t|erminal |
|000029e0| 73 79 6d 62 6f 6c 20 74 | 68 61 74 0a 58 09 09 09 |symbol t|hat.X...|
|000029f0| 09 20 20 20 6d 61 74 63 | 68 65 73 20 74 68 65 20 |. matc|hes the |
|00002a00| 65 6d 70 74 79 20 73 74 | 72 69 6e 67 20 69 66 20 |empty st|ring if |
|00002a10| 69 74 20 69 73 20 61 74 | 20 74 68 65 0a 58 09 09 |it is at| the.X..|
|00002a20| 09 09 20 20 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f |.. beg|inning o|
|00002a30| 66 20 61 20 6c 69 6e 65 | 3b 20 5f 41 4c 4c 42 45 |f a line|; _ALLBE|
|00002a40| 47 4c 49 4e 45 20 61 70 | 70 6c 69 65 73 0a 58 09 |GLINE ap|plies.X.|
|00002a50| 09 09 09 20 20 20 74 6f | 20 74 68 65 20 65 6e 74 |... to| the ent|
|00002a60| 69 72 65 20 72 65 67 65 | 78 70 20 61 6e 64 20 63 |ire rege|xp and c|
|00002a70| 61 6e 20 6f 6e 6c 79 20 | 6f 63 63 75 72 0a 58 09 |an only |occur.X.|
|00002a80| 09 09 09 20 20 20 61 73 | 20 74 68 65 20 66 69 72 |... as| the fir|
|00002a90| 73 74 20 74 6f 6b 65 6e | 20 74 68 65 72 65 6f 66 |st token| thereof|
|00002aa0| 2e 20 20 5f 41 4c 4c 42 | 45 47 4c 49 4e 45 0a 58 |. _ALLB|EGLINE.X|
|00002ab0| 09 09 09 09 20 20 20 6e | 65 76 65 72 20 61 70 70 |.... n|ever app|
|00002ac0| 65 61 72 73 20 69 6e 20 | 74 68 65 20 70 61 72 73 |ears in |the pars|
|00002ad0| 65 20 74 72 65 65 3b 20 | 61 20 5f 42 45 47 4c 49 |e tree; |a _BEGLI|
|00002ae0| 4e 45 0a 58 09 09 09 09 | 20 20 20 69 73 20 70 72 |NE.X....| is pr|
|00002af0| 65 70 65 6e 64 65 64 20 | 77 69 74 68 20 5f 43 41 |epended |with _CA|
|00002b00| 54 20 74 6f 20 74 68 65 | 20 65 6e 74 69 72 65 0a |T to the| entire.|
|00002b10| 58 09 09 09 09 20 20 20 | 72 65 67 65 78 70 20 69 |X.... |regexp i|
|00002b20| 6e 73 74 65 61 64 2e 20 | 2a 2f 0a 58 0a 58 20 20 |nstead. |*/.X.X |
|00002b30| 5f 45 4e 44 4c 49 4e 45 | 2c 09 09 09 2f 2a 20 5f |_ENDLINE|,.../* _|
|00002b40| 45 4e 44 4c 49 4e 45 20 | 69 73 20 61 20 74 65 72 |ENDLINE |is a ter|
|00002b50| 6d 69 6e 61 6c 20 73 79 | 6d 62 6f 6c 20 74 68 61 |minal sy|mbol tha|
|00002b60| 74 20 6d 61 74 63 68 65 | 73 0a 58 09 09 09 09 20 |t matche|s.X.... |
|00002b70| 20 20 74 68 65 20 65 6d | 70 74 79 20 73 74 72 69 | the em|pty stri|
|00002b80| 6e 67 20 69 66 20 69 74 | 20 69 73 20 61 74 20 74 |ng if it| is at t|
|00002b90| 68 65 20 65 6e 64 20 6f | 66 0a 58 09 09 09 09 20 |he end o|f.X.... |
|00002ba0| 20 20 61 20 6c 69 6e 65 | 2e 20 2a 2f 0a 58 0a 58 | a line|. */.X.X|
|00002bb0| 20 20 5f 41 4c 4c 45 4e | 44 4c 49 4e 45 2c 09 09 | _ALLEN|DLINE,..|
|00002bc0| 09 2f 2a 20 5f 41 4c 4c | 45 4e 44 4c 49 4e 45 20 |./* _ALL|ENDLINE |
|00002bd0| 69 73 20 74 6f 20 5f 45 | 4e 44 4c 49 4e 45 20 61 |is to _E|NDLINE a|
|00002be0| 73 20 5f 41 4c 4c 42 45 | 47 4c 49 4e 45 0a 58 09 |s _ALLBE|GLINE.X.|
|00002bf0| 09 09 09 20 20 20 69 73 | 20 74 6f 20 5f 42 45 47 |... is| to _BEG|
|00002c00| 4c 49 4e 45 2e 20 2a 2f | 0a 58 0a 58 20 20 5f 42 |LINE. */|.X.X _B|
|00002c10| 45 47 57 4f 52 44 2c 09 | 09 09 2f 2a 20 5f 42 45 |EGWORD,.|../* _BE|
|00002c20| 47 57 4f 52 44 20 69 73 | 20 61 20 74 65 72 6d 69 |GWORD is| a termi|
|00002c30| 6e 61 6c 20 73 79 6d 62 | 6f 6c 20 74 68 61 74 20 |nal symb|ol that |
|00002c40| 6d 61 74 63 68 65 73 0a | 58 09 09 09 09 20 20 20 |matches.|X.... |
|00002c50| 74 68 65 20 65 6d 70 74 | 79 20 73 74 72 69 6e 67 |the empt|y string|
|00002c60| 20 69 66 20 69 74 20 69 | 73 20 61 74 20 74 68 65 | if it i|s at the|
|00002c70| 20 62 65 67 69 6e 6e 69 | 6e 67 0a 58 09 09 09 09 | beginni|ng.X....|
|00002c80| 20 20 20 6f 66 20 61 20 | 77 6f 72 64 2e 20 2a 2f | of a |word. */|
|00002c90| 0a 58 0a 58 20 20 5f 45 | 4e 44 57 4f 52 44 2c 09 |.X.X _E|NDWORD,.|
|00002ca0| 09 09 2f 2a 20 5f 45 4e | 44 57 4f 52 44 20 69 73 |../* _EN|DWORD is|
|00002cb0| 20 61 20 74 65 72 6d 69 | 6e 61 6c 20 73 79 6d 62 | a termi|nal symb|
|00002cc0| 6f 6c 20 74 68 61 74 20 | 6d 61 74 63 68 65 73 0a |ol that |matches.|
|00002cd0| 58 09 09 09 09 20 20 20 | 74 68 65 20 65 6d 70 74 |X.... |the empt|
|00002ce0| 79 20 73 74 72 69 6e 67 | 20 69 66 20 69 74 20 69 |y string| if it i|
|00002cf0| 73 20 61 74 20 74 68 65 | 20 65 6e 64 20 6f 66 0a |s at the| end of.|
|00002d00| 58 09 09 09 09 20 20 20 | 61 20 77 6f 72 64 2e 20 |X.... |a word. |
|00002d10| 2a 2f 0a 58 0a 58 20 20 | 5f 4c 49 4d 57 4f 52 44 |*/.X.X |_LIMWORD|
|00002d20| 2c 09 09 09 2f 2a 20 5f | 4c 49 4d 57 4f 52 44 20 |,.../* _|LIMWORD |
|00002d30| 69 73 20 61 20 74 65 72 | 6d 69 6e 61 6c 20 73 79 |is a ter|minal sy|
|00002d40| 6d 62 6f 6c 20 74 68 61 | 74 20 6d 61 74 63 68 65 |mbol tha|t matche|
|00002d50| 73 0a 58 09 09 09 09 20 | 20 20 74 68 65 20 65 6d |s.X.... | the em|
|00002d60| 70 74 79 20 73 74 72 69 | 6e 67 20 69 66 20 69 74 |pty stri|ng if it|
|00002d70| 20 69 73 20 61 74 20 74 | 68 65 20 62 65 67 69 6e | is at t|he begin|
|00002d80| 6e 69 6e 67 0a 58 09 09 | 09 09 20 20 20 6f 72 20 |ning.X..|.. or |
|00002d90| 74 68 65 20 65 6e 64 20 | 6f 66 20 61 20 77 6f 72 |the end |of a wor|
|00002da0| 64 2e 20 2a 2f 0a 58 0a | 58 20 20 5f 4e 4f 54 4c |d. */.X.|X _NOTL|
|00002db0| 49 4d 57 4f 52 44 2c 09 | 09 09 2f 2a 20 5f 4e 4f |IMWORD,.|../* _NO|
|00002dc0| 54 4c 49 4d 57 4f 52 44 | 20 69 73 20 61 20 74 65 |TLIMWORD| is a te|
|00002dd0| 72 6d 69 6e 61 6c 20 73 | 79 6d 62 6f 6c 20 74 68 |rminal s|ymbol th|
|00002de0| 61 74 0a 58 09 09 09 09 | 20 20 20 6d 61 74 63 68 |at.X....| match|
|00002df0| 65 73 20 74 68 65 20 65 | 6d 70 74 79 20 73 74 72 |es the e|mpty str|
|00002e00| 69 6e 67 20 69 66 20 69 | 74 20 69 73 20 6e 6f 74 |ing if i|t is not|
|00002e10| 20 61 74 0a 58 09 09 09 | 09 20 20 20 74 68 65 20 | at.X...|. the |
|00002e20| 62 65 67 69 6e 6e 69 6e | 67 20 6f 72 20 65 6e 64 |beginnin|g or end|
|00002e30| 20 6f 66 20 61 20 77 6f | 72 64 2e 20 2a 2f 0a 58 | of a wo|rd. */.X|
|00002e40| 0a 58 20 20 5f 51 4d 41 | 52 4b 2c 09 09 09 2f 2a |.X _QMA|RK,.../*|
|00002e50| 20 5f 51 4d 41 52 4b 20 | 69 73 20 61 6e 20 6f 70 | _QMARK |is an op|
|00002e60| 65 72 61 74 6f 72 20 6f | 66 20 6f 6e 65 20 61 72 |erator o|f one ar|
|00002e70| 67 75 6d 65 6e 74 20 74 | 68 61 74 0a 58 09 09 09 |gument t|hat.X...|
|00002e80| 09 20 20 20 6d 61 74 63 | 68 65 73 20 7a 65 72 6f |. matc|hes zero|
|00002e90| 20 6f 72 20 6f 6e 65 20 | 6f 63 63 75 72 65 6e 63 | or one |occurenc|
|00002ea0| 65 73 20 6f 66 20 69 74 | 73 0a 58 09 09 09 09 20 |es of it|s.X.... |
|00002eb0| 20 20 61 72 67 75 6d 65 | 6e 74 2e 20 2a 2f 0a 58 | argume|nt. */.X|
|00002ec0| 0a 58 20 20 5f 53 54 41 | 52 2c 09 09 09 2f 2a 20 |.X _STA|R,.../* |
|00002ed0| 5f 53 54 41 52 20 69 73 | 20 61 6e 20 6f 70 65 72 |_STAR is| an oper|
|00002ee0| 61 74 6f 72 20 6f 66 20 | 6f 6e 65 20 61 72 67 75 |ator of |one argu|
|00002ef0| 6d 65 6e 74 20 74 68 61 | 74 0a 58 09 09 09 09 20 |ment tha|t.X.... |
|00002f00| 20 20 6d 61 74 63 68 65 | 73 20 74 68 65 20 4b 6c | matche|s the Kl|
|00002f10| 65 65 6e 65 20 63 6c 6f | 73 75 72 65 20 28 7a 65 |eene clo|sure (ze|
|00002f20| 72 6f 20 6f 72 20 6d 6f | 72 65 0a 58 09 09 09 09 |ro or mo|re.X....|
|00002f30| 20 20 20 6f 63 63 75 72 | 72 65 6e 63 65 73 29 20 | occur|rences) |
|00002f40| 6f 66 20 69 74 73 20 61 | 72 67 75 6d 65 6e 74 2e |of its a|rgument.|
|00002f50| 20 2a 2f 0a 58 0a 58 20 | 20 5f 50 4c 55 53 2c 09 | */.X.X | _PLUS,.|
|00002f60| 09 09 2f 2a 20 5f 50 4c | 55 53 20 69 73 20 61 6e |../* _PL|US is an|
|00002f70| 20 6f 70 65 72 61 74 6f | 72 20 6f 66 20 6f 6e 65 | operato|r of one|
|00002f80| 20 61 72 67 75 6d 65 6e | 74 20 74 68 61 74 0a 58 | argumen|t that.X|
|00002f90| 09 09 09 09 20 20 20 6d | 61 74 63 68 65 73 20 74 |.... m|atches t|
|00002fa0| 68 65 20 70 6f 73 69 74 | 69 76 65 20 63 6c 6f 73 |he posit|ive clos|
|00002fb0| 75 72 65 20 28 6f 6e 65 | 20 6f 72 20 6d 6f 72 65 |ure (one| or more|
|00002fc0| 0a 58 09 09 09 09 20 20 | 20 6f 63 63 75 72 72 65 |.X.... | occurre|
|00002fd0| 6e 63 65 73 29 20 6f 66 | 20 69 74 73 20 61 72 67 |nces) of| its arg|
|00002fe0| 75 6d 65 6e 74 2e 20 2a | 2f 0a 58 0a 58 20 20 5f |ument. *|/.X.X _|
|00002ff0| 43 41 54 2c 09 09 09 09 | 2f 2a 20 5f 43 41 54 20 |CAT,....|/* _CAT |
|00003000| 69 73 20 61 6e 20 6f 70 | 65 72 61 74 6f 72 20 6f |is an op|erator o|
|00003010| 66 20 74 77 6f 20 61 72 | 67 75 6d 65 6e 74 73 20 |f two ar|guments |
|00003020| 74 68 61 74 0a 58 09 09 | 09 09 20 20 20 6d 61 74 |that.X..|.. mat|
|00003030| 63 68 65 73 20 74 68 65 | 20 63 6f 6e 63 61 74 65 |ches the| concate|
|00003040| 6e 61 74 69 6f 6e 20 6f | 66 20 69 74 73 0a 58 09 |nation o|f its.X.|
|00003050| 09 09 09 20 20 20 61 72 | 67 75 6d 65 6e 74 73 2e |... ar|guments.|
|00003060| 20 20 5f 43 41 54 20 69 | 73 20 6e 65 76 65 72 20 | _CAT i|s never |
|00003070| 72 65 74 75 72 6e 65 64 | 20 62 79 20 74 68 65 0a |returned| by the.|
|00003080| 58 09 09 09 09 20 20 20 | 6c 65 78 69 63 61 6c 20 |X.... |lexical |
|00003090| 61 6e 61 6c 79 7a 65 72 | 2e 20 2a 2f 0a 58 0a 58 |analyzer|. */.X.X|
|000030a0| 20 20 5f 4f 52 2c 09 09 | 09 09 2f 2a 20 5f 4f 52 | _OR,..|../* _OR|
|000030b0| 20 69 73 20 61 6e 20 6f | 70 65 72 61 74 6f 72 20 | is an o|perator |
|000030c0| 6f 66 20 74 77 6f 20 61 | 72 67 75 6d 65 6e 74 73 |of two a|rguments|
|000030d0| 20 74 68 61 74 0a 58 09 | 09 09 09 20 20 20 6d 61 | that.X.|... ma|
|000030e0| 74 63 68 65 73 20 65 69 | 74 68 65 72 20 6f 66 20 |tches ei|ther of |
|000030f0| 69 74 73 20 61 72 67 75 | 6d 65 6e 74 73 2e 20 2a |its argu|ments. *|
|00003100| 2f 0a 58 0a 58 20 20 5f | 4c 50 41 52 45 4e 2c 09 |/.X.X _|LPAREN,.|
|00003110| 09 09 2f 2a 20 5f 4c 50 | 41 52 45 4e 20 6e 65 76 |../* _LP|AREN nev|
|00003120| 65 72 20 61 70 70 65 61 | 72 73 20 69 6e 20 74 68 |er appea|rs in th|
|00003130| 65 20 70 61 72 73 65 20 | 74 72 65 65 2c 0a 58 09 |e parse |tree,.X.|
|00003140| 09 09 09 20 20 20 69 74 | 20 69 73 20 6f 6e 6c 79 |... it| is only|
|00003150| 20 61 20 6c 65 78 65 6d | 65 2e 20 2a 2f 0a 58 0a | a lexem|e. */.X.|
|00003160| 58 20 20 5f 52 50 41 52 | 45 4e 2c 09 09 09 2f 2a |X _RPAR|EN,.../*|
|00003170| 20 5f 52 50 41 52 45 4e | 20 6e 65 76 65 72 20 61 | _RPAREN| never a|
|00003180| 70 70 65 61 72 73 20 69 | 6e 20 74 68 65 20 70 61 |ppears i|n the pa|
|00003190| 72 73 65 20 74 72 65 65 | 2e 20 2a 2f 0a 58 0a 58 |rse tree|. */.X.X|
|000031a0| 20 20 5f 53 45 54 09 09 | 09 09 2f 2a 20 5f 53 45 | _SET..|../* _SE|
|000031b0| 54 20 61 6e 64 20 28 61 | 6e 64 20 61 6e 79 20 76 |T and (a|nd any v|
|000031c0| 61 6c 75 65 20 67 72 65 | 61 74 65 72 29 20 69 73 |alue gre|ater) is|
|000031d0| 20 61 0a 58 09 09 09 09 | 20 20 20 74 65 72 6d 69 | a.X....| termi|
|000031e0| 6e 61 6c 20 73 79 6d 62 | 6f 6c 20 74 68 61 74 20 |nal symb|ol that |
|000031f0| 6d 61 74 63 68 65 73 20 | 61 6e 79 20 6f 66 20 61 |matches |any of a|
|00003200| 0a 58 09 09 09 09 20 20 | 20 63 6c 61 73 73 20 6f |.X.... | class o|
|00003210| 66 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 2a 2f |f charac|ters. */|
|00003220| 0a 58 7d 20 5f 74 6f 6b | 65 6e 3b 0a 58 0a 58 23 |.X} _tok|en;.X.X#|
|00003230| 65 6c 73 65 20 2f 2a 20 | 21 20 5f 5f 53 54 44 43 |else /* |! __STDC|
|00003240| 5f 5f 20 2a 2f 0a 58 0a | 58 74 79 70 65 64 65 66 |__ */.X.|Xtypedef|
|00003250| 20 73 68 6f 72 74 20 5f | 74 6f 6b 65 6e 3b 0a 58 | short _|token;.X|
|00003260| 0a 58 23 64 65 66 69 6e | 65 20 5f 45 4e 44 20 2d |.X#defin|e _END -|
|00003270| 31 0a 58 23 64 65 66 69 | 6e 65 20 5f 45 4d 50 54 |1.X#defi|ne _EMPT|
|00003280| 59 20 5f 4e 4f 54 43 48 | 41 52 0a 58 23 64 65 66 |Y _NOTCH|AR.X#def|
|00003290| 69 6e 65 20 5f 42 41 43 | 4b 52 45 46 20 28 5f 45 |ine _BAC|KREF (_E|
|000032a0| 4d 50 54 59 20 2b 20 31 | 29 0a 58 23 64 65 66 69 |MPTY + 1|).X#defi|
|000032b0| 6e 65 20 5f 42 45 47 4c | 49 4e 45 20 28 5f 45 4d |ne _BEGL|INE (_EM|
|000032c0| 50 54 59 20 2b 20 32 29 | 0a 58 23 64 65 66 69 6e |PTY + 2)|.X#defin|
|000032d0| 65 20 5f 41 4c 4c 42 45 | 47 4c 49 4e 45 20 28 5f |e _ALLBE|GLINE (_|
|000032e0| 45 4d 50 54 59 20 2b 20 | 33 29 0a 58 23 64 65 66 |EMPTY + |3).X#def|
|000032f0| 69 6e 65 20 5f 45 4e 44 | 4c 49 4e 45 20 28 5f 45 |ine _END|LINE (_E|
|00003300| 4d 50 54 59 20 2b 20 34 | 29 0a 58 23 64 65 66 69 |MPTY + 4|).X#defi|
|00003310| 6e 65 20 5f 41 4c 4c 45 | 4e 44 4c 49 4e 45 20 28 |ne _ALLE|NDLINE (|
|00003320| 5f 45 4d 50 54 59 20 2b | 20 35 29 0a 58 23 64 65 |_EMPTY +| 5).X#de|
|00003330| 66 69 6e 65 20 5f 42 45 | 47 57 4f 52 44 20 28 5f |fine _BE|GWORD (_|
|00003340| 45 4d 50 54 59 20 2b 20 | 36 29 0a 58 23 64 65 66 |EMPTY + |6).X#def|
|00003350| 69 6e 65 20 5f 45 4e 44 | 57 4f 52 44 20 28 5f 45 |ine _END|WORD (_E|
|00003360| 4d 50 54 59 20 2b 20 37 | 29 0a 58 23 64 65 66 69 |MPTY + 7|).X#defi|
|00003370| 6e 65 20 5f 4c 49 4d 57 | 4f 52 44 20 28 5f 45 4d |ne _LIMW|ORD (_EM|
|00003380| 50 54 59 20 2b 20 38 29 | 0a 58 23 64 65 66 69 6e |PTY + 8)|.X#defin|
|00003390| 65 20 5f 4e 4f 54 4c 49 | 4d 57 4f 52 44 20 28 5f |e _NOTLI|MWORD (_|
|000033a0| 45 4d 50 54 59 20 2b 20 | 39 29 0a 58 23 64 65 66 |EMPTY + |9).X#def|
|000033b0| 69 6e 65 20 5f 51 4d 41 | 52 4b 20 28 5f 45 4d 50 |ine _QMA|RK (_EMP|
|000033c0| 54 59 20 2b 20 31 30 29 | 0a 58 23 64 65 66 69 6e |TY + 10)|.X#defin|
|000033d0| 65 20 5f 53 54 41 52 20 | 28 5f 45 4d 50 54 59 20 |e _STAR |(_EMPTY |
|000033e0| 2b 20 31 31 29 0a 58 23 | 64 65 66 69 6e 65 20 5f |+ 11).X#|define _|
|000033f0| 50 4c 55 53 20 28 5f 45 | 4d 50 54 59 20 2b 20 31 |PLUS (_E|MPTY + 1|
|00003400| 32 29 0a 58 23 64 65 66 | 69 6e 65 20 5f 43 41 54 |2).X#def|ine _CAT|
|00003410| 20 28 5f 45 4d 50 54 59 | 20 2b 20 31 33 29 0a 58 | (_EMPTY| + 13).X|
|00003420| 23 64 65 66 69 6e 65 20 | 5f 4f 52 20 28 5f 45 4d |#define |_OR (_EM|
|00003430| 50 54 59 20 2b 20 31 34 | 29 0a 58 23 64 65 66 69 |PTY + 14|).X#defi|
|00003440| 6e 65 20 5f 4c 50 41 52 | 45 4e 20 28 5f 45 4d 50 |ne _LPAR|EN (_EMP|
|00003450| 54 59 20 2b 20 31 35 29 | 0a 58 23 64 65 66 69 6e |TY + 15)|.X#defin|
|00003460| 65 20 5f 52 50 41 52 45 | 4e 20 28 5f 45 4d 50 54 |e _RPARE|N (_EMPT|
|00003470| 59 20 2b 20 31 36 29 0a | 58 23 64 65 66 69 6e 65 |Y + 16).|X#define|
|00003480| 20 5f 53 45 54 20 28 5f | 45 4d 50 54 59 20 2b 20 | _SET (_|EMPTY + |
|00003490| 31 37 29 0a 58 0a 58 23 | 65 6e 64 69 66 20 2f 2a |17).X.X#|endif /*|
|000034a0| 20 21 20 5f 5f 53 54 44 | 43 5f 5f 20 2a 2f 0a 58 | ! __STD|C__ */.X|
|000034b0| 0a 58 2f 2a 20 53 65 74 | 73 20 61 72 65 20 73 74 |.X/* Set|s are st|
|000034c0| 6f 72 65 64 20 69 6e 20 | 61 6e 20 61 72 72 61 79 |ored in |an array|
|000034d0| 20 69 6e 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 64 | in the |compiled|
|000034e0| 20 72 65 67 65 78 70 3b | 20 74 68 65 20 69 6e 64 | regexp;| the ind|
|000034f0| 65 78 20 6f 66 20 74 68 | 65 0a 58 20 20 20 61 72 |ex of th|e.X ar|
|00003500| 72 61 79 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |ray corr|espondin|
|00003510| 67 20 74 6f 20 61 20 67 | 69 76 65 6e 20 73 65 74 |g to a g|iven set|
|00003520| 20 74 6f 6b 65 6e 20 69 | 73 20 67 69 76 65 6e 20 | token i|s given |
|00003530| 62 79 20 5f 53 45 54 5f | 49 4e 44 45 58 28 74 29 |by _SET_|INDEX(t)|
|00003540| 2e 20 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 5f 53 |. */.X#d|efine _S|
|00003550| 45 54 5f 49 4e 44 45 58 | 28 74 29 20 28 28 74 29 |ET_INDEX|(t) ((t)|
|00003560| 20 2d 20 5f 53 45 54 29 | 0a 58 0a 58 2f 2a 20 53 | - _SET)|.X.X/* S|
|00003570| 6f 6d 65 74 69 6d 65 73 | 20 63 68 61 72 61 63 74 |ometimes| charact|
|00003580| 65 72 73 20 63 61 6e 20 | 6f 6e 6c 79 20 62 65 20 |ers can |only be |
|00003590| 6d 61 74 63 68 65 64 20 | 64 65 70 65 6e 64 69 6e |matched |dependin|
|000035a0| 67 20 6f 6e 20 74 68 65 | 20 73 75 72 72 6f 75 6e |g on the| surroun|
|000035b0| 64 69 6e 67 0a 58 20 20 | 20 63 6f 6e 74 65 78 74 |ding.X | context|
|000035c0| 2e 20 20 53 75 63 68 20 | 63 6f 6e 74 65 78 74 20 |. Such |context |
|000035d0| 64 65 63 69 73 69 6f 6e | 73 20 64 65 70 65 6e 64 |decision|s depend|
|000035e0| 20 6f 6e 20 77 68 61 74 | 20 74 68 65 20 70 72 65 | on what| the pre|
|000035f0| 76 69 6f 75 73 20 63 68 | 61 72 61 63 74 65 72 0a |vious ch|aracter.|
|00003600| 58 20 20 20 77 61 73 2c | 20 61 6e 64 20 74 68 65 |X was,| and the|
|00003610| 20 76 61 6c 75 65 20 6f | 66 20 74 68 65 20 63 75 | value o|f the cu|
|00003620| 72 72 65 6e 74 20 28 6c | 6f 6f 6b 61 68 65 61 64 |rrent (l|ookahead|
|00003630| 29 20 63 68 61 72 61 63 | 74 65 72 2e 20 20 43 6f |) charac|ter. Co|
|00003640| 6e 74 65 78 74 0a 58 20 | 20 20 64 65 70 65 6e 64 |ntext.X | depend|
|00003650| 65 6e 74 20 63 6f 6e 73 | 74 72 61 69 6e 74 73 20 |ent cons|traints |
|00003660| 61 72 65 20 65 6e 63 6f | 64 65 64 20 61 73 20 38 |are enco|ded as 8|
|00003670| 20 62 69 74 20 69 6e 74 | 65 67 65 72 73 2e 20 20 | bit int|egers. |
|00003680| 45 61 63 68 20 62 69 74 | 20 74 68 61 74 0a 58 20 |Each bit| that.X |
|00003690| 20 20 69 73 20 73 65 74 | 20 69 6e 64 69 63 61 74 | is set| indicat|
|000036a0| 65 73 20 74 68 61 74 20 | 74 68 65 20 63 6f 6e 73 |es that |the cons|
|000036b0| 74 72 61 69 6e 74 20 73 | 75 63 63 65 65 64 73 20 |traint s|ucceeds |
|000036c0| 69 6e 20 74 68 65 20 63 | 6f 72 72 65 73 70 6f 6e |in the c|orrespon|
|000036d0| 64 69 6e 67 0a 58 20 20 | 20 63 6f 6e 74 65 78 74 |ding.X | context|
|000036e0| 2e 0a 58 0a 58 20 20 20 | 62 69 74 20 37 20 2d 20 |..X.X |bit 7 - |
|000036f0| 70 72 65 76 69 6f 75 73 | 20 61 6e 64 20 63 75 72 |previous| and cur|
|00003700| 72 65 6e 74 20 61 72 65 | 20 6e 65 77 6c 69 6e 65 |rent are| newline|
|00003710| 73 0a 58 20 20 20 62 69 | 74 20 36 20 2d 20 70 72 |s.X bi|t 6 - pr|
|00003720| 65 76 69 6f 75 73 20 77 | 61 73 20 6e 65 77 6c 69 |evious w|as newli|
|00003730| 6e 65 2c 20 63 75 72 72 | 65 6e 74 20 69 73 6e 27 |ne, curr|ent isn'|
|00003740| 74 0a 58 20 20 20 62 69 | 74 20 35 20 2d 20 70 72 |t.X bi|t 5 - pr|
|00003750| 65 76 69 6f 75 73 20 77 | 61 73 6e 27 74 20 6e 65 |evious w|asn't ne|
|00003760| 77 6c 69 6e 65 2c 20 63 | 75 72 72 65 6e 74 20 69 |wline, c|urrent i|
|00003770| 73 0a 58 20 20 20 62 69 | 74 20 34 20 2d 20 6e 65 |s.X bi|t 4 - ne|
|00003780| 69 74 68 65 72 20 70 72 | 65 76 69 6f 75 73 20 6e |ither pr|evious n|
|00003790| 6f 72 20 63 75 72 72 65 | 6e 74 20 69 73 20 61 20 |or curre|nt is a |
|000037a0| 6e 65 77 6c 69 6e 65 0a | 58 20 20 20 62 69 74 20 |newline.|X bit |
|000037b0| 33 20 2d 20 70 72 65 76 | 69 6f 75 73 20 61 6e 64 |3 - prev|ious and|
|000037c0| 20 63 75 72 72 65 6e 74 | 20 61 72 65 20 77 6f 72 | current| are wor|
|000037d0| 64 2d 63 6f 6e 73 74 69 | 74 75 65 6e 74 73 0a 58 |d-consti|tuents.X|
|000037e0| 20 20 20 62 69 74 20 32 | 20 2d 20 70 72 65 76 69 | bit 2| - previ|
|000037f0| 6f 75 73 20 77 61 73 20 | 77 6f 72 64 2d 63 6f 6e |ous was |word-con|
|00003800| 73 74 69 74 75 65 6e 74 | 2c 20 63 75 72 72 65 6e |stituent|, curren|
|00003810| 74 20 69 73 6e 27 74 0a | 58 20 20 20 62 69 74 20 |t isn't.|X bit |
|00003820| 31 20 2d 20 70 72 65 76 | 69 6f 75 73 20 77 61 73 |1 - prev|ious was|
|00003830| 6e 27 74 20 77 6f 72 64 | 2d 63 6f 6e 73 74 69 74 |n't word|-constit|
|00003840| 75 65 6e 74 2c 20 63 75 | 72 72 65 6e 74 20 69 73 |uent, cu|rrent is|
|00003850| 0a 58 20 20 20 62 69 74 | 20 30 20 2d 20 6e 65 69 |.X bit| 0 - nei|
|00003860| 74 68 65 72 20 70 72 65 | 76 69 6f 75 73 20 6e 6f |ther pre|vious no|
|00003870| 72 20 63 75 72 72 65 6e | 74 20 69 73 20 77 6f 72 |r curren|t is wor|
|00003880| 64 2d 63 6f 6e 73 74 69 | 74 75 65 6e 74 0a 58 0a |d-consti|tuent.X.|
|00003890| 58 20 20 20 57 6f 72 64 | 2d 63 6f 6e 73 74 69 74 |X Word|-constit|
|000038a0| 75 65 6e 74 20 63 68 61 | 72 61 63 74 65 72 73 20 |uent cha|racters |
|000038b0| 61 72 65 20 74 68 6f 73 | 65 20 74 68 61 74 20 73 |are thos|e that s|
|000038c0| 61 74 69 73 66 79 20 69 | 73 61 6c 6e 75 6d 28 29 |atisfy i|salnum()|
|000038d0| 2e 0a 58 0a 58 20 20 20 | 54 68 65 20 6d 61 63 72 |..X.X |The macr|
|000038e0| 6f 20 5f 53 55 43 43 45 | 45 44 53 5f 49 4e 5f 43 |o _SUCCE|EDS_IN_C|
|000038f0| 4f 4e 54 45 58 54 20 64 | 65 74 65 72 6d 69 6e 65 |ONTEXT d|etermine|
|00003900| 73 20 77 68 65 74 68 65 | 72 20 61 20 61 20 67 69 |s whethe|r a a gi|
|00003910| 76 65 6e 20 63 6f 6e 73 | 74 72 61 69 6e 74 0a 58 |ven cons|traint.X|
|00003920| 20 20 20 73 75 63 63 65 | 65 64 73 20 69 6e 20 61 | succe|eds in a|
|00003930| 20 70 61 72 74 69 63 75 | 6c 61 72 20 63 6f 6e 74 | particu|lar cont|
|00003940| 65 78 74 2e 20 20 50 72 | 65 76 6e 20 69 73 20 74 |ext. Pr|evn is t|
|00003950| 72 75 65 20 69 66 20 74 | 68 65 20 70 72 65 76 69 |rue if t|he previ|
|00003960| 6f 75 73 20 63 68 61 72 | 61 63 74 65 72 0a 58 20 |ous char|acter.X |
|00003970| 20 20 77 61 73 20 61 20 | 6e 65 77 6c 69 6e 65 2c | was a |newline,|
|00003980| 20 63 75 72 72 6e 20 69 | 73 20 74 72 75 65 20 69 | currn i|s true i|
|00003990| 66 20 74 68 65 20 6c 6f | 6f 6b 61 68 65 61 64 20 |f the lo|okahead |
|000039a0| 63 68 61 72 61 63 74 65 | 72 20 69 73 20 61 20 6e |characte|r is a n|
|000039b0| 65 77 6c 69 6e 65 2e 0a | 58 20 20 20 50 72 65 76 |ewline..|X Prev|
|000039c0| 6c 20 61 6e 64 20 63 75 | 72 72 6c 20 73 69 6d 69 |l and cu|rrl simi|
|000039d0| 6c 61 72 6c 79 20 64 65 | 70 65 6e 64 20 75 70 6f |larly de|pend upo|
|000039e0| 6e 20 77 68 65 74 68 65 | 72 20 74 68 65 20 70 72 |n whethe|r the pr|
|000039f0| 65 76 69 6f 75 73 20 61 | 6e 64 20 63 75 72 72 65 |evious a|nd curre|
|00003a00| 6e 74 0a 58 20 20 20 63 | 68 61 72 61 63 74 65 72 |nt.X c|haracter|
|00003a10| 73 20 61 72 65 20 77 6f | 72 64 2d 63 6f 6e 73 74 |s are wo|rd-const|
|00003a20| 69 74 75 65 6e 74 20 6c | 65 74 74 65 72 73 2e 20 |ituent l|etters. |
|00003a30| 2a 2f 0a 58 23 64 65 66 | 69 6e 65 20 5f 4d 41 54 |*/.X#def|ine _MAT|
|00003a40| 43 48 45 53 5f 4e 45 57 | 4c 49 4e 45 5f 43 4f 4e |CHES_NEW|LINE_CON|
|00003a50| 54 45 58 54 28 63 6f 6e | 73 74 72 61 69 6e 74 2c |TEXT(con|straint,|
|00003a60| 20 70 72 65 76 6e 2c 20 | 63 75 72 72 6e 29 20 5c | prevn, |currn) \|
|00003a70| 0a 58 20 20 28 28 63 6f | 6e 73 74 72 61 69 6e 74 |.X ((co|nstraint|
|00003a80| 29 20 26 20 31 20 3c 3c | 20 28 28 70 72 65 76 6e |) & 1 <<| ((prevn|
|00003a90| 29 20 3f 20 32 20 3a 20 | 30 29 20 2b 20 28 28 63 |) ? 2 : |0) + ((c|
|00003aa0| 75 72 72 6e 29 20 3f 20 | 31 20 3a 20 30 29 20 2b |urrn) ? |1 : 0) +|
|00003ab0| 20 34 29 0a 58 23 64 65 | 66 69 6e 65 20 5f 4d 41 | 4).X#de|fine _MA|
|00003ac0| 54 43 48 45 53 5f 4c 45 | 54 54 45 52 5f 43 4f 4e |TCHES_LE|TTER_CON|
|00003ad0| 54 45 58 54 28 63 6f 6e | 73 74 72 61 69 6e 74 2c |TEXT(con|straint,|
|00003ae0| 20 70 72 65 76 6c 2c 20 | 63 75 72 72 6c 29 20 5c | prevl, |currl) \|
|00003af0| 0a 58 20 20 28 28 63 6f | 6e 73 74 72 61 69 6e 74 |.X ((co|nstraint|
|00003b00| 29 20 26 20 31 20 3c 3c | 20 28 28 70 72 65 76 6c |) & 1 <<| ((prevl|
|00003b10| 29 20 3f 20 32 20 3a 20 | 30 29 20 2b 20 28 28 63 |) ? 2 : |0) + ((c|
|00003b20| 75 72 72 6c 29 20 3f 20 | 31 20 3a 20 30 29 29 0a |urrl) ? |1 : 0)).|
|00003b30| 58 23 64 65 66 69 6e 65 | 20 5f 53 55 43 43 45 45 |X#define| _SUCCEE|
|00003b40| 44 53 5f 49 4e 5f 43 4f | 4e 54 45 58 54 28 63 6f |DS_IN_CO|NTEXT(co|
|00003b50| 6e 73 74 72 61 69 6e 74 | 2c 20 70 72 65 76 6e 2c |nstraint|, prevn,|
|00003b60| 20 63 75 72 72 6e 2c 20 | 70 72 65 76 6c 2c 20 63 | currn, |prevl, c|
|00003b70| 75 72 72 6c 29 20 5c 0a | 58 20 20 28 5f 4d 41 54 |urrl) \.|X (_MAT|
|00003b80| 43 48 45 53 5f 4e 45 57 | 4c 49 4e 45 5f 43 4f 4e |CHES_NEW|LINE_CON|
|00003b90| 54 45 58 54 28 63 6f 6e | 73 74 72 61 69 6e 74 2c |TEXT(con|straint,|
|00003ba0| 20 70 72 65 76 6e 2c 20 | 63 75 72 72 6e 29 09 09 | prevn, |currn)..|
|00003bb0| 20 20 20 20 20 5c 0a 58 | 20 20 20 26 26 20 5f 4d | \.X| && _M|
|00003bc0| 41 54 43 48 45 53 5f 4c | 45 54 54 45 52 5f 43 4f |ATCHES_L|ETTER_CO|
|00003bd0| 4e 54 45 58 54 28 63 6f | 6e 73 74 72 61 69 6e 74 |NTEXT(co|nstraint|
|00003be0| 2c 20 70 72 65 76 6c 2c | 20 63 75 72 72 6c 29 29 |, prevl,| currl))|
|00003bf0| 0a 58 0a 58 2f 2a 20 54 | 68 65 20 66 6f 6c 6c 6f |.X.X/* T|he follo|
|00003c00| 77 69 6e 67 20 6d 61 63 | 72 6f 73 20 67 69 76 65 |wing mac|ros give|
|00003c10| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 61 62 6f | informa|tion abo|
|00003c20| 75 74 20 77 68 61 74 20 | 61 20 63 6f 6e 73 74 72 |ut what |a constr|
|00003c30| 61 69 6e 74 20 64 65 70 | 65 6e 64 73 20 6f 6e 2e |aint dep|ends on.|
|00003c40| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 5f 50 52 | */.X#de|fine _PR|
|00003c50| 45 56 5f 4e 45 57 4c 49 | 4e 45 5f 44 45 50 45 4e |EV_NEWLI|NE_DEPEN|
|00003c60| 44 45 4e 54 28 63 6f 6e | 73 74 72 61 69 6e 74 29 |DENT(con|straint)|
|00003c70| 20 5c 0a 58 20 20 28 28 | 28 63 6f 6e 73 74 72 61 | \.X ((|(constra|
|00003c80| 69 6e 74 29 20 26 20 30 | 78 63 30 29 20 3e 3e 20 |int) & 0|xc0) >> |
|00003c90| 32 20 21 3d 20 28 28 63 | 6f 6e 73 74 72 61 69 6e |2 != ((c|onstrain|
|00003ca0| 74 29 20 26 20 30 78 33 | 30 29 29 0a 58 23 64 65 |t) & 0x3|0)).X#de|
|00003cb0| 66 69 6e 65 20 5f 50 52 | 45 56 5f 4c 45 54 54 45 |fine _PR|EV_LETTE|
|00003cc0| 52 5f 44 45 50 45 4e 44 | 45 4e 54 28 63 6f 6e 73 |R_DEPEND|ENT(cons|
|00003cd0| 74 72 61 69 6e 74 29 20 | 5c 0a 58 20 20 28 28 28 |traint) |\.X (((|
|00003ce0| 63 6f 6e 73 74 72 61 69 | 6e 74 29 20 26 20 30 78 |constrai|nt) & 0x|
|00003cf0| 30 63 29 20 3e 3e 20 32 | 20 21 3d 20 28 28 63 6f |0c) >> 2| != ((co|
|00003d00| 6e 73 74 72 61 69 6e 74 | 29 20 26 20 30 78 30 33 |nstraint|) & 0x03|
|00003d10| 29 29 0a 58 0a 58 2f 2a | 20 54 6f 6b 65 6e 73 20 |)).X.X/*| Tokens |
|00003d20| 74 68 61 74 20 6d 61 74 | 63 68 20 74 68 65 20 65 |that mat|ch the e|
|00003d30| 6d 70 74 79 20 73 74 72 | 69 6e 67 20 73 75 62 6a |mpty str|ing subj|
|00003d40| 65 63 74 20 74 6f 20 73 | 6f 6d 65 20 63 6f 6e 73 |ect to s|ome cons|
|00003d50| 74 72 61 69 6e 74 20 61 | 63 74 75 61 6c 6c 79 0a |traint a|ctually.|
|00003d60| 58 20 20 20 77 6f 72 6b | 20 62 79 20 61 70 70 6c |X work| by appl|
|00003d70| 79 69 6e 67 20 74 68 61 | 74 20 63 6f 6e 73 74 72 |ying tha|t constr|
|00003d80| 61 69 6e 74 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |aint to |determin|
|00003d90| 65 20 77 68 61 74 20 6d | 61 79 20 66 6f 6c 6c 6f |e what m|ay follo|
|00003da0| 77 20 74 68 65 6d 2c 0a | 58 20 20 20 74 61 6b 69 |w them,.|X taki|
|00003db0| 6e 67 20 69 6e 74 6f 20 | 61 63 63 6f 75 6e 74 20 |ng into |account |
|00003dc0| 77 68 61 74 20 68 61 73 | 20 67 6f 6e 65 20 62 65 |what has| gone be|
|00003dd0| 66 6f 72 65 2e 20 20 54 | 68 65 20 66 6f 6c 6c 6f |fore. T|he follo|
|00003de0| 77 69 6e 67 20 76 61 6c | 75 65 73 20 61 72 65 0a |wing val|ues are.|
|00003df0| 58 20 20 20 74 68 65 20 | 63 6f 6e 73 74 72 61 69 |X the |constrai|
|00003e00| 6e 74 73 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |nts corr|espondin|
|00003e10| 67 20 74 6f 20 74 68 65 | 20 73 70 65 63 69 61 6c |g to the| special|
|00003e20| 20 74 6f 6b 65 6e 73 20 | 70 72 65 76 69 6f 75 73 | tokens |previous|
|00003e30| 6c 79 20 64 65 66 69 6e | 65 64 2e 20 2a 2f 0a 58 |ly defin|ed. */.X|
|00003e40| 23 64 65 66 69 6e 65 20 | 5f 4e 4f 5f 43 4f 4e 53 |#define |_NO_CONS|
|00003e50| 54 52 41 49 4e 54 20 30 | 78 66 66 0a 58 23 64 65 |TRAINT 0|xff.X#de|
|00003e60| 66 69 6e 65 20 5f 42 45 | 47 4c 49 4e 45 5f 43 4f |fine _BE|GLINE_CO|
|00003e70| 4e 53 54 52 41 49 4e 54 | 20 30 78 63 66 0a 58 23 |NSTRAINT| 0xcf.X#|
|00003e80| 64 65 66 69 6e 65 20 5f | 45 4e 44 4c 49 4e 45 5f |define _|ENDLINE_|
|00003e90| 43 4f 4e 53 54 52 41 49 | 4e 54 20 30 78 61 66 0a |CONSTRAI|NT 0xaf.|
|00003ea0| 58 23 64 65 66 69 6e 65 | 20 5f 42 45 47 57 4f 52 |X#define| _BEGWOR|
|00003eb0| 44 5f 43 4f 4e 53 54 52 | 41 49 4e 54 20 30 78 66 |D_CONSTR|AINT 0xf|
|00003ec0| 32 0a 58 23 64 65 66 69 | 6e 65 20 5f 45 4e 44 57 |2.X#defi|ne _ENDW|
|00003ed0| 4f 52 44 5f 43 4f 4e 53 | 54 52 41 49 4e 54 20 30 |ORD_CONS|TRAINT 0|
|00003ee0| 78 66 34 0a 58 23 64 65 | 66 69 6e 65 20 5f 4c 49 |xf4.X#de|fine _LI|
|00003ef0| 4d 57 4f 52 44 5f 43 4f | 4e 53 54 52 41 49 4e 54 |MWORD_CO|NSTRAINT|
|00003f00| 20 30 78 66 36 0a 58 23 | 64 65 66 69 6e 65 20 5f | 0xf6.X#|define _|
|00003f10| 4e 4f 54 4c 49 4d 57 4f | 52 44 5f 43 4f 4e 53 54 |NOTLIMWO|RD_CONST|
|00003f20| 52 41 49 4e 54 20 30 78 | 66 39 0a 58 0a 58 2f 2a |RAINT 0x|f9.X.X/*|
|00003f30| 20 53 74 61 74 65 73 20 | 6f 66 20 74 68 65 20 72 | States |of the r|
|00003f40| 65 63 6f 67 6e 69 7a 65 | 72 20 63 6f 72 72 65 73 |ecognize|r corres|
|00003f50| 70 6f 6e 64 20 74 6f 20 | 73 65 74 73 20 6f 66 20 |pond to |sets of |
|00003f60| 70 6f 73 69 74 69 6f 6e | 73 20 69 6e 20 74 68 65 |position|s in the|
|00003f70| 20 70 61 72 73 65 0a 58 | 20 20 20 74 72 65 65 2c | parse.X| tree,|
|00003f80| 20 74 6f 67 65 74 68 65 | 72 20 77 69 74 68 20 74 | togethe|r with t|
|00003f90| 68 65 20 63 6f 6e 73 74 | 72 61 69 6e 74 73 20 75 |he const|raints u|
|00003fa0| 6e 64 65 72 20 77 68 69 | 63 68 20 74 68 65 79 20 |nder whi|ch they |
|00003fb0| 6d 61 79 20 62 65 20 6d | 61 74 63 68 65 64 2e 0a |may be m|atched..|
|00003fc0| 58 20 20 20 53 6f 20 61 | 20 70 6f 73 69 74 69 6f |X So a| positio|
|00003fd0| 6e 20 69 73 20 65 6e 63 | 6f 64 65 64 20 61 73 20 |n is enc|oded as |
|00003fe0| 61 6e 20 69 6e 64 65 78 | 20 69 6e 74 6f 20 74 68 |an index| into th|
|00003ff0| 65 20 70 61 72 73 65 20 | 74 72 65 65 20 74 6f 67 |e parse |tree tog|
|00004000| 65 74 68 65 72 20 77 69 | 74 68 0a 58 20 20 20 61 |ether wi|th.X a|
|00004010| 20 63 6f 6e 73 74 72 61 | 69 6e 74 2e 20 2a 2f 0a | constra|int. */.|
|00004020| 58 74 79 70 65 64 65 66 | 20 73 74 72 75 63 74 0a |Xtypedef| struct.|
|00004030| 58 7b 0a 58 20 20 75 6e | 73 69 67 6e 65 64 20 69 |X{.X un|signed i|
|00004040| 6e 64 65 78 3a 32 34 2c | 09 09 2f 2a 20 49 6e 64 |ndex:24,|../* Ind|
|00004050| 65 78 20 69 6e 74 6f 20 | 74 68 65 20 70 61 72 73 |ex into |the pars|
|00004060| 65 20 61 72 72 61 79 2e | 20 2a 2f 0a 58 09 20 20 |e array.| */.X. |
|00004070| 20 63 6f 6e 73 74 72 61 | 69 6e 74 3a 38 3b 09 2f | constra|int:8;./|
|00004080| 2a 20 43 6f 6e 73 74 72 | 61 69 6e 74 20 66 6f 72 |* Constr|aint for|
|00004090| 20 6d 61 74 63 68 69 6e | 67 20 74 68 69 73 20 70 | matchin|g this p|
|000040a0| 6f 73 69 74 69 6f 6e 2e | 20 2a 2f 0a 58 7d 20 5f |osition.| */.X} _|
|000040b0| 70 6f 73 69 74 69 6f 6e | 3b 0a 58 0a 58 2f 2a 20 |position|;.X.X/* |
|000040c0| 53 65 74 73 20 6f 66 20 | 70 6f 73 69 74 69 6f 6e |Sets of |position|
|000040d0| 73 20 61 72 65 20 73 74 | 6f 72 65 64 20 61 73 20 |s are st|ored as |
|000040e0| 61 72 72 61 79 73 2e 20 | 2a 2f 0a 58 74 79 70 65 |arrays. |*/.Xtype|
|000040f0| 64 65 66 20 73 74 72 75 | 63 74 0a 58 7b 0a 58 20 |def stru|ct.X{.X |
|00004100| 20 5f 70 6f 73 69 74 69 | 6f 6e 20 2a 65 6c 65 6d | _positi|on *elem|
|00004110| 73 3b 09 09 2f 2a 20 45 | 6c 65 6d 65 6e 74 73 20 |s;../* E|lements |
|00004120| 6f 66 20 74 68 69 73 20 | 70 6f 73 69 74 69 6f 6e |of this |position|
|00004130| 20 73 65 74 2e 20 2a 2f | 0a 58 20 20 69 6e 74 20 | set. */|.X int |
|00004140| 6e 65 6c 65 6d 3b 09 09 | 09 2f 2a 20 4e 75 6d 62 |nelem;..|./* Numb|
|00004150| 65 72 20 6f 66 20 65 6c | 65 6d 65 6e 74 73 20 69 |er of el|ements i|
|00004160| 6e 20 74 68 69 73 20 73 | 65 74 2e 20 2a 2f 0a 58 |n this s|et. */.X|
|00004170| 7d 20 5f 70 6f 73 69 74 | 69 6f 6e 5f 73 65 74 3b |} _posit|ion_set;|
|00004180| 0a 58 0a 58 2f 2a 20 41 | 20 73 74 61 74 65 20 6f |.X.X/* A| state o|
|00004190| 66 20 74 68 65 20 72 65 | 67 65 78 70 20 63 6f 6e |f the re|gexp con|
|000041a0| 73 69 73 74 73 20 6f 66 | 20 61 20 73 65 74 20 6f |sists of| a set o|
|000041b0| 66 20 70 6f 73 69 74 69 | 6f 6e 73 2c 20 73 6f 6d |f positi|ons, som|
|000041c0| 65 20 66 6c 61 67 73 2c | 0a 58 20 20 20 61 6e 64 |e flags,|.X and|
|000041d0| 20 74 68 65 20 74 6f 6b | 65 6e 20 76 61 6c 75 65 | the tok|en value|
|000041e0| 20 6f 66 20 74 68 65 20 | 6c 6f 77 65 73 74 2d 6e | of the |lowest-n|
|000041f0| 75 6d 62 65 72 65 64 20 | 70 6f 73 69 74 69 6f 6e |umbered |position|
|00004200| 20 6f 66 20 74 68 65 20 | 73 74 61 74 65 20 74 68 | of the |state th|
|00004210| 61 74 0a 58 20 20 20 63 | 6f 6e 74 61 69 6e 73 20 |at.X c|ontains |
|00004220| 61 6e 20 5f 45 4e 44 20 | 74 6f 6b 65 6e 2e 20 2a |an _END |token. *|
|00004230| 2f 0a 58 74 79 70 65 64 | 65 66 20 73 74 72 75 63 |/.Xtyped|ef struc|
|00004240| 74 0a 58 7b 0a 58 20 20 | 69 6e 74 20 68 61 73 68 |t.X{.X |int hash|
|00004250| 3b 09 09 09 2f 2a 20 48 | 61 73 68 20 6f 66 20 74 |;.../* H|ash of t|
|00004260| 68 65 20 70 6f 73 69 74 | 69 6f 6e 73 20 6f 66 20 |he posit|ions of |
|00004270| 74 68 69 73 20 73 74 61 | 74 65 2e 20 2a 2f 0a 58 |this sta|te. */.X|
|00004280| 20 20 5f 70 6f 73 69 74 | 69 6f 6e 5f 73 65 74 20 | _posit|ion_set |
|00004290| 65 6c 65 6d 73 3b 09 09 | 2f 2a 20 50 6f 73 69 74 |elems;..|/* Posit|
|000042a0| 69 6f 6e 73 20 74 68 69 | 73 20 73 74 61 74 65 20 |ions thi|s state |
|000042b0| 63 6f 75 6c 64 20 6d 61 | 74 63 68 2e 20 2a 2f 0a |could ma|tch. */.|
|000042c0| 58 20 20 75 6e 73 69 67 | 6e 65 64 20 6e 65 77 6c |X unsig|ned newl|
|000042d0| 69 6e 65 3a 31 2c 09 09 | 2f 2a 20 54 72 75 65 20 |ine:1,..|/* True |
|000042e0| 69 66 20 70 72 65 76 69 | 6f 75 73 20 73 74 61 74 |if previ|ous stat|
|000042f0| 65 20 6d 61 74 63 68 65 | 64 20 6e 65 77 6c 69 6e |e matche|d newlin|
|00004300| 65 2e 20 2a 2f 0a 58 09 | 20 20 20 6c 65 74 74 65 |e. */.X.| lette|
|00004310| 72 3a 31 2c 09 09 2f 2a | 20 54 72 75 65 20 69 66 |r:1,../*| True if|
|00004320| 20 70 72 65 76 69 6f 75 | 73 20 73 74 61 74 65 20 | previou|s state |
|00004330| 6d 61 74 63 68 65 64 20 | 61 20 6c 65 74 74 65 72 |matched |a letter|
|00004340| 2e 20 2a 2f 0a 58 09 20 | 20 20 62 61 63 6b 72 65 |. */.X. | backre|
|00004350| 66 3a 31 2c 09 09 2f 2a | 20 54 72 75 65 20 69 66 |f:1,../*| True if|
|00004360| 20 74 68 69 73 20 73 74 | 61 74 65 20 6d 61 74 63 | this st|ate matc|
|00004370| 68 65 73 20 61 20 5c 3c | 64 69 67 69 74 3e 2e 20 |hes a \<|digit>. |
|00004380| 2a 2f 0a 58 09 20 20 20 | 63 6f 6e 73 74 72 61 69 |*/.X. |constrai|
|00004390| 6e 74 3a 38 3b 09 2f 2a | 20 43 6f 6e 73 74 72 61 |nt:8;./*| Constra|
|000043a0| 69 6e 74 20 66 6f 72 20 | 74 68 69 73 20 73 74 61 |int for |this sta|
|000043b0| 74 65 20 74 6f 20 61 63 | 63 65 70 74 2e 20 2a 2f |te to ac|cept. */|
|000043c0| 0a 58 20 20 69 6e 74 20 | 66 69 72 73 74 5f 65 6e |.X int |first_en|
|000043d0| 64 3b 09 09 2f 2a 20 54 | 6f 6b 65 6e 20 76 61 6c |d;../* T|oken val|
|000043e0| 75 65 20 6f 66 20 74 68 | 65 20 66 69 72 73 74 20 |ue of th|e first |
|000043f0| 5f 45 4e 44 20 69 6e 20 | 65 6c 65 6d 73 2e 20 2a |_END in |elems. *|
|00004400| 2f 0a 58 7d 20 5f 64 66 | 61 5f 73 74 61 74 65 3b |/.X} _df|a_state;|
|00004410| 0a 58 0a 58 2f 2a 20 49 | 66 20 61 6e 20 72 2e 65 |.X.X/* I|f an r.e|
|00004420| 2e 20 69 73 20 61 74 20 | 6d 6f 73 74 20 4d 55 53 |. is at |most MUS|
|00004430| 54 5f 4d 41 58 20 63 68 | 61 72 61 63 74 65 72 73 |T_MAX ch|aracters|
|00004440| 20 6c 6f 6e 67 2c 20 77 | 65 20 6c 6f 6f 6b 20 66 | long, w|e look f|
|00004450| 6f 72 20 61 20 73 74 72 | 69 6e 67 20 77 68 69 63 |or a str|ing whic|
|00004460| 68 0a 58 20 20 20 6d 75 | 73 74 20 61 70 70 65 61 |h.X mu|st appea|
|00004470| 72 20 69 6e 20 69 74 3b | 20 77 68 61 74 65 76 65 |r in it;| whateve|
|00004480| 72 27 73 20 66 6f 75 6e | 64 20 69 73 20 64 72 6f |r's foun|d is dro|
|00004490| 70 70 65 64 20 69 6e 74 | 6f 20 74 68 65 20 73 74 |pped int|o the st|
|000044a0| 72 75 63 74 20 72 65 67 | 2e 20 2a 2f 0a 58 0a 58 |ruct reg|. */.X.X|
|000044b0| 23 64 65 66 69 6e 65 20 | 4d 55 53 54 5f 4d 41 58 |#define |MUST_MAX|
|000044c0| 09 35 30 0a 58 0a 58 2f | 2a 20 41 20 63 6f 6d 70 |.50.X.X/|* A comp|
|000044d0| 69 6c 65 64 20 72 65 67 | 75 6c 61 72 20 65 78 70 |iled reg|ular exp|
|000044e0| 72 65 73 73 69 6f 6e 2e | 20 2a 2f 0a 58 73 74 72 |ression.| */.Xstr|
|000044f0| 75 63 74 20 72 65 67 65 | 78 70 0a 58 7b 0a 58 20 |uct rege|xp.X{.X |
|00004500| 20 2f 2a 20 53 74 75 66 | 66 20 62 75 69 6c 74 20 | /* Stuf|f built |
|00004510| 62 79 20 74 68 65 20 73 | 63 61 6e 6e 65 72 2e 20 |by the s|canner. |
|00004520| 2a 2f 0a 58 20 20 5f 63 | 68 61 72 73 65 74 20 2a |*/.X _c|harset *|
|00004530| 63 68 61 72 73 65 74 73 | 3b 09 09 2f 2a 20 41 72 |charsets|;../* Ar|
|00004540| 72 61 79 20 6f 66 20 63 | 68 61 72 61 63 74 65 72 |ray of c|haracter|
|00004550| 20 73 65 74 73 20 66 6f | 72 20 5f 53 45 54 20 74 | sets fo|r _SET t|
|00004560| 6f 6b 65 6e 73 2e 20 2a | 2f 0a 58 20 20 69 6e 74 |okens. *|/.X int|
|00004570| 20 63 69 6e 64 65 78 3b | 09 09 09 2f 2a 20 49 6e | cindex;|.../* In|
|00004580| 64 65 78 20 66 6f 72 20 | 61 64 64 69 6e 67 20 6e |dex for |adding n|
|00004590| 65 77 20 63 68 61 72 73 | 65 74 73 2e 20 2a 2f 0a |ew chars|ets. */.|
|000045a0| 58 20 20 69 6e 74 20 63 | 61 6c 6c 6f 63 3b 09 09 |X int c|alloc;..|
|000045b0| 09 2f 2a 20 4e 75 6d 62 | 65 72 20 6f 66 20 63 68 |./* Numb|er of ch|
|000045c0| 61 72 73 65 74 73 20 63 | 75 72 72 65 6e 74 6c 79 |arsets c|urrently|
|000045d0| 20 61 6c 6c 6f 63 61 74 | 65 64 2e 20 2a 2f 0a 58 | allocat|ed. */.X|
|000045e0| 0a 58 20 20 2f 2a 20 53 | 74 75 66 66 20 62 75 69 |.X /* S|tuff bui|
|000045f0| 6c 74 20 62 79 20 74 68 | 65 20 70 61 72 73 65 72 |lt by th|e parser|
|00004600| 2e 20 2a 2f 0a 58 20 20 | 5f 74 6f 6b 65 6e 20 2a |. */.X |_token *|
|00004610| 74 6f 6b 65 6e 73 3b 09 | 09 2f 2a 20 50 6f 73 74 |tokens;.|./* Post|
|00004620| 66 69 78 20 70 61 72 73 | 65 20 61 72 72 61 79 2e |fix pars|e array.|
|00004630| 20 2a 2f 0a 58 20 20 69 | 6e 74 20 74 69 6e 64 65 | */.X i|nt tinde|
|00004640| 78 3b 09 09 09 2f 2a 20 | 49 6e 64 65 78 20 66 6f |x;.../* |Index fo|
|00004650| 72 20 61 64 64 69 6e 67 | 20 6e 65 77 20 74 6f 6b |r adding| new tok|
|00004660| 65 6e 73 2e 20 2a 2f 0a | 58 20 20 69 6e 74 20 74 |ens. */.|X int t|
|00004670| 61 6c 6c 6f 63 3b 09 09 | 09 2f 2a 20 4e 75 6d 62 |alloc;..|./* Numb|
|00004680| 65 72 20 6f 66 20 74 6f | 6b 65 6e 73 20 63 75 72 |er of to|kens cur|
|00004690| 72 65 6e 74 6c 79 20 61 | 6c 6c 6f 63 61 74 65 64 |rently a|llocated|
|000046a0| 2e 20 2a 2f 0a 58 20 20 | 69 6e 74 20 64 65 70 74 |. */.X |int dept|
|000046b0| 68 3b 09 09 09 2f 2a 20 | 44 65 70 74 68 20 72 65 |h;.../* |Depth re|
|000046c0| 71 75 69 72 65 64 20 6f | 66 20 61 6e 20 65 76 61 |quired o|f an eva|
|000046d0| 6c 75 61 74 69 6f 6e 20 | 73 74 61 63 6b 0a 58 09 |luation |stack.X.|
|000046e0| 09 09 09 20 20 20 75 73 | 65 64 20 66 6f 72 20 64 |... us|ed for d|
|000046f0| 65 70 74 68 2d 66 69 72 | 73 74 20 74 72 61 76 65 |epth-fir|st trave|
|00004700| 72 73 61 6c 20 6f 66 20 | 74 68 65 0a 58 09 09 09 |rsal of |the.X...|
|00004710| 09 20 20 20 70 61 72 73 | 65 20 74 72 65 65 2e 20 |. pars|e tree. |
|00004720| 2a 2f 0a 58 20 20 69 6e | 74 20 6e 6c 65 61 76 65 |*/.X in|t nleave|
|00004730| 73 3b 09 09 09 2f 2a 20 | 4e 75 6d 62 65 72 20 6f |s;.../* |Number o|
|00004740| 66 20 6c 65 61 76 65 73 | 20 6f 6e 20 74 68 65 20 |f leaves| on the |
|00004750| 70 61 72 73 65 20 74 72 | 65 65 2e 20 2a 2f 0a 58 |parse tr|ee. */.X|
|00004760| 20 20 69 6e 74 20 6e 72 | 65 67 65 78 70 73 3b 09 | int nr|egexps;.|
|00004770| 09 09 2f 2a 20 43 6f 75 | 6e 74 20 6f 66 20 70 61 |../* Cou|nt of pa|
|00004780| 72 61 6c 6c 65 6c 20 72 | 65 67 65 78 70 73 20 62 |rallel r|egexps b|
|00004790| 65 69 6e 67 20 62 75 69 | 6c 74 0a 58 09 09 09 09 |eing bui|lt.X....|
|000047a0| 20 20 20 77 69 74 68 20 | 72 65 67 70 61 72 73 65 | with |regparse|
|000047b0| 28 29 2e 20 2a 2f 0a 58 | 0a 58 20 20 2f 2a 20 53 |(). */.X|.X /* S|
|000047c0| 74 75 66 66 20 6f 77 6e | 65 64 20 62 79 20 74 68 |tuff own|ed by th|
|000047d0| 65 20 73 74 61 74 65 20 | 62 75 69 6c 64 65 72 2e |e state |builder.|
|000047e0| 20 2a 2f 0a 58 20 20 5f | 64 66 61 5f 73 74 61 74 | */.X _|dfa_stat|
|000047f0| 65 20 2a 73 74 61 74 65 | 73 3b 09 09 2f 2a 20 53 |e *state|s;../* S|
|00004800| 74 61 74 65 73 20 6f 66 | 20 74 68 65 20 72 65 67 |tates of| the reg|
|00004810| 65 78 70 2e 20 2a 2f 0a | 58 20 20 69 6e 74 20 73 |exp. */.|X int s|
|00004820| 69 6e 64 65 78 3b 09 09 | 09 2f 2a 20 49 6e 64 65 |index;..|./* Inde|
|00004830| 78 20 66 6f 72 20 61 64 | 64 69 6e 67 20 6e 65 77 |x for ad|ding new|
|00004840| 20 73 74 61 74 65 73 2e | 20 2a 2f 0a 58 20 20 69 | states.| */.X i|
|00004850| 6e 74 20 73 61 6c 6c 6f | 63 3b 09 09 09 2f 2a 20 |nt sallo|c;.../* |
|00004860| 4e 75 6d 62 65 72 20 6f | 66 20 73 74 61 74 65 73 |Number o|f states|
|00004870| 20 63 75 72 72 65 6e 74 | 6c 79 20 61 6c 6c 6f 63 | current|ly alloc|
|00004880| 61 74 65 64 2e 20 2a 2f | 0a 58 0a 58 20 20 2f 2a |ated. */|.X.X /*|
|00004890| 20 53 74 75 66 66 20 62 | 75 69 6c 74 20 62 79 20 | Stuff b|uilt by |
|000048a0| 74 68 65 20 73 74 72 75 | 63 74 75 72 65 20 61 6e |the stru|cture an|
|000048b0| 61 6c 79 7a 65 72 2e 20 | 2a 2f 0a 58 20 20 5f 70 |alyzer. |*/.X _p|
|000048c0| 6f 73 69 74 69 6f 6e 5f | 73 65 74 20 2a 66 6f 6c |osition_|set *fol|
|000048d0| 6c 6f 77 73 3b 09 2f 2a | 20 41 72 72 61 79 20 6f |lows;./*| Array o|
|000048e0| 66 20 66 6f 6c 6c 6f 77 | 20 73 65 74 73 2c 20 69 |f follow| sets, i|
|000048f0| 6e 64 65 78 65 64 20 62 | 79 20 70 6f 73 69 74 69 |ndexed b|y positi|
|00004900| 6f 6e 0a 58 09 09 09 09 | 20 20 20 69 6e 64 65 78 |on.X....| index|
|00004910| 2e 20 20 54 68 65 20 66 | 6f 6c 6c 6f 77 20 6f 66 |. The f|ollow of|
|00004920| 20 61 20 70 6f 73 69 74 | 69 6f 6e 20 69 73 20 74 | a posit|ion is t|
|00004930| 68 65 20 73 65 74 0a 58 | 09 09 09 09 20 20 20 6f |he set.X|.... o|
|00004940| 66 20 70 6f 73 69 74 69 | 6f 6e 73 20 63 6f 6e 74 |f positi|ons cont|
|00004950| 61 69 6e 69 6e 67 20 63 | 68 61 72 61 63 74 65 72 |aining c|haracter|
|00004960| 73 20 74 68 61 74 0a 58 | 09 09 09 09 20 20 20 63 |s that.X|.... c|
|00004970| 6f 75 6c 64 20 63 6f 6e | 63 65 69 76 61 62 6c 79 |ould con|ceivably|
|00004980| 20 66 6f 6c 6c 6f 77 20 | 61 20 63 68 61 72 61 63 | follow |a charac|
|00004990| 74 65 72 0a 58 09 09 09 | 09 20 20 20 6d 61 74 63 |ter.X...|. matc|
|000049a0| 68 69 6e 67 20 74 68 65 | 20 67 69 76 65 6e 20 70 |hing the| given p|
|000049b0| 6f 73 69 74 69 6f 6e 20 | 69 6e 20 61 20 73 74 72 |osition |in a str|
|000049c0| 69 6e 67 0a 58 09 09 09 | 09 20 20 20 6d 61 74 63 |ing.X...|. matc|
|000049d0| 68 69 6e 67 20 74 68 65 | 20 72 65 67 65 78 70 2e |hing the| regexp.|
|000049e0| 20 20 41 6c 6c 6f 63 61 | 74 65 64 20 74 6f 20 74 | Alloca|ted to t|
|000049f0| 68 65 0a 58 09 09 09 09 | 20 20 20 6d 61 78 69 6d |he.X....| maxim|
|00004a00| 75 6d 20 70 6f 73 73 69 | 62 6c 65 20 70 6f 73 69 |um possi|ble posi|
|00004a10| 74 69 6f 6e 20 69 6e 64 | 65 78 2e 20 2a 2f 0a 58 |tion ind|ex. */.X|
|00004a20| 20 20 69 6e 74 20 73 65 | 61 72 63 68 66 6c 61 67 | int se|archflag|
|00004a30| 3b 09 09 2f 2a 20 54 72 | 75 65 20 69 66 20 77 65 |;../* Tr|ue if we|
|00004a40| 20 61 72 65 20 73 75 70 | 70 6f 73 65 64 20 74 6f | are sup|posed to|
|00004a50| 20 62 75 69 6c 64 20 61 | 20 73 65 61 72 63 68 69 | build a| searchi|
|00004a60| 6e 67 0a 58 09 09 09 09 | 20 20 20 61 73 20 6f 70 |ng.X....| as op|
|00004a70| 70 6f 73 65 64 20 74 6f | 20 61 6e 20 65 78 61 63 |posed to| an exac|
|00004a80| 74 20 6d 61 74 63 68 65 | 72 2e 20 20 41 20 73 65 |t matche|r. A se|
|00004a90| 61 72 63 68 69 6e 67 0a | 58 09 09 09 09 20 20 20 |arching.|X.... |
|00004aa0| 6d 61 74 63 68 65 72 20 | 66 69 6e 64 73 20 74 68 |matcher |finds th|
|00004ab0| 65 20 66 69 72 73 74 20 | 61 6e 64 20 73 68 6f 72 |e first |and shor|
|00004ac0| 74 65 73 74 20 73 74 72 | 69 6e 67 0a 58 09 09 09 |test str|ing.X...|
|00004ad0| 09 20 20 20 6d 61 74 63 | 68 69 6e 67 20 61 20 72 |. matc|hing a r|
|00004ae0| 65 67 65 78 70 20 61 6e | 79 77 68 65 72 65 20 69 |egexp an|ywhere i|
|00004af0| 6e 20 74 68 65 20 62 75 | 66 66 65 72 2c 0a 58 09 |n the bu|ffer,.X.|
|00004b00| 09 09 09 20 20 20 77 68 | 65 72 65 61 73 20 61 6e |... wh|ereas an|
|00004b10| 20 65 78 61 63 74 20 6d | 61 74 63 68 65 72 20 66 | exact m|atcher f|
|00004b20| 69 6e 64 73 20 74 68 65 | 20 6c 6f 6e 67 65 73 74 |inds the| longest|
|00004b30| 0a 58 09 09 09 09 20 20 | 20 73 74 72 69 6e 67 20 |.X.... | string |
|00004b40| 6d 61 74 63 68 69 6e 67 | 2c 20 62 75 74 20 61 6e |matching|, but an|
|00004b50| 63 68 6f 72 65 64 20 74 | 6f 20 74 68 65 0a 58 09 |chored t|o the.X.|
|00004b60| 09 09 09 20 20 20 62 65 | 67 69 6e 6e 69 6e 67 20 |... be|ginning |
|00004b70| 6f 66 20 74 68 65 20 62 | 75 66 66 65 72 2e 20 2a |of the b|uffer. *|
|00004b80| 2f 0a 58 0a 58 20 20 2f | 2a 20 53 74 75 66 66 20 |/.X.X /|* Stuff |
|00004b90| 6f 77 6e 65 64 20 62 79 | 20 74 68 65 20 65 78 65 |owned by| the exe|
|00004ba0| 63 75 74 6f 72 2e 20 2a | 2f 0a 58 20 20 69 6e 74 |cutor. *|/.X int|
|00004bb0| 20 74 72 61 6c 6c 6f 63 | 3b 09 09 09 2f 2a 20 4e | tralloc|;.../* N|
|00004bc0| 75 6d 62 65 72 20 6f 66 | 20 74 72 61 6e 73 69 74 |umber of| transit|
|00004bd0| 69 6f 6e 20 74 61 62 6c | 65 73 20 74 68 61 74 20 |ion tabl|es that |
|00004be0| 68 61 76 65 0a 58 09 09 | 09 09 20 20 20 73 6c 6f |have.X..|.. slo|
|00004bf0| 74 73 20 73 6f 20 66 61 | 72 2e 20 2a 2f 0a 58 20 |ts so fa|r. */.X |
|00004c00| 20 69 6e 74 20 74 72 63 | 6f 75 6e 74 3b 09 09 09 | int trc|ount;...|
|00004c10| 2f 2a 20 4e 75 6d 62 65 | 72 20 6f 66 20 74 72 61 |/* Numbe|r of tra|
|00004c20| 6e 73 69 74 69 6f 6e 20 | 74 61 62 6c 65 73 20 74 |nsition |tables t|
|00004c30| 68 61 74 20 68 61 76 65 | 0a 58 09 09 09 09 20 20 |hat have|.X.... |
|00004c40| 20 61 63 74 75 61 6c 6c | 79 20 62 65 65 6e 20 62 | actuall|y been b|
|00004c50| 75 69 6c 74 2e 20 2a 2f | 0a 58 20 20 69 6e 74 20 |uilt. */|.X int |
|00004c60| 2a 2a 74 72 61 6e 73 3b | 09 09 09 2f 2a 20 54 72 |**trans;|.../* Tr|
|00004c70| 61 6e 73 69 74 69 6f 6e | 20 74 61 62 6c 65 73 20 |ansition| tables |
|00004c80| 66 6f 72 20 73 74 61 74 | 65 73 20 74 68 61 74 20 |for stat|es that |
|00004c90| 63 61 6e 0a 58 09 09 09 | 09 20 20 20 6e 65 76 65 |can.X...|. neve|
|00004ca0| 72 20 61 63 63 65 70 74 | 2e 20 20 49 66 20 74 68 |r accept|. If th|
|00004cb0| 65 20 74 72 61 6e 73 69 | 74 69 6f 6e 73 20 66 6f |e transi|tions fo|
|00004cc0| 72 20 61 0a 58 09 09 09 | 09 20 20 20 73 74 61 74 |r a.X...|. stat|
|00004cd0| 65 20 68 61 76 65 20 6e | 6f 74 20 79 65 74 20 62 |e have n|ot yet b|
|00004ce0| 65 65 6e 20 63 6f 6d 70 | 75 74 65 64 2c 20 6f 72 |een comp|uted, or|
|00004cf0| 20 74 68 65 0a 58 09 09 | 09 09 20 20 20 73 74 61 | the.X..|.. sta|
|00004d00| 74 65 20 63 6f 75 6c 64 | 20 70 6f 73 73 69 62 6c |te could| possibl|
|00004d10| 79 20 61 63 63 65 70 74 | 2c 20 69 74 73 20 65 6e |y accept|, its en|
|00004d20| 74 72 79 20 69 6e 0a 58 | 09 09 09 09 20 20 20 74 |try in.X|.... t|
|00004d30| 68 69 73 20 74 61 62 6c | 65 20 69 73 20 4e 55 4c |his tabl|e is NUL|
|00004d40| 4c 2e 20 2a 2f 0a 58 20 | 20 69 6e 74 20 2a 2a 72 |L. */.X | int **r|
|00004d50| 65 61 6c 74 72 61 6e 73 | 3b 09 09 2f 2a 20 54 72 |ealtrans|;../* Tr|
|00004d60| 61 6e 73 20 61 6c 77 61 | 79 73 20 70 6f 69 6e 74 |ans alwa|ys point|
|00004d70| 73 20 74 6f 20 72 65 61 | 6c 74 72 61 6e 73 20 2b |s to rea|ltrans +|
|00004d80| 20 31 3b 20 74 68 69 73 | 0a 58 09 09 09 09 20 20 | 1; this|.X.... |
|00004d90| 20 69 73 20 73 6f 20 74 | 72 61 6e 73 5b 2d 31 5d | is so t|rans[-1]|
|00004da0| 20 63 61 6e 20 63 6f 6e | 74 61 69 6e 20 4e 55 4c | can con|tain NUL|
|00004db0| 4c 2e 20 2a 2f 0a 58 20 | 20 69 6e 74 20 2a 2a 66 |L. */.X | int **f|
|00004dc0| 61 69 6c 73 3b 09 09 09 | 2f 2a 20 54 72 61 6e 73 |ails;...|/* Trans|
|00004dd0| 69 74 69 6f 6e 20 74 61 | 62 6c 65 73 20 61 66 74 |ition ta|bles aft|
|00004de0| 65 72 20 66 61 69 6c 69 | 6e 67 20 74 6f 20 61 63 |er faili|ng to ac|
|00004df0| 63 65 70 74 0a 58 09 09 | 09 09 20 20 20 6f 6e 20 |cept.X..|.. on |
|00004e00| 61 20 73 74 61 74 65 20 | 74 68 61 74 20 70 6f 74 |a state |that pot|
|00004e10| 65 6e 74 69 61 6c 6c 79 | 20 63 6f 75 6c 64 20 64 |entially| could d|
|00004e20| 6f 20 73 6f 2e 20 2a 2f | 0a 58 20 20 69 6e 74 20 |o so. */|.X int |
|00004e30| 2a 73 75 63 63 65 73 73 | 3b 09 09 09 2f 2a 20 54 |*success|;.../* T|
|00004e40| 61 62 6c 65 20 6f 66 20 | 61 63 63 65 70 74 61 6e |able of |acceptan|
|00004e50| 63 65 20 63 6f 6e 64 69 | 74 69 6f 6e 73 20 75 73 |ce condi|tions us|
|00004e60| 65 64 20 69 6e 0a 58 09 | 09 09 09 20 20 20 72 65 |ed in.X.|... re|
|00004e70| 67 65 78 65 63 75 74 65 | 20 61 6e 64 20 63 6f 6d |gexecute| and com|
|00004e80| 70 75 74 65 64 20 69 6e | 20 62 75 69 6c 64 5f 73 |puted in| build_s|
|00004e90| 74 61 74 65 2e 20 2a 2f | 0a 58 20 20 69 6e 74 20 |tate. */|.X int |
|00004ea0| 2a 6e 65 77 6c 69 6e 65 | 73 3b 09 09 2f 2a 20 54 |*newline|s;../* T|
|00004eb0| 72 61 6e 73 69 74 69 6f | 6e 73 20 6f 6e 20 6e 65 |ransitio|ns on ne|
|00004ec0| 77 6c 69 6e 65 73 2e 20 | 20 54 68 65 20 65 6e 74 |wlines. | The ent|
|00004ed0| 72 79 20 66 6f 72 20 61 | 0a 58 09 09 09 09 20 20 |ry for a|.X.... |
|00004ee0| 20 6e 65 77 6c 69 6e 65 | 20 69 6e 20 61 6e 79 20 | newline| in any |
|00004ef0| 74 72 61 6e 73 69 74 69 | 6f 6e 20 74 61 62 6c 65 |transiti|on table|
|00004f00| 20 69 73 20 61 6c 77 61 | 79 73 0a 58 09 09 09 09 | is alwa|ys.X....|
|00004f10| 20 20 20 2d 31 20 73 6f | 20 77 65 20 63 61 6e 20 | -1 so| we can |
|00004f20| 63 6f 75 6e 74 20 6c 69 | 6e 65 73 20 77 69 74 68 |count li|nes with|
|00004f30| 6f 75 74 20 77 61 73 74 | 69 6e 67 0a 58 09 09 09 |out wast|ing.X...|
|00004f40| 09 20 20 20 74 6f 6f 20 | 6d 61 6e 79 20 63 79 63 |. too |many cyc|
|00004f50| 6c 65 73 2e 20 20 54 68 | 65 20 74 72 61 6e 73 69 |les. Th|e transi|
|00004f60| 74 69 6f 6e 20 66 6f 72 | 20 61 0a 58 09 09 09 09 |tion for| a.X....|
|00004f70| 20 20 20 6e 65 77 6c 69 | 6e 65 20 69 73 20 73 74 | newli|ne is st|
|00004f80| 6f 72 65 64 20 73 65 70 | 61 72 61 74 65 6c 79 20 |ored sep|arately |
|00004f90| 61 6e 64 20 68 61 6e 64 | 6c 65 64 0a 58 09 09 09 |and hand|led.X...|
|00004fa0| 09 20 20 20 61 73 20 61 | 20 73 70 65 63 69 61 6c |. as a| special|
|00004fb0| 20 63 61 73 65 2e 20 20 | 4e 65 77 6c 69 6e 65 20 | case. |Newline |
|00004fc0| 69 73 20 61 6c 73 6f 20 | 75 73 65 64 0a 58 09 09 |is also |used.X..|
|00004fd0| 09 09 20 20 20 61 73 20 | 61 20 73 65 6e 74 69 6e |.. as |a sentin|
|00004fe0| 65 6c 20 61 74 20 74 68 | 65 20 65 6e 64 20 6f 66 |el at th|e end of|
|00004ff0| 20 74 68 65 20 62 75 66 | 66 65 72 2e 20 2a 2f 0a | the buf|fer. */.|
|00005000| 58 20 20 63 68 61 72 20 | 6d 75 73 74 5b 4d 55 53 |X char |must[MUS|
|00005010| 54 5f 4d 41 58 5d 3b 0a | 58 20 20 69 6e 74 20 6d |T_MAX];.|X int m|
|00005020| 75 73 74 6e 3b 0a 58 7d | 3b 0a 58 0a 58 2f 2a 20 |ustn;.X}|;.X.X/* |
|00005030| 53 6f 6d 65 20 6d 61 63 | 72 6f 73 20 66 6f 72 20 |Some mac|ros for |
|00005040| 75 73 65 72 20 61 63 63 | 65 73 73 20 74 6f 20 72 |user acc|ess to r|
|00005050| 65 67 65 78 70 20 69 6e | 74 65 72 6e 61 6c 73 2e |egexp in|ternals.|
|00005060| 20 2a 2f 0a 58 0a 58 2f | 2a 20 41 43 43 45 50 54 | */.X.X/|* ACCEPT|
|00005070| 49 4e 47 20 72 65 74 75 | 72 6e 73 20 74 72 75 65 |ING retu|rns true|
|00005080| 20 69 66 20 73 20 63 6f | 75 6c 64 20 70 6f 73 73 | if s co|uld poss|
|00005090| 69 62 6c 79 20 62 65 20 | 61 6e 20 61 63 63 65 70 |ibly be |an accep|
|000050a0| 74 69 6e 67 20 73 74 61 | 74 65 20 6f 66 20 72 2e |ting sta|te of r.|
|000050b0| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 41 43 43 | */.X#de|fine ACC|
|000050c0| 45 50 54 49 4e 47 28 73 | 2c 20 72 29 20 28 28 72 |EPTING(s|, r) ((r|
|000050d0| 29 2e 73 74 61 74 65 73 | 5b 73 5d 2e 63 6f 6e 73 |).states|[s].cons|
|000050e0| 74 72 61 69 6e 74 29 0a | 58 0a 58 2f 2a 20 41 43 |traint).|X.X/* AC|
|000050f0| 43 45 50 54 53 5f 49 4e | 5f 43 4f 4e 54 45 58 54 |CEPTS_IN|_CONTEXT|
|00005100| 20 72 65 74 75 72 6e 73 | 20 74 72 75 65 20 69 66 | returns| true if|
|00005110| 20 74 68 65 20 67 69 76 | 65 6e 20 73 74 61 74 65 | the giv|en state|
|00005120| 20 61 63 63 65 70 74 73 | 20 69 6e 20 74 68 65 0a | accepts| in the.|
|00005130| 58 20 20 20 73 70 65 63 | 69 66 69 65 64 20 63 6f |X spec|ified co|
|00005140| 6e 74 65 78 74 2e 20 2a | 2f 0a 58 23 64 65 66 69 |ntext. *|/.X#defi|
|00005150| 6e 65 20 41 43 43 45 50 | 54 53 5f 49 4e 5f 43 4f |ne ACCEP|TS_IN_CO|
|00005160| 4e 54 45 58 54 28 70 72 | 65 76 6e 2c 20 63 75 72 |NTEXT(pr|evn, cur|
|00005170| 72 6e 2c 20 70 72 65 76 | 6c 2c 20 63 75 72 72 6c |rn, prev|l, currl|
|00005180| 2c 20 73 74 61 74 65 2c | 20 72 65 67 29 20 5c 0a |, state,| reg) \.|
|00005190| 58 20 20 5f 53 55 43 43 | 45 45 44 53 5f 49 4e 5f |X _SUCC|EEDS_IN_|
|000051a0| 43 4f 4e 54 45 58 54 28 | 28 72 65 67 29 2e 73 74 |CONTEXT(|(reg).st|
|000051b0| 61 74 65 73 5b 73 74 61 | 74 65 5d 2e 63 6f 6e 73 |ates[sta|te].cons|
|000051c0| 74 72 61 69 6e 74 2c 09 | 09 20 20 20 5c 0a 58 09 |traint,.|. \.X.|
|000051d0| 09 20 20 20 20 20 20 20 | 70 72 65 76 6e 2c 20 63 |. |prevn, c|
|000051e0| 75 72 72 6e 2c 20 70 72 | 65 76 6c 2c 20 63 75 72 |urrn, pr|evl, cur|
|000051f0| 72 6c 29 0a 58 0a 58 2f | 2a 20 46 49 52 53 54 5f |rl).X.X/|* FIRST_|
|00005200| 4d 41 54 43 48 49 4e 47 | 5f 52 45 47 45 58 50 20 |MATCHING|_REGEXP |
|00005210| 72 65 74 75 72 6e 73 20 | 74 68 65 20 69 6e 64 65 |returns |the inde|
|00005220| 78 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 68 65 20 |x number| of the |
|00005230| 66 69 72 73 74 20 6f 66 | 20 70 61 72 61 6c 6c 65 |first of| paralle|
|00005240| 6c 0a 58 20 20 20 72 65 | 67 65 78 70 73 20 74 68 |l.X re|gexps th|
|00005250| 61 74 20 61 20 67 69 76 | 65 6e 20 73 74 61 74 65 |at a giv|en state|
|00005260| 20 63 6f 75 6c 64 20 61 | 63 63 65 70 74 2e 20 20 | could a|ccept. |
|00005270| 50 61 72 61 6c 6c 65 6c | 20 72 65 67 65 78 70 73 |Parallel| regexps|
|00005280| 20 61 72 65 20 6e 75 6d | 62 65 72 65 64 0a 58 20 | are num|bered.X |
|00005290| 20 20 73 74 61 72 74 69 | 6e 67 20 61 74 20 31 2e | starti|ng at 1.|
|000052a0| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 46 49 52 | */.X#de|fine FIR|
|000052b0| 53 54 5f 4d 41 54 43 48 | 49 4e 47 5f 52 45 47 45 |ST_MATCH|ING_REGE|
|000052c0| 58 50 28 73 74 61 74 65 | 2c 20 72 65 67 29 20 28 |XP(state|, reg) (|
|000052d0| 2d 28 72 65 67 29 2e 73 | 74 61 74 65 73 5b 73 74 |-(reg).s|tates[st|
|000052e0| 61 74 65 5d 2e 66 69 72 | 73 74 5f 65 6e 64 29 0a |ate].fir|st_end).|
|000052f0| 58 0a 58 2f 2a 20 45 6e | 74 72 79 20 70 6f 69 6e |X.X/* En|try poin|
|00005300| 74 73 2e 20 2a 2f 0a 58 | 0a 58 23 69 66 64 65 66 |ts. */.X|.X#ifdef|
|00005310| 20 5f 5f 53 54 44 43 5f | 5f 0a 58 0a 58 2f 2a 20 | __STDC_|_.X.X/* |
|00005320| 52 65 67 73 79 6e 74 61 | 78 28 29 20 74 61 6b 65 |Regsynta|x() take|
|00005330| 73 20 74 77 6f 20 61 72 | 67 75 6d 65 6e 74 73 3b |s two ar|guments;|
|00005340| 20 74 68 65 20 66 69 72 | 73 74 20 73 65 74 73 20 | the fir|st sets |
|00005350| 74 68 65 20 73 79 6e 74 | 61 78 20 62 69 74 73 20 |the synt|ax bits |
|00005360| 64 65 73 63 72 69 62 65 | 64 0a 58 20 20 20 65 61 |describe|d.X ea|
|00005370| 72 6c 69 65 72 20 69 6e | 20 74 68 69 73 20 66 69 |rlier in| this fi|
|00005380| 6c 65 2c 20 61 6e 64 20 | 74 68 65 20 73 65 63 6f |le, and |the seco|
|00005390| 6e 64 20 73 65 74 73 20 | 74 68 65 20 63 61 73 65 |nd sets |the case|
|000053a0| 2d 66 6f 6c 64 69 6e 67 | 20 66 6c 61 67 2e 20 2a |-folding| flag. *|
|000053b0| 2f 0a 58 65 78 74 65 72 | 6e 20 76 6f 69 64 20 72 |/.Xexter|n void r|
|000053c0| 65 67 73 79 6e 74 61 78 | 28 69 6e 74 2c 20 69 6e |egsyntax|(int, in|
|000053d0| 74 29 3b 0a 58 0a 58 2f | 2a 20 43 6f 6d 70 69 6c |t);.X.X/|* Compil|
|000053e0| 65 20 74 68 65 20 67 69 | 76 65 6e 20 73 74 72 69 |e the gi|ven stri|
|000053f0| 6e 67 20 6f 66 20 74 68 | 65 20 67 69 76 65 6e 20 |ng of th|e given |
|00005400| 6c 65 6e 67 74 68 20 69 | 6e 74 6f 20 74 68 65 20 |length i|nto the |
|00005410| 67 69 76 65 6e 20 73 74 | 72 75 63 74 20 72 65 67 |given st|ruct reg|
|00005420| 65 78 70 2e 0a 58 20 20 | 20 46 69 6e 61 6c 20 61 |exp..X | Final a|
|00005430| 72 67 75 6d 65 6e 74 20 | 69 73 20 61 20 66 6c 61 |rgument |is a fla|
|00005440| 67 20 73 70 65 63 69 66 | 79 69 6e 67 20 77 68 65 |g specif|ying whe|
|00005450| 74 68 65 72 20 74 6f 20 | 62 75 69 6c 64 20 61 20 |ther to |build a |
|00005460| 73 65 61 72 63 68 69 6e | 67 20 6f 72 20 61 6e 0a |searchin|g or an.|
|00005470| 58 20 20 20 65 78 61 63 | 74 20 6d 61 74 63 68 65 |X exac|t matche|
|00005480| 72 2e 20 2a 2f 0a 58 65 | 78 74 65 72 6e 20 76 6f |r. */.Xe|xtern vo|
|00005490| 69 64 20 72 65 67 63 6f | 6d 70 69 6c 65 28 63 6f |id regco|mpile(co|
|000054a0| 6e 73 74 20 63 68 61 72 | 20 2a 2c 20 73 69 7a 65 |nst char| *, size|
|000054b0| 5f 74 2c 20 73 74 72 75 | 63 74 20 72 65 67 65 78 |_t, stru|ct regex|
|000054c0| 70 20 2a 2c 20 69 6e 74 | 29 3b 0a 58 0a 58 2f 2a |p *, int|);.X.X/*|
|000054d0| 20 45 78 65 63 75 74 65 | 20 74 68 65 20 67 69 76 | Execute| the giv|
|000054e0| 65 6e 20 73 74 72 75 63 | 74 20 72 65 67 65 78 70 |en struc|t regexp|
|000054f0| 20 6f 6e 20 74 68 65 20 | 62 75 66 66 65 72 20 6f | on the |buffer o|
|00005500| 66 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 20 54 |f charac|ters. T|
|00005510| 68 65 0a 58 20 20 20 66 | 69 72 73 74 20 63 68 61 |he.X f|irst cha|
|00005520| 72 20 2a 20 70 6f 69 6e | 74 73 20 74 6f 20 74 68 |r * poin|ts to th|
|00005530| 65 20 62 65 67 69 6e 6e | 69 6e 67 2c 20 61 6e 64 |e beginn|ing, and|
|00005540| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 70 6f 69 6e | the sec|ond poin|
|00005550| 74 73 20 74 6f 20 74 68 | 65 0a 58 20 20 20 66 69 |ts to th|e.X fi|
|00005560| 72 73 74 20 63 68 61 72 | 61 63 74 65 72 20 61 66 |rst char|acter af|
|00005570| 74 65 72 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 |ter the |end of t|
|00005580| 68 65 20 62 75 66 66 65 | 72 2c 20 77 68 69 63 68 |he buffe|r, which|
|00005590| 20 6d 75 73 74 20 62 65 | 20 61 20 77 72 69 74 61 | must be| a writa|
|000055a0| 62 6c 65 0a 58 20 20 20 | 70 6c 61 63 65 20 73 6f |ble.X |place so|
|000055b0| 20 61 20 73 65 6e 74 69 | 6e 65 6c 20 65 6e 64 2d | a senti|nel end-|
|000055c0| 6f 66 2d 62 75 66 66 65 | 72 20 6d 61 72 6b 65 72 |of-buffe|r marker|
|000055d0| 20 63 61 6e 20 62 65 20 | 73 74 6f 72 65 64 20 74 | can be |stored t|
|000055e0| 68 65 72 65 2e 20 20 54 | 68 65 0a 58 20 20 20 73 |here. T|he.X s|
|000055f0| 65 63 6f 6e 64 2d 74 6f | 2d 6c 61 73 74 20 61 72 |econd-to|-last ar|
|00005600| 67 75 6d 65 6e 74 20 69 | 73 20 61 20 66 6c 61 67 |gument i|s a flag|
|00005610| 20 74 65 6c 6c 69 6e 67 | 20 77 68 65 74 68 65 72 | telling| whether|
|00005620| 20 74 6f 20 61 6c 6c 6f | 77 20 6e 65 77 6c 69 6e | to allo|w newlin|
|00005630| 65 73 20 74 6f 0a 58 20 | 20 20 62 65 20 70 61 72 |es to.X | be par|
|00005640| 74 20 6f 66 20 61 20 73 | 74 72 69 6e 67 20 6d 61 |t of a s|tring ma|
|00005650| 74 63 68 69 6e 67 20 74 | 68 65 20 72 65 67 65 78 |tching t|he regex|
|00005660| 70 2e 20 20 54 68 65 20 | 6e 65 78 74 2d 74 6f 2d |p. The |next-to-|
|00005670| 6c 61 73 74 20 61 72 67 | 75 6d 65 6e 74 2c 0a 58 |last arg|ument,.X|
|00005680| 20 20 20 69 66 20 6e 6f | 6e 2d 4e 55 4c 4c 2c 20 | if no|n-NULL, |
|00005690| 70 6f 69 6e 74 73 20 74 | 6f 20 61 20 70 6c 61 63 |points t|o a plac|
|000056a0| 65 20 74 6f 20 69 6e 63 | 72 65 6d 65 6e 74 20 65 |e to inc|rement e|
|000056b0| 76 65 72 79 20 74 69 6d | 65 20 77 65 20 73 65 65 |very tim|e we see|
|000056c0| 20 61 0a 58 20 20 20 6e | 65 77 6c 69 6e 65 2e 20 | a.X n|ewline. |
|000056d0| 20 54 68 65 20 66 69 6e | 61 6c 20 61 72 67 75 6d | The fin|al argum|
|000056e0| 65 6e 74 2c 20 69 66 20 | 6e 6f 6e 2d 4e 55 4c 4c |ent, if |non-NULL|
|000056f0| 2c 20 70 6f 69 6e 74 73 | 20 74 6f 20 61 20 66 6c |, points| to a fl|
|00005700| 61 67 20 74 68 61 74 20 | 77 69 6c 6c 0a 58 20 20 |ag that |will.X |
|00005710| 20 62 65 20 73 65 74 20 | 69 66 20 66 75 72 74 68 | be set |if furth|
|00005720| 65 72 20 65 78 61 6d 69 | 6e 61 74 69 6f 6e 20 62 |er exami|nation b|
|00005730| 79 20 61 20 62 61 63 6b | 74 72 61 63 6b 69 6e 67 |y a back|tracking|
|00005740| 20 6d 61 74 63 68 65 72 | 20 69 73 20 6e 65 65 64 | matcher| is need|
|00005750| 65 64 20 69 6e 0a 58 20 | 20 20 6f 72 64 65 72 20 |ed in.X | order |
|00005760| 74 6f 20 76 65 72 69 66 | 79 20 62 61 63 6b 72 65 |to verif|y backre|
|00005770| 66 65 72 65 6e 63 69 6e | 67 3b 20 6f 74 68 65 72 |ferencin|g; other|
|00005780| 77 69 73 65 20 74 68 65 | 20 66 6c 61 67 20 77 69 |wise the| flag wi|
|00005790| 6c 6c 20 62 65 20 63 6c | 65 61 72 65 64 2e 0a 58 |ll be cl|eared..X|
|000057a0| 20 20 20 52 65 74 75 72 | 6e 73 20 4e 55 4c 4c 20 | Retur|ns NULL |
|000057b0| 69 66 20 6e 6f 20 6d 61 | 74 63 68 20 69 73 20 66 |if no ma|tch is f|
|000057c0| 6f 75 6e 64 2c 20 6f 72 | 20 61 20 70 6f 69 6e 74 |ound, or| a point|
|000057d0| 65 72 20 74 6f 20 74 68 | 65 20 66 69 72 73 74 0a |er to th|e first.|
|000057e0| 58 20 20 20 63 68 61 72 | 61 63 74 65 72 20 61 66 |X char|acter af|
|000057f0| 74 65 72 20 74 68 65 20 | 66 69 72 73 74 20 26 20 |ter the |first & |
|00005800| 73 68 6f 72 74 65 73 74 | 20 6d 61 74 63 68 69 6e |shortest| matchin|
|00005810| 67 20 73 74 72 69 6e 67 | 20 69 6e 20 74 68 65 20 |g string| in the |
|00005820| 62 75 66 66 65 72 2e 20 | 2a 2f 0a 58 65 78 74 65 |buffer. |*/.Xexte|
|00005830| 72 6e 20 63 68 61 72 20 | 2a 72 65 67 65 78 65 63 |rn char |*regexec|
|00005840| 75 74 65 28 73 74 72 75 | 63 74 20 72 65 67 65 78 |ute(stru|ct regex|
|00005850| 70 20 2a 2c 20 63 68 61 | 72 20 2a 2c 20 63 68 61 |p *, cha|r *, cha|
|00005860| 72 20 2a 2c 20 69 6e 74 | 2c 20 69 6e 74 20 2a 2c |r *, int|, int *,|
|00005870| 20 69 6e 74 20 2a 29 3b | 0a 58 0a 58 2f 2a 20 46 | int *);|.X.X/* F|
|00005880| 72 65 65 20 74 68 65 20 | 73 74 6f 72 61 67 65 20 |ree the |storage |
|00005890| 68 65 6c 64 20 62 79 20 | 74 68 65 20 63 6f 6d 70 |held by |the comp|
|000058a0| 6f 6e 65 6e 74 73 20 6f | 66 20 61 20 73 74 72 75 |onents o|f a stru|
|000058b0| 63 74 20 72 65 67 65 78 | 70 2e 20 2a 2f 0a 58 65 |ct regex|p. */.Xe|
|000058c0| 78 74 65 72 6e 20 76 6f | 69 64 20 72 65 67 66 72 |xtern vo|id regfr|
|000058d0| 65 65 28 73 74 72 75 63 | 74 20 72 65 67 65 78 70 |ee(struc|t regexp|
|000058e0| 20 2a 29 3b 0a 58 0a 58 | 2f 2a 20 45 6e 74 72 79 | *);.X.X|/* Entry|
|000058f0| 20 70 6f 69 6e 74 73 20 | 66 6f 72 20 70 65 6f 70 | points |for peop|
|00005900| 6c 65 20 77 68 6f 20 6b | 6e 6f 77 20 77 68 61 74 |le who k|now what|
|00005910| 20 74 68 65 79 27 72 65 | 20 64 6f 69 6e 67 2e 20 | they're| doing. |
|00005920| 2a 2f 0a 58 0a 58 2f 2a | 20 49 6e 69 74 69 61 6c |*/.X.X/*| Initial|
|00005930| 69 7a 65 20 74 68 65 20 | 63 6f 6d 70 6f 6e 65 6e |ize the |componen|
|00005940| 74 73 20 6f 66 20 61 20 | 73 74 72 75 63 74 20 72 |ts of a |struct r|
|00005950| 65 67 65 78 70 2e 20 2a | 2f 0a 58 65 78 74 65 72 |egexp. *|/.Xexter|
|00005960| 6e 20 76 6f 69 64 20 72 | 65 67 69 6e 69 74 28 73 |n void r|eginit(s|
|00005970| 74 72 75 63 74 20 72 65 | 67 65 78 70 20 2a 29 3b |truct re|gexp *);|
|00005980| 0a 58 0a 58 2f 2a 20 49 | 6e 63 72 65 6d 65 6e 74 |.X.X/* I|ncrement|
|00005990| 61 6c 6c 79 20 70 61 72 | 73 65 20 61 20 73 74 72 |ally par|se a str|
|000059a0| 69 6e 67 20 6f 66 20 67 | 69 76 65 6e 20 6c 65 6e |ing of g|iven len|
|000059b0| 67 74 68 20 69 6e 74 6f | 20 61 20 73 74 72 75 63 |gth into| a struc|
|000059c0| 74 20 72 65 67 65 78 70 | 2e 20 2a 2f 0a 58 65 78 |t regexp|. */.Xex|
|000059d0| 74 65 72 6e 20 76 6f 69 | 64 20 72 65 67 70 61 72 |tern voi|d regpar|
|000059e0| 73 65 28 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 2c |se(const| char *,|
|000059f0| 20 73 69 7a 65 5f 74 2c | 20 73 74 72 75 63 74 20 | size_t,| struct |
|00005a00| 72 65 67 65 78 70 20 2a | 29 3b 0a 58 0a 58 2f 2a |regexp *|);.X.X/*|
|00005a10| 20 41 6e 61 6c 79 7a 65 | 20 61 20 70 61 72 73 65 | Analyze| a parse|
|00005a20| 64 20 72 65 67 65 78 70 | 3b 20 73 65 63 6f 6e 64 |d regexp|; second|
|00005a30| 20 61 72 67 75 6d 65 6e | 74 20 74 65 6c 6c 73 20 | argumen|t tells |
|00005a40| 77 68 65 74 68 65 72 20 | 74 6f 20 62 75 69 6c 64 |whether |to build|
|00005a50| 20 61 20 73 65 61 72 63 | 68 69 6e 67 0a 58 20 20 | a searc|hing.X |
|00005a60| 20 6f 72 20 61 6e 20 65 | 78 61 63 74 20 6d 61 74 | or an e|xact mat|
|00005a70| 63 68 65 72 2e 20 2a 2f | 0a 58 65 78 74 65 72 6e |cher. */|.Xextern|
|00005a80| 20 76 6f 69 64 20 72 65 | 67 61 6e 61 6c 79 7a 65 | void re|ganalyze|
|00005a90| 28 73 74 72 75 63 74 20 | 72 65 67 65 78 70 20 2a |(struct |regexp *|
|00005aa0| 2c 20 69 6e 74 29 3b 0a | 58 0a 58 2f 2a 20 43 6f |, int);.|X.X/* Co|
|00005ab0| 6d 70 75 74 65 2c 20 66 | 6f 72 20 65 61 63 68 20 |mpute, f|or each |
|00005ac0| 70 6f 73 73 69 62 6c 65 | 20 63 68 61 72 61 63 74 |possible| charact|
|00005ad0| 65 72 2c 20 74 68 65 20 | 74 72 61 6e 73 69 74 69 |er, the |transiti|
|00005ae0| 6f 6e 73 20 6f 75 74 20 | 6f 66 20 61 20 67 69 76 |ons out |of a giv|
|00005af0| 65 6e 0a 58 20 20 20 73 | 74 61 74 65 2c 20 73 74 |en.X s|tate, st|
|00005b00| 6f 72 69 6e 67 20 74 68 | 65 6d 20 69 6e 20 61 6e |oring th|em in an|
|00005b10| 20 61 72 72 61 79 20 6f | 66 20 69 6e 74 65 67 65 | array o|f intege|
|00005b20| 72 73 2e 20 2a 2f 0a 58 | 65 78 74 65 72 6e 20 76 |rs. */.X|extern v|
|00005b30| 6f 69 64 20 72 65 67 73 | 74 61 74 65 28 69 6e 74 |oid regs|tate(int|
|00005b40| 2c 20 73 74 72 75 63 74 | 20 72 65 67 65 78 70 20 |, struct| regexp |
|00005b50| 2a 2c 20 69 6e 74 20 5b | 5d 29 3b 0a 58 0a 58 2f |*, int [|]);.X.X/|
|00005b60| 2a 20 45 72 72 6f 72 20 | 68 61 6e 64 6c 69 6e 67 |* Error |handling|
|00005b70| 2e 20 2a 2f 0a 58 0a 58 | 2f 2a 20 52 65 67 65 72 |. */.X.X|/* Reger|
|00005b80| 72 6f 72 28 29 20 69 73 | 20 63 61 6c 6c 65 64 20 |ror() is| called |
|00005b90| 62 79 20 74 68 65 20 72 | 65 67 65 78 70 20 72 6f |by the r|egexp ro|
|00005ba0| 75 74 69 6e 65 73 20 77 | 68 65 6e 65 76 65 72 20 |utines w|henever |
|00005bb0| 61 6e 20 65 72 72 6f 72 | 20 6f 63 63 75 72 73 2e |an error| occurs.|
|00005bc0| 20 20 49 74 0a 58 20 20 | 20 74 61 6b 65 73 20 61 | It.X | takes a|
|00005bd0| 20 73 69 6e 67 6c 65 20 | 61 72 67 75 6d 65 6e 74 | single |argument|
|00005be0| 2c 20 61 20 4e 55 4c 2d | 74 65 72 6d 69 6e 61 74 |, a NUL-|terminat|
|00005bf0| 65 64 20 73 74 72 69 6e | 67 20 64 65 73 63 72 69 |ed strin|g descri|
|00005c00| 62 69 6e 67 20 74 68 65 | 20 65 72 72 6f 72 2e 0a |bing the| error..|
|00005c10| 58 20 20 20 54 68 65 20 | 64 65 66 61 75 6c 74 20 |X The |default |
|00005c20| 72 65 67 65 72 72 6f 72 | 28 29 20 70 72 69 6e 74 |regerror|() print|
|00005c30| 73 20 74 68 65 20 65 72 | 72 6f 72 20 6d 65 73 73 |s the er|ror mess|
|00005c40| 61 67 65 20 74 6f 20 73 | 74 64 65 72 72 20 61 6e |age to s|tderr an|
|00005c50| 64 20 65 78 69 74 73 2e | 0a 58 20 20 20 54 68 65 |d exits.|.X The|
|00005c60| 20 75 73 65 72 20 63 61 | 6e 20 70 72 6f 76 69 64 | user ca|n provid|
|00005c70| 65 20 61 20 64 69 66 66 | 65 72 65 6e 74 20 72 65 |e a diff|erent re|
|00005c80| 67 66 72 65 65 28 29 20 | 69 66 20 73 6f 20 64 65 |gfree() |if so de|
|00005c90| 73 69 72 65 64 2e 20 2a | 2f 0a 58 65 78 74 65 72 |sired. *|/.Xexter|
|00005ca0| 6e 20 76 6f 69 64 20 72 | 65 67 65 72 72 6f 72 28 |n void r|egerror(|
|00005cb0| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 29 3b 0a 58 |const ch|ar *);.X|
|00005cc0| 0a 58 23 65 6c 73 65 20 | 2f 2a 20 21 20 5f 5f 53 |.X#else |/* ! __S|
|00005cd0| 54 44 43 5f 5f 20 2a 2f | 0a 58 65 78 74 65 72 6e |TDC__ */|.Xextern|
|00005ce0| 20 76 6f 69 64 20 72 65 | 67 73 79 6e 74 61 78 28 | void re|gsyntax(|
|00005cf0| 29 2c 20 72 65 67 63 6f | 6d 70 69 6c 65 28 29 2c |), regco|mpile(),|
|00005d00| 20 72 65 67 66 72 65 65 | 28 29 2c 20 72 65 67 69 | regfree|(), regi|
|00005d10| 6e 69 74 28 29 2c 20 72 | 65 67 70 61 72 73 65 28 |nit(), r|egparse(|
|00005d20| 29 3b 0a 58 65 78 74 65 | 72 6e 20 76 6f 69 64 20 |);.Xexte|rn void |
|00005d30| 72 65 67 61 6e 61 6c 79 | 7a 65 28 29 2c 20 72 65 |reganaly|ze(), re|
|00005d40| 67 73 74 61 74 65 28 29 | 2c 20 72 65 67 65 72 72 |gstate()|, regerr|
|00005d50| 6f 72 28 29 3b 0a 58 65 | 78 74 65 72 6e 20 63 68 |or();.Xe|xtern ch|
|00005d60| 61 72 20 2a 72 65 67 65 | 78 65 63 75 74 65 28 29 |ar *rege|xecute()|
|00005d70| 3b 0a 58 23 65 6e 64 69 | 66 0a 45 4e 44 5f 4f 46 |;.X#endi|f.END_OF|
|00005d80| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 32 32 |_FILE.if| test 22|
|00005d90| 34 32 37 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |427 -ne |`wc -c <|
|00005da0| 27 64 66 61 2e 68 27 60 | 3b 20 74 68 65 6e 0a 20 |'dfa.h'`|; then. |
|00005db0| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|00005dc0| 27 64 66 61 2e 68 27 5c | 22 20 75 6e 70 61 63 6b |'dfa.h'\|" unpack|
|00005dd0| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00005de0| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00005df0| 27 64 66 61 2e 68 27 0a | 66 69 0a 69 66 20 74 65 |'dfa.h'.|fi.if te|
|00005e00| 73 74 20 2d 66 20 27 67 | 72 65 70 2e 63 27 20 2d |st -f 'g|rep.c' -|
|00005e10| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00005e20| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00005e30| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00005e40| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00005e50| 66 69 6c 65 20 5c 22 27 | 67 72 65 70 2e 63 27 5c |file \"'|grep.c'\|
|00005e60| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00005e70| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00005e80| 67 72 65 70 2e 63 27 5c | 22 20 5c 28 32 38 33 34 |grep.c'\|" \(2834|
|00005e90| 36 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |6 charac|ters\).s|
|00005ea0| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 67 72 |ed "s/^X|//" >'gr|
|00005eb0| 65 70 2e 63 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |ep.c' <<|'END_OF_|
|00005ec0| 46 49 4c 45 27 0a 58 2f | 2a 20 67 72 65 70 20 2d |FILE'.X/|* grep -|
|00005ed0| 20 70 72 69 6e 74 20 6c | 69 6e 65 73 20 6d 61 74 | print l|ines mat|
|00005ee0| 63 68 69 6e 67 20 61 6e | 20 65 78 74 65 6e 64 65 |ching an| extende|
|00005ef0| 64 20 72 65 67 75 6c 61 | 72 20 65 78 70 72 65 73 |d regula|r expres|
|00005f00| 73 69 6f 6e 0a 58 20 20 | 20 43 6f 70 79 72 69 67 |sion.X | Copyrig|
|00005f10| 68 74 20 28 43 29 20 31 | 39 38 38 20 46 72 65 65 |ht (C) 1|988 Free|
|00005f20| 20 53 6f 66 74 77 61 72 | 65 20 46 6f 75 6e 64 61 | Softwar|e Founda|
|00005f30| 74 69 6f 6e 2c 20 49 6e | 63 2e 0a 58 20 20 20 20 |tion, In|c..X |
|00005f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f50| 20 20 57 72 69 74 74 65 | 6e 20 4a 75 6e 65 2c 20 | Writte|n June, |
|00005f60| 31 39 38 38 20 62 79 20 | 4d 69 6b 65 20 48 61 65 |1988 by |Mike Hae|
|00005f70| 72 74 65 6c 0a 58 09 20 | 20 20 20 20 20 20 20 20 |rtel.X. | |
|00005f80| 20 20 20 20 20 42 4d 47 | 20 73 70 65 65 64 75 70 | BMG| speedup|
|00005f90| 73 20 61 64 64 65 64 20 | 4a 75 6c 79 2c 20 31 39 |s added |July, 19|
|00005fa0| 38 38 0a 58 09 09 09 62 | 79 20 4a 61 6d 65 73 20 |88.X...b|y James |
|00005fb0| 41 2e 20 57 6f 6f 64 73 | 20 61 6e 64 20 41 72 74 |A. Woods| and Art|
|00005fc0| 68 75 72 20 44 61 76 69 | 64 20 4f 6c 73 6f 6e 0a |hur Davi|d Olson.|
|00005fd0| 58 0a 58 09 09 20 20 20 | 20 20 20 20 4e 4f 20 57 |X.X.. | NO W|
|00005fe0| 41 52 52 41 4e 54 59 0a | 58 0a 58 20 20 42 45 43 |ARRANTY.|X.X BEC|
|00005ff0| 41 55 53 45 20 54 48 49 | 53 20 50 52 4f 47 52 41 |AUSE THI|S PROGRA|
|00006000| 4d 20 49 53 20 4c 49 43 | 45 4e 53 45 44 20 46 52 |M IS LIC|ENSED FR|
|00006010| 45 45 20 4f 46 20 43 48 | 41 52 47 45 2c 20 57 45 |EE OF CH|ARGE, WE|
|00006020| 20 50 52 4f 56 49 44 45 | 20 41 42 53 4f 4c 55 54 | PROVIDE| ABSOLUT|
|00006030| 45 4c 59 0a 58 4e 4f 20 | 57 41 52 52 41 4e 54 59 |ELY.XNO |WARRANTY|
|00006040| 2c 20 54 4f 20 54 48 45 | 20 45 58 54 45 4e 54 20 |, TO THE| EXTENT |
|00006050| 50 45 52 4d 49 54 54 45 | 44 20 42 59 20 41 50 50 |PERMITTE|D BY APP|
|00006060| 4c 49 43 41 42 4c 45 20 | 53 54 41 54 45 20 4c 41 |LICABLE |STATE LA|
|00006070| 57 2e 20 20 45 58 43 45 | 50 54 0a 58 57 48 45 4e |W. EXCE|PT.XWHEN|
|00006080| 20 4f 54 48 45 52 57 49 | 53 45 20 53 54 41 54 45 | OTHERWI|SE STATE|
|00006090| 44 20 49 4e 20 57 52 49 | 54 49 4e 47 2c 20 46 52 |D IN WRI|TING, FR|
|000060a0| 45 45 20 53 4f 46 54 57 | 41 52 45 20 46 4f 55 4e |EE SOFTW|ARE FOUN|
|000060b0| 44 41 54 49 4f 4e 2c 20 | 49 4e 43 2c 0a 58 52 49 |DATION, |INC,.XRI|
|000060c0| 43 48 41 52 44 20 4d 2e | 20 53 54 41 4c 4c 4d 41 |CHARD M.| STALLMA|
|000060d0| 4e 20 41 4e 44 2f 4f 52 | 20 4f 54 48 45 52 20 50 |N AND/OR| OTHER P|
|000060e0| 41 52 54 49 45 53 20 50 | 52 4f 56 49 44 45 20 54 |ARTIES P|ROVIDE T|
|000060f0| 48 49 53 20 50 52 4f 47 | 52 41 4d 20 22 41 53 20 |HIS PROG|RAM "AS |
|00006100| 49 53 22 0a 58 57 49 54 | 48 4f 55 54 20 57 41 52 |IS".XWIT|HOUT WAR|
|00006110| 52 41 4e 54 59 20 4f 46 | 20 41 4e 59 20 4b 49 4e |RANTY OF| ANY KIN|
|00006120| 44 2c 20 45 49 54 48 45 | 52 20 45 58 50 52 45 53 |D, EITHE|R EXPRES|
|00006130| 53 45 44 20 4f 52 20 49 | 4d 50 4c 49 45 44 2c 20 |SED OR I|MPLIED, |
|00006140| 49 4e 43 4c 55 44 49 4e | 47 2c 0a 58 42 55 54 20 |INCLUDIN|G,.XBUT |
|00006150| 4e 4f 54 20 4c 49 4d 49 | 54 45 44 20 54 4f 2c 20 |NOT LIMI|TED TO, |
|00006160| 54 48 45 20 49 4d 50 4c | 49 45 44 20 57 41 52 52 |THE IMPL|IED WARR|
|00006170| 41 4e 54 49 45 53 20 4f | 46 20 4d 45 52 43 48 41 |ANTIES O|F MERCHA|
|00006180| 4e 54 41 42 49 4c 49 54 | 59 20 41 4e 44 0a 58 46 |NTABILIT|Y AND.XF|
|00006190| 49 54 4e 45 53 53 20 46 | 4f 52 20 41 20 50 41 52 |ITNESS F|OR A PAR|
|000061a0| 54 49 43 55 4c 41 52 20 | 50 55 52 50 4f 53 45 2e |TICULAR |PURPOSE.|
|000061b0| 20 20 54 48 45 20 45 4e | 54 49 52 45 20 52 49 53 | THE EN|TIRE RIS|
|000061c0| 4b 20 41 53 20 54 4f 20 | 54 48 45 20 51 55 41 4c |K AS TO |THE QUAL|
|000061d0| 49 54 59 0a 58 41 4e 44 | 20 50 45 52 46 4f 52 4d |ITY.XAND| PERFORM|
|000061e0| 41 4e 43 45 20 4f 46 20 | 54 48 45 20 50 52 4f 47 |ANCE OF |THE PROG|
|000061f0| 52 41 4d 20 49 53 20 57 | 49 54 48 20 59 4f 55 2e |RAM IS W|ITH YOU.|
|00006200| 20 20 53 48 4f 55 4c 44 | 20 54 48 45 20 50 52 4f | SHOULD| THE PRO|
|00006210| 47 52 41 4d 20 50 52 4f | 56 45 0a 58 44 45 46 45 |GRAM PRO|VE.XDEFE|
|00006220| 43 54 49 56 45 2c 20 59 | 4f 55 20 41 53 53 55 4d |CTIVE, Y|OU ASSUM|
|00006230| 45 20 54 48 45 20 43 4f | 53 54 20 4f 46 20 41 4c |E THE CO|ST OF AL|
|00006240| 4c 20 4e 45 43 45 53 53 | 41 52 59 20 53 45 52 56 |L NECESS|ARY SERV|
|00006250| 49 43 49 4e 47 2c 20 52 | 45 50 41 49 52 20 4f 52 |ICING, R|EPAIR OR|
|00006260| 0a 58 43 4f 52 52 45 43 | 54 49 4f 4e 2e 0a 58 0a |.XCORREC|TION..X.|
|00006270| 58 20 49 4e 20 4e 4f 20 | 45 56 45 4e 54 20 55 4e |X IN NO |EVENT UN|
|00006280| 4c 45 53 53 20 52 45 51 | 55 49 52 45 44 20 42 59 |LESS REQ|UIRED BY|
|00006290| 20 41 50 50 4c 49 43 41 | 42 4c 45 20 4c 41 57 20 | APPLICA|BLE LAW |
|000062a0| 57 49 4c 4c 20 52 49 43 | 48 41 52 44 20 4d 2e 0a |WILL RIC|HARD M..|
|000062b0| 58 53 54 41 4c 4c 4d 41 | 4e 2c 20 54 48 45 20 46 |XSTALLMA|N, THE F|
|000062c0| 52 45 45 20 53 4f 46 54 | 57 41 52 45 20 46 4f 55 |REE SOFT|WARE FOU|
|000062d0| 4e 44 41 54 49 4f 4e 2c | 20 49 4e 43 2e 2c 20 41 |NDATION,| INC., A|
|000062e0| 4e 44 2f 4f 52 20 41 4e | 59 20 4f 54 48 45 52 20 |ND/OR AN|Y OTHER |
|000062f0| 50 41 52 54 59 0a 58 57 | 48 4f 20 4d 41 59 20 4d |PARTY.XW|HO MAY M|
|00006300| 4f 44 49 46 59 20 41 4e | 44 20 52 45 44 49 53 54 |ODIFY AN|D REDIST|
|00006310| 52 49 42 55 54 45 20 54 | 48 49 53 20 50 52 4f 47 |RIBUTE T|HIS PROG|
|00006320| 52 41 4d 20 41 53 20 50 | 45 52 4d 49 54 54 45 44 |RAM AS P|ERMITTED|
|00006330| 20 42 45 4c 4f 57 2c 20 | 42 45 0a 58 4c 49 41 42 | BELOW, |BE.XLIAB|
|00006340| 4c 45 20 54 4f 20 59 4f | 55 20 46 4f 52 20 44 41 |LE TO YO|U FOR DA|
|00006350| 4d 41 47 45 53 2c 20 49 | 4e 43 4c 55 44 49 4e 47 |MAGES, I|NCLUDING|
|00006360| 20 41 4e 59 20 4c 4f 53 | 54 20 50 52 4f 46 49 54 | ANY LOS|T PROFIT|
|00006370| 53 2c 20 4c 4f 53 54 20 | 4d 4f 4e 49 45 53 2c 20 |S, LOST |MONIES, |
|00006380| 4f 52 0a 58 4f 54 48 45 | 52 20 53 50 45 43 49 41 |OR.XOTHE|R SPECIA|
|00006390| 4c 2c 20 49 4e 43 49 44 | 45 4e 54 41 4c 20 4f 52 |L, INCID|ENTAL OR|
|000063a0| 20 43 4f 4e 53 45 51 55 | 45 4e 54 49 41 4c 20 44 | CONSEQU|ENTIAL D|
|000063b0| 41 4d 41 47 45 53 20 41 | 52 49 53 49 4e 47 20 4f |AMAGES A|RISING O|
|000063c0| 55 54 20 4f 46 20 54 48 | 45 0a 58 55 53 45 20 4f |UT OF TH|E.XUSE O|
|000063d0| 52 20 49 4e 41 42 49 4c | 49 54 59 20 54 4f 20 55 |R INABIL|ITY TO U|
|000063e0| 53 45 20 28 49 4e 43 4c | 55 44 49 4e 47 20 42 55 |SE (INCL|UDING BU|
|000063f0| 54 20 4e 4f 54 20 4c 49 | 4d 49 54 45 44 20 54 4f |T NOT LI|MITED TO|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.