README.md \
autogen.sh \
genhelp.sh \
- doc/loplas.ps \
- doc/sample.bib \
- doc/tdfa/tdfa.pdf \
examples \
test
+++ /dev/null
-%!PS-Adobe-2.0
-%%Creator: dvipsk 5.526a Copyright 1986, 1993 Radical Eye Software
-%%Title: paper.dvi
-%%Pages: 16
-%%PageOrder: Ascend
-%%BoundingBox: 0 0 612 792
-%%EndComments
-%DVIPSCommandLine: dvips -o paper.ps paper
-%DVIPSParameters: dpi=300, compressed, comments removed
-%DVIPSSource: TeX output 1994.04.15:2115
-%%BeginProcSet: texc.pro
-/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N
-/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72
-mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1}
-ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
-isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div
-hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul
-TR matrix currentmatrix dup dup 4 get round 4 exch put dup dup 5 get
-round 5 exch put setmatrix}N /@landscape{/isls true N}B /@manualfeed{
-statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0
-0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{/nn 8 dict N nn
-begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X
-array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo
-setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx
-FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{
-pop nn dup definefont setfont}B /ch-width{ch-data dup length 5 sub get}
-B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{128 ch-data dup
-length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub get 127 sub}B
-/ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data dup type
-/stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N /rc 0 N /gp
-0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup /base get 2
-index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff
-ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice
-ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]/id
-ch-image N /rw ch-width 7 add 8 idiv string N /rc 0 N /gp 0 N /cp 0 N{
-rc 0 ne{rc 1 sub /rc X rw}{G}ifelse}imagemask restore}B /G{{id gp get
-/gp gp 1 add N dup 18 mod S 18 idiv pl S get exec}loop}B /adv{cp add /cp
-X}B /chg{rw cp id gp 4 index getinterval putinterval dup gp add /gp X
-adv}B /nd{/cp 0 N rw exit}B /lsh{rw cp 2 copy get dup 0 eq{pop 1}{dup
-255 eq{pop 254}{dup dup add 255 and S 1 and or}ifelse}ifelse put 1 adv}
-B /rsh{rw cp 2 copy get dup 0 eq{pop 128}{dup 255 eq{pop 127}{dup 2 idiv
-S 128 and or}ifelse}ifelse put 1 adv}B /clr{rw cp 2 index string
-putinterval adv}B /set{rw cp fillstr 0 4 index getinterval putinterval
-adv}B /fillstr 18 string 0 1 17{2 copy 255 put pop}for N /pl[{adv 1 chg}
-{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{
-adv rsh nd}{1 add adv}{/rc X nd}{1 add set}{1 add clr}{adv 2 chg}{adv 2
-chg nd}{pop nd}]dup{bind pop}forall N /D{/cc X dup type /stringtype ne{]
-}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup
-length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{
-cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin
-0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul
-add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore showpage
-userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook
-known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X
-/IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for
-65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0
-0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V
-{}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7
-getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false}
-ifelse}{false}ifelse end{{gsave TR -.1 -.1 TR 1 1 scale rulex ruley
-false RMat{BDot}imagemask grestore}}{{gsave TR -.1 -.1 TR rulex ruley
-scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave
-transform round exch round exch itransform moveto rulex 0 rlineto 0
-ruley neg rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta
-0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}
-B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{
-3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p
--1 w}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{
-3 2 roll p a}B /bos{/SS save N}B /eos{SS restore}B end
-%%EndProcSet
-%%BeginProcSet: special.pro
-TeXDict begin /SDict 200 dict N SDict begin /@SpecialDefaults{/hs 612 N
-/vs 792 N /ho 0 N /vo 0 N /hsc 1 N /vsc 1 N /ang 0 N /CLIP 0 N /rwiSeen
-false N /rhiSeen false N /letter{}N /note{}N /a4{}N /legal{}N}B
-/@scaleunit 100 N /@hscale{@scaleunit div /hsc X}B /@vscale{@scaleunit
-div /vsc X}B /@hsize{/hs X /CLIP 1 N}B /@vsize{/vs X /CLIP 1 N}B /@clip{
-/CLIP 2 N}B /@hoffset{/ho X}B /@voffset{/vo X}B /@angle{/ang X}B /@rwi{
-10 div /rwi X /rwiSeen true N}B /@rhi{10 div /rhi X /rhiSeen true N}B
-/@llx{/llx X}B /@lly{/lly X}B /@urx{/urx X}B /@ury{/ury X}B /magscale
-true def end /@MacSetUp{userdict /md known{userdict /md get type
-/dicttype eq{userdict begin md length 10 add md maxlength ge{/md md dup
-length 20 add dict copy def}if end md begin /letter{}N /note{}N /legal{}
-N /od{txpose 1 0 mtx defaultmatrix dtransform S atan/pa X newpath
-clippath mark{transform{itransform moveto}}{transform{itransform lineto}
-}{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform{
-itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}}{{
-closepath}}pathforall newpath counttomark array astore /gc xdf pop ct 39
-0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if}N
-/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 -1
-scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 get
-ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip
-not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0
-TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{noflips{TR
-pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop 90 rotate 1
--1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg
-TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr 1 get neg
-sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr 2 get ppr
-0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 -1 roll add
-2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S TR}if}N /cp
-{pop pop showpage pm restore}N end}if}if}N /normalscale{Resolution 72
-div VResolution 72 div neg scale magscale{DVImag dup scale}if 0 setgray}
-N /psfts{S 65781.76 div N}N /startTexFig{/psf$SavedState save N userdict
-maxlength dict begin /magscale false def normalscale currentpoint TR
-/psf$ury psfts /psf$urx psfts /psf$lly psfts /psf$llx psfts /psf$y psfts
-/psf$x psfts currentpoint /psf$cy X /psf$cx X /psf$sx psf$x psf$urx
-psf$llx sub div N /psf$sy psf$y psf$ury psf$lly sub div N psf$sx psf$sy
-scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub TR
-/showpage{}N /erasepage{}N /copypage{}N /p 3 def @MacSetUp}N /doclip{
-psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2
-roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath
-moveto}N /endTexFig{end psf$SavedState restore}N /@beginspecial{SDict
-begin /SpecialSave save N gsave normalscale currentpoint TR
-@SpecialDefaults count /ocount X /dcount countdictstack N}N /@setspecial
-{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto
-closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx
-sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR
-}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse
-CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury
-lineto closepath clip}if /showpage{}N /erasepage{}N /copypage{}N newpath
-}N /@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{
-end}repeat grestore SpecialSave restore end}N /@defspecial{SDict begin}
-N /@fedspecial{end}B /li{lineto}B /rl{rlineto}B /rc{rcurveto}B /np{
-/SaveX currentpoint /SaveY X N 1 setlinecap newpath}N /st{stroke SaveX
-SaveY moveto}N /fil{fill SaveX SaveY moveto}N /ellipse{/endangle X
-/startangle X /yrad X /xrad X /savematrix matrix currentmatrix N TR xrad
-yrad scale 0 0 1 startangle endangle arc savematrix setmatrix}N end
-%%EndProcSet
-TeXDict begin 40258431 52099146 1000 300 300 (paper.dvi)
-@start /Fa 43 122 df<126012F0A212701210A31220A312401280040C7B830D>44
-D<126012F0A2126004047B830D>46 D<1303A3497EA2497E130BA2EB11E0A3EB20F0A249
-7E1478A2497EA33801FFFEEB001E0002131F80A248EB0780A2120C001E14C039FF803FFC
-1E1D7E9C22>65 D<B512C0380F0078141C141E140E140FA4140E141E5C14F8EBFFF0EB00
-3C140FEC0780A2EC03C0A5EC078015005C143CB512F01A1C7D9B20>I<90380FE0209038
-7018603801C00439030003E000061301000E13004814605A15201278127000F01400A800
-70142012781238A26C14407E000614806CEB01003801C00638007018EB0FE01B1E7D9C21
->I<B512C0380F0078141C140715801403EC01C0A215E0140015F0A815E0A2140115C0EC
-0380A2EC0700141E1478B512E01C1C7D9B22>I<B6FC380F000F140380A215801400A214
-801500A3130113FF13011300A3154014001580A31401A2EC0300140FB6FC1A1C7D9B1F>
-I<B512FE380F001E14061402A214031401A214811480A3130113FF13011300A41400A77F
-EAFFF8181C7D9B1E>I<90381FC04090387030C03801C00C38030003000E1301120C001C
-13005A15401278127000F01400A6EC7FF8EC07C00070130312781238A27E120C120E0003
-13053801C008390070304090381FC0001D1E7D9C23>I<39FFF0FFF0390F000F00AC90B5
-FCEB000FAD39FFF0FFF01C1C7D9B22>I<380FFF8038007C00133CB3127012F8A21338EA
-7078EA4070EA30E0EA0F80111D7D9B18>74 D<39FFF00FF8390F0007C0EC030014025C5C
-5C1460148049C7FC13021307497E1317EB23C0EB43E01381EB00F08014788080141F80EC
-078015C015E039FFF03FFC1E1C7D9B23>I<EAFFF8EA0F8090C7FCB01404A3140CA21408
-1418143814F8B5FC161C7D9B1C>I<B46CEB3FE0000FEC3E00A2D80BC0135EA2D809E013
-9EA33908F0011EA2EB7802A3EB3C04A2EB1E08A3EB0F10A2EB07A0A3EB03C0A2EB018012
-1C3AFF8181FFE0231C7D9B29>I<B4EB1FF0390F8003809038C00100120BEA09E0EA08F0
-A21378133C133E131E130F14811307EB03C1EB01E114F113001479147D143D141FA28080
-80121CB46C7E1C1C7D9B22>I<B512E0380F0078141C80801580A51500140E5C1478EBFF
-E090C8FCACEAFFF0191C7D9B1F>80 D<B57E380F00F014388080140FA4140E5C5C14F0EB
-FF80EB01E0EB0070147880A61508A2141CEC1E1038FFF00EC7EA03E01D1D7D9B21>82
-D<3803E080EA0C19EA1005EA3003EA600112E01300A36C13007E127EEA7FE0EA3FFC6CB4
-FC00071380EA007FEB07C0EB03E0130113007EA36C13C0A238E0018038D00300EACE06EA
-81F8131E7D9C19>I<007FB512C038700F010060130000401440A200C014201280A30000
-1400B1497E3803FFFC1B1C7D9B21>I<39FFF01FF0390F000380EC0100B3A26C13021380
-00035BEA01C03800E018EB7060EB0F801C1D7D9B22>I<39FFE003FC001FC712F06C1440
-A26C6C1380A27F0003EB0100A23801E002A2EBF00600001304A2EB7808A2EB7C18EB3C10
-A26D5AA2EB1F60EB0F40A26D5AA36DC7FCA21E1D7E9B22>I<3BFFE07FF03FC03B1F000F
-800F00ED00066CEC8004A213800007496C5A1413A23A03C033E0101421A23A01E061F020
-1440A2D800F06D5AEC8078A20178EB7C80903879003CA2013D013FC7FC013E7FA2011E13
-1E011C130EA2010C130C010813042A1D7E9B2E>I<13201370A313B8A3EA011CA3EA020E
-A2487EA2EA07FF38080380A3381801C0EA380338FE0FF815157F9419>97
-D<EAFFFCEA1C07EB038014C0A414801307381FFF00A2381C038014C0EB01E0A414C01303
-EB078038FFFE0013157F9418>I<EBFC2038078260380E01E0EA1C004813600078132012
-7012F01400A5142012701278003813407E6C138038078300EA00FC13157E9419>I<EAFF
-FCEA1C07EB01C0EB00E0A21470A21478A71470A214E0A2EB01C0EB0700EAFFFC15157F94
-1A>I<B51280EA1C031300A21440A213101400A21330EA1FF0EA1C3013101420A2130014
-60144014C01301B5FC13157F9417>I<EBFC2038078260380E01E0EA1C00481360007813
-20127012F01400A3EB0FF8EB00E0A21270127812387E7E380783603800FC2015157E941B
->103 D<38FF8FF8381C01C0A9EA1FFFEA1C01A938FF8FF815157F9419>I<EAFF80EA1C00
-B3EAFF8009157F940D>I<38FF83F8381C01E01480140013025B5B5B1330137013B8EA1D
-1C121EEA1C0E7F14801303EB01C014E014F038FF83FC16157F941A>107
-D<EAFFC0001CC7FCAC1480A3130114005B5BB5FC11157F9415>I<00FEEB0FE0001E1400
-00171317A338138027A23811C047A33810E087A2EB7107A3133AA2131CA2123839FE083F
-E01B157F941F>I<38FC03F8381E00E014401217EA138013C01211EA10E01370A2133813
-1CA2130E130714C0130313011300123800FE134015157F9419>I<EA01F8EA070EEA0C03
-001C1380383801C0007813E0EA700000F013F0A7007013E0EA7801003813C0381C0380EA
-1E0738070E00EA01F814157E941A>I<EAFFFCEA1C0FEB038014C0A51480EB0F00EA1FFC
-001CC7FCA9B47E12157F9417>I<EAFFF8EA1C0EEB0780130314C0A314801307EB0E00EA
-1FF8EA1C1C7F7FA31480148414C4EB03CC38FF80F816157F9419>114
-D<EA1F10EA30F0EA603012C01310A213007E127EEA3FC0EA1FE0EA03F0EA007813381318
-1280A21310EAC030EAF060EA8FC00D157E9413>I<387FFFF03860703000401310A20080
-1308A300001300ADEA07FF15157F9419>I<38FF83F8381C00E01440AE000C13C0000E13
-8038060100EA0386EA00FC15157F9419>I<38FF01F8383C00F0001C1340A2001E13C000
-0E1380A238070100A21383EA0382A2EA01C4A213E4EA00E8A21370A3132015157F9419>
-I<38FF87F0381E0380000E1300EA0F026C5AEA038413C8EA01D0EA00F0A21370137813BC
-EA011C7FEA020F487EEB0380000C13C0123C38FE07F815157F9419>120
-D<38FF80FE381E0078000E1320000F13407E3803808013C100011300EA00E2A21374137C
-1338A848B4FC1715809419>I E /Fb 7 118 df<EA0780EA1840EA302012601340EAFF80
-EAC000A413201340EA6180EA3E000B0E7C8D10>101 D<123E120CA41218A41230A41260
-A412C012C8A312D0126007177D9609>108 D<3830783C38498CC6384E0502EA4C06389C
-0E06EA180CA348485A15801418A23960300900140E190E7D8D1D>I<EA0780EA18C0EA30
-40EA6060A212C0A3EA80C0A2EA8180EAC1001246123C0B0E7B8D12>111
-D<EA30F0EA4B18EA4E38EA4C30EA98001218A35AA45AA20D0E7D8D0F>114
-D<EA0780EA0C40EA18E0A2EA3800121EEA1F80EA07C01200126012E0EAC180EAC300123E
-0B0E7D8D0F>I<EA3804EA2C0C124CA2EA8C181218A3EA30301332A21372EA18B4EA0F1C
-0F0E7D8D13>117 D E /Fc 1 59 df<126012F0A2126004047D830A>58
-D E /Fd 1 111 df<EA30F8EA590C124E129C12981218A2EA301813191331A2EA603213
-1C100D7F8C15>110 D E /Fe 22 121 df<EAFF80A2090280880C>45
-D<12E0A303037D820A>I<130813181330A31360A313C0A3EA0180A3EA0300A21206A35A
-A35AA35AA35AA35AA20D217E9812>I<1202120E12FEA2120EB0EAFFE0A20B167D9512>
-49 D<B51280A2380007005B130E5B133C5B137013F0485A5B1203485A90C7FC5A121E12
-1C5A12781270B51280A211177E9616>90 D<EA1FC0EA7FE0EA7070EA40381200A2EA01F8
-121FEA7E3812F012E0A2EAF078EA7FF8EA3FB80D0F7F8E11>97 D<12E0A8EAE7C0EAFFE0
-EAF870EAE038A2131CA51338A2EAF0F0EAFFE0EAE7800E177E9612>I<EA07E0EA1FF8EA
-3838EA7000A25AA512701308EA3838EA1FF8EA07E00D0F7F8E10>I<EA0F80EA1FE0EA38
-70EA7030EA6038EAE018EAFFF8A2EAE000A212601270EA3818EA1FF8EA07E00D0F7F8E10
->101 D<EA03E01207EA0C20EA1C00A5EAFF80A2EA1C00AD0B1780960B>I<EA0F9FEA1FFF
-EA38F0EA7070A4EA38E0EA3FC0EA6F80EA60001270EA7FF0EA3FF8EA7FFCEA701EEAE00E
-A3EA783CEA3FF8EA0FE010167F8E12>I<12E0A31200A612E0AF03187E9708>105
-D<12E0B3A503177E9608>108 D<38E7E1F838EFF3FC38F87E1E38F03C0EEAE038AB170F
-7E8E1C>I<EAE7E0EAEFF0EAF878EAF03812E0AB0D0F7E8E12>I<EA07C0EA1FF0EA3838EA
-701CA2EAE00EA5EA701CA2EA3C78EA1FF0EA07C00F0F7F8E12>I<EAE7C0EAFFE0EAF870
-EAE038A2131CA51338A2EAF0F0EAFFE0EAE780EAE000A60E157E8E12>I<EAE38012EFEA
-FC005A5AA25AA9090F7E8E0C>114 D<121FEA7FC012E01300A27E127FEA3F80EA0FC0EA
-01E0128012C0EAE1C0127FEA1F000B0F7F8E0E>I<1238A4EAFFC0A2EA3800AA1340EA1F
-C013000A137F920D>I<EAE038AC13F8127FEA3F380D0F7E8E12>I<EA701CEA7838EA3870
-121CEA0EE0EA07C0EA0380A2EA07C0EA0EE0EA0C60EA1C70EA3838EA701CEAF01E0F0F80
-8E10>120 D E /Ff 34 121 df<3801F1C0120312071301120EA7EAFFF1A2EA0E01B012
-1D809C16>13 D<EAFFE0A20B0280890E>45 D<12E0A303037C820C>I<130113031306A3
-130CA31318A31330A31360A213C0A3EA0180A3EA0300A31206A25AA35AA35AA35AA35AA2
-10297E9E15>I<EA03C0EA0FF0EA1FF8EA3C3CEA381CEA700EA3EAE007ADEA700EA3EA38
-1CEA3C3CEA1FF8EA0FF0EA07E0101D7E9B15>I<5A1207123FB4FC12C71207B3A3EAFFF8
-A20D1C7C9B15>I<EA07C0EA1FF0EA3878EA701CEA601EEAE00EEAC00F124013071200A2
-130F130E131E131C133C137813F0EA01E013C0EA0380EA0700120E5A5A5AB5FCA2101C7E
-9B15>I<EA07E0EA1FF0EA3838EA701CEAE01E1240A21200A2131C133C1378EA07F013E0
-13F0EA003C131C131E130FA41280A2EAC01EEA601CEA383CEA1FF0EA07E0101D7E9B15>
-I<133C137C135C13DC1201139C1203A2EA071CA2120EA2121C123C12381278127012F0B5
-12C0A238001C00A7121B7F9A15>I<EA7FFEA2EA7000A7EA73E0EA7FF013F8EA7E3CEA7C
-1E1278130F1200A6EA401E12C0EA603CEA3878EA1FF0EA0FC0101C7E9A15>I<B5FCA2EA
-0007130E131CA213381378137013F013E01201A2EA03C0A3EA0780A413005AA6101B7E9A
-15>55 D<EA03C0EA0FF0EA1C38EA381CEA700C130E12E013061307A5130F1270EA781FEA
-3C3FEA3FF7EA1FE7EA0F86EA000EA2130C131C1318EA2030EA70F0EA3FC0EA0F80101D7E
-9B15>57 D<B512C0A200F0C7FCABB51280A200F0C7FCACB512C0A2121D7C9C19>69
-D<387FFFF0A2380001E0130314C013071480EB0F005B131E133E133C5B13F85B12015B48
-5A12075B120F90C7FC121E123E123C127C1278B512F0A2141D7E9C19>90
-D<EA0FC0EA3FF0EA7FF8EA7038EA401C1200A213FC120F123FEA781C12E0A3EAF07CEA7F
-FC13DCEA3F1C0E127E9114>97 D<12E0ABEAE3E0EAEFF0EAFFF8EAF87CEAF01CEAE01E13
-0EA6131C12F0EAF87CEAFFF8EAEFF0EAE3C00F1D7D9C15>I<EA07E0EA0FF8EA1FFCEA3C
-1CEA700413005AA612701304EA3C1CEA1FFCEA0FF8EA07E00E127E9112>I<130EABEA0F
-8EEA1FEEEA3FFEEA7C3EEA700EA212E0A612F0EA701EEA7C3EEA3FFEEA1FEEEA0F8E0F1D
-7E9C15>I<EA07C0EA1FE0EA3FF0EA7878EA7018EA601CEAFFFCA3EAE000A312701304EA
-3C1CEA3FFCEA1FF8EA07E00E127E9112>I<13FC12011203EA0700120EA7EAFFE0A2EA0E
-00B00E1D809C0D>I<3803C3C0EA0FFF5A381C3800487EA56C5AEA1FF85BEA3BC00038C7
-FCA2EA1FFC13FF481380EA700738E001C0A3EAF003387C0F80383FFF006C5AEA07F8121B
-7F9115>I<12F0A41200A71270B2041D7E9C0A>105 D<12E0AB133C137813F0EAE1E0EAE3
-C0EAE780EAEF00B4FC138012FBEAF9C0EAF1E012E013F013781338133C131E0F1D7D9C14
->107 D<12E0B3AB031D7D9C0A>I<38E3F03F39EFF8FF80D8FFFD13C039F81F81E038F00F
-00EAE00EAD1B127D9122>I<EAE3E0EAEFF0EAFFF8EAF83CEAF01C12E0AD0E127D9115>I<
-EA03F0EA0FFC487EEA3C0F38780780EA700338E001C0A5EAF00300701380EA7807383C0F
-00EA1FFE6C5AEA03F012127F9115>I<EAE3E0EAEFF0EAFFF8EAF87CEAF01CEAE01E130E
-A6131CEAF03CEAF87CEAFFF8EAEFF0EAE3C0EAE000A80F1A7D9115>I<EAE38012E712EF
-EAFC005A5AA25AAB09127D910E>114 D<EA1FC0EA3FF0127FEAF030EAE000A27E127FEA
-3FC0EA1FE0EA00F01338A21280EAF078EAFFF0EA7FE0EA1FC00D127F9110>I<121CA6EA
-FFE0A2EA1C00AC1320EA1FF0120FEA07C00C187F970F>I<EAE01CAE137CEAFFFCEA7FDC
-EA3F1C0E127D9115>I<39E03E0380A3D870371300EB7707A213733838E38EA33818E18C
-381CC1CC001D13DCA2380D80D8000F13F8A20007137019127F911C>119
-D<3870038038780700EA3C0EEA1C1C120E6C5AEA03F06C5A5B7F487EEA0738EA0E18131C
-487E487E3870038000F013C01212809113>I E /Fg 72 126 df<126012F0AA12701200
-A4126012F0A212600414799312>33 D<EA4040EAE0E0A7EA40400B097D9312>I<EA0E38
-A4EAFFFEA2127FEA1C70A5EA7FFE12FFA2EA38E0A50F147F9312>I<EA3018EA783812FC
-1370A313E0A21278EA31C01201A2EA0380A2EA0700A3EA0E18133C137E121CA31238133C
-EA18180F1A7F9612>37 D<1207EA1F80EA19C01239A3EA3B9E133EEA3E38EA1C70A2EA1E
-E0123E1267EAE7C0EAE3C413CE12E7EA7EFCEA3C380F147F9312>I<126012F012F81278
-1218A31230A2126012C01280050C799312>I<EA01801203EA06005A5A123812301270A2
-5AA71270A21230123812187E7EEA0380120109197B9612>I<128012C012601230121812
-1C120C120EA21207A7120EA2120C121C12181230126012C0128008197C9612>I<1207A3
-EAE738EAFFF8EA7FF0EA1FC0A2EA7FF0EAFFF8EAE738EA0700A30D0E7E9012>I<EA0380
-A6EAFFFEA3EA0380A60F0F7F9112>I<126012F012F8127812181230A212E012C0050979
-8312>I<EAFFF8A30D037E8B12>I<126012F0A212600404798312>I<13181338A21370A2
-13E0A2EA01C0A3EA0380A2EA0700A2120EA25AA35AA25AA25AA25A0D1A7E9612>I<EA07
-C0EA0FE0EA1C70EA3838EA701CA2EAE00EA7131EEA701CA2EA3838EA1C70EA0FE0EA07C0
-0F147F9312>I<1206A2120E121E12FE12EE120EACEAFFE0A20B147D9312>I<EA0F80EA3F
-C0EA70E0EAE0701338A2124012001330137013E013C0EA0180EA030012065AEA18381230
-EA7FF8A20D147E9312>I<EA0FC0EA3FF0EA7838EA701C1220120013381370EA07E013F0
-EA0038131C130EA2124012E0131CEA7838EA3FF0EA0FC00F147F9312>I<12E0EAFFFEA2
-EAE0181338EA007013E013C01201EA0380A2EA0700A4120EA512040F157F9412>55
-D<EA07C0EA1FF0EA3C78EA783CEA701CA3EA3838EA0FE0EA07C0EA3C78EA701CEAE00EA4
-EA701CEA783CEA1FF0EA0FE00F147F9312>I<EA07C0EA1FF0EA3838EA7018EAE01C130C
-130EA2EA701EEA383EEA1FEEEA0FCEEA000E131CA2EA7018133813F0EA3FC0EA0F800F14
-7F9312>I<126012F0A212601200A6126012F0A21260040E798D12>I<126012F0A2126012
-00A6126012F0A212701230A2126012C012800413798D12>I<13381378EA01F0EA03E0EA
-0F80EA1F00123C12F85A7E123C121FEA0F80EA03E0EA01F0EA007813380D117E9212>I<
-EAFFFEA2127FC7FCA3EA7FFE12FFA20F097F8E12>I<124012E07E127C7EEA0F80EA07C0
-EA01E0EA00F8137813F8EA01E0EA07C0EA0F80EA3E005A12F05A12400D137E9312>I<EA
-0380EA07C0A21206A2EA0EE0A4EA0C60EA1C70A3EA1FF0A2EA3838A3EAFC7EA20F147F93
-12>65 D<EAFFE013F0EA3838131CA413381378EA3FF013F8EA381C130EA4131E133CEAFF
-F813F00F147F9312>I<EA03E6EA0FFEEA1C3EEA381EEA700EA21260EAE000A6EA600E12
-70A2EA381CEA1C38EA0FF0EA03E00F147F9312>I<EAFFFEA2EA380EA31300A213E0A212
-3FA21238A21300130EA4EAFFFEA20F147F9312>69 D<EAFFFEA2EA380EA31300A21370A2
-EA3FF0A2EA3870A21300A512FEA20F147F9312>I<EAFFE0A2EA0E00B0EAFFE0A20B147D
-9312>73 D<EAFE7E127EEA3838137013E0A2EA39C0EA3B80123FA213C0123DEA3CE01238
-1370A21338A2EA7E7E12FE0F147F9312>75 D<B4FCA21238AC1304130EA3EAFFFEA20F14
-7F9312>I<EAFC7EA2EA7C7CEA745CEA76DCA61277EA739CA2EA701CA5EAF83EA20F147F
-9312>I<EA3FE0EA7FF0EA7070EAE038AEEA7070EA7FF0EA3FE00D147E9312>79
-D<EAFFE013F8EA383C131C130EA4131C133CEA3FF813E0EA3800A612FEA20F147F9312>
-I<EAFF8013E0EA38F013781338A3137813F0EA3FE013C0EA38E01370A41377A2EAFE3E13
-1C10147F9312>82 D<EA1F30EA3FF01270EAE070A313001270127FEA3FC0EA0FE0EA00F0
-13781338126012E01330EAF070EAFFE0EACF800D147E9312>I<EA7FFE12FFEAE38EA3EA
-0380ADEA0FE0A20F147F9312>I<38FE3F80A238380E00AE6C5A6C5AEA07F06C5A111480
-9312>I<EAFC7EA2EA3838A2EA1C70A2EA0EE0A3EA07C0A2EA0380A7EA0FE0A20F147F93
-12>89 D<EA7FF812FFEAE070A213E01200EA01C0EA0380A2EA0700A2120EA25AEA381CA2
-1270A2EAFFFCA20E147E9312>I<EAFFC0A2EAE000B3A4EAFFC0A20A1A7A9612>I<12C07E
-A21270A27EA27EA37EA27EA2EA0380A2EA01C0A3EA00E0A21370A21338A213180D1A7E96
-12>I<EAFFC0A21201B3A412FFA20A1A7F9612>I<EA1FC0EA3FF0EA3838EA101C1200EA07
-FC123FEA781C12E0A3EA703C383FFF80EA1FCF110E7F8D12>97 D<12F8A21238A4EA3BE0
-EA3FF0EA3C38EA381C130C130EA4130C131CEA3C38EA3FF0EA1BC00F147F9312>I<EA07
-F0EA1FF8EA3838EA7010EA600012E0A41260EA70381238EA1FF0EA07E00D0E7E8D12>I<
-13F8A21338A4EA07B8EA1FF8EA3878EA7038126012E0A41260EA70781238EA1FFEEA0FBE
-0F147F9312>I<EA0780EA1FE0EA38701270EA603812E0EAFFF8A2EAE0001260EA703812
-38EA1FF0EA07C00D0E7E8D12>I<137E13FFEA01C7EA03821380A2EA7FFE12FFEA0380AA
-EA3FF8A21014809312>I<EA0F9EEA1FFFEA38E7EA7070A4EA38E0EA3FC01380EA7000EA
-3FE013F813FCEA701EEAE00EA3EA600CEA783CEA1FF0EA0FE010167F8D12>I<12F8A212
-38A4EA39E0EA3FF0EA3E38123C1238A8EAFE3EA20F147F9312>I<1206120FA21206C7FC
-A3127FA21207AAEAFFF0A20C157D9412>I<12F8A21238A4EA3BFCA2EA38F0EA39E0EA3B
-C0EA3F80A213C0EA3DE0123813701338EAFC7EA20F147F9312>107
-D<B4FCA21207B0EAFFF8A20D147E9312>I<EAF71CEAFFBEEA79E7A2EA71C7A838F9E780
-EAF8E3110E808D12>I<EAF9E0EAFFF0EA3E38123C1238A8EAFE3EA20F0E7F8D12>I<EA0F
-80EA3FE01238EA7070EAE038A5EAF078EA7070EA38E0123FEA0F800D0E7E8D12>I<EAFB
-E0EAFFF0EA3C38EA381C130C130EA4130C131CEA3C38EA3FF0EA3BC0EA3800A512FEA20F
-157F8D12>I<EAFC78EAFDFCEA1F9CEA1E081300121CA7EAFFC0A20E0E7E8D12>114
-D<EA1FF0123FEA607012C0EAE000127FEA3FE0EA0FF0EA0078EA601812E0EAF030EAFFE0
-EADFC00D0E7E8D12>I<1206120EA3EA7FF812FFEA0E00A7131CA3EA07F8EA01E00E127F
-9112>I<EAF8F8A2EA3838A91378EA1FFEEA0FBE0F0E7F8D12>I<EAFC7EA2EA3838A2EA1C
-70A3EA0EE0A4EA07C0A2EA03800F0E7F8D12>I<EAFEFEA2EA701CA3EA3018EA3BB8EA3F
-F8A2EA3AB81238EA1CF0A30F0E7F8D12>I<EA7C7CA2EA1CF0EA0EE0EA0FC01207EA0380
-120713C0EA0EE0EA1EF0EA1C70EAFC7EA20F0E7F8D12>I<EAFC7EA2EA3838121C1370A2
-120E136013E01206A2EA07C01203A21380A3EA7700127F127E12380F157F8D12>I<EA3F
-FC127FEA70381370EA00E0EA01C0EA0380EA0700120EEA1C1C12381270EAFFFCA20E0E7F
-8D12>I<13F81201EA0380EA0700A8120E12FCA2120E7EA8EA0380EA01F812000D1A7E96
-12>I<127812FC120E7EA8EA0380EA01F8A2EA0380EA0700A8120E12FC12780D1A7E9612>
-125 D E /Fh 37 123 df<90383FE3F83901F03F1C3903C03E3E0007137CEA0F80151C15
-00A5B612C0A2390F807C00AE397FE1FFC0A21F1D809C1C>11 D<127812FCA4127806067D
-850D>46 D<1360EA01E0120F12FF12F31203B3A2387FFF80A2111B7D9A18>49
-D<EA07F8EA1FFE38383F8038780FC0EAFC0714E01303A21278EA000714C0A2EB0F80EB1F
-00131E13385B5B38018060EA03001206000813E0381FFFC05A5AB5FCA2131B7E9A18>I<
-EA03F8EA1FFEEA3C1FEB0F80387C07C0127E127C123838000F80A2EB1E005BEA03F8EA00
-1EEB0F80EB07C0A214E01230127812FCA214C038780F80EB1F00EA1FFEEA07F8131B7E9A
-18>I<EB018013031307130F131F133F136F13CF138F1201EA030F1206120C1218123012
-6012C0B512F8A238000F80A63801FFF8A2151B7F9A18>I<B512F814FF390FC01F80EC0F
-C0140715E0A515C0EC0F80EC3F00EBFFFE9038C00F80EC07C015E0140315F0A5EC07E0A2
-EC1FC0B6120014FC1C1C7E9B22>66 D<90381FE0209038FFF8E03803F80F3807C003380F
-800148C7FC123E1560127E127C00FC1400A8007C1460127E123E15C07E390F8001803907
-C003003803F80E3800FFFCEB1FE01B1C7D9B22>I<B6FCA2380FC01F1407801580A2EBC1
-81A3EC800013C313FFA213C313C1A21560A29038C000E015C0A21401A21403EC0F80B6FC
-A21B1C7E9B1F>69 D<D8FFC0EB03FF6D5B000F15F0D80DF0130DA3D80CF81319A2017C13
-31A26D1361A26D13C1A390380F8181A2903807C301A2EB03E6A2EB01FCA3EB00F8A23AFF
-C0701FFFA2281C7E9B2D>77 D<EB3FE03801F07C3803C01E390F800F80391F0007C0001E
-1303003E14E0007E14F0007C1301A200FC14F8A8007C14F0007E1303A2003E14E0003F13
-076C14C0390F800F803903C01E003801F07C38003FE01D1C7D9B24>79
-D<B512F014FE380FC03FEC0F806E7E81A55D4A5A023EC7FCEBFFF0EBC07C80143F6E7EA6
-ED8180A2EC0FC13AFFFC07C300EC01FE211C7E9B24>82 D<3807F820381FFEE0EA3C07EA
-7801EA700012F01460A26C130012FEEAFFE0EA7FFE6C7E1480000F13C06C13E0EA007FEB
-03F01301130012C0A214E07E38F001C0EAFC0338EFFF00EA83FC141C7D9B1B>I<007FB5
-12E0A238781F81007013800060146000E0147000C01430A400001400B03807FFFEA21C1C
-7E9B21>I<EA0FF8EA1C1E383E0F80130714C0121C1200137FEA07E7EA1F07123C127C12
-F8A3EA780B383E13F8EA0FE115127F9117>97 D<B4FCA2121FA9EB3F80EBE1E0EB8070EB
-0078143CA2143EA6143CA21478EB8070381EC1E0381C3F00171D7F9C1B>I<EA03FCEA0E
-0EEA1C1F123C1278130E00F8C7FCA61278EB0180123C381C0300EA0E0EEA03F811127E91
-15>I<EB0FF0A21301A9EA01F9EA0F07EA1C03EA3C011278A212F8A61278A2123CEA1C03
-380F0FFEEA03F9171D7E9C1B>I<EA01FCEA0F07381C0380383C01C0127814E012F8A2B5
-FC00F8C7FCA31278007C1360123C6C13C0380F03803801FC0013127F9116>I<137F3801
-E3803803C7C0EA0787120FEB8380EB8000A5EAFFF8A2EA0F80AEEA7FF8A2121D809C0F>
-I<3803F8F0380E0F38121E381C0730003C1380A4001C1300EA1E0FEA0E0EEA1BF80010C7
-FC1218A2EA1FFF14C06C13E04813F0387801F838F00078A300701370007813F0381E03C0
-3807FF00151B7F9118>I<B4FCA2121FA9EB0FC0EB31E0EB40F0EB80F8A21300AB38FFE7
-FFA2181D7F9C1B>I<121E123FA4121EC7FCA6B4FCA2121FAEEAFFE0A20B1E7F9D0E>I<B4
-FCA2121FA9EB0FF8A2EB0380EB0700130C5B137013F87F13BC133E7F7F1480EB07C0EB03
-E038FFC7FCA2161D7F9C19>107 D<B4FCA2121FB3A7EAFFE0A20B1D7F9C0E>I<39FF0FC0
-7E903831E18F3A1F40F20780D980FC13C0A2EB00F8AB3AFFE7FF3FF8A225127F9128>I<
-38FF0FC0EB31E0381F40F0EB80F8A21300AB38FFE7FFA218127F911B>I<EA01FC380F07
-80381C01C0003C13E0387800F0A200F813F8A6007813F0A2383C01E0381E03C0380F0780
-3801FC0015127F9118>I<38FF3F80EBE1E0381F80F0EB0078147C143C143EA6143C147C
-1478EB80F0EBC1E0EB3F0090C7FCA6EAFFE0A2171A7F911B>I<EAFE3E1347381E8F80A3
-381F070090C7FCAAEAFFF0A211127F9114>114 D<EA1FD8EA3078EA601812E0A2EAF000
-EAFF80EA7FE013F0EA1FF8EA07FCEA007CEAC01CA212E01318EAF830EACFC00E127E9113
->I<1203A45AA25AA2EA3FFC12FFEA1F00A9130CA4EA0F08EA0798EA03F00E1A7F9913>I<
-38FF07F8A2EA1F00AC1301120F380786FFEA01F818127F911B>I<39FF8FF8FEA2391F03
-E030A201831370000FEBF0601386D807C613C0EBCEF8EBEC790003EB7D80EBF83D0001EB
-3F00A2497E0000131EEBE00EA21F127F9122>119 D<38FFC7FCA2381F8180EA0F833807
-C700EA03EEEA01FC5B1200137C13FEEA01DFEA039F38070F80380607C0380C03E038FF07
-FCA216127F9119>I<38FFC1FCA2381F0060EB80E0000F13C013C03807C180A23803E300
-A2EA01F713F6EA00FE5BA21378A21330A21370EA706012F85BEAF9800073C7FC123E161A
-7F9119>I<383FFF80383C1F00EA303F133E485A13FC5BEA01F01203485AEBC180EA0F81
-121F1303003E1300EA7E07EA7C0FB5FC11127F9115>I E /Fi 55
-124 df<1218123CA31204A21208A21210122012401280060C779C0D>39
-D<EB01C05CA3130391C7FCA35B1306A3B612C0A2D8000CC7FCA2131C1318A313381330A3
-137013601A1A7B9620>43 D<12181238127812381208A21210A212201240A21280050C7D
-830D>I<EAFFC0A30A037D890F>I<1230127812F0126005047C830D>I<14031407140E14
-0C141C141814381430147014E014C013011480130314005B1306130E5B13181338133013
-70136013E05B1201485A90C7FC5A1206120E120C121C121812385A126012E05AA218297F
-9E15>I<133C13C6EA0183EA030312061480120E120C121C1400485AA4EA700EA4485AA3
-5BA21330485A12E0EA60C0EA7180001EC7FC111D7B9B15>I<13021306130C131C137CEA
-039CEA0038A41370A413E0A4EA01C0A4EA0380A41207EAFFF00F1C7C9B15>I<133C13C3
-38010180120214C0EA0441A21208A338108380A238110700EA0E06C65A5B5B13C048C7FC
-12061208485A13021220EA4006EA7E0CEAC7F81283EA80E0121D7C9B15>I<133EEBC180
-EA0101380200C05A1340EA0841A3EB8380EA070338000700130EEA01F8EA0038130CA213
-0EA41270485A12805B1330EA4060EA21C0001FC7FC121D7C9B15>I<EB018014C0EB0380
-A314005BA21306130E130C131C1318A25BA25B134013C6EA018E130E1202EA061C120C12
-18123FEA40F8EA803FEA0038A25BA45B136012247E9B15>I<EBC060EBFFC0481380EBFE
-0090C7FCA21202A4EA0478EA058CEA060612041208EA0007A21306130EA21270130CEAE0
-1CEA80181338EA40305BEA21C0001FC7FC131D7C9B15>I<130FEB308013C0EA01831203
-90C7FC1206120E120C121C13F0EA3B18EA3C0C12381278EA700EA3EA601C12E0A35BA25B
-EA60605BEA2180001EC7FC111D7B9B15>I<131E1361EB8180EA0180380300C0A2380601
-80A3380703001386EA03CC13F01201EA0378EA063CEA081EEA180E1230EA6006A3485AA2
-5BEA60105BEA30C0000FC7FC121D7C9B15>56 D<133C13C6EA0183EA03031206120E000C
-1380121C1400A2485AA35B130EEA181EA2EA0C6CEA079CEA001C1318133813305BEAE0C0
-A2EA81800086C7FC127C111D7B9B15>I<1206120FA212061200AA1230127812F0126008
-127C910D>I<1418A21438A21478A214B8130114381302143CEB041CA213081318131013
-20A2EB7FFCEB401C1380120113001202A2487F120C001C131EB4EBFFC01A1D7E9C1F>65
-D<903803F02090381E0C6090383002E09038E003C03801C001EA038048C7FC000E148012
-1E121C123C15005AA35AA41404A35C12705C6C5B00185B6C485AD80706C7FCEA01F81B1E
-7A9C1E>67 D<48B512E038003C00013813601540A35BA214201500495AA214C013FF3801
-C080A43803810113801402A248485AA2140C5C000E1378B55A1B1C7D9B1C>69
-D<48B512C038003C01EB38001580A35BA214201500495AA214C013FF3801C080A4D80381
-C7FC1380A348C8FCA45AEAFFF01A1C7D9B1B>I<903803F02090381E0C6090383002E090
-38E003C03801C001EA038048C7FC000E1480121E121C123C15005AA35AA2903801FFC090
-38001E00141CA400705BA27E001813786C139038070710D801F8C7FC1B1E7A9C20>I<38
-01FFC038003C001338A45BA45BA4485AA4485AA448C7FCA45AEAFFE0121C7E9B10>73
-D<3801FFE038003C001338A45BA45BA4485AA438038008A31410EA07001430146014E038
-0E03C0B5FC151C7D9B1A>76 D<D801FEEB07F8D8003E1480012EEB0F001517A21527014E
-132E154EA2158E90388E011CA21402A23901070438A21408141000025C1420A214400004
-5C14801400120C381C060139FF861FFC251C7D9B25>I<3901FC03FE39001C0070013C13
-60012E1340A301471380A3EB43809038838100A2138114C1380101C2A2EB00E2A2000213
-E41474A3481338A3000C1318001C1310EAFF801F1C7D9B1F>I<EB07F0EB1C1CEB700E49
-7E3901C00380EA0380EA0700000E14C0121E121C123CA25AA348EB0780A3EC0F00A2140E
-141E5C007013385C00785B383801C06C485AD80E0EC7FCEA03F81A1E7A9C20>I<3801FF
-FC38003C079038380380EC01C0A3EB7003A31580EBE0071500140E14383801FFE001C0C7
-FCA3485AA448C8FCA45AEAFFE01A1C7D9B1C>I<3801FFF838003C0EEB3807EC0380A3EB
-7007A3EC0F00EBE00E5C1470EBFFC0EA01C014601470A2EA0380A4380700F01540A21580
-48137839FFE07900C7121E1A1D7D9B1E>82 D<EB0F84EB304CEB403CEB8018EA01005AA2
-00061310A214001207A2EA03E013FC6CB4FC38007F80EB07C01301A21300A21220A23860
-0180A2EB03001302EAF004EACC18EA83E0161E7D9C17>I<001FB512C0381C070138300E
-0000201480126012405B1280A2000014005BA45BA45BA4485AA41203EA7FFE1A1C799B1E
->I<397FF0FF80390F001C00000E13181410A3485BA4485BA4485BA44848C7FCA31302A2
-5BA2EA6008EA3030EA1040EA0F80191D779B1F>I<3901FF81FE39001E00F0011C136001
-1E1380EB0E011500EB0F026D5A5C1490EB03A014C01301A28013021304497EEB10701320
-EB60381340EB803C3801001C12020006131E121E39FF80FFC01F1C7E9B1F>88
-D<EA03CCEA063C120CEA181CEA383812301270A2EAE070A413E212C0A2EA61E4EA6264EA
-3C380F127B9115>97 D<123F1207A2120EA45AA4EA39C0EA3E60EA3830A2EA7038A4EAE0
-70A3136013E0EAC0C012C1EA6180EA6300123C0D1D7B9C13>I<EA01F0EA0708120CEA18
-1CEA3838EA30001270A25AA513081310EA6020EA30C0EA1F000E127B9113>I<EB1F8013
-03A2EB0700A4130EA4EA03DCEA063C120CEA181CEA383812301270A2485AA413E212C0A2
-EA61E4EA6264EA3C38111D7B9C15>I<EA01E0EA0710120CEA1808EA381012701360EA7F
-80EAE000A51308EA60101320EA30C0EA1F000D127B9113>I<EB03C0EB0670130CEB1C60
-1400A25BA53803FF8038007000A55BA5485AA5485AA390C7FCA25A12C612E65A12781425
-819C0D>I<13F3EA018FEA030FEA0607EA0E0E120C121CA2EA381CA413381230A2EA1878
-13F0EA0F701200A213E0A2EAC0C012E1EAC300127E101A7D9113>I<EA0FC01201A2485A
-A448C7FCA4EA0E78138CEA0F0E120E121CA4485AA35B00701380A21370EB7100EAE032EA
-601C111D7D9C15>I<EA01801203EA0100C7FCA7121C12261247A2128EA2120E5AA35AA2
-1271A31272A2123C091C7C9B0D>I<EA1F801203A2EA0700A4120EA45AA45AA45AA412E4
-A412681238091D7C9C0B>108 D<393C1E078039266318C0394683A0E0384703C0008E13
-80A2120EA2391C0701C0A3EC0380D8380E1388A2EC0708151039701C032039300C01C01D
-127C9122>I<EA3C3CEA2646EA4687EA4707128EA2120EA2EA1C0EA35B00381340A21338
-148038701900EA300E12127C9117>I<EA01E0EA0718EA0C0C12181238EA300E1270A2EA
-E01CA31318133813301360EA60C0EA3180EA1E000F127B9115>I<EA07873804D9803808
-E0C0A23811C0E0A21201A2380381C0A31480EA070314005B1306EA0E8C137090C7FCA25A
-A4123CB47E131A7F9115>I<EA03C4EA062CEA0C3CEA181CEA383812301270A2EAE070A4
-13E012C0A21261EA63C0123D1201A2EA0380A41207EA3FF00E1A7B9113>I<EA3C3CEA26
-C2EA4687EA4707EA8E061300120EA25AA45AA45A123010127C9112>I<EA01F0EA060812
-0C131CEA1818EA1C00121F13C0EA0FF01207EA00781338EA603012E012C0EA8060EA60C0
-EA1F000E127D9111>I<13C01201A3EA0380A4EAFFE0EA0700A3120EA45AA4EA3840A313
-80EA1900120E0B1A7D990E>I<EA1E03EA27071247A2EA870EA2120EA2485AA438383880
-A21218EB3900EA1C59EA078E11127C9116>I<381E0183382703871247148338870701A2
-120EA2381C0E02A31404EA180C131C1408001C1310380C26303807C3C018127C911C>
-119 D<EA070EEA19913810E38012203841C30013C01201A2485AA4EA07021267EAE70412
-CBEA8B08EA70F011127D9113>I<EA1E03EA27071247A2EA870EA2120EA2EA1C1CA4EA38
-38A21218A2EA1C70EA07F0EA0070A213E0EAE0C012E1EA8180EA4700123C101A7C9114>
-I<B512C012017C8B15>123 D E /Fj 38 123 df<90380FF83F90397FFDFFC03A01F81F
-E3E03903E03F87EA07C0D80F801307ED03C06EC7FCA6B612FCA2260F801FC7FCB2397FF0
-FFF0A223237FA221>11 D<1238127C12FE12FFA2127F123B1203A212071206A2120C121C
-12181270122008117CA210>39 D<1238127C12FEA3127C123807077C8610>46
-D<13181378EA01F812FFA21201B3A7387FFFE0A213207C9F1C>49
-D<EA03FCEA0FFF383C1FC0387007E0007C13F0EAFE0314F8A21301127CEA3803120014F0
-A2EB07E014C0EB0F80EB1F00133E13385BEBE018EA01C0EA0380EA0700000E1338380FFF
-F05A5A5AB5FCA215207D9F1C>I<13FE3807FFC0380F07E0381E03F0123FEB81F8A3EA1F
-0314F0120014E0EB07C0EB1F803801FE007F380007C0EB01F014F8EB00FCA2003C13FE12
-7EB4FCA314FCEA7E01007813F8381E07F0380FFFC03801FE0017207E9F1C>I<14E01301
-1303A21307130F131FA21337137713E7EA01C71387EA03071207120E120C121812381270
-12E0B512FEA2380007E0A7EBFFFEA217207E9F1C>I<00101320381E01E0381FFFC01480
-14005B13F8EA1BC00018C7FCA4EA19FCEA1FFF381E0FC0381807E01303000013F0A214F8
-A21238127C12FEA200FC13F0A2387007E0003013C0381C1F80380FFF00EA03F815207D9F
-1C>I<1470A214F8A3497EA2497EA3EB06FF80010E7FEB0C3FA201187F141F01387FEB30
-0FA201607F140701E07F90B5FCA239018001FCA200038090C7FCA20006147FA23AFFE00F
-FFF8A225227EA12A>65 D<B67E15E03907F001F86E7E157EA2157FA5157E15FE5DEC03F8
-90B55AA29038F001FCEC007E811680151F16C0A6ED3F80A2ED7F00EC01FEB612F815C022
-227EA128>I<D903FE138090381FFF819038FF01E33901F8003FD803E0131F4848130F48
-481307121F48C71203A2481401127EA200FE91C7FCA8127EED0180127F7E15036C6C1400
-120F6C6C1306D803F05B6C6C13386CB413F090381FFFC0D903FEC7FC21227DA128>I<B6
-7E15F03907F003FCEC007E81ED1F80ED0FC0ED07E0A216F01503A316F8A916F0A3ED07E0
-A2ED0FC0ED1F80ED3F00157EEC03FCB612F0158025227EA12B>I<B612FCA23807F00015
-3C151C150C150EA215061418A3150014381478EBFFF8A2EBF07814381418A21503A21400
-1506A3150EA2151E153EEC01FCB6FCA220227EA125>I<B612F8A23807F001EC00781538
-1518151CA2150CA21418A21500A214381478EBFFF8A2EBF07814381418A491C7FCA8B512
-E0A21E227EA123>I<D903FE134090391FFFC0C090387F00F1D801F8133F4848130FD807
-C01307000F1403485A48C71201A2481400127EA200FE1500A791380FFFFC127E007F9038
-001FC0A27EA26C7E6C7E6C7E6C7ED801FC133F39007F80E790381FFFC30103130026227D
-A12C>I<B512E0A2D807F0C7FCB31518A41538A21570A215F014011407B6FCA21D227EA1
-22>76 D<EB07FC90383FFF809038FC07E03903F001F848486C7E4848137E48487FA248C7
-EA1F80A24815C0007E140FA200FE15E0A9007E15C0007F141FA26C15806D133F001F1500
-6C6C137E6C6C5B6C6C485A3900FC07E090383FFF80D907FCC7FC23227DA12A>79
-D<B6FC15E03907F007F0EC01FC1400157EA2157FA5157EA215FC1401EC07F090B512E015
-0001F0C7FCADB57EA220227EA126>I<B512FEECFFC03907F007F0EC01F86E7E157E157F
-A6157E5D4A5AEC07F090B512C05D9038F00FE06E7E6E7E6E7EA81606EC00FEEDFF0CB538
-803FF8ED0FF027227EA12A>82 D<007FB61280A2397E03F80F0078140700701403006014
-0100E015C0A200C01400A400001500B3A20003B512F8A222227EA127>84
-D<B53A0FFFF01FFEA2260FF00090C712E000076E14C0A26C6C9138800180153F6D150300
-0103C01300A26C6C90387FE006156F7F6D9038C7F00CA20280EBF81C90263F81831318A2
-D91FC36D5A150114E3903A0FE600FE60A202F6EBFFE0D907FC6D5AA201035D4A133FA26D
-486DC7FCA20100141E4A130EA237227FA13A>87 D<EA07FC381FFF80383F07C0EB03E013
-0114F0121E1200A2133FEA03FDEA1FC1EA3F01127E12FCA4EA7E02EB0CF8381FF87F3807
-E03F18167E951B>97 D<EBFF80000713E0380F83F0EA1F03123E127E387C01E090C7FC12
-FCA6127C127EA2003E13306C1360380FC0E03807FF803800FE0014167E9519>99
-D<EB01FEA2EB003EABEA01FC3807FFBE380F81FE381F007E003E133E127E127C12FCA812
-7CA26C137E001E13FE380F83BE3907FF3FC0EA01FC1A237EA21F>I<13FE3807FF80380F
-87C0381E01E0003E13F0EA7C0014F812FCA2B5FCA200FCC7FCA3127CA2127E003E13186C
-1330380FC0703803FFC0C6130015167E951A>I<3803FC1E380FFF7F381F0F8F383E07CF
-383C03C0007C13E0A5003C13C0EA3E07381F0F80EBFF00EA13FC0030C7FCA21238383FFF
-806C13F06C13F84813FCEA380048133E00F0131EA40078133C007C137C383F01F8380FFF
-E00001130018217E951C>103 D<B4FCA2121FABEB07E0EB1FF8EB307CEB403CEB803EA2
-1300AE39FFE1FFC0A21A237EA21F>I<121C123E127FA3123E121CC7FCA7B4FCA2121FB2
-EAFFE0A20B247EA310>I<3AFF07F007F090391FFC1FFC3A1F303E303E01401340496C48
-7EA201001300AE3BFFE0FFE0FFE0A22B167E9530>109 D<38FF07E0EB1FF8381F307CEB
-403CEB803EA21300AE39FFE1FFC0A21A167E951F>I<13FE3807FFC0380F83E0381E00F0
-003E13F848137CA300FC137EA7007C137CA26C13F8381F01F0380F83E03807FFC03800FE
-0017167E951C>I<38FF0FE0EB3FF8381FF07CEB803E497E1580A2EC0FC0A8EC1F80A290
-38803F00EBC03EEBE0FCEB3FF8EB0FC090C8FCA8EAFFE0A21A207E951F>I<EAFE1FEB3F
-C0381E67E013C71387A2381F83C090C7FCADEAFFF0A213167E9517>114
-D<EA0FF3EA3FFFEA781FEA6007EAE003A212F000FCC7FCEA7FE013F8EA3FFEEA0FFF1201
-38000F80EAC007130312E0A238F00700EAFC0EEAEFFCEAC7F011167E9516>I<487EA412
-03A21207A2120F123FB5FCA2EA0F80ABEB8180A5EB8300EA07C3EA03FEEA00F811207F9F
-16>I<38FF01FEA2381F003EAF147E14FE380F81BE3907FF3FC0EA01FC1A167E951F>I<39
-FFE01FE0A2390F800600A2EBC00E0007130CEBE01C00031318A26C6C5AA26C6C5AA2EB7C
-C0A2137F6D5AA26DC7FCA2130EA21B167F951E>I<387FFFF0A2387C03E0387007C0EA60
-0F38E01F8000C01300133E137EC65A5B485A00031330EA07E013C0380F8070121F383F00
-60003E13E0EA7C03B5FCA214167E9519>122 D E /Fk 4 122 df<EA07E0EA1FF8EA3FFC
-EA7FFEA2B5FCA6EA7FFEA2EA3FFCEA1FF8EA07E010107E9115>15
-D<133C13E0EA01C013801203AD13005A121C12F0121C12077E1380AD120113C0EA00E013
-3C0E297D9E15>102 D<12F0121C12077E1380AD120113C0EA00E0133C13E0EA01C01380
-1203AD13005A121C12F00E297D9E15>I<12021207A61202A3EA7270EAFFF8EA7270EA02
-00A21207B11202A60D267E9C12>121 D E /Fl 12 114 df<38078010EA1FC0383FE020
-EA7FF03860304038C01080128038000900A2130AA3130CA21308A31318A35BA45BA21340
-141B7F9115>13 D<126012F0A2126004047C830C>58 D<126012F0A212701210A41220A2
-12401280040C7C830C>I<140CA2141CA2143C147C145C149C148EEB010EA213021304A2
-1308A213101320EB3FFEEB4007A21380EA0100A21202A21206121E39FF807FF01C1D7F9C
-1F>65 D<3801FFE038003C001338A45BA45BA4485AA438038002A31404EA0700140C1418
-1438000E13F0B5FC171C7E9B1C>76 D<3801FFFE39003C03C090383800E015F01570A249
-13F0A3EC01E001E013C0EC0780EC1E00EBFFF03801C03080141CA2EA0380A43807003C15
-08A2151048131E39FFE00E20C7EA07C01D1D7E9B20>82 D<EB0FC1EB3033EB400FEB8006
-1201EA0300A200061304A200071300A27FEA03F06CB4FC6C13C0EB3FE01303EB00F01470
-1430A21220A200601360A214C0148038F00300EACC06EA83F8181E7E9C19>I<EA01E3EA
-0717EA0C0F1218EA380E12301270A2485AA4EB3880A3EA607838319900EA1E0E11127E91
-16>97 D<123F1207A2120EA45AA4EA39E0EA3A30EA3C1812381270131CA3EAE038A31330
-1370136013C01261EA2300121E0E1D7E9C12>I<EA01F0EA030C120EEA1C1EEA383CEA30
-18EA7000A25AA51304EA60081310EA3060EA1F800F127E9112>I<EA381F384E61803846
-81C0EA4701128F128E120EA2381C0380A3EB070000381310A2130E142038700640383003
-8014127E9119>110 D<EA01C2EA0626EA0C1E1218EA381C12301270A2EAE038A41370A3
-EA60F0EA23E0121C1200A2EA01C0A41203EA1FF80F1A7E9113>113
-D E /Fm 77 125 df<126012F0AF12601200A4126012F0A212600419779816>33
-D<EAE038EAF078A7EAE038A2EA60300D0B7C9816>I<EA0387A6387FFFC0B512E0A23807
-0E00A3EA0E1CA4B512E0A26C13C0381C3800A613197F9816>I<13C01201A3EA07F0EA1F
-FC48B4FCEA7DCF38F1C78012E1A338F1C300EA79C0127FEA1FF0EA07FCEA01FE13CFEBC7
-80EAF1C3A3EAE1C712F13879DF00EA3FFE6C5AEA07E0EA01C0A2120011207E9C16>I<EA
-0380EA07E0120FEA1E70121CA3EB77E013E7121D380FC700138E130E121EEA3F1C127FEA
-739CEAE3F812E138E0F1C0A2EA71F9EA7FFF383F9F80381E070013197F9816>38
-D<1218123C123E121E120EA3121E121C123C127812F01260070D799816>I<13E01201EA
-07C013005A121E5A123812781270A312F05AA77E1270A312781238123C7E7E7E13C0EA01
-E012000B217A9C16>I<12E07E127C121C121E7EEA0780120313C01201A313E01200A712
-0113C0A3120313801207EA0F00121E121C127C12F05A0B217C9C16>I<EA01C0A4EA71C7
-38F9CF80387FFF00EA1FFCEA07F0A2EA1FFCEA7FFF38F9CF803871C700EA01C0A411127E
-9516>I<EA01C0A8B51280A33801C000A811137E9516>I<1238127C127EA2123E120E121E
-123C127C12F81260070B798416>I<B51280A311037E8D16>I<127012F8A3127005057884
-16>I<EB01801303A2EB0700A2130EA25BA25BA25BA25BA2485AA2485AA248C7FCA2120E
-A25AA25AA25AA25AA25A11207E9C16>I<EA03E0EA0FF8487EEA1E3CEA380EEA780FEA70
-07A238E00380A8EAF00700701300A2EA780FEA3C1E6C5AEA1FFC6C5AEA03E011197E9816
->I<EA01801203A21207120F127F12FF12731203AEEA7FF813FC13F80E197C9816>I<EA07
-E0EA1FF8EA7FFEEA783FEAF00FEB07801303A21200A2130714005B131E5B5B5BEA03E0EA
-078048C7FC381E0380123CEA7FFFB5FC7E11197E9816>I<EA07E0EA1FFCEA7FFEEA781F
-7F7F12005BA2133EEA07FC5B7FEA001E130714801303A212F013071400EAF81FEA7FFE6C
-5AEA07E011197E9816>I<137C13FC13DC1201EA039CA2EA071C120F120E121E123C1238
-127812F0B512E0A338001C00A53801FFC0A313197F9816>I<EA3FFEA30038C7FCA7EA3B
-F0EA3FFC7FEA3C0FEA3007000013801303126012F01307EB0F006C5AEA7FFEEA1FF8EA07
-E011197E9816>I<13F8EA03FEEA0FFFEA1F0F123E123CEA78060070C7FC12F0EAF3F8EA
-EFFE12FFEAF80F38F00780A2EAE00312F0A21270EA7807EB0F006C5AEA1FFEEA0FF8EA03
-E011197E9816>I<12E0B51280A338E00F00131EEA001C5B137813705BA2485AA3485AA4
-48C7FCA7111A7E9916>I<EA07F0EA1FFC487EEA7C1F38F00780EAE003A338700700EA7C
-1FEA1FFCEA07F0EA1FFCEA3C1EEA700700F01380EAE003A3EAF00700701300EA7C1FEA3F
-FE6C5AEA07F011197E9816>I<EA03E0EA0FF8EA3FFCEA7C1EEA780F487E12E01480A213
-03EAF007A2EA780FEA3FFF13FBEA0FE3EA00071400EA300FEA780E131E137CEA7FF8EA3F
-E0EA0F8011197E9816>I<127012F8A312701200A8127012F8A312700512789116>I<1238
-127CA312381200A81238127CA3123C121C123C123812F812F012600618799116>I<EB01
-801307131FEB3E0013F8485AEA07C0485A003EC7FC12FC12F012FC123EEA0F806C7EEA01
-F06C7E133EEB1F801307130111157E9616>I<EA7FFFB51280A2C8FCA5B51280A26C1300
-110B7E9116>I<12C012F012FC123EEA0F806C7EEA01F06C7E133EEB1F801307131FEB3E
-0013F8485AEA07C0485A003EC7FC12FC12F012C011157E9616>I<EA0FE0EA3FF8EA7FFC
-EAF01E130EA2EA601EEA007C13F8EA01F0EA03E013C01380A41300C7FCA41203EA0780A2
-EA03000F197D9816>I<13E0487EA213B0A2EA03B8A31318EA071CA5EA0E0EA2EA0FFEA2
-487EEA1C07A3387F1FC000FF13E0007F13C013197F9816>65 D<3801F180EA07FF5AEA1F
-0FEA3C0712781303127000F0C7FC5AA77E387003801278A2EA3C07381F0F00EA0FFE6C5A
-EA01F011197E9816>67 D<EA7FF8EAFFFE6C7EEA1C0FEB0780EB03C01301A214E01300A8
-EB01C0A21303EB0780130F387FFF00485AEA7FF81319809816>I<387FFFC0B5FC7EEA1C
-01A490C7FCA2131CA2EA1FFCA3EA1C1CA290C7FC14E0A5EA7FFFB5FC7E13197F9816>I<
-B512E0A3EA1C00A41400A2131CA2EA1FFCA3EA1C1CA290C7FCA6B47E7F5B13197F9816>
-I<387F1FC038FFBFE0387F1FC0381C0700A7EA1FFFA3EA1C07A9387F1FC038FFBFE0387F
-1FC013197F9816>72 D<EAFFFEA3EA0380B3EAFFFEA30F197D9816>I<387F0FE038FF8F
-F0387F0FE0381C0780EB0F00130E5B133C5B5B5BEA1DF0121F7F1338EA1E1C121C7FA27F
-A2EB0380387F07E038FF8FF0387F07E01419809816>75 D<EAFFC0A3001CC7FCAE144014
-E0A4B5FCA313197F9816>I<38FC07E0EAFE0FA2383A0B80EA3B1BA513BBEA39B3A413F3
-EA38E3A21303A538FE0FE0A313197F9816>I<387E1FC038FF3FE0387F1FC0381D070013
-87A313C7A2121CA213E7A31367A21377A21337A31317EA7F1FEAFF9FEA7F0F13197F9816
->I<EA1FFC487E487EEA780F38F00780EAE003AEEAF007A238780F00EA7FFF6C5A6C5A11
-197E9816>I<EA7FF8EAFFFE6C7E381C0F80130314C01301A313031480130F381FFF005B
-13F8001CC7FCA7127F487E6CC7FC12197F9816>I<EA7FE0EAFFF86C7EEA1C1E7F7FA45B
-131EEA1FFC5B7FEA1C1C7FA414201470A2387F07E0EAFF87387F03C014197F9816>82
-D<EA07E3EA1FFF127FEA781F487E487EA290C7FC7E1278EA7F80EA1FF0EA07FCC67E130F
-EB07801303A212E0A2EAF00738F80F00EAFFFE5BEAC7F011197E9816>I<387FFFE0B5FC
-A2EAE0E0A400001300AFEA07FC487E6C5A13197F9816>I<387F07F038FF8FF8387F07F0
-381C01C0B0380E0380A23807070013FF6C5AEA00F81519809816>I<387F1F80133F131F
-380E1E00131CEA073C1338EA03B813F012015B120012017F120313B81207131CA2EA0E0E
-A2487E387F1FC000FF13E0007F13C013197F9816>88 D<38FE0FE0EAFF1FEAFE0F381C07
-00A2EA0E0EA26C5AA3EA03B8A2EA01F0A26C5AA8EA03F8487E6C5A13197F9816>I<EAFF
-F0A3EAE000B3A8EAFFF0A30C20789C16>91 D<12C07EA21270A27EA27EA27EA27EA26C7E
-A26C7EA26C7EA21370A27FA27FA27FA27FA2EB0380A2130111207E9C16>I<EAFFF0A3EA
-0070B3A8EAFFF0A30C207F9C16>I<120C121E123C1278127012F012E0A312F012F81278
-1230070D789B16>96 D<EA1FE0EA7FF87FEA783CEA301EEA000EA2EA03FE121FEA7E0E12
-F012E0A2EAF01EEAF83E387FFFE0EA3FE7EA0F8313127E9116>I<127E12FE127E120EA4
-133EEBFF80000F13C0EB83E01301380E00F0A21470A414F0000F13E01301EB83C013FF00
-0E1300EA063C1419809816>I<EA03F8EA0FFE121FEA3C1EEA780CEA700012F05AA47EEA
-70071278EA3E0FEA1FFEEA0FFCEA03F010127D9116>I<133F5B7F1307A4EA03C7EA0FF7
-EA3FFFEA3C1F487E487EA212E0A412F05BEA781FEA7C3F383FFFE0381FF7F03807C7E014
-197F9816>I<EA03E0EA0FF8EA1FFCEA3C1EEA780EEA700712E0B5FCA3EAE000A2EA7007
-1278EA3C0FEA1FFEEA0FFCEA03F010127D9116>I<131FEB7F8013FFEA01E7EBC30013C0
-A2EA7FFFB5FCA2EA01C0ACEA3FFE487E6C5A11197F9816>I<3803E3C0380FFFE05A381E
-3CC0383C1E00EA380EA3EA3C1E6C5AEA1FFC5BEA3BE00038C7FCA2EA1FFC13FF4813C0EA
-780338F001E0EAE000A3EAF001387C07C0383FFF80380FFE00EA03F8131C7F9116>I<12
-7E12FE127E120EA4133C13FF000F138013871303A2120EA9387FC7F038FFE7F8387FC7F0
-1519809816>I<EA0180EA03C0A2EA0180C7FCA4EA7FC0A31201ACEA7FFFB5FC7E101A7D
-9916>I<EAFFC0A31201B3B51280A311197E9816>108 D<38F9C38038FFEFC0EBFFE0EA3E
-7CEA3C78EA3870AA38FE7CF8A2EB3C781512809116>I<EA7E3CEAFEFF007F1380EA0F87
-1303A2120EA9387FC7F038FFE7F8387FC7F01512809116>I<EA03E0EA0FF8487EEA3C1E
-487EEA700738E00380A5EAF00700701300EA780FEA3C1EEA1FFC6C5AEA03E011127E9116
->I<EA7E3E38FEFF80007F13C0380F83E01301380E00F0A21470A414F0000F13E01301EB
-83C013FF000E1300133C90C7FCA6EA7FC0487E6C5A141B809116>I<EA07C7EA1FF748B4
-FCEA7C3FEA781F487E7F12E0A412F05BEA781FEA7C3FEA3FFFEA1FF7EA07C7EA0007A6EB
-3FE0EB7FF0EB3FE0141B7E9116>I<38FF0FC0EB3FE0137F3807F040EBE0005B5BA290C7
-FCA7EAFFFCA313127F9116>I<EA0FECEA3FFC127FEAF03CEAE01CA2EAF000EA7F80EA1F
-F0EA07FCEA003EEAE00EA212F0EAF81EEAFFFC13F8EAC7E00F127D9116>I<12035AA4EA
-7FFFB5FCA20007C7FCA75BEB0380A2130713873803FF005BEA00F811177F9616>I<387E
-1F80EAFE3FEA7E1FEA0E03AA1307EA0F0FEBFFF06C13F83803E3F01512809116>I<38FF
-1FE013BF131F38380380A413E33819F300A213B3EA1DB7A4EA0F1EA313127F9116>119
-D<387F1FC0133F131F380F1C00EA073CEA03B813F012016C5A12017FEA03B8EA073C131C
-EA0E0E387F1FC038FF3FE0387F1FC013127F9116>I<387F1FC038FF9FE0387F1FC0381C
-0700120E130EA212075BA2EA039CA21398EA01B8A2EA00F0A35BA3485A1279127BEA7F80
-6CC7FC123C131B7F9116>I<383FFFC05AA238700780EB0F00131EC65A5B485A485AEA07
-8048C7FC381E01C0123C1278B5FCA312127F9116>I<12E0B3AE0320779C16>124
-D E /Fn 10 58 df<121FEA3180EA60C0EA4040EAC060A8EA4040EA60C0EA3180EA1F00
-0B107F8F0F>48 D<120C123C12CC120CACEAFF8009107E8F0F>I<121FEA6180EA40C0EA
-806012C01200A213C0EA0180EA030012065AEA10201220EA7FC012FF0B107F8F0F>I<12
-1FEA2180EA60C0A2120013801201EA0F00EA00801340136012C0A2EA8040EA6080EA1F00
-0B107F8F0F>I<1203A25A5A120B121312331223124312C3EAFFE0EA0300A4EA1FE00B10
-7F8F0F>I<EA2080EA3F00122C1220A3122FEA3080EA2040EA0060A312C0EA80C0EA6180
-EA1F000B107F8F0F>I<EA0780EA1840EA30C0126013005A12CFEAF080EAE040EAC060A3
-1240EA60C0EA3080EA1F000B107F8F0F>I<1240EA7FE013C0EA8080A2EA010012025AA2
-120C1208A21218A50B117E900F>I<121FEA3180EA60C0A3EA7180EA3F00120FEA3380EA
-61C0EAC060A3EA4040EA6080EA1F000B107F8F0F>I<121FEA3180EA60C0EAC0401360A3
-EA40E01221EA1E6012001340EA60C01380EA4300123E0B107F8F0F>I
-E /Fo 66 124 df<EBFCF83807839CEA0E07001C13081400A5B512E0381C0700AC38FF1F
-E01617809615>11 D<13FCEA0782EA0E07121C130290C7FCA4B5FCEA1C07AC38FF1FE013
-17809614>I<13FFEA0707120E121CA6B5FCEA1C07AC38FFBFE01317809614>I<12011202
-1204120C1218A21230A212701260A312E0AA1260A312701230A21218A2120C1204120212
-0108227D980E>40 D<12801240122012301218A2120CA2120E1206A31207AA1206A3120E
-120CA21218A2123012201240128008227E980E>I<126012F0A212701210A21220A21240
-A2040A7D830A>44 D<EAFF80A2090280870C>I<126012F0A2126004047D830A>I<130813
-181330A31360A313C0A3EA0180A3EA0300A21206A35AA35AA35AA35AA35AA20D217E9812
->I<12035AB4FC1207B1EA7FF00C157E9412>49 D<EA0F80EA30E0EA4070EA8030EAC038
-12E0124012001370A2136013C0EA0180EA03001206EA0C081208EA1018EA3FF0127F12FF
-0D157E9412>I<EA0FE0EA3030EA6018EA701CA21200131813381360EA07E0EA00301318
-130C130EA212E0A2EAC00CEA4018EA3030EA0FE00F157F9412>I<1330A2137013F01201
-1370120212041208121812101220124012C0EAFFFEEA0070A5EA03FE0F157F9412>I<EA
-2030EA3FE013C0EA24001220A4EA2F80EA30E0EA2070EA00301338A2124012E0A2EA8030
-EA4060EA20C0EA1F000D157E9412>I<EA01F0EA0608EA080CEA181C1230EA7000126012
-E0EAE3E0EAEC30EAF018130CEAE00EA31260A2EA300C1318EA1830EA07C00F157F9412>
-I<1240EA7FFE13FC13F8EAC008EA80101320EA00401380A2EA0100A25A12021206A2120E
-A512040F167E9512>I<EA07C0EA1830EA30181260EAE00CA2130EA3EA601E1230EA186E
-EA0F8EEA000E130C131CEA7018A2EA6030EA20C0EA1F800F157F9412>57
-D<B512FCA2C8FCA6B512FCA2160A7E8C1B>61 D<13101338A3135CA3138EA3EA0107A200
-031380EA0203A23807FFC0EA0401A2380800E0A21218003813F038FE03FE17177F961A>
-65 D<EAFFFE381C0380EB00E014601470A414E0EB01C0381FFF8014C0381C00E0147014
-301438A4147014E0EB01C0B5120015177F9619>I<EBFC1038038330380E00B048137048
-1330123000701310126012E01400A51410126012700030132012386C13406C1380380383
-00EA00FC14177E9619>I<B5FC381C01C0EB00E0143014381418141C140C140EA7140C14
-1CA2143814301460EB01C0B5120017177F961B>I<B512E0EA1C00146014201410A3EB04
-00A3130CEA1FFCEA1C0C13041408A2130014181410A2143014F0B5FC15177F9618>I<B5
-12E0EA1C00146014201410A3EB0400A3130CEA1FFCEA1C0C1304A390C7FCA6EAFFC01417
-7F9617>I<EB7E0838038198380600584813384813185A00701308A25A1400A4EB03FEEB
-00381270A212307E7E7E380380D838007F0817177E961C>I<EAFFE0EA0E00B3A3EAFFE0
-0B177F960D>73 D<38FF80FE381C0078146014401480EB0100130613085B13381378139C
-EA1D0E121EEA1C07EB0380EB01C0A2EB00E014701478147C38FF80FF18177F961B>75
-D<EAFFC0001CC7FCAD1420A31460A2144014C01303B5FC13177F9616>I<00FEEB03F800
-1E14C000171305A338138009A23811C011A33810E021A2EB7041A3EB3881A2EB1D01A213
-0EA2123839FE040FF81D177F9620>I<00FC13FE001E1338001F13101217EA1380EA11C0
-A2EA10E013701338A2131C130E130F1307EB0390EB01D0A2EB00F014701430123800FE13
-1017177F961A>I<13FCEA0303380E01C0381C00E0481370003013300070133800601318
-00E0131CA700701338A200301330003813706C13E0380E01C038030300EA00FC16177E96
-1B>I<EAFFFE381C0380EB00C014601470A4146014C0EB0380381FFE00001CC7FCAAB47E
-14177F9618>I<EAFFFC381C0380EB00C014E01470A414E014C0EB0380381FFE00381C07
-80EB01C0EB00E0A514E1A2147238FF803C18177F961A>82 D<EA0FC4EA302CEA601CEA40
-0CEAC004A3EAE0001270127FEA3FE0EA0FF8EA01FCEA001C130E13061280A3EAC004EAE0
-08EAD810EA87E00F177E9614>I<387FFFF83860381800401308A200801304A300001300
-AF3807FFC016177F9619>I<38FF80FE383C0038001C1310A26C1320A26C1340A3380380
-80A213C100011300A2EA00E2A213F61374A21338A3131017177F961A>86
-D<38FF83FC381F01E0380E00807EEB8100EA0382EA01C213E4EA00E81378A21338137C13
-5E138EEA0187EB0780EA0203380601C0000413E0EA0C00001C13F038FF03FE17177F961A
->88 D<12FCA212C0B3AB12FCA206217D980A>91 D<12FCA2120CB3AB12FCA2062180980A
->93 D<EA1FC0EA38601330EA10381200EA03F8EA1E3812301270EAE039A21379EA70FFEA
-1F1E100E7F8D12>97 D<12FC121CA813F8EA1F06EA1C031480130114C0A4148013031400
-EA1B0EEA10F81217809614>I<EA07F0EA18381230EA7010EA600012E0A41260EA700812
-30EA1830EA07C00D0E7F8D10>I<137E130EA8EA07CEEA1C3EEA300E1270126012E0A412
-601270EA301EEA182E3807CFC012177F9614>I<EA0FC0EA1860EA3030EA7038EAE018EA
-FFF8EAE000A31260EA7008EA3010EA1830EA07C00D0E7F8D10>I<EA03E0EA0670120EEA
-1C201300A5EAFF80EA1C00ACEAFF800C1780960B>I<EA0F9EEA18E3EA3060EA7070A3EA
-3060EA18C0EA2F80EA20001260EA3FE013F813FCEA600EEAC006A3EA600CEA3838EA0FE0
-10157F8D12>I<12FC121CA8137CEA1D8EEA1E07121CAA38FF9FE01317809614>I<121812
-3CA212181200A5127C121CAC12FF081780960A>I<1203EA0780A2EA0300C7FCA5EA1F80
-1203AF1243EAE30012E7127C091D82960B>I<12FC121CA8EB3F80EB1C00131813205B13
-C0EA1FE0EA1CF0137013787F7FA238FF3FC01217809613>I<12FC121CB3A3EAFF800917
-80960A>I<38FC7C1F391D8E6380391E0781C0001C1301AA39FF9FE7F81D0E808D1E>I<EA
-FC7CEA1D8EEA1E07121CAA38FF9FE0130E808D14>I<EA07C0EA1830EA3018EA600CA2EA
-E00EA5EA701CEA3018EA1830EA07C00F0E7F8D12>I<EAFCF8EA1F0EEA1C031480130114
-C0A414801303EB0700EA1F0EEA1CF890C7FCA5B47E1214808D14>I<EA07C2EA1C26EA38
-1EEA700E126012E0A412601270EA301EEA1C2EEA07CEEA000EA5EB7FC012147F8D13>I<
-EAFCF0EA1D38121EEA1C101300A9EAFF800D0E808D0E>I<EA1F40EA60C0EAC040A2EAE0
-00B4FCEA7F80EA1FC0EA01E0EA8060A212C0EAE0C0EA9F000B0E7F8D0E>I<1208A31218
-A21238EAFF80EA3800A71340A4EA1C80EA0F000A147F930E>I<EAFC3FEA1C07AA5BEA0E
-173803E7E0130E808D14>I<EAFE1FEA3C0E130CEA1C08A2EA0E10A2EA0720A2EA03C0A3
-EA0180A2100E7F8D13>I<38FCFE7C383838381410381C3C20A2134C380E4E40A2138638
-078780A2130300031300A2160E7F8D19>I<EAFE3FEA3C18EA1C10EA0E20EA074013C0EA
-0380EA01C0EA02E0EA04F0EA0870EA1838EA383CEAFC7F100E7F8D13>I<EAFE1FEA3C0E
-130CEA1C08A2EA0E10A2EA0720A2EA03C0A3EA0180A21300A212E2A212A4127810147F8D
-13>I<EAFFF0EAC0E01280EA81C0EA83801287EA0700120EEA1E08121CEA3818EA701013
-30EAFFF00D0E7F8D10>I<B512801101808812>I E /Fp 1 4 df<120CA2EACCC012EDEA
-7F80EA0C00EA7F80EAEDC012CCEA0C00A20A0B7D8B10>3 D E /Fq
-10 58 df<120FEA30C0EA6060A2EA4020EAC030A9EA4020EA6060A2EA30C0EA0F000C13
-7E9211>48 D<120C121C12EC120CAFEAFFC00A137D9211>I<121FEA60C01360EAF07013
-301260EA0070A2136013C012011380EA02005AEA08101210EA2020EA7FE012FF0C137E92
-11>I<EA0FC0EA3070EA7038A31200133013E0EA0FC0EA007013381318131C126012F013
-18EAE038EA6070EA1FC00E137F9211>I<136013E0A2EA016012021206120C1208121012
-20126012C0EAFFFCEA0060A5EA03FC0E137F9211>I<EA6060EA7FC01380EA44001240A3
-124FEA70C0EA40E0EA00601370A212E0A21360EA40E0EA21C0EA1F000C137E9211>I<EA
-07C0EA0C20EA10701220EA6000A25A12CFEAD0C0EAE060EAC0201330A31240EA6020EA20
-60EA10C0EA0F000C137E9211>I<1240EA7FFC13F8EA401012801320EA00401380EA0100
-A25A12021206A2120EA512040E147E9311>I<EA0FC0EA1070EA20181260A21270EA3C30
-EA3F60EA0F8013E0EA31F0EA6078EAC01C130CA3EA6018EA3030EA0FC00E137F9211>I<
-120FEA3080EA6040EA4060EAC0201330A31240EA6070EA30B0EA0F30120013201360EAE0
-401380EA4100123E0C137E9211>I E /Fr 76 124 df<EB7E1F3901C1B180390303E3C0
-000713C3000EEBC180903801C000A6B512FC380E01C0B0387F87FC1A1D809C18>11
-D<137E3801C180EA0301380703C0120EEB018090C7FCA5B512C0EA0E01B0387F87F8151D
-809C17>I<EB7FC0EA01C1EA03031207EA0E01A7B5FCEA0E01B0387FCFF8151D809C17>I<
-90383F07E03901C09C18380380F0D80701133C000E13E00100131892C7FCA5B612FC390E
-00E01CB03A7FC7FCFF80211D809C23>I<EA6060EAF0F0EAF8F8EA6868EA0808A3EA1010
-A2EA2020EA4040EA80800D0C7F9C15>34 D<126012F012F812681208A31210A212201240
-1280050C7C9C0C>39 D<13401380EA0100120212065AA25AA25AA212701260A312E0AC12
-60A312701230A27EA27EA27E12027EEA008013400A2A7D9E10>I<7E12407E7E12187EA2
-7EA27EA213801201A313C0AC1380A312031300A21206A25AA25A12105A5A5A0A2A7E9E10
->I<1306ADB612E0A2D80006C7FCAD1B1C7E9720>43 D<126012F0A212701210A41220A2
-12401280040C7C830C>I<EAFFE0A20B0280890E>I<126012F0A2126004047C830C>I<EA
-03C0EA0C30EA1818EA300CA2EA700EEA6006A2EAE007ADEA6006A2EA700EEA300CA2EA18
-18EA0C30EA07E0101D7E9B15>48 D<12035A123F12C71207B3A4EA0F80EAFFF80D1C7C9B
-15>I<EA07C0EA1830EA201CEA400C130EEAF00F12F81307A21270EA000F130EA2131CA2
-13381370136013C0EA0180EA0300EA0601120C1218EA1002EA3FFE127F12FF101C7E9B15
->I<EA07E0EA1830EA201CA2EA781E130E131E1238EA001CA2131813301360EA07E0EA00
-30131CA2130E130FA2127012F8A3EAF00EEA401C1220EA1830EA07E0101D7E9B15>I<13
-0CA2131C133CA2135C13DC139CEA011C120312021204120C1208121012301220124012C0
-B512C038001C00A73801FFC0121C7F9B15>I<EA300CEA3FF813F013C0EA2000A6EA23E0
-EA2430EA2818EA301CEA200E1200130FA3126012F0A3EA800EEA401E131CEA2038EA1870
-EA07C0101D7E9B15>I<13F0EA030CEA0604EA0C0EEA181E1230130CEA7000A21260EAE3
-E0EAE430EAE818EAF00C130EEAE0061307A51260A2EA7006EA300E130CEA1818EA0C30EA
-03E0101D7E9B15>I<1240387FFF801400A2EA4002485AA25B485AA25B1360134013C0A2
-12015BA21203A41207A66CC7FC111D7E9B15>I<EA03E0EA0C30EA1008EA200C13061260
-A31270EA780CEA3E08EA3FB0EA1FE0EA07F013F8EA18FCEA307EEA601E130FEAC0071303
-A4EA60021304EA300CEA1C10EA07E0101D7E9B15>I<EA03C0EA0C30EA1818EA300C1270
-EA600EEAE006A21307A51260EA700F1230EA1817EA0C27EA07C7EA0006A2130EEA300C12
-781318EA7010EA2030EA30C0EA0F80101D7E9B15>I<126012F0A212601200AA126012F0
-A2126004127C910C>I<126012F0A212601200AA126012F0A212701210A41220A2124012
-80041A7C910C>I<1306A3130FA3EB1780A3EB23C0A3EB41E0A3EB80F0A200017FEB0078
-EBFFF83803007C0002133CA20006133E0004131EA2000C131F121E39FF80FFF01C1D7F9C
-1F>65 D<B512C0380F00F01438143C141C141EA4141C143C1478EB01F0EBFFE0EB007814
-3C141E140E140FA5141EA2143C1478B512E0181C7E9B1D>I<90381F8080EBE061380180
-1938070007000E13035A14015A00781300A2127000F01400A8007014801278A212386CEB
-0100A26C13026C5B380180083800E030EB1FC0191E7E9C1E>I<B512C0380F00F0143C14
-0E80A2EC038015C01401A215E0A815C0A21403158014071500140E5C1470B512C01B1C7E
-9B20>I<B512FC380F003C140C1404A214061402A213021400A3130613FE13061302A314
-0113001402A31406A2140C143CB512FC181C7E9B1C>I<B512F8380F007814181408A214
-0C1404A213021400A3130613FE13061302A490C7FCA77FEAFFF8161C7E9B1B>I<90381F
-8080EBE0613801801938070007000E13035A14015A00781300A2127000F01400A6ECFFF0
-EC0F80007013071278A212387EA27E6C130B380180113800E06090381F80001C1E7E9C21
->I<39FFF3FFC0390F003C00ACEBFFFCEB003CAD39FFF3FFC01A1C7E9B1F>I<EAFFF0EA0F
-00B3A8EAFFF00C1C7F9B0F>I<EA1FFFEA00F81378B3127012F8A3EAF0F0EA40E0EA21C0
-EA1F00101D7F9B15>I<EAFFF8EA0F8090C7FCB01408A31418A2141014301470EB01F0B5
-FC151C7E9B1A>76 D<B46CEBFF80000FECF800A2390BC00178A33809E002A23808F004A3
-EB7808A3EB3C10A3EB1E20A3EB0F40A2EB0780A3EB0300121C3AFF8307FF80211C7E9B26
->I<B4EB7FC0390F800E001404EA0BC0EA09E0A2EA08F013F81378133CA2131E130FA2EB
-078414C41303EB01E4A2EB00F4147CA2143CA2141C140C121C38FF80041A1C7E9B1F>I<
-EB3F80EBE0E03803803848487E000E7F487F003C148000381303007814C0A20070130100
-F014E0A8007014C000781303A200381480003C1307001C14006C130E6C5B6C6C5A3800E0
-E0EB3F801B1E7E9C20>I<B51280380F00E01478143C141C141EA5141C143C147814E0EB
-FF8090C7FCACEAFFF0171C7E9B1C>I<B5FC380F01E0EB007880141C141EA4141C143C5C
-EB01E001FFC7FCEB03C0EB00E0801478A61510A21438EC3C2038FFF01CC7EA07C01C1D7E
-9B1F>82 D<3807E080EA1C19EA3005EA7003EA600112E01300A36C13007E127CEA7FC0EA
-3FF8EA1FFEEA07FFC61380130FEB07C0130313011280A300C01380A238E00300EAD002EA
-CC0CEA83F8121E7E9C17>I<007FB512C038700F010060130000401440A200C014201280
-A300001400B1497E3803FFFC1B1C7F9B1E>I<39FFF07FC0390F000E001404B3A26C5B13
-8000035B12016C6C5AEB70C0011FC7FC1A1D7E9B1F>I<39FFE00FF0391F0003C06CEB01
-8015006D5A00071302A26C6C5AA36C6C5AA213F000005BA2EBF830EB7820A26D5AA36D5A
-A2131F6DC7FCA21306A31C1D7F9B1F>I<3AFFE0FFE0FF3A1F001F003C001E011E13186C
-011F1310A3D807801420EC2780A2D803C01440EC43C0A213E00001903881E080A33A00F1
-00F100A3017913FA017A137AA2013E137C013C133CA301181318A3281D7F9B2B>I<397F
-F0FFC0390FC03E0038078018EA03C0EBE01000015BEBF06000001340EB7880137D013DC7
-FC7F131F7F80A2EB13C0EB23E01321EB41F0EBC0F8EB80783801007C48133C00027F0006
-131F001FEB3F8039FFC0FFF01C1C7F9B1F>I<12FEA212C0B3B312FEA207297C9E0C>91
-D<EA0808EA1010EA2020EA4040A2EA8080A3EAB0B0EAF8F8EA7878EA30300D0C7A9C15>
-I<12FEA21206B3B312FEA20729809E0C>I<EA1FC0EA3070EA78387F12301200A2EA01FC
-EA0F1C12381270126000E01340A3EA603C38304E80381F870012127E9115>97
-D<12FC121CAA137CEA1D86EA1E03381C018014C0130014E0A614C013011480381E0300EA
-1906EA10F8131D7F9C17>I<EA07E0EA0C30EA18781230EA7030EA600012E0A61260EA70
-041230EA1808EA0C30EA07C00E127E9112>I<133F1307AAEA03E7EA0C17EA180F487E12
-70126012E0A61260127012306C5AEA0C373807C7E0131D7E9C17>I<EA03E0EA0C30EA18
-18EA300CEA700EEA600612E0EAFFFEEAE000A41260EA70021230EA1804EA0C18EA03E00F
-127F9112>I<13F8EA018CEA071E1206EA0E0C1300A6EAFFE0EA0E00B0EA7FE00F1D809C
-0D>I<EB03803803C4C0EA0C38001C138038181800EA381CA4EA1818EA1C38EA0C30EA13
-C00010C7FC12307EEA1FF813FF1480EA3003386001C0EAC000A33860018038300300EA1C
-0EEA07F8121C7F9215>I<12FC121CAA137C1387EA1D03001E1380121CAD38FF9FF0141D
-7F9C17>I<1218123CA21218C7FCA712FC121CB0EAFF80091D7F9C0C>I<13C0EA01E0A2EA
-00C01300A7EA0FE01200B3A21260EAF0C012F1EA6180EA3E000B25839C0D>I<12FC121C
-AAEB3FC0EB0F00130C13085B5B5B13E0121DEA1E70EA1C781338133C131C7F130F148038
-FF9FE0131D7F9C16>I<12FC121CB3A9EAFF80091D7F9C0C>I<39FC7E07E0391C83883839
-1D019018001EEBE01C001C13C0AD3AFF8FF8FF8021127F9124>I<EAFC7CEA1C87EA1D03
-001E1380121CAD38FF9FF014127F9117>I<EA03F0EA0E1CEA1806487E00701380EA6001
-00E013C0A600601380EA700300301300EA1806EA0E1CEA03F012127F9115>I<EAFC7CEA
-1D86EA1E03381C018014C0130014E0A6EB01C0A21480381E0300EA1D06EA1CF890C7FCA7
-B47E131A7F9117>I<EA03C1EA0C33EA180BEA300FEA7007A212E0A612601270EA300F12
-18EA0C37EA07C7EA0007A7EB3FE0131A7E9116>I<EAFCE0EA1D30EA1E78A2EA1C301300
-ACEAFFC00D127F9110>I<EA1F90EA3070EA4030EAC010A212E0EAF800EA7F80EA3FE0EA
-0FF0EA00F8EA8038131812C0A2EAE010EAD060EA8FC00D127F9110>I<1204A4120CA212
-1C123CEAFFE0EA1C00A91310A5120CEA0E20EA03C00C1A7F9910>I<38FC1F80EA1C03AD
-1307120CEA0E1B3803E3F014127F9117>I<38FF07E0383C0380381C0100A2EA0E02A26C
-5AA3EA0388A213D8EA01D0A2EA00E0A3134013127F9116>I<39FF3FCFE0393C0F038038
-1C07011500130B000E1382A21311000713C4A213203803A0E8A2EBC06800011370A2EB80
-30000013201B127F911E>I<387F8FF0380F03801400EA0702EA0384EA01C813D8EA00F0
-1370137813F8139CEA010E1202EA060738040380381E07C038FF0FF81512809116>I<38
-FF07E0383C0380381C0100A2EA0E02A26C5AA3EA0388A213D8EA01D0A2EA00E0A31340A2
-5BA212F000F1C7FC12F31266123C131A7F9116>I<EA7FFCEA70381260EA407013F013E0
-EA41C012031380EA0700EA0F04120E121CEA3C0CEA380812701338EAFFF80E127F9112>
-I<B512F01401808B15>I E /Fs 40 122 df<49B4FC011F13C090387F81E0EBFC013901
-F807F01203EA07F0A4EC01C091C8FCA3EC3FF8B6FCA33807F003B3A33A7FFF3FFF80A321
-2A7FA925>12 D<130E131E137EEA07FE12FFA212F81200B3AB387FFFFEA317277BA622>
-49 D<EBFF80000713F04813FC381E03FE393800FF80007C133F00FE14C06C131F15E014
-0FA2127E003C131FC7FC15C0A2EC3F801500147E5C5C495A495AEB078049C7FC131E4913
-E013705B3901C001C0EA0380EA0600000FB5FC5A5A5AB61280A31B277DA622>I<EB7F80
-3803FFF04813FC380F80FE381F007FEA3F80EC3F80A3121F1300C7EA7F00A2147E5C495A
-EB07F0EBFFC0A2EB01F8EB007E801580EC1FC0A215E0A2123C127EB4FCA215C0143F4814
-80007CEB7F00003F13FE6CB45A000713F0C613801B277DA622>I<140E141E143E147E14
-FEA213011303EB077E130EA2131C1338137013E0A2EA01C0EA0380EA0700120EA25A5A5A
-5AB612F8A3C7EAFE00A890387FFFF8A31D277EA622>I<00181303381F801FEBFFFE5C5C
-5C14C091C7FC001CC8FCA7EB7FC0381DFFF8381F80FC381E003F1208C7EA1F8015C0A215
-E0A21218127C12FEA315C05A0078EB3F80A26CEB7F00381F01FE6CB45A000313F0C61380
-1B277DA622>I<EB07F8EB3FFE90B5FC3901FC07803903F00FC03807C01FEA0F80121F13
-0048EB0F8091C7FC127EA3EAFE02EB1FF0EB3FFCEB603EEB801F00FF14809038000FC0A2
-4814E0A4127EA4123E003F14C07EEC1F80D80F8013003807E07E6CB45A6C5B38003FC01B
-277DA622>I<1238123E003FB512F0A34814E015C0158015003870000EA25C485B5C5CEA
-00015C495A130791C7FC5B5B131E133EA2137E137CA213FCA41201A76C5A13701C297CA8
-22>I<EC0780A24A7EA34A7EA24A7EA3EC77F8A2ECF7FC14E3A2903801C1FEA201037F14
-80A249486C7EA24980010E133FA2496D7EA2013FB57EA39039700007F8A201F080491303
-A248486D7EA2000381D8FFFE013F13FCA32E297EA833>65 D<91387FE003903907FFFC07
-011FEBFF0F90397FF00F9F9039FF0001FFD801FC7F4848147F4848143F4848141F485A16
-0F485A1607127FA290C9FC5AA97E7F1607123FA26C7E160E6C7E6C6C141C6C6C143C6C6C
-14786CB4EB01F090397FF007C0011FB512800107EBFE009038007FF028297CA831>67
-D<B612FCEDFF8016E03A03FC001FF8ED03FCED00FE167FEE3F80EE1FC0A2EE0FE0A2EE07
-F0A417F8AA17F0A3EE0FE0A217C0161FEE3F80EE7F005EED03FCED1FF8B75A168003FCC7
-FC2D297EA834>I<B712E0A33903FC001FED07F01501A215001670A3913801C0781638A3
-02031300A2140F90B5FCA3EBFC0F1403A20201130EA3161C91C7FCA3163C1638167816F8
-15011503151FB712F0A327297EA82C>I<B712C0A33903FC003FED0FE015031501A21500
-A316F0913801C070A316001403A2140F90B5FCA3EBFC0F1403A21401A491C8FCA9B512FC
-A324297EA82A>I<91387FE003903907FFFC07011FEBFF0F90397FF00F9F9039FF0001FF
-D801FC7F484880484880484880485A82485A82127FA290CAFC5AA892B512F87E7F030013
-00123FA26C7EA26C7E6C7E6C7E6C7E6CB45B90387FF007011FB5129F0107EBFE0F903900
-7FF0032D297CA835>I<B512FCA33801FE00B3B1B512FCA316297FA819>73
-D<B612E015FE6F7E3A03FC003FE0ED0FF06F7E6F7E150182A65E4B5A1507ED0FE0ED3FC0
-90B500FEC7FCA29039FC00FF80ED3FC06F7E6F7E6F7EA9170EA21503923801FC1CB538F0
-00FEEE7FF8EE0FE02F297EA832>82 D<01FF13C0000313E1000F13F9381F80FF383F003F
-003E130F481307A200FC1303A214017EA26C90C7FC13C0EA7FFCEBFFE06C13F86C13FE80
-000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E01303A46C14E0A26C13076C
-14C0B4EB0F80EBE01F00E3B5120000E113FC38C01FF01C297CA825>I<B500E0B539E01F
-FFC0A32803FC0003FCC7EA7000A26D6E14F0000102015DA26D6E13016C60A26D6C486D48
-5AA26E48EBC007013F023F91C7FCA2DAE00F6D5A011FD90E1F130EA26D6C486C6C5AA217
-F8902707F838075BA2DAFC78EBFC780103D970031370A2DAFEF0EBFEF00101D9E0015BA2
-6D6C486C6C5AA36E486D5AA36EC76CC8FCA3021E141EA242297FA845>87
-D<3803FF80000F13F0381F01FC383F80FE147F801580EA1F00C7FCA4EB3FFF3801FC3FEA
-0FE0EA1F80EA3F00127E5AA4145F007E13DF393F839FFC381FFE0F3803F8031E1B7E9A21
->97 D<EAFFE0A3120FACEBE1FE9038E7FF809038FE07E09038F803F09038F001F89038E0
-00FCA2157EA2157FA8157EA315FCA29038F001F89038F803F090389C0FE090380FFF8039
-0E01FC00202A7EA925>I<EB3FF03801FFFC3803F03E380FC07FEA1F80EA3F00A248133E
-007E90C7FCA212FEA7127EA2127F6CEB03801380001FEB0700380FE00E3803F83C3801FF
-F838003FC0191B7E9A1E>I<EC7FF0A31407ACEB3F873801FFF73807F03F380FC00F381F
-8007EA3F00A2127EA312FEA8127EA27EA2381F800F380FC01F3907E07FFF3801FFE73800
-7F87202A7EA925>I<EB3FC03801FFF03803E07C380F803E001F7F130048EB0F80127E15
-C0A200FE1307A2B6FCA248C8FCA3127EA2127F6CEB01C07E390F8003803907C007003803
-F01E3800FFFCEB3FE01A1B7E9A1F>I<EB07F8EB3FFCEB7E3E3801FC7FEA03F813F01207
-143E1400A7B512C0A33807F000B3A3387FFF80A3182A7EA915>I<90387F80F03901FFE3
-F83907C0FE1C390F807C7C381F003E151048EB3F00A66C133EA26C6C5A6C6C5A3805FFE0
-380C7F8048C8FC121CA2121E381FFFF814FF6C14C06C14E06C14F0120F383E000748EB01
-F8481300A4007CEB01F0A2003FEB07E0390FC01F806CB5120038007FF01E287E9A22>I<
-EAFFE0A3120FAC147E9038E1FF809038E30FC001E413E0EBE80701F813F013F0A213E0B0
-39FFFE3FFFA3202A7DA925>I<1207EA0F80EA1FC0EA3FE0A3EA1FC0EA0F80EA0700C7FC
-A7EAFFE0A3120FB3A3EAFFFEA30F2B7EAA12>I<EAFFE0A3120FACEC3FF8A3EC0700140E
-143C5C5CEBE1E0EBE3C0EBE780EBEFC0EBFFE0A2EBF7F0EBE3F8EBC1FCA2EBC0FE147FA2
-EC3F80EC1FC0A239FFFC7FFCA31E2A7EA923>107 D<EAFFE0A3120FB3B2EAFFFEA30F2A
-7EA912>I<26FFC07FEB1FC0903AC1FFC07FF0903AC307E0C1F8D80FC49038F101FC9039
-C803F20001D801FE7F01D05BA201E05BB03CFFFE3FFF8FFFE0A3331B7D9A38>I<38FFC0
-7E9038C1FF809038C30FC0D80FC413E0EBC80701D813F013D0A213E0B039FFFE3FFFA320
-1B7D9A25>I<EB3FE03801FFFC3803F07E390FC01F80391F800FC0393F0007E0A2007EEB
-03F0A300FE14F8A8007E14F0A26CEB07E0A2391F800FC0390FC01F803907F07F003801FF
-FC38003FE01D1B7E9A22>I<38FFE1FE9038E7FF809038FE0FE0390FF803F09038F001F8
-01E013FC140015FEA2157FA8157E15FEA215FC140101F013F89038F803F09038FC0FE090
-38EFFF809038E1FC0001E0C7FCA9EAFFFEA320277E9A25>I<38FFC3E0EBC7F8EBCC7C38
-0FD8FE13D0A213F0EBE07C1400B0B5FCA3171B7E9A1B>114 D<3803FE30380FFFF0EA3E
-03EA7800127000F01370A27E00FE1300EAFFE06CB4FC14C06C13E06C13F0000713F8C6FC
-EB07FC130000E0137C143C7E14387E6C137038FF01E038E7FFC000C11300161B7E9A1B>
-I<1370A413F0A312011203A21207381FFFE0B5FCA23807F000AD1470A7000313E03801F8
-C0EA00FFEB3F0014267FA51A>I<39FFE07FF0A3000F1307B2140FA2000713173903F067
-FF3801FFC738007F87201B7D9A25>I<3BFFFC7FFC1FFCA33B0FE00FE001C02607F007EB
-0380A201F8EBF0070003160015F82601FC0F130EA29039FE1FFC1E0000011C131C15FE90
-39FF387E3C017F1438EC787F6D486C5AA29138E01FF0011F5CA26D486C5AA36D486C5AA2
-2E1B7F9A31>119 D<39FFFC1FFEA33907F00780D803F813006C6C5AEBFE1E00005BEB7F
-78EB3FF85C6D5A130F6D7E80130F497EEB3DFEEB38FFEB787F9038F03F80D801E013C039
-03C01FE0EB800F39FFF03FFFA3201B7F9A23>I<39FFFE07FFA33907F000E0A2EBF80100
-0314C0A23901FC0380A2EBFE07000014006D5AEB7F0EA2EB3F9CA214FC6D5AA26D5AA213
-075CA26D5AA25CA21307003890C7FC127CEAFE0EA25B5BEA7C70EA3FE0EA0F8020277F9A
-23>I E /Ft 14 123 df<EA03CCEA0E2EEA181C123812301270EAE038A4EAC072A3EA60
-F2EA6134EA1E180F107C8F14>97 D<EA01E0EA0618120CEA1838EA3010EA7000126012E0
-A413081310EA6020EA30C0EA1F000D107C8F12>99 D<EB1F801303A3EB0700A4130EA2EA
-03CEEA0E2EEA181C123812301270485AA4EAC072A3EA60F2EA6134EA1E18111A7C9914>
-I<EA01E0EA0E18EA1C08123812701310EAFFE0EAE000A41308EA60101320EA30C0EA1F00
-0D107C8F12>I<13F338038B8038060700120E120C121CEA380EA4EA301CA3EA183C5BEA
-07B8EA0038A25B1260EAE0E0EAC1C0007FC7FC11177E8F12>103
-D<1203120712061200A61238124C124E128E129CA2121C1238A212701272A212E212E412
-64123808197C980C>105 D<121F1207A3120EA4121CA41238A41270A412E4A412E81230
-081A7D990A>108 D<EA307CEA5986EA9E07A2129CA2EA380EA35B00701380A21338EB39
-00EAE019EA600E11107C8F16>110 D<EA01F0EA0618EA0C0CEA180E12301270126012E0
-A2130C131C13181330EA6060EA30C0EA1F000F107C8F14>I<EA030F380590C0EA09E0EB
-C060A3380380E0A4380701C0148013031400EA0E8E137890C7FCA25AA4B4FC1317808F14
->I<EA03E0EA04301208EA18701360EA1C00EA1F8013C0EA0FE01200136012E0A2EA80C0
-EA4180EA3E000C107D8F10>115 D<1206120EA45AA2EAFFC0EA1C005AA45AA412E1A312
-E212E412380A177C960D>I<EA3806EA4C07EA4E0E128E129CA2EA1C1C1238A3EA7039A3
-EA3079EA389AEA0F0C10107C8F15>I<EA0382EA07C4EA0FFCEA10081310EA00201340EA
-0180EA03001204EA08081210EA2018EA7FF0EA43E0EA81C00F107E8F10>122
-D E /Fu 54 124 df<13FCEA0182EA0703EA0607EA0E0290C7FCA5B5FCEA0E07AE387F0F
-E0131A809915>12 D<90387E1F803901C17040390703C0600006EB80E0000E14401500A5
-B612E0380E0380AE397F8FE3FC1E1A809920>14 D<1380EA010012025A120C120812185A
-A35AA412E0AA1260A47EA37E1208120C12047E7EEA008009267D9B0F>40
-D<7E12407E7E12181208120C7EA37EA41380AA1300A41206A35A1208121812105A5A5A09
-267E9B0F>I<126012F0A212701210A31220A212401280040B7D830B>44
-D<EAFFC0A20A0280880D>I<126012F0A2126004047D830B>I<EA0F80EA1060EA2030EA40
-38EA803CEAC01C12E01240EA003C1338A21370136013C0EA018013001202EA0404120812
-10EA3008EA3FF8127F12FF0E187E9713>50 D<EA0F80EA10E0EA2070EA6078EA70381220
-EA00781370A2136013C0EA0F80EA00E013701338133CA212E0A212C0EA40381370EA30E0
-EA0F800E187E9713>I<1330A2137013F0A2EA0170120312021204120C12081210123012
-20124012C0B5FCEA0070A6EA07FF10187F9713>I<1240EA7FFE13FCA2EA4008EA8010A2
-1320EA0040A213801201A213005AA45AA612020F197E9813>55 D<126012F0A212601200
-A8126012F0A2126004107D8F0B>58 D<126012F0A212601200A8126012F0A212701210A3
-1220A21240128004177D8F0B>I<130CA3131EA2133F1327A2EB4380A3EB81C0A348C67E
-A213FF38020070A20006137800041338A2487FA2001C131EB4EBFFC01A1A7F991D>65
-D<EB3F023801C0C63803002E000E131E48130E14065A007813021270A200F01300A60070
-1302A21278003813047E14087E000313303801C0C038003F00171A7E991C>67
-D<B5FC380E01C0EB00E014301438141CA2140EA2140FA8140EA2141E141C1438A21470EB
-01C0B51200181A7E991D>I<B512F0380E00701430141014181408A3EB0400A3130CEA0F
-FCEA0E0C1304A3EB0004A21408A3141814381470B512F0161A7E991A>I<EB3F023801C0
-C63803002E000E131E48130E14065A007813021270A200F090C7FCA5903801FFC0397000
-0E00A2127812387EA27E000313163801C06638003F821A1A7E991E>71
-D<38FFE7FF380E0070AB380FFFF0380E0070AC38FFE7FF181A7E991D>I<EAFFE0EA0E00
-B3A6EAFFE00B1A7F990E>I<39FFE07F80390E001E00141814105C5C5C49C7FC13025B5B
-131C132E134E1387380F0380120E6D7E6D7EA21470A28080143E39FFE0FF80191A7E991E
->75 D<EAFFF0000EC7FCB01420A314601440A214C01303B5FC131A7E9918>I<B5FC380E
-03C0EB00E01470A21478A41470A214E0EB03C0380FFF00000EC7FCABEAFFE0151A7E991A
->80 D<EAFFFC380E0780EB01C06D7E80A55C495AEB0780D80FFCC7FCEA0E067F6D7E80A3
-80A31580EB00F0EC710038FFE03E191A7E991C>82 D<EA0FC2EA1836EA200EEA600612C0
-1302A3EAE0001270127EEA3FE0EA1FF8EA07FCEA003E130E130713031280A3EAC0021306
-EAE004EAD818EA87E0101A7E9915>I<007FB5FC38701C0700401301A200C01480008013
-00A300001400B13803FFE0191A7F991C>I<3AFF83FF0FF03A3C007801C0001CEC0080A2
-6CEC0100A2149C6C1402A2EB010EA2D803815BEB8207A2D801C25B9038C40388A2D800E4
-1390A29038E801D0017813E0A2EB7000A201305B01201340241A7F9927>87
-D<12FEA212C0B3AF12FEA207257D9B0B>91 D<12FEA21206B3AF12FEA20725809B0B>93
-D<EA3F80EA70C013E0EA20701200A2EA07F0EA1C701230127012E01371A213F1EA71FBEA
-1E3C10107E8F13>97 D<12FC121CA913F8EA1F0EEA1E07381C0380130114C0A6EB038014
-00EA1E07EA1B0CEA10F0121A7F9915>I<EA07F8EA0C1C1238EA3008EA70005AA61270EA
-3004EA3808EA0C18EA07E00E107F8F11>I<137E130EA9EA03CEEA0C3EEA380E12301270
-12E0A612601270EA381EEA1C2E3807CFC0121A7F9915>I<EA07C0EA1C30EA30181270EA
-600C12E0EAFFFCEAE000A41260EA3004EA3808EA0C18EA07E00E107F8F11>I<EA01F0EA
-0318EA0738EA0E101300A6EAFFC0EA0E00AEEA7FE00D1A80990C>I<EA0FCEEA1873EA30
-30EA7038A4EA3030EA1860EA2FC0EA200012601270EA3FF013FCEA1FFEEA600FEAC003A4
-EA6006EA381CEA07E010187F8F13>I<12FC121CA913F8EA1D0CEA1E0EA2121CAB38FF9F
-C0121A7F9915>I<1218123CA21218C7FCA612FC121CAEEAFF80091A80990A>I<EA0180EA
-03C0A2EA0180C7FCA6EA0FC01201B21241EAE180EAE300127E0A2182990C>I<12FC121C
-A9EB3F80EB1E00131813105B5BEA1DC0EA1FE0121C1370137813387F131E131F38FF3FC0
-121A7F9914>I<12FC121CB3A6EAFF80091A80990A>I<38FC7C1F391D8E6380391E0781C0
-A2001C1301AB39FF9FE7F81D107F8F20>I<EAFCF8EA1D0CEA1E0EA2121CAB38FF9FC012
-107F8F15>I<EA07E0EA1C38EA300CEA700EEA6006EAE007A6EA6006EA700EEA381CEA1C
-38EA07E010107F8F13>I<EAFCF8EA1F0EEA1E07381C0380A2EB01C0A6EB03801400EA1E
-07EA1F0CEA1CF090C7FCA6B47E12177F8F15>I<EAFCE0EA1D70121E1320EA1C00ABEAFF
-C00C107F8F0F>114 D<EA1F20EA60E0EA402012C0A2EAF000127FEA3FC0EA1FE0EA00F0
-EA8070133012C01320EAF040EA8F800C107F8F0F>I<1204A3120CA2121C123CEAFFC0EA
-1C00A81320A5EA0E40EA03800B177F960F>I<EAFC7EEA1C0EAC131EEA0C2E3807CFC012
-107F8F15>I<38FF1F80383C0600EA1C04A2EA1E0CEA0E08A26C5AA21390EA03A0A2EA01
-C0A36C5A11107F8F14>I<39FF3F9F80393C0E070000381306381C16041317001E130C38
-0E23081488000F13983807419014D03803C1E01380A200015BEB004019107F8F1C>I<38
-FF3F80383C1C00EA1C18EA0E106C5A13606C5A12017F1203EA0270487E1208EA181CEA38
-1E38FC3FC012107F8F14>I<38FF1F80383C0600EA1C04A2EA1E0CEA0E08A26C5AA21390
-EA03A0A2EA01C0A36C5AA248C7FCA212E112E212E4127811177F8F14>I<B512C0120180
-8913>123 D E /Fv 16 118 df<1303497EA3497EA2EB1BE0A3EB31F0A2EB60F8A2EBE0
-FCEBC07CA248487EEBFFFE487FEB001FA20006EB0F80A2000E14C039FFC07FFCA21E1A7F
-9921>65 D<EAFFFCA2EA0F80AE140CA3141CA21438147814F8B5FCA2161A7E991B>76
-D<B512E014F8380F807E80801580A51500143E5CEBFFF80180C7FCAAEAFFF8A2191A7E99
-1E>80 D<EA0FF0EA1C3CEA3E1E130E130F121C120013FFEA0FCFEA3E0F127C12F8A31317
-387C27E0EA1FC313117F9015>97 D<12FEA2121EA7137F381FC3C0EB00E0001E13F01478
-A2147CA51478A214F0001F13E0381D83C038187F00161A7F9919>I<EA03FCEA0F0EEA1C
-1F123C1278130E00F8C7FCA51278A2383C0180381C0300EA0F06EA03FC11117F9014>I<
-EA03F0EA0E1C487EEA3C071278148012F8A2B5FC00F8C7FCA21278A2383C0180381C0300
-EA0E06EA03FC11117F9014>101 D<3807E3C0381C3CE0EA381C38781EC01400A4EA381C
-6C5AEA27E00020C7FCA21230EA3FFE381FFF8014C0EA700338E000E0A4387001C0383C07
-803807FC0013197F9016>103 D<123C127EA4123CC7FCA4127EA2121EADEAFF80A2091B
-7F9A0D>105 D<39FE1F01F0903863C63C391E81C81C391F01F01EA2001E13E0AA3AFFCF
-FCFFC0A222117F9025>109 D<EAFE1FEB63C0EA1E81381F01E0A2121EAA38FFCFFCA216
-117F9019>I<EA03F8EA0E0E383C0780EA3803007813C0A200F813E0A6007813C0EA7C07
-003C1380380E0E00EA03F813117F9016>I<EAFC78139CEA1D3EA2121E131C1300A9EAFF
-C0A20F117F9012>114 D<EA1FB0EA2070EA403012C0A2EAF000EAFF80EA7FE0EA3FF812
-07EA003CEAC00CA212E01308EAF830EACFE00E117F9011>I<1206A4120EA2121EEA3FF0
-12FFEA1E00A81318A5EA0F30EA03E00D187F9711>I<38FE0FE0A2EA1E01AB1303A2380F
-05FCEA03F916117F9019>I E /Fw 1 4 df<1202A3EAC218EAF278EA3AE0EA0F80A2EA3A
-E0EAF278EAC218EA0200A30D0E7E8E12>3 D E /Fx 34 122 df<127012F812FCA21274
-1204A41208A21210A212201240060F7C840E>44 D<127012F8A3127005057C840E>46
-D<13801203120F12F31203B3A9EA07C0EAFFFE0F217CA018>49 D<13021306130EA2131E
-A2132E134EA2138EA2EA010E1202A21204A212081210A21220A212401280B512F838000E
-00A7131F3801FFF015217FA018>52 D<00101380381E0700EA1FFF5B13F8EA13E00010C7
-FCA613F8EA130EEA1407381803801210380001C0A214E0A4127012F0A200E013C01280EA
-4003148038200700EA1006EA0C1CEA03F013227EA018>I<EA01F0EA060C487EEA180738
-3803801270A238F001C0A314E0A5127013031238EA1805120CEA0619EA03E1380001C0A3
-EB0380A200301300EA78071306EA700CEA20186C5AEA0FC013227EA018>57
-D<497EA3497EA3EB05E0A2EB0DF01308A2497E1478A2497EA3497EA3497EA290B5FC3901
-000780A24814C000021303A24814E01401A2000CEB00F0A2003EEB01F839FF800FFF2023
-7EA225>65 D<B512F8380F800E0007EB0780EC03C015E0140115F0A515E01403EC07C0EC
-0F80EC3E00EBFFFE9038800780EC03C0EC01E015F0140015F8A6EC01F0A2EC03E0EC07C0
-000FEB0F00B512FC1D227EA123>I<903807E0109038381830EBE0063901C00170390380
-00F048C7FC000E1470121E001C1430123CA2007C14101278A200F81400A812781510127C
-123CA2001C1420121E000E14407E6C6C13803901C001003800E002EB381CEB07E01C247D
-A223>I<B512F0380F801E00071307EC03C01401EC00E015F01578A2157C153CA3153EA9
-153CA2157C1578A215F015E01401EC03C0EC0700000F131EB512F81F227EA125>I<9038
-07F00890383C0C18EBE0023901C001B839038000F848C71278481438121E15185AA2007C
-14081278A200F81400A7EC1FFF0078EB00F81578127C123CA27EA27E7E6C6C13B86C7E39
-00E0031890383C0C08903807F00020247DA226>71 D<B512F0380F803C0007130FEC0780
-15C0140315E0A615C014071580EC0F00143CEBFFF00180C7FCAE487EEAFFFC1B227EA121
->80 D<3803F020380C0C60EA1802383001E0EA70000060136012E0A21420A36C1300A212
-78127FEA3FF0EA1FFE6C7E0003138038003FC0EB07E01301EB00F0A214707EA46C1360A2
-6C13C07E38C8018038C60700EA81FC14247DA21B>83 D<39FFFC07FF390FC000F86C4813
-701520B3A5000314407FA2000114806C7E9038600100EB3006EB1C08EB03F020237EA125
->85 D<3BFFF03FFC03FE3B1F8007E000F86C486C4813701720A26C6C6C6C1340A32703C0
-02F01380A33B01E004780100A33A00F0083C02A39039F8183E06903978101E04A2137C90
-393C200F08A390391E400790A390390F8003E0A36D486C5AA36D5C010213002F237FA132
->87 D<EA0FE0EA1838EA3C0C130EEA18071200A313FFEA07C7EA1E07123C1278127000F0
-1308A3130FEA7817383C2390380FC1E015157E9418>97 D<120E12FE121E120EAB131FEB
-61C0EB8060380F0030000E1338143C141C141EA7141C143C1438000F1370380C8060EB41
-C038083F0017237FA21B>I<EA01FEEA0703380C0780121C383803000078C7FC127012F0
-A712700078134012386C1380380C0100EA0706EA01F812157E9416>I<14E0130F130113
-00ABEA01F8EA0704EA0C02EA1C01EA38001278127012F0A7127012781238EA1801EA0C02
-38070CF03801F0FE17237EA21B>I<EA01FCEA0707380C0380381C01C01238007813E0EA
-700012F0B5FC00F0C7FCA512700078132012386C13406C138038070300EA00FC13157F94
-16>I<133C13C6EA018F1203130FEA0700A9EAFFF8EA0700B21380EA7FF8102380A20F>I<
-121C123EA3121CC7FCA8120E12FE121E120EB1EAFFC00A227FA10E>105
-D<120E12FE121E120EB3ADEAFFE00B237FA20E>108 D<390E1FC07F3AFE60E183803A1E
-807201C03A0F003C00E0A2000E1338AF3AFFE3FF8FFE27157F942A>I<380E1F8038FE60
-C0381E80E0380F0070A2120EAF38FFE7FF18157F941B>I<EA01FCEA0707380C01803818
-00C0003813E0481370A200F01378A700701370007813F0003813E0381C01C0380E038038
-070700EA01FC15157F9418>I<EA0E1F38FE61C0380E8060380F0070000E1338143C141C
-141EA7143CA21438000F1370380E80E0EB41C0EB3F0090C7FCA9EAFFE0171F7F941B>I<
-EA0E3CEAFE46EA1E8FEA0F0F13061300120EAD120FEAFFF010157F9413>114
-D<EA0F88EA3078EA601812C01308A212E0EAF000EA7F80EA3FE0EA0FF0EA01F8EA003CEA
-801C130CA212C01308EAE018EAD030EA8FC00E157E9413>I<1202A41206A3120E121E12
-3EEAFFF8EA0E00AB1304A6EA07081203EA01F00E1F7F9E13>I<000E137038FE07F0EA1E
-00000E1370AD14F0A238060170380382783800FC7F18157F941B>I<38FFC1FE381E0078
-000E13301420A26C1340A238038080A33801C100A2EA00E2A31374A21338A3131017157F
-941A>I<39FF8FF8FF391E01E03C001CEBC018120EECE010A239070260201470A2390384
-30401438A23901C81880141CA23900F00D00140FA2EB6006A320157F9423>I<38FFC1FE
-381E0078000E13301420A26C1340A238038080A33801C100A2EA00E2A31374A21338A313
-10A25BA35B12F05B12F10043C7FC123C171F7F941A>121 D E /Fy
-20 124 df<EB7F803801FFF0380701F8380C007E48131F00107F48148048EB07C0A2EC03
-E012B012F87EA31278C7FCEC07C0A21580140F15005C141E5C5C14705C495A495A49C7FC
-130E130C5B5B5B491320485A48C7FC000614405A12084814C0003FB5FC481480B6FCA21B
-2F7DAE21>50 D<1403A34A7EA24A7EA3EC17E01413A2EC23F01421A2EC40F8A3EC807CA2
-0101137EEC003EA20102133F81A2496D7EA3496D7EA2011880011FB5FCA29039200003F0
-1501A249801500A249147CA348C87EA248153F825AD81F80EC3F80D8FFE0903803FFFCA2
-2E327EB132>65 D<91383FE001903901FFF803903807F01E90391F800307013EC7128701
-78144F49142F4848141F4848140F485A000F150790C8FC481503121E123E003C1501127C
-A30078150012F8AB1278127C1601A2123C123E121E001F15027E6D1406000715046C6C14
-086C7E6C6C141001781420013E14C090391F800380903907F00F00903801FFFC9038003F
-E028337CB130>67 D<B712E0A23907E0000F00031401ED00F016701630A21610A41608A3
-15801600A41401A2140790B5FCA2EBE0071401A21400A31602A215001604A4160CA21608
-1618A216381678ED01F80007EC0FF0B7FCA227317CB02D>69 D<DA1FE013809138FFFC01
-903807F00F90390F800183013EC712C3017814274914174848140F485A48481407160348
-C8FC481501121E123E123C1600127CA20078160012F8AA92380FFFFC1278007C9138001F
-C0EE0F80123CA2123E121E121F7E6C7E7F12036C7E6C6C1417137C6D1463D90F8013C390
-3907F00781903900FFFE00DA1FF013002E337CB134>71 D<D8FFF0ED7FF8A200071700D8
-02F815BEA3017CEC013EA26D1402A36D1404A36D6C1308A36D6C1310A36D6C1320A26D6C
-1340A36D6C1380A391387C0100A3EC3E02A36E5AA2EC0F88A3EC07D0A3EC03E0A300076D
-5AD80F80157FD8FFF891380FFFF8EC008035317CB03D>77 D<B6FC15F03907E001FC0003
-EB003EED0F806F7E6F7E150182150082A65E15015E4B5A4B5A4BC7FC153CEC01F090B5C8
-FC9038E001F0EC007C151E6F7E1507826F7EAB1708A21501A2486C903800F010B56C1370
-EE3860C9EA0F802D327CB031>82 D<90387F80203801FFE03907C07860380F001C001EEB
-06E048130300381301007813001270156012F0A21520A37E1500127C127E7E13C0EA1FF8
-6CB47E6C13F86C7FC613FF010F1380010013C0EC1FE01407EC03F01401140015F8A26C14
-78A57E15706C14F015E07E6CEB01C000ECEB038000C7EB070038C1F01E38807FFCEB0FF0
-1D337CB125>I<D8FFFEEC07FFA2D807F0EC01F86C48EC00E017C07F00011680A26C6CEC
-0100A27F017C1402A2017E1406013E1404A26D5CA280010F5CA26D6C5BA28001035CA26E
-13C001015CA26D6C48C7FCA214FCEC7C02A26E5AA2143F6E5AA21598EC0F90A2EC07E0A3
-6E5AA26E5AA330327FB032>86 D<13FE380303C0380C00E00010137080003C133C003E13
-1C141EA21208C7FCA3EB0FFEEBFC1EEA03E0EA0F80EA1F00123E123C127C481404A3143E
-A21278007C135E6CEB8F08390F0307F03903FC03E01E1F7D9E21>97
-D<EB3F80EBE06038038018380700045A001E131E001C133E123C127C14080078130012F8
-A91278127CA2003C13017E14027E6C1304380380183800E060EB3F80181F7D9E1D>99
-D<EB3F80EBE0E0380380383807003C000E7F121E001C7F123C127C00781480140712F8A2
-B6FC00F8C8FCA61278127C123C15807E000EEB0100000F1302EA07803801C00C3800F030
-EB1FC0191F7E9E1D>101 D<120FEA1F80A4EA0F00C7FCABEA078012FFA2120F1207B3A6
-EA0FC0EAFFF8A20D307EAF12>105 D<EA078012FFA2120F1207B3B3A7EA0FC0EAFFFCA2
-0E327EB112>108 D<380780FE39FF83078090388C03C0390F9001E0EA07A06E7E13C0A2
-5BB3A2486C487E3AFFFC1FFF80A2211F7E9E25>110 D<EB1FC0EBF0783801C01C380700
-07481480001EEB03C0001C1301003C14E0A248EB00F0A300F814F8A8007814F0007C1301
-003C14E0A26CEB03C0A26CEB07803907800F003801C01C3800F078EB1FC01D1F7E9E21>
-I<380783E038FF8C18EB907C120FEA07A0EBC0381400A35BB3487EEAFFFEA2161F7E9E19
->114 D<3801FC10380E0330381800F048137048133012E01410A37E6C1300127EEA3FF0
-6CB4FC6C13C0000313E038003FF0EB01F813006C133CA2141C7EA27E14186C1338143000
-CC136038C301C03880FE00161F7E9E1A>I<1340A513C0A31201A212031207120F381FFF
-E0B5FC3803C000B01410A80001132013E000001340EB78C0EB1F00142C7FAB19>I<B712
-802101809321>123 D E end
-%%EndProlog
-%%BeginSetup
-%%Feature: *Resolution 300dpi
-TeXDict begin
-
-%%EndSetup
-%%Page: 1 1
-1 0 bop 284 369 a Fy(RE2C)21 b({)h(A)f(More)h(V)-6 b(ersatile)23
-b(Scanner)e(Generator)472 490 y Fx(P)o(eter)15 b(Bum)o(bulis)209
-b(Donald)17 b(D.)f(Co)o(w)o(an)272 548 y(Computer)g(Science)e
-(Departmen)o(t)h(and)i(Computer)e(Systems)g(Group)692
-606 y(Univ)o(ersit)o(y)e(of)k(W)l(aterlo)q(o)1175 588
-y Fw(\003)782 704 y Fx(April)e(15,)i(1994)849 895 y Fv(Abstract)120
-960 y Fu(It)f(is)g(usually)j(claimed)f(that)e(lexical)j(analysis)f
-(routines)g(are)e(still)i(co)q(ded)f(b)o(y)f(hand,)i(despite)g(the)e
-(widespread)62 1005 y(a)o(v)n(ailabil)q(i)q(t)o(y)h(of)d(scanner)i
-(generators,)f(for)f(e\016ciency)i(reasons.)23 b(While)16
-b(e\016ciency)g(is)f(a)f(consideration)q(,)j(there)e(exist)62
-1051 y(freely)k(a)o(v)n(ailable)j(scanner)d(generators)g(suc)o(h)g(as)g
-(GLA)f([7])g(that)g(can)h(generate)g(scanners)h(that)e(are)h(faster)f
-(than)62 1097 y(most)g(hand-co)q(ded)h(ones.)30 b(Ho)o(w)o(ev)o(er,)18
-b(most)g(generated)g(scanners)g(are)g(tailored)h(for)e(a)g(particular)j
-(en)o(vironmen)o(t,)62 1142 y(and)c(retargetting)h(these)e(scanners)i
-(to)e(other)h(en)o(vironmen)o(ts,)h(if)f(p)q(ossible,)h(is)f(usually)i
-(complex)f(enough)f(to)f(mak)o(e)62 1188 y(a)h(hand-co)q(ded)h(scanner)
-f(more)g(app)q(ealing.)26 b(In)16 b(this)g(pap)q(er)g(w)o(e)f(describ)q
-(e)i(RE2C,)e(a)g(scanner)i(generator)f(that)f(not)62
-1234 y(only)e(generates)f(scanners)h(whic)o(h)f(are)g(faster)f(\(and)h
-(usually)i(smaller\))f(than)f(those)g(pro)q(duced)h(b)o(y)f(an)o(y)g
-(other)g(scanner)62 1279 y(generator)i(kno)o(wn)g(to)f(the)g(authors,)g
-(includin)q(g)j(GLA,)c(but)i(also)g(adapt)f(easily)i(to)e(an)o(y)h(en)o
-(vironmen)o(t.)62 1371 y(Categories)19 b(and)f(Sub)r(ject)g
-(Descriptors:)27 b(D.3.2)17 b([)p Fv(Programming)j(Languages)p
-Fu(]:)25 b(Language)19 b(Classi\014cations)i({)62 1416
-y Ft(sp)n(e)n(cialize)n(d)11 b(applic)n(atio)o(n)g(languages)o
-Fu(;)f(D.3.4)j([)p Fv(Programming)h(Languages)p Fu(]:)j(Pro)q(cessors)
-62 1508 y(General)e(T)m(erms:)h(Algorithms,)e(Languages,)h(P)o
-(erformance)62 1599 y(Additional)h(Key)d(W)m(ords)h(and)g(Phrases:)j
-(Lexical)e(analysis,)g(scanner)f(generator)-42 1736 y
-Fs(1)67 b(In)n(tro)r(duction)-42 1827 y Fr(Lexical)14
-b(analysis)g(routines)h(are)g(still)f(often)g(co)q(ded)i(b)o(y)e(hand)g
-(despite)i(the)f(widespread)g(a)o(v)n(ailabilit)o(y)c(of)j(scanner)i
-(gener-)-42 1877 y(ators.)k(F)m(or)14 b(example,)e(while)i(most)f(Unix)
-h(systems)g(ha)o(v)o(e)g(a)g(scanner)i(generator)f(installed)f(\(t)o
-(ypically)f(LEX)h([15)o(])g(or)g(\015ex)-42 1927 y([16]\),)d(few)i
-(Unix)f(applications)f(use)i(a)f(mec)o(hanically)e(generated)k
-(scanner.)19 b(One)13 b(commonly)c(cited)k(reason)g(for)e(not)i(using)
--42 1977 y(LEX-generated)k(scanners)f(is)f(p)q(erformance:)20
-b(they)15 b(can)g(b)q(e)g(10)g(times)f(slo)o(w)o(er)g(than)h(equiv)n
-(alen)o(t)f(hand-co)q(ded)i(scanners)-42 2026 y([13].)h(As)d(a)g
-(result,)g(there)h(has)f(b)q(een)h(considerable)f(researc)o(h)i(in)o
-(to)d(impro)o(ving)e(the)j(p)q(erformance)g(of)f(mec)o(hanically)e
-(gen-)-42 2076 y(erated)17 b(scanners)f([16)o(,)f(7,)f(9].)21
-b(GLA)15 b([7)o(],)g(one)g(suc)o(h)h(scanner)g(generator,)g(can)f(pro)q
-(duce)h(scanners)h(that)e(are)h(faster)f(than)-42 2126
-y(most)h(hand-co)q(ded)h(scanners.)29 b(Ho)o(w)o(ev)o(er,)17
-b(the)h(use)f(of)f(hand-co)q(ded)i(scanners)g(is)f(still)f(prev)n(alen)
-o(t.)27 b(One)17 b(p)q(ossibilit)o(y)f(is)-42 2176 y(that)e(this)g(is)g
-(due)h(to)e(the)i(di\016cult)o(y)e(of)g(adapting)g(the)h(generated)i
-(scanners)f(to)f(sp)q(eci\014c)h(applications.)21 2226
-y(Most)g(scanner)g(generators)h(are)f(tailored)f(to)g(a)h(particular)f
-(en)o(vironmen)o(t.)19 b(In)14 b(fact,)g(the)i(trend)f(in)f(recen)o(t)i
-(y)o(ears)f(has)-42 2276 y(b)q(een)i(to)e(in)o(tegrate)g(scanner)i
-(generators)f(with)f(compiler)f(to)q(olkits.)21 b(F)m(or)15
-b(example,)f(GLA)h(is)g(part)g(of)g(the)g(Eli)g(compiler)-42
-2325 y(construction)k(system)f([8)o(],)g(and)g(Rex)f([9])g(is)h(part)g
-(of)f(the)h(GMD)f(T)m(o)q(olb)q(o)o(x)g(for)g(Compiler)f(Construction)
-1688 2310 y Fq(1)1707 2325 y Fr(.)30 b(Scanners)p -42
-2362 780 2 v 4 2389 a Fp(\003)22 2401 y Fo(P)o(ermission)9
-b(to)j(cop)o(y)e(without)h(fee)g(all)g(or)g(part)g(of)g(this)g
-(material)e(is)j(gran)o(ted)d(pro)o(vided)h(that)g(the)h(copies)f(are)h
-(not)g(made)f(or)i(distributed)-42 2440 y(for)g(direct)e(commercial)f
-(adv)n(an)o(tage,)g(the)i(A)o(CM)j(cop)o(yrigh)o(t)9
-b(notice)i(and)g(the)g(title)g(of)h(the)f(publication)e(and)i(its)g
-(date)g(app)q(ear,)f(and)h(notice)g(is)-42 2480 y(giv)o(en)g(that)g
-(cop)o(ying)f(is)i(b)o(y)f(p)q(ermission)e(of)j(the)f(Asso)q(ciation)f
-(for)h(Computing)f(Mac)o(hinery)m(.)15 b(T)m(o)d(cop)o(y)f(otherwise,)f
-(or)i(to)f(republish,)f(requires)-42 2519 y(a)k(fee)f(and/or)f(sp)q
-(eci\014c)g(p)q(ermission.)19 b(Cop)o(yrigh)o(t)12 b(1994)h(b)o(y)g
-(the)g(Asso)q(ciation)f(for)h(Computing)e(Mac)o(hinery)m(,)h(Inc.)22
-b(T)m(o)14 b(app)q(ear)e(in)h(LOPLAS)-42 2558 y(2\(1{4\).)5
-2586 y Fn(1)22 2598 y Fo(Also)f(kno)o(wn)e(as)i(Co)q(c)o(ktail)e
-(\(Compiler-Compi)o(ler-)o(T)m(o)q(olb)q(o)n(x)f(Karlsruhe\).)923
-2748 y Fr(1)p eop
-%%Page: 2 2
-2 1 bop -42 195 a Fr(generated)21 b(b)o(y)d(these)i(to)q(ols)f(assume)f
-(the)i(existence)g(of)e(a)h(library)f(of)g(supp)q(ort)h(mo)q(dules)f
-(for)h(error)g(handling,)g(input)-42 245 y(bu\013ering,)c(sym)o(b)q(ol)
-d(table)i(managemen)o(t,)d(and)j(similar)e(functions.)18
-b(While)c(these)h(supp)q(ort)g(mo)q(dules)e(simplify)f(the)i(task)-42
-295 y(of)c(implemen)o(ting)c(a)k(compiler)f(or)h(in)o(terpreter,)i
-(they)e(mak)o(e)f(adaptation)g(to)h(other)g(purp)q(oses)i(more)d
-(di\016cult.)16 b(Adaptation)-42 345 y(to)e(other)h(en)o(vironmen)o(ts)
-e(is)h(also)f(made)g(more)g(di\016cult)g(b)q(ecause)j(often)e
-(assumptions)f(are)i(made)d(ab)q(out)i(the)h(input)f(and)-42
-394 y(restrictions)j(are)e(placed)g(on)g(tok)o(ens)g(in)g(order)g(to)g
-(ac)o(hiev)o(e)g(b)q(etter)i(p)q(erformance.)k(RE2C)14
-b(go)q(es)i(to)f(the)g(other)h(extreme:)-42 444 y(it)e(concen)o(trates)
-i(solely)d(on)h(generating)g(co)q(de)h(for)e(matc)o(hing)f(regular)i
-(expressions.)21 494 y(RE2C)f(is)h(successful)h(at)f(its)g(task:)k(not)
-13 b(only)g(do)q(es)i(it)e(pro)q(duce)i(scanners)h(whic)o(h)e(are)g
-(faster)g(than)g(those)g(created)i(b)o(y)-42 544 y(other)g(scanner)h
-(generators)f(but,)f(surprisingly)m(,)f(they)i(are)g(usually)e(smaller)
-f(as)j(w)o(ell.)21 b(F)m(urther,)15 b(RE2C)g(do)q(es)h(not)f(mak)o(e)
--42 594 y(an)o(y)i(assumptions)e(ab)q(out)h(the)h(input)g(or)f(place)h
-(an)o(y)f(restrictions)i(on)e(tok)o(ens.)26 b(T)m(o)16
-b(a)g(large)g(degree,)i(the)g(p)q(erformance)-42 643
-y(and)d(\015exibilit)o(y)d(of)i(RE2C-generated)h(scanners)h(is)f(due)f
-(to)h(a)f(no)o(v)o(el)f(metho)q(d)h(for)g(determining)f(when)i(to)f
-(re\014ll)g(a)g(bu\013er)-42 693 y(whic)o(h)g(a)o(v)o(oids)f(the)i
-(complications)c(in)o(tro)q(duced)k(b)o(y)f(the)g(sen)o(tinel)h(metho)q
-(d)e([1)o(].)21 743 y(The)e(follo)o(wing)d(sections)j(of)f(this)h(pap)q
-(er)g(describ)q(e)i(RE2C)d(scanner)i(sp)q(eci\014cations,)f(discuss)h
-(ho)o(w)e(these)i(sp)q(eci\014cations)-42 793 y(are)21
-b(con)o(v)o(erted)g(in)o(to)f(scanners,)j(and)d(giv)o(e)f(p)q
-(erformance)h(results)h(ac)o(hiev)o(ed)g(b)o(y)f(our)g(implemen)o
-(tatio)o(n)d(\(including)j(a)-42 843 y(comparison)13
-b(with)g(GLA\).)-42 980 y Fs(2)67 b(Scanner)24 b(Sp)r(eci\014cations)
--42 1071 y Fr(An)14 b(RE2C)g(source)h(\014le)f(consists)h(of)e(C[14)o
-(])g(or)h(C++[4])842 1056 y Fq(2)874 1071 y Fr(co)q(de)g(in)o(terlea)o
-(v)o(ed)g(with)g(commen)o(ts)e(of)h(the)i(form)d Fm(/*!re2c)20
-b Fl(:)7 b(:)g(:)-42 1121 y Fm(*/)15 b Fr(con)o(taining)f(scanner)i(sp)
-q(eci\014cations.)23 b(These)16 b(sp)q(eci\014cations)g(are)g(replaced)
-g(with)e(generated)j(co)q(de)e(that)g(is)g(in)o(v)o(ok)o(ed)-42
-1170 y(simply)d(b)o(y)i(\\falling)d(in)o(to")i(the)i(commen)o(ts)d(as)i
-(illustrated)g(in)f(Figure)h(1)g(and)f(in)h(App)q(endix)g(A)1481
-1155 y Fq(3)1500 1170 y Fr(.)469 1254 y Fm(#define)20
-b(YYCURSOR)42 b(p)469 1304 y(unsigned)20 b(char)h(*scan)p
-887 1304 14 2 v 14 w(uint\(unsigned)e(char)i(*p\))p Fk(f)469
-1353 y Fm(/*!re2c)556 1403 y([0-9]+)195 b Fk(f)p Fm(return)20
-b(p;)p Fk(g)556 1453 y Fm([\\)o(000-\\)o(377])87 b Fk(f)p
-Fm(return)20 b(NULL;)p Fk(g)469 1503 y Fm(*/)469 1553
-y Fk(g)681 1634 y Fr(Figure)14 b(1:)k(A)c(simple)f(scanner.)21
-1733 y(A)i(scanner)h(sp)q(eci\014cation)f(tak)o(es)g(the)g(form)e(of)h
-(a)h(list)f(of)g(rules,)h(eac)o(h)g(rule)g(consisting)g(of)f(a)g
-(regular)h(expression)h([10)o(])-42 1783 y(and)g(an)g(action)f
-(expressed)k(in)c(executable)i(co)q(de.)25 b(Figure)16
-b(2)g(illustrates)g(a)g(trivial)e(RE2C)h(scanner)j(sp)q(eci\014cation)e
-(that)-42 1833 y(will)c(b)q(e)h(used)h(as)f(an)f(example)g(throughout)g
-(this)h(pap)q(er.)36 b(Eac)o(h)14 b(call)d(to)i(the)g(co)q(de)h
-(generated)g(from)d(a)h(sp)q(eci\014cation)i(will)416
-1926 y Fm("print")201 b Fk(f)22 b Fm(return)e(PRINT;)49
-b(/*)21 b(rule)g(5)h(*/)f Fk(g)416 1975 y Fm([a-z])o(+)224
-b Fk(f)22 b Fm(return)e(ID;)115 b(/*)21 b(rule)g(4)h(*/)f
-Fk(g)416 2025 y Fm([0-9])o(+)224 b Fk(f)22 b Fm(return)e(DEC;)93
-b(/*)21 b(rule)g(3)h(*/)f Fk(g)416 2075 y Fm("0x")g([0-9a-f])n(+)50
-b Fk(f)22 b Fm(return)e(HEX;)93 b(/*)21 b(rule)g(2)h(*/)f
-Fk(g)416 2125 y Fm([\\000-\\)o(377])114 b Fk(f)22 b Fm(return)e(ERR;)93
-b(/*)21 b(rule)g(1)h(*/)f Fk(g)108 2214 y Fr(Figure)15
-b(2:)20 b(Sample)13 b(sp)q(eci\014cation.)22 b Fm([)p
-Fl(a)p Fm(-)p Fl(b)p Fm(])14 b Fr(matc)o(hes)h(an)o(y)f(c)o(haracter)i
-(b)q(et)o(w)o(een)g Fl(a)f Fr(and)g Fl(b)p Fr(,)f(inclusiv)o(ely)m(.)
-108 2264 y(The)i(last)f(rule,)g(for)g(example,)e(will)h(matc)o(h)g(an)o
-(y)g(eigh)o(t)h(bit)g(c)o(haracter.)23 b(Rules)15 b(are)g(listed)h(in)e
-(order)i(of)108 2314 y(precedence)q(.)-42 2414 y(\014rst)d(determine)g
-(the)f(longest)h(p)q(ossible)f(pre\014x)h(of)f(the)h(remaining)d(input)
-i(that)g(matc)o(hes)g(one)g(of)g(the)h(regular)f(expressions)-42
-2463 y(and)i(will)f(then)h(execute)i(the)e(action)g(in)f(the)i(\014rst)
-g(applicable)e(rule.)p -42 2498 780 2 v 5 2525 a Fn(2)22
-2537 y Fo(Retargetting)8 b(RE2C)k(to)f(a)h(di\013eren)o(t)d(language)g
-(is)i(straigh)o(tforw)o(ard.)5 2564 y Fn(3)22 2576 y
-Fo(RE2C-generated)e(scanners)g(require)h(no)h(additional)d(supp)q(ort)i
-(co)q(de.)923 2748 y Fr(2)p eop
-%%Page: 3 3
-3 2 bop 138 1062 a @beginspecial 53 @llx 268 @lly 435
-@urx 486 @ury 3820 @rwi @setspecial
-%%BeginDocument: scanner.eps
-
-
-
-
-
-
-
-
-
-
-
-/AutoFlatness false def
-
-% -------------- POSTSCRIPT PROLOG FOR CORELDRAW 3.X ------
-
-% Copyright 1992 Corel Corporation. All rights reserved.
-
-/wCorelDict 300 dict def wCorelDict begin/bd{bind def}bind def
-
-/ld{load def}bd/xd{exch def}bd/_ null def
-
-/$c 0 def/$m 0 def/$y 0 def/$k 0 def/$t 1 def
-
-/$n _ def/$o 0 def/$fil 0 def/$bkg false def
-
-/$C 0 def/$M 0 def/$Y 0 def/$K 0 def/$T 1 def
-
-/$N _ def/$O 0 def/$PF false def/$ctm matrix currentmatrix def
-
-/$ptm matrix def/$ttm matrix def/$stm matrix def
-
-/$fst 128 def/$pad 0 def/$rox 0 def/$roy 0 def
-
-currentscreen/@dsp xd/$dsp/@dsp def/$dsa xd
-
-/$dsf xd/$sdf false def/$SDF false def/$Scra 0.0 def
-
-/$sv 0 def/@cp/closepath ld/@gs/gsave ld/@gr/grestore ld
-
-/@np/newpath ld/@sv{/$sv save def}bd/@rs{$sv restore}bd
-
-/@ss{exch $Scra add exch load setscreen}bd
-
-AutoFlatness{/$cpx ([Error: PathTooComplex; OffendingCommand: AnyPaintingOperator]\n) def
-
-/@err1{$cpx print flush newpath}bd/@ifl{dup currentflat exch sub 10 gt
-
-{@err1 exit}{currentflat 2 add setflat}ifelse}bd
-
-/@fill/fill ld/fill{currentflat{{@fill}stopped{@ifl}{exit}ifelse
-
-}bind loop setflat}bd/@eofill/eofill ld/eofill{currentflat{{@eofill}
-
-stopped{@ifl}{exit}ifelse}bind loop setflat}bd
-
-/@clip/clip ld/clip{currentflat{{@clip}stopped{initclip @ifl}{exit
-
-}ifelse}bind loop setflat}bd/@eoclip/eoclip ld
-
-/eoclip{currentflat{{@eoclip}stopped{initclip @ifl}{exit}ifelse
-
-}bind loop setflat}bd/@stroke/stroke ld/stroke{currentflat{{@stroke}
-
-stopped{@ifl}{exit}ifelse}bind loop setflat}bd}if
-
-/InRange{3 -1 roll 2 copy le{pop}{exch pop}ifelse
-
-2 copy ge{pop}{exch pop}ifelse}bd/wDstChck{2 1 roll dup 3 -1 roll
-
-eq{1 add}if}bd/@dot{dup mul exch dup mul add 1 exch sub 2 div}bd
-
-/@lin{exch pop abs 1 exch sub}bd/@MN{2 copy le{pop}{exch pop}ifelse}bd
-
-/setcmykcolor where{pop}{/setcmykcolor{4 1 roll
-
-3{3 index add 1 @MN 1 exch sub 3 1 roll}repeat
-
-setrgbcolor pop}bd}ifelse/setoverprint{/$op xd}bd
-
-/currentoverprint{$op}bd/setsepcolor{1 exch sub setgray}bd
-
-/checksepcolor{1 exch sub dup setgray 1 eq exch 1 eq and not}bd
-
-/setprocesscolor{ColorSeparationMode 0 eq{setcmykcolor}{
-
-0 4 $ink sub index exch pop 5 1 roll 4{pop}repeat
-
-setsepcolor}ifelse}bd/findcmykcustomcolor{5 array astore}bd
-
-/setcustomcolor where{pop}{/setcustomcolor{ColorSeparationMode 0 eq{
-
-exch aload pop pop 4{4 index mul 4 1 roll}repeat
-
-5 -1 roll pop setcmykcolor}{exch aload pop
-
-CurrentInkName eq{4 index}{0}ifelse 6 1 roll
-
-5{pop}repeat setsepcolor}ifelse}bd}ifelse/colorimage where{pop}{
-
-/colorimage{pop pop pop pop pop{currentfile $dat readhexstring pop pop}
-
-repeat pop}bd}ifelse/@tc{dup 1 ge{pop}{4{dup
-
-6 -1 roll mul exch}repeat pop}ifelse}bd/@scc{1 eq setoverprint
-
-dup _ eq{pop setprocesscolor pop}{findcmykcustomcolor
-
-exch setcustomcolor}ifelse ColorSeparationMode 0 eq{true}{
-
-currentgray 1 eq currentoverprint and not}ifelse}bd
-
-/@sft{/$tx $tllx $pxf add dup $tllx gt{$pwid sub}if def
-
-/$ty $tury $pyf sub dup $tury lt{$phei add}if def}bd
-
-/@stb{pathbbox/$ury xd/$urx xd/$lly xd/$llx xd}bd
-
-/@ep{{cvx exec}forall}bd/@tp{@sv/$in true def
-
-2 copy dup $lly le{/$in false def}if $phei sub $ury ge{/$in false def}if
-
-dup $urx ge{/$in false def}if $pwid add $llx le{/$in false def}if
-
-$in{@np 2 copy m $pwid 0 rl 0 $phei neg rl $pwid neg 0 rl
-
-0 $phei rl clip @np $pn cvlit load aload pop
-
-7 -1 roll 5 index sub 7 -1 roll 3 index sub translate
-
-/$ctm matrix currentmatrix def @ep pop pop pop pop}{pop pop}ifelse
-
-@rs}bd/@th{@sft 0 1 $tly 1 sub{dup $psx mul $tx add{
-
-dup $llx gt{$pwid sub}{exit}ifelse}loop exch $phei mul $ty exch sub
-
-0 1 $tlx 1 sub{$pwid mul 3 copy 3 -1 roll add exch
-
-@tp pop}for pop pop}for}bd/@tv{@sft 0 1 $tlx 1 sub{dup $pwid mul $tx add
-
-exch $psy mul $ty exch sub{dup $ury lt{$phei add}{exit}ifelse}loop
-
-0 1 $tly 1 sub{$phei mul 3 copy sub @tp pop}for
-
-pop pop}for}bd/@pf{@gs $ctm setmatrix $pm concat
-
-@stb eoclip Bburx Bbury $pm itransform/$tury xd/$turx xd
-
-Bbllx Bblly $pm itransform/$tlly xd/$tllx xd
-
-/$wid $turx $tllx sub def/$hei $tury $tlly sub def
-
-@gs $vectpat{1 0 0 0 0 _ $o @scc{eofill}if}{$t $c $m $y $k $n $o @scc{
-
-$tllx $tlly translate $wid $hei scale <00> 8 1 false [ 8 0 0 1 0 0 ]{}imagemask
-
-/$bkg true def}if}ifelse @gr $wid 0 gt $hei 0 gt and{
-
-$pn cvlit load aload pop/$pd xd 3 -1 roll sub/$phei xd
-
-exch sub/$pwid xd/$tlx $wid $pwid div ceiling 1 add def
-
-/$tly $hei $phei div ceiling 1 add def $psx 0 eq{@tv}{@th}ifelse}if
-
-@gr @np/$bkg false def}bd/@dlt{ColorSeparationMode 0 eq{
-
-/$dc $toc $tot mul $frc $frt mul dup/$c xd sub $fst 1 sub div def
-
-/$dm $tom $tot mul $frm $frt mul dup/$m xd sub $fst 1 sub div def
-
-/$dy $toy $tot mul $fry $frt mul dup/$y xd sub $fst 1 sub div def
-
-/$dk $tok $tot mul $frk $frt mul dup/$k xd sub $fst 1 sub div def
-
-true}{$frt $frc $frm $fry $frk $frn $o @scc
-
-dup{/$frk 1 currentgray sub def}{/$frk 0 def}ifelse
-
-$tot $toc $tom $toy $tok $ton $o @scc dup{/$tok 1 currentgray sub def}{
-
-/$tok 0 def}ifelse or dup{/$c 0 def/$m 0 def/$y 0 def/$k $frk def
-
-/$dc 0 def/$dm 0 def/$dy 0 def/$dk $tok $frk sub $fst 1 sub div def}if
-
-}ifelse}bd/@ftl{1 index 4 index sub dup $pad mul dup/$pdw xd
-
-2 mul sub $fst div/$wid xd 2 index sub/$hei xd
-
-pop translate $c $m $y $k 4 copy ColorSeparationMode 0 ne
-
-{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse
-
-0 0 moveto 0 $hei lineto $pdw $hei lineto $pdw 0 lineto 0 0 lineto fill
-
-$pdw 0 translate $fst{4 copy ColorSeparationMode 0 ne
-
-{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse
-
-0 0 moveto 0 $hei lineto $wid $hei lineto $wid 0 lineto 0 0 lineto fill
-
-$wid 0 translate $dk add 4 1 roll $dy add 4 1 roll
-
-$dm add 4 1 roll $dc add 4 1 roll}repeat $dk sub 4 1 roll
-
-$dy sub 4 1 roll $dm sub 4 1 roll $dc sub 4 1 roll
-
-ColorSeparationMode 0 ne{1 exch sub setgray pop pop pop}
-
-{setcmykcolor}ifelse 0 0 moveto 0 $hei lineto $pdw $hei lineto $pdw 0 lineto 0 0 lineto fill
-
-}bd/@ftr{1 index 4 index sub dup $rox mul/$row xd
-
-2 div 1 index 4 index sub dup $roy mul/$roh xd
-
-2 div 2 copy dup mul exch dup mul add sqrt
-
-$row dup mul $roh dup mul add sqrt add dup/$hei xd $fst div/$wid xd
-
-4 index add $roh add exch 5 index add $row add
-
-exch translate pop pop pop pop currentflat dup 5 mul setflat
-
-$c $m $y $k 4 copy ColorSeparationMode 0 ne
-
-{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse
-
-$wid 0 moveto 0 0 $hei 0 360 arc fill 1.0 $pad 2 mul sub dup scale
-
-$fst{4 copy ColorSeparationMode 0 ne{1 exch sub setgray pop pop pop}
-
-{setcmykcolor}ifelse $wid 0 moveto 0 0 $hei 0 360 arc fill
-
-/$hei $hei $wid sub def $dk add 4 1 roll $dy add 4 1 roll
-
-$dm add 4 1 roll $dc add 4 1 roll}repeat pop pop pop pop
-
-setflat}bd/@ff{@gs @dlt{$ctm setmatrix eoclip
-
-newpath Bbllx Bblly moveto Bbllx Bbury lineto
-
-Bburx Bbury lineto Bburx Bblly lineto $fan rotate
-
-pathbbox newpath $fty 1 eq{@ftr}{@ftl}ifelse}if
-
-@gr @np}bd/@Pf{@sv ColorSeparationMode 0 eq $ink 3 eq or{0 J 0 j [] 0 d
-
-$t $c $m $y $k $n $o @scc pop $ctm setmatrix
-
-72 1000 div dup matrix scale dup concat dup Bburx exch Bbury exch itransform
-
-ceiling cvi/Bbury xd ceiling cvi/Bburx xd Bbllx exch Bblly exch itransform
-
-floor cvi/Bblly xd floor cvi/Bbllx xd $Prm aload pop
-
-$Psn load exec}{1 setgray eofill}ifelse @rs
-
-@np}bd/g{1 exch sub/$k xd/$c 0 def/$m 0 def/$y 0 def/$t 1 def/$n _ def/$fil 0 def
-
-}bd/G{1 exch sub/$K xd/$C 0 def/$M 0 def/$Y 0 def/$T 1 def/$N _ def}bd
-
-/k{/$k xd/$y xd/$m xd/$c xd/$t 1 def/$n _ def/$fil 0 def}bd
-
-/K{/$K xd/$Y xd/$M xd/$C xd/$T 1 def/$N _ def}bd
-
-/x{/$t xd/$n xd/$k xd/$y xd/$m xd/$c xd/$fil 0 def}bd
-
-/X{/$T xd/$N xd/$K xd/$Y xd/$M xd/$C xd}bd
-
-/d/setdash ld/i{dup 0 ne{setflat}{pop}ifelse}bd
-
-/j/setlinejoin ld/J/setlinecap ld/M/setmiterlimit ld
-
-/w/setlinewidth ld/O{/$o xd}bd/R{/$O xd}bd
-
-/c/curveto ld/C/c ld/v{4 -2 roll 2 copy 6 -2 roll curveto}bd
-
-/V/v ld/y{2 copy curveto}bd/Y/y ld/l/lineto ld
-
-/L/l ld/rl/rlineto ld/m/moveto ld/n/newpath ld
-
-/N/newpath ld/F{matrix currentmatrix $sdf{$scf $sca $scp @ss}if
-
-$fil 1 eq{@pf}{$fil 2 eq{@ff}{$fil 3 eq{@Pf}{$t $c $m $y $k $n $o @scc
-
-{eofill}{@np}ifelse}ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}if
-
-setmatrix}bd/f{@cp F}bd/S{matrix currentmatrix
-
-$ctm setmatrix $SDF{$SCF $SCA $SCP @ss}if $T $C $M $Y $K $N $O @scc{
-
-matrix currentmatrix $ptm concat stroke setmatrix}{@np}ifelse
-
-$SDF{$dsf $dsa $dsp @ss}if setmatrix}bd/s{@cp
-
-S}bd/B{@gs F @gr S}bd/b{@cp B}bd/W{eoclip}bd
-
-/p{/$pm xd 7{pop}repeat/$pyf xd/$pxf xd/$pn xd
-
-/$fil 1 def}bd/P{11{pop}repeat}bd/u{}bd/U{}bd
-
-/A{pop}bd/q/@gs ld/Q/@gr ld/E{5 array astore
-
-exch cvlit exch def}bd/`{}bd/~{}bd/@{}bd/&{}bd
-
-/CorelDrawReencodeVect [ 16#82/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl
-
-16#88/circumflex/perthousand/Scaron/guilsinglleft/OE
-
-16#91/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash
-
-16#98/tilde/trademark/scaron/guilsinglright/oe
-
-16#9F/Ydieresis 16#A1/exclamdown/cent/sterling/currency/yen/brokenbar/section
-
-16#a8/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/minus/registered/macron
-
-16#b0/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
-
-16#b8/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
-
-16#c0/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
-
-16#c8/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
-
-16#d0/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
-
-16#d8/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
-
-16#e0/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
-
-16#e8/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
-
-16#f0/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
-
-16#f8/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
-
-] def/@cc{currentfile $dat readhexstring pop}bd
-
-/@sm{/$ctm $ctm currentmatrix def}bd/@E{/Bbury xd/Bburx xd
-
-/Bblly xd/Bbllx xd}bd/@c{@cp}bd/@p{/$fil 1 def
-
-1 eq/$vectpat xd/$pm xd/$psy xd/$psx xd/$pyf xd/$pxf xd
-
-/$pn xd}bd/@P{/$fil 3 def/$Psn xd array astore
-
-/$Prm xd}bd/@k{/$fil 2 def/$roy xd/$rox xd/$pad xd
-
-/$fty xd/$fan xd $fty 1 eq{/$fan 0 def}if/$tok xd/$toy xd/$tom xd/$toc xd
-
-/$frk xd/$fry xd/$frm xd/$frc xd/$frn _ def/$frt 1 def/$ton _ def/$tot 1 def
-
-}bd/@x{/$fil 2 def/$roy xd/$rox xd/$pad xd
-
-/$fty xd/$fan xd/$tot xd/$ton xd/$tok xd/$toy xd/$tom xd/$toc xd
-
-/$frt xd/$frn xd/$frk xd/$fry xd/$frm xd/$frc xd}bd
-
-/@ii{concat 3 index 3 index m 3 index 1 index l
-
-2 copy l 1 index 3 index l 3 index 3 index l
-
-clip pop pop pop pop}bd/@i{@sm @gs @ii 6 index 1 ne{/$frg true def
-
-pop pop}{1 eq{$T $C $M $Y $K $N $O @scc/$frg xd}{/$frg false def
-
-}ifelse 1 eq{@gs $ctm setmatrix $t $c $m $y $k $n $o @scc{eofill}if
-
-@gr}if}ifelse/$frg $frg $bkg or def @np/$ury xd/$urx xd/$lly xd/$llx xd
-
-/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul 8 div ceiling cvi string def
-
-$frg{$SDF{$SCF $SCA $SCP @ss}if $llx $lly translate
-
-$urx $llx sub $ury $lly sub scale $wid $hei abs
-
-$bts 1 eq{false}{$bts}ifelse [ $wid 0 0 $hei neg 0
-
-$hei 0 gt{$hei}{0}ifelse]/@cc load $bts 1 eq{imagemask}{image}ifelse
-
-$SDF{$dsf $dsa $dsp @ss}if}{$hei abs{@cc pop}repeat}ifelse
-
-@gr $ctm setmatrix}def/@M{@sv}bd/@N{/@cc{}def
-
-1 eq{12 -1 roll neg 12 1 roll @I}{13 -1 roll neg 13 1 roll
-
-@i}ifelse @rs}bd/@I{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd/$llx xd
-
-/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div ceiling cvi string def
-
-$llx $lly translate $urx $llx sub $ury $lly sub scale
-
-$wid $hei abs $bts [ $wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]
-
-/@cc load false $ncl colorimage @gr $ctm setmatrix}bd
-
-/z{exch findfont exch scalefont setfont}bd
-
-/ZB{9 dict dup begin 4 1 roll/FontType 3 def
-
-/FontMatrix xd/FontBBox xd/Encoding 256 array def
-
-0 1 255{Encoding exch/.notdef put}for/CharStrings 256 dict def
-
-CharStrings/.notdef{}put/Metrics 256 dict def
-
-Metrics/.notdef 3 -1 roll put/BuildChar{exch
-
-dup/$char exch/Encoding get 3 index get def
-
-dup/Metrics get $char get aload pop setcachedevice
-
-begin Encoding exch get CharStrings exch get
-
-end exec}def end definefont pop}bd/ZBAddChar{findfont begin
-
-dup 4 1 roll dup 6 1 roll Encoding 3 1 roll put
-
-CharStrings 3 1 roll put Metrics 3 1 roll put
-
-end}bd/Z{findfont dup maxlength 2 add dict exch
-
-dup{1 index/FID ne{3 index 3 1 roll put}{pop pop}ifelse}forall
-
-pop dup dup/Encoding get 256 array copy dup/$fe xd
-
-/Encoding exch put dup/Fontname 3 index put
-
-3 -1 roll dup length 0 ne{0 exch{dup type 0 type eq{exch pop}{
-
-$fe exch 2 index exch put 1 add}ifelse}forall
-
-pop}if dup 256 dict dup/$met xd/Metrics exch put
-
-dup/FontMatrix get 0 get 1000 mul 1 exch div
-
-3 index length 256 eq{0 1 255{dup $fe exch get
-
-dup/.notdef eq{pop pop}{5 index 3 -1 roll get
-
-2 index mul $met 3 1 roll put}ifelse}for}if
-
-pop definefont pop pop}bd/@ftx{{currentpoint 3 -1 roll
-
-(0) dup 3 -1 roll 0 exch put dup @gs true charpath
-
-$ctm setmatrix @@txt @gr @np stringwidth pop 3 -1 roll add exch moveto
-
-}forall}bd/@ft{matrix currentmatrix exch $sdf{$scf $sca $scp @ss}if
-
-$fil 1 eq{/@@txt/@pf ld @ftx}{$fil 2 eq{/@@txt/@ff ld @ftx}{$fil 3 eq
-
-{/@@txt/@Pf ld @ftx}{$t $c $m $y $k $n $o @scc{show}{pop}ifelse}ifelse
-
-}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}if setmatrix}bd
-
-/@st{matrix currentmatrix exch $SDF{$SCF $SCA $SCP @ss}if
-
-$T $C $M $Y $K $N $O @scc{{currentpoint 3 -1 roll
-
-(0) dup 3 -1 roll 0 exch put dup @gs true charpath
-
-$ctm setmatrix $ptm concat stroke @gr @np stringwidth pop 3 -1 roll add exch moveto
-
-}forall}{pop}ifelse $SDF{$dsf $dsa $dsp @ss}if
-
-setmatrix}bd/@te{@ft}bd/@tr{@st}bd/@ta{dup
-
-@gs @ft @gr @st}bd/@t@a{dup @gs @st @gr @ft}bd
-
-/@tm{/$textsave save def @sm concat}bd/e{/t{@te}def}bd
-
-/r{/t{@tr}def}bd/o{/t{pop}def}bd/a{/t{@ta}def}bd
-
-/@a{/t{@t@a}def}bd/t{@te}def/T{@np $ctm setmatrix
-
-/$ttm matrix def $textsave restore}bd/@t{/$stm $stm currentmatrix def
-
-3 1 roll moveto $ttm concat t $stm setmatrix}def
-
-/@n{/$ttm exch matrix rotate def}bd/@s{}bd
-
-/@l{}bd/@B{@gs S @gr F}bd/@b{@cp @B}bd/@w{matrix rotate/$ptm xd
-
-matrix scale $ptm dup concatmatrix/$ptm xd
-
-1 eq{$ptm exch dup concatmatrix/$ptm xd}if
-
-1 w}bd/@g{1 eq dup/$sdf xd{/$scp xd/$sca xd
-
-/$scf xd}if}bd/@G{1 eq dup/$SDF xd{/$SCP xd
-
-/$SCA xd/$SCF xd}if}bd/@D{3 copy @ss/$dsp xd
-
-/$dsa xd/$dsf xd}bd/@j{@sv @np}bind def/@J{@rs}bind def
-
-/@sep{/ColorSeparationMode where{pop}{/ColorSeparationMode 0 def
-
-/CurrentInkName (Composite) def}ifelse ColorSeparationMode 0 eq{
-
-/CurrentInkName (Composite) def}if/CurrentInkName where{pop}{
-
-/CurrentInkName (Composite) def}ifelse CurrentInkName (Composite) eq
-
-{/$ink -1 def}{CurrentInkName (Cyan) eq{/$ink 0 def}{
-
-CurrentInkName (Magenta) eq{/$ink 1 def}{CurrentInkName (Yellow) eq
-
-{/$ink 2 def}{CurrentInkName (Black) eq{/$ink 3 def}{/$ink 4 def
-
-}ifelse}ifelse}ifelse}ifelse}ifelse}bd @sep
-
-/@whi{@gs -72000 dup moveto -72000 72000 lineto
-
-72000 dup lineto 72000 -72000 lineto closepath 1 setgray fill
-
-@gr}bd/@neg{ [{1 exch sub}/exec cvx currenttransfer/exec cvx] cvx settransfer
-
-@whi}bd/@reg{[] 0 d 0 setgray .3 setlinewidth
-
-2 copy 5.4 0 360 arc closepath 2 copy moveto 9 0 rlineto
-
-2 copy moveto -9 0 rlineto 2 copy moveto 0 9 rlineto
-
-moveto 0 -9 rlineto stroke}bd/leftbracket{(\050)}def
-
-/rightbracket{(\051)}def
-
-
-
-
-
-11.4737 setmiterlimit
-
-1.00 setflat
-
-/$fst 128 def
-
-[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-
-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 229
-
-229 291 457 457 732 543 182 275 275 322 480 229 275 229 229 457
-
-457 457 457 457 457 457 457 457 457 229 229 480 480 480 457 836
-
-543 543 592 592 543 504 639 592 229 408 543 457 686 592 639 543
-
-639 592 543 504 592 543 771 543 543 504 229 229 229 387 457 275
-
-457 457 408 457 457 229 457 457 182 182 408 182 686 457 457 457
-
-457 275 408 229 457 408 592 408 408 408 275 213 275 480 750 750
-
-750 750 457 275 818 457 457 275 818 750 275 818 750 750 750 750
-
-182 182 275 275 229 457 818 275 818 750 275 771 750 750 750 750
-
-275 457 457 457 457 148 457 275 605 299 457 480 750 605 750 750
-
-750 750 750 275 750 441 750 275 750 299 457 750 750 750 504 543
-
-543 543 543 543 543 818 592 543 543 543 543 229 229 229 229 750
-
-592 639 639 639 639 639 750 639 592 592 592 592 543 750 504 457
-
-457 457 457 457 457 732 408 457 457 457 457 229 229 229 229 750
-
-457 457 457 457 457 457 750 504 457 457 457 457 408 750 408 ]
-
-CorelDrawReencodeVect /_Helvetica-Narrow /Helvetica-Narrow Z
-
-[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-
-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
-
-600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 ]
-
-CorelDrawReencodeVect /_Courier /Courier Z
-
-
-
-
-@sv
-
-/$ctm matrix currentmatrix def
-
-@sv
-
-
-106.13 392.62 110.02 399.38 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 106 392] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (0) @t
-
-T
-
-
-160.70 392.69 163.30 399.31 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 160 392] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (1) @t
-
-T
-
-
-214.06 392.69 217.94 399.24 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 214 392] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (2) @t
-
-T
-
-
-268.06 392.54 271.94 399.24 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 268 392] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (3) @t
-
-T
-
-
-321.98 392.47 325.94 399.10 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 322 392] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (4) @t
-
-T
-
-
-375.98 392.40 379.94 399.10 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 376 392] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (5) @t
-
-T
-
-
-159.98 446.69 163.94 453.38 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 160 446] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (6) @t
-
-T
-
-
-106.06 338.83 110.09 345.38 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 106 338] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (7) @t
-
-T
-
-
-159.98 338.62 163.94 345.46 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 160 338] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (8) @t
-
-T
-
-
-106.13 284.62 110.02 291.46 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 106 284] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (9) @t
-
-T
-
-
-157.97 284.69 166.10 291.53 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 158 285] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (10) @t
-
-T
-
-
-104.54 446.69 111.53 453.31 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 104 446] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 125.00 z
-
-0 0 (11) @t
-
-T
-
-
-112.54 440.93 114.55 445.97 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 112 440] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (1) @t
-
-T
-
-
-166.46 278.93 169.49 283.97 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 166 278] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (2) @t
-
-T
-
-
-112.46 332.86 115.49 337.90 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 112 332] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (3) @t
-
-T
-
-
-166.46 332.86 169.49 337.90 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 166 332] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (3) @t
-
-T
-
-
-328.46 386.93 331.56 391.97 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 328 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (4) @t
-
-T
-
-
-274.46 386.93 277.56 391.97 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 274 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (4) @t
-
-T
-
-
-220.46 386.93 223.56 391.97 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 220 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (4) @t
-
-T
-
-
-166.46 386.93 169.56 391.97 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 166 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (4) @t
-
-T
-
-
-166.46 440.93 169.56 445.97 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 166 440] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (4) @t
-
-T
-
-
-382.46 386.78 385.56 391.90 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 382 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Helvetica-Narrow 97.00 z
-
-0 0 (5) @t
-
-T
-
-
-94.54 382.54 121.61 409.46 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-108.07 409.46 m
-
-115.49 409.46 121.61 403.42 121.61 396.00 c
-
-121.61 388.58 115.49 382.54 108.07 382.54 c
-
-100.66 382.54 94.54 388.58 94.54 396.00 c
-
-94.54 403.42 100.66 409.46 108.07 409.46 c
-
-@c
-
-S
-
-
-94.54 274.54 121.61 301.46 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-108.07 301.46 m
-
-115.49 301.46 121.61 295.42 121.61 288.00 c
-
-121.61 280.58 115.49 274.54 108.07 274.54 c
-
-100.66 274.54 94.54 280.58 94.54 288.00 c
-
-94.54 295.42 100.66 301.46 108.07 301.46 c
-
-@c
-
-S
-
-
-94.54 328.61 121.61 355.54 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-108.07 355.54 m
-
-115.49 355.54 121.61 349.49 121.61 342.07 c
-
-121.61 334.66 115.49 328.61 108.07 328.61 c
-
-100.66 328.61 94.54 334.66 94.54 342.07 c
-
-94.54 349.49 100.66 355.54 108.07 355.54 c
-
-@c
-
-S
-
-
-95.83 329.98 120.17 354.31 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-108.00 354.31 m
-
-114.62 354.31 120.17 348.91 120.17 342.14 c
-
-120.17 335.45 114.62 329.98 108.00 329.98 c
-
-101.30 329.98 95.83 335.45 95.83 342.14 c
-
-95.83 348.91 101.30 354.31 108.00 354.31 c
-
-@c
-
-S
-
-
-148.46 328.54 175.54 355.46 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-162.00 355.46 m
-
-169.42 355.46 175.54 349.42 175.54 342.00 c
-
-175.54 334.58 169.42 328.54 162.00 328.54 c
-
-154.58 328.54 148.46 334.58 148.46 342.00 c
-
-148.46 349.42 154.58 355.46 162.00 355.46 c
-
-@c
-
-S
-
-
-149.76 329.90 174.10 354.24 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-161.93 354.24 m
-
-168.55 354.24 174.10 348.84 174.10 342.07 c
-
-174.10 335.38 168.55 329.90 161.93 329.90 c
-
-155.23 329.90 149.76 335.38 149.76 342.07 c
-
-149.76 348.84 155.23 354.24 161.93 354.24 c
-
-@c
-
-S
-
-
-148.46 436.54 175.54 463.46 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-162.00 463.46 m
-
-169.42 463.46 175.54 457.42 175.54 450.00 c
-
-175.54 442.58 169.42 436.54 162.00 436.54 c
-
-154.58 436.54 148.46 442.58 148.46 450.00 c
-
-148.46 457.42 154.58 463.46 162.00 463.46 c
-
-@c
-
-S
-
-
-149.76 437.90 174.10 462.24 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-161.93 462.24 m
-
-168.55 462.24 174.10 456.84 174.10 450.07 c
-
-174.10 443.38 168.55 437.90 161.93 437.90 c
-
-155.23 437.90 149.76 443.38 149.76 450.07 c
-
-149.76 456.84 155.23 462.24 161.93 462.24 c
-
-@c
-
-S
-
-
-94.54 436.54 121.61 463.46 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-108.07 463.46 m
-
-115.49 463.46 121.61 457.42 121.61 450.00 c
-
-121.61 442.58 115.49 436.54 108.07 436.54 c
-
-100.66 436.54 94.54 442.58 94.54 450.00 c
-
-94.54 457.42 100.66 463.46 108.07 463.46 c
-
-@c
-
-S
-
-
-95.83 437.90 120.17 462.24 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-108.00 462.24 m
-
-114.62 462.24 120.17 456.84 120.17 450.07 c
-
-120.17 443.38 114.62 437.90 108.00 437.90 c
-
-101.30 437.90 95.83 443.38 95.83 450.07 c
-
-95.83 456.84 101.30 462.24 108.00 462.24 c
-
-@c
-
-S
-
-
-148.46 382.54 175.54 409.46 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-162.00 409.46 m
-
-169.42 409.46 175.54 403.42 175.54 396.00 c
-
-175.54 388.58 169.42 382.54 162.00 382.54 c
-
-154.58 382.54 148.46 388.58 148.46 396.00 c
-
-148.46 403.42 154.58 409.46 162.00 409.46 c
-
-@c
-
-S
-
-
-149.76 383.90 174.10 408.24 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-161.93 408.24 m
-
-168.55 408.24 174.10 402.84 174.10 396.07 c
-
-174.10 389.38 168.55 383.90 161.93 383.90 c
-
-155.23 383.90 149.76 389.38 149.76 396.07 c
-
-149.76 402.84 155.23 408.24 161.93 408.24 c
-
-@c
-
-S
-
-
-148.54 274.61 175.61 301.54 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-162.07 301.54 m
-
-169.49 301.54 175.61 295.49 175.61 288.07 c
-
-175.61 280.66 169.49 274.61 162.07 274.61 c
-
-154.66 274.61 148.54 280.66 148.54 288.07 c
-
-148.54 295.49 154.66 301.54 162.07 301.54 c
-
-@c
-
-S
-
-
-149.83 275.98 174.17 300.31 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-162.00 300.31 m
-
-168.62 300.31 174.17 294.91 174.17 288.14 c
-
-174.17 281.45 168.62 275.98 162.00 275.98 c
-
-155.30 275.98 149.83 281.45 149.83 288.14 c
-
-149.83 294.91 155.30 300.31 162.00 300.31 c
-
-@c
-
-S
-
-
-202.46 382.46 229.54 409.39 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-216.00 409.39 m
-
-223.42 409.39 229.54 403.34 229.54 395.93 c
-
-229.54 388.51 223.42 382.46 216.00 382.46 c
-
-208.58 382.46 202.46 388.51 202.46 395.93 c
-
-202.46 403.34 208.58 409.39 216.00 409.39 c
-
-@c
-
-S
-
-
-203.76 383.83 228.10 408.17 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-215.93 408.17 m
-
-222.55 408.17 228.10 402.77 228.10 396.00 c
-
-228.10 389.30 222.55 383.83 215.93 383.83 c
-
-209.23 383.83 203.76 389.30 203.76 396.00 c
-
-203.76 402.77 209.23 408.17 215.93 408.17 c
-
-@c
-
-S
-
-
-256.46 382.39 283.54 409.32 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-270.00 409.32 m
-
-277.42 409.32 283.54 403.27 283.54 395.86 c
-
-283.54 388.44 277.42 382.39 270.00 382.39 c
-
-262.58 382.39 256.46 388.44 256.46 395.86 c
-
-256.46 403.27 262.58 409.32 270.00 409.32 c
-
-@c
-
-S
-
-
-257.76 383.76 282.10 408.10 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-269.93 408.10 m
-
-276.55 408.10 282.10 402.70 282.10 395.93 c
-
-282.10 389.23 276.55 383.76 269.93 383.76 c
-
-263.23 383.76 257.76 389.23 257.76 395.93 c
-
-257.76 402.70 263.23 408.10 269.93 408.10 c
-
-@c
-
-S
-
-
-310.46 382.32 337.54 409.25 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-324.00 409.25 m
-
-331.42 409.25 337.54 403.20 337.54 395.78 c
-
-337.54 388.37 331.42 382.32 324.00 382.32 c
-
-316.58 382.32 310.46 388.37 310.46 395.78 c
-
-310.46 403.20 316.58 409.25 324.00 409.25 c
-
-@c
-
-S
-
-
-311.76 383.69 336.10 408.02 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-323.93 408.02 m
-
-330.55 408.02 336.10 402.62 336.10 395.86 c
-
-336.10 389.16 330.55 383.69 323.93 383.69 c
-
-317.23 383.69 311.76 389.16 311.76 395.86 c
-
-311.76 402.62 317.23 408.02 323.93 408.02 c
-
-@c
-
-S
-
-
-364.46 382.25 391.54 409.18 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-378.00 409.18 m
-
-385.42 409.18 391.54 403.13 391.54 395.71 c
-
-391.54 388.30 385.42 382.25 378.00 382.25 c
-
-370.58 382.25 364.46 388.30 364.46 395.71 c
-
-364.46 403.13 370.58 409.18 378.00 409.18 c
-
-@c
-
-S
-
-
-365.76 383.62 390.10 407.95 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-377.93 407.95 m
-
-384.55 407.95 390.10 402.55 390.10 395.78 c
-
-390.10 389.09 384.55 383.62 377.93 383.62 c
-
-371.23 383.62 365.76 389.09 365.76 395.78 c
-
-365.76 402.55 371.23 407.95 377.93 407.95 c
-
-@c
-
-S
-
-
-121.54 395.86 148.54 396.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-121.54 396.00 m
-
-147.17 396.00 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-144.00 398.52 m
-
-147.96 396.00 L
-
-144.00 393.48 L
-
-S
-
-@J
-
-
-175.54 395.86 202.54 396.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-175.54 396.00 m
-
-201.17 396.00 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-198.00 398.52 m
-
-201.96 396.00 L
-
-198.00 393.48 L
-
-S
-
-@J
-
-
-229.54 395.86 256.54 396.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-229.54 396.00 m
-
-255.17 396.00 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-252.00 398.52 m
-
-255.96 396.00 L
-
-252.00 393.48 L
-
-S
-
-@J
-
-
-283.54 395.86 310.54 396.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-283.54 396.00 m
-
-309.17 396.00 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-306.00 398.52 m
-
-309.96 396.00 L
-
-306.00 393.48 L
-
-S
-
-@J
-
-
-337.54 395.86 364.54 396.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-337.54 396.00 m
-
-363.17 396.00 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-360.00 398.52 m
-
-363.96 396.00 L
-
-360.00 393.48 L
-
-S
-
-@J
-
-
-125.57 268.56 143.86 284.98 @E
-
-
-[0.07198 0.00000 0.00000 0.07199 125 278] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (0) @t
-
-120 0 (-) @t
-
-180 0 (9) @t
-
-0 -125 (a) @t
-
-60 -125 (-) @t
-
-120 -125 (f) @t
-
-180 -125 (\135) @t
-
-T
-
-
-121.54 287.86 148.54 288.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-121.54 288.00 m
-
-147.17 288.00 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-144.00 290.52 m
-
-147.96 288.00 L
-
-144.00 285.48 L
-
-S
-
-@J
-
-
-121.54 341.86 148.54 342.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-121.54 342.00 m
-
-147.17 342.00 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-144.00 344.52 m
-
-147.96 342.00 L
-
-144.00 339.48 L
-
-S
-
-@J
-
-
-107.86 301.54 108.14 328.54 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-108.00 328.54 m
-
-108.00 302.90 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-110.52 306.14 m
-
-108.00 302.18 L
-
-105.48 306.14 L
-
-S
-
-@J
-
-
-107.86 355.54 108.14 382.54 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-108.00 382.54 m
-
-108.00 356.90 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-110.52 360.14 m
-
-108.00 356.18 L
-
-105.48 360.14 L
-
-S
-
-@J
-
-
-107.86 409.54 108.14 436.54 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-108.00 409.54 m
-
-108.00 435.17 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-105.41 432.00 m
-
-108.00 435.96 L
-
-110.59 432.00 L
-
-S
-
-@J
-
-
-117.00 405.00 153.00 441.00 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-117.00 405.00 m
-
-152.06 440.06 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-147.96 439.63 m
-
-152.64 440.64 L
-
-151.70 436.03 L
-
-S
-
-@J
-
-
-117.00 351.00 153.00 387.00 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-117.00 387.00 m
-
-152.06 351.94 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-151.63 356.04 m
-
-152.64 351.43 L
-
-148.03 352.44 L
-
-S
-
-@J
-
-
-166.39 341.93 196.63 377.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-173.38 346.82 m
-
-177.48 347.47 182.59 350.42 186.77 354.60 c
-
-193.75 361.58 196.63 370.22 193.18 373.68 c
-
-189.72 377.14 181.08 374.33 174.10 367.34 c
-
-169.92 363.17 166.90 358.06 166.39 353.95 C
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-169.34 356.90 m
-
-166.39 353.30 L
-
-164.30 357.62 L
-
-S
-
-@J
-
-
-166.39 450.72 196.63 485.93 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-173.38 455.62 m
-
-177.48 456.26 182.59 459.22 186.77 463.39 c
-
-193.75 470.38 196.63 479.02 193.18 482.47 c
-
-189.72 485.93 181.08 483.12 174.10 476.14 c
-
-169.92 471.96 166.90 466.85 166.39 462.74 C
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-169.34 465.70 m
-
-166.39 462.10 L
-
-164.30 466.42 L
-
-S
-
-@J
-
-
-166.39 287.93 196.63 323.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-173.38 292.82 m
-
-177.48 293.47 182.59 296.42 186.77 300.60 c
-
-193.75 307.58 196.63 316.22 193.18 319.68 c
-
-189.72 323.14 181.08 320.33 174.10 313.34 c
-
-169.92 309.17 166.90 304.06 166.39 299.95 C
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-169.34 302.90 m
-
-166.39 299.30 L
-
-164.30 303.62 L
-
-S
-
-@J
-
-
-166.61 396.00 198.00 450.00 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-182.30 396.00 m
-
-190.94 396.00 198.00 408.17 198.00 423.00 c
-
-198.00 437.83 190.94 450.00 182.30 450.00 C
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-185.54 447.41 m
-
-181.58 450.00 L
-
-185.54 452.59 L
-
-S
-
-@J
-
-
-220.61 396.00 252.00 450.00 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-236.30 396.00 m
-
-244.94 396.00 252.00 408.17 252.00 423.00 c
-
-252.00 437.83 244.94 450.00 236.30 450.00 C
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-239.54 447.41 m
-
-235.58 450.00 L
-
-239.54 452.59 L
-
-S
-
-@J
-
-
-274.61 396.00 306.00 450.00 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-290.30 396.00 m
-
-298.94 396.00 306.00 408.17 306.00 423.00 c
-
-306.00 437.83 298.94 450.00 290.30 450.00 C
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-293.54 447.41 m
-
-289.58 450.00 L
-
-293.54 452.59 L
-
-S
-
-@J
-
-
-328.61 396.00 360.00 450.00 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-344.30 396.00 m
-
-352.94 396.00 360.00 408.17 360.00 423.00 c
-
-360.00 437.83 352.94 450.00 344.30 450.00 C
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-347.54 447.41 m
-
-343.58 450.00 L
-
-347.54 452.59 L
-
-S
-
-@J
-
-
-382.54 396.00 413.93 450.00 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-398.23 396.00 m
-
-406.87 396.00 413.93 408.17 413.93 423.00 c
-
-413.93 437.83 406.87 450.00 398.23 450.00 C
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-401.47 447.41 m
-
-397.51 450.00 L
-
-401.47 452.59 L
-
-S
-
-@J
-
-
-391.54 395.86 398.23 396.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-391.54 396.00 m
-
-398.23 396.00 L
-
-S
-
-
-175.54 449.86 398.23 450.14 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-398.23 450.00 m
-
-175.54 450.00 L
-
-S
-
-
-139.46 385.27 144.43 391.03 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 139 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (p) @t
-
-T
-
-
-188.93 386.93 193.90 390.96 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 188 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (r) @t
-
-T
-
-
-242.93 386.93 247.61 392.76 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 242 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (i) @t
-
-T
-
-
-296.93 386.93 301.97 391.03 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 296 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (n) @t
-
-T
-
-
-350.93 386.86 355.82 392.18 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 350 386] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (t) @t
-
-T
-
-
-98.93 364.39 103.46 370.22 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 98 364] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (0) @t
-
-T
-
-
-98.93 310.46 103.97 314.42 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 98 310] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (x) @t
-
-T
-
-
-125.50 331.78 146.66 338.76 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 125 332] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (0) @t
-
-120 0 (-) @t
-
-180 0 (9) @t
-
-240 0 (\135) @t
-
-T
-
-
-134.50 367.78 155.66 374.76 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 134 368] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (1) @t
-
-120 0 (-) @t
-
-180 0 (9) @t
-
-240 0 (\135) @t
-
-T
-
-
-134.28 416.74 166.46 424.73 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 134 418] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (a) @t
-
-120 0 (-) @t
-
-180 0 (z) @t
-
-240 0 (\135) @t
-
-300 0 (\134) @t
-
-360 0 (p) @t
-
-T
-
-
-197.28 417.31 229.46 424.73 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 197 418] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (a) @t
-
-120 0 (-) @t
-
-180 0 (z) @t
-
-240 0 (\135) @t
-
-300 0 (\134) @t
-
-360 0 (r) @t
-
-T
-
-
-251.28 417.31 283.18 424.73 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 251 418] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (a) @t
-
-120 0 (-) @t
-
-180 0 (z) @t
-
-240 0 (\135) @t
-
-300 0 (\134) @t
-
-360 0 (i) @t
-
-T
-
-
-305.28 417.31 337.54 424.73 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 305 418] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (a) @t
-
-120 0 (-) @t
-
-180 0 (z) @t
-
-240 0 (\135) @t
-
-300 0 (\134) @t
-
-360 0 (n) @t
-
-T
-
-
-359.28 417.31 391.39 424.73 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 359 418] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (a) @t
-
-120 0 (-) @t
-
-180 0 (z) @t
-
-240 0 (\135) @t
-
-300 0 (\134) @t
-
-360 0 (t) @t
-
-T
-
-
-413.50 417.31 434.66 424.15 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 413 418] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (a) @t
-
-120 0 (-) @t
-
-180 0 (z) @t
-
-240 0 (\135) @t
-
-T
-
-
-193.03 475.78 214.20 482.62 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 193 476] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (a) @t
-
-120 0 (-) @t
-
-180 0 (z) @t
-
-240 0 (\135) @t
-
-T
-
-
-193.03 367.78 214.20 374.76 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 193 368] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (0) @t
-
-120 0 (-) @t
-
-180 0 (9) @t
-
-240 0 (\135) @t
-
-T
-
-
-192.74 313.78 227.45 320.76 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 193 314] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (0) @t
-
-120 0 (-) @t
-
-180 0 (9) @t
-
-240 0 (a) @t
-
-300 0 (-) @t
-
-360 0 (f) @t
-
-420 0 (\135) @t
-
-T
-
-
-52.70 412.56 107.21 429.41 @E
-
-
-[0.07199 0.00000 0.00000 0.07199 53 422] @tm
-
- 0 O 0 @g
-
-0.00 0.00 0.00 1.00 k
-
-e
-
-/_Courier 125.00 z
-
-0 0 (\133) @t
-
-60 0 (\134) @t
-
-120 0 (0) @t
-
-180 0 (0) @t
-
-240 0 (0) @t
-
-300 0 (-) @t
-
-360 0 (\134) @t
-
-420 0 (3) @t
-
-480 0 (7) @t
-
-540 0 (7) @t
-
-600 0 (\135) @t
-
-660 0 (\134) @t
-
-0 -125 (\133) @t
-
-60 -125 (0) @t
-
-120 -125 (-) @t
-
-180 -125 (9) @t
-
-240 -125 (a) @t
-
-300 -125 (-) @t
-
-360 -125 (z) @t
-
-420 -125 (\135) @t
-
-T
-
-
-54.00 391.54 94.54 401.83 @E
-
-0 J 0 j [] 0 d 0 R 0 @G
-
-0.00 0.00 0.00 1.00 K
-
-0 0.22 0.22 0.00 @w
-
-
-54.00 396.65 m
-
-55.51 398.16 56.52 401.83 58.54 401.18 c
-
-62.50 399.89 63.29 392.18 67.54 392.18 c
-
-71.71 392.18 72.29 401.18 76.54 401.18 c
-
-80.71 401.18 81.50 393.55 85.54 392.18 c
-
-87.48 391.54 88.27 396.58 90.00 396.65 C
-
-93.17 396.65 L
-
-S
-
-@j
-
-0.00 0.00 0.00 1.00 K
-
-0.00 0.00 0.00 1.00 k
-
-0 @g
-
-0 @G
-
-[] 0 d 0 J 0 j
-
-0 R 0 O 0 1.01 1.01 0 @w
-
-90.00 399.17 m
-
-93.96 396.65 L
-
-90.00 394.13 L
-
-S
-
-@J
-
-@rs
-
-@rs
-
-
- end
-
-%%EndDocument
- @endspecial 108 1136 a Fr(Figure)21 b(3:)32 b(A)20 b(DF)-5
-b(A)21 b(for)f(the)i(sample)d(sp)q(eci\014cation)j(in)e(Figure)g(2.)39
-b(State)21 b(0)f(is)h(the)g(start)g(state.)108 1186 y(Accepting)d
-(states)g(are)g(lab)q(eled)e(with)h(the)g(n)o(um)o(b)q(er)f(of)g(the)i
-(rule)f(that)g(they)g(matc)o(h.)26 b(F)m(or)16 b(example,)108
-1236 y(state)i(10)d(accepts)j(rule)f(2.)25 b(T)m(ransitions)16
-b(di\013ering)g(only)g(b)o(y)g(lab)q(el)f(are)i(represen)o(ted)i(with)d
-(the)h(same)108 1286 y(arc.)i(F)m(or)12 b(example,)f(state)j(0)e(has)h
-(transitions)g(to)f(state)i(6)e(on)h(all)e(of)i(the)g(follo)o(wing)d(c)
-o(haracters:)19 b Fm(a)p Fr(,)13 b Fl(:)7 b(:)g(:)n Fr(,)108
-1336 y Fm(o)p Fr(,)14 b Fm(q)p Fr(,)f Fl(:)7 b(:)g(:)12
-b Fm(z)p Fr(.)21 1469 y(RE2C)i(is)g(di\013eren)o(t)h(from)e(most)g
-(other)i(scanner)h(generators)f(in)f(that)h(the)g(user)g(m)o(ust)f(pro)
-o(vide)g(the)h(input)f(bu\013ering)-42 1519 y(mec)o(hanism)i(for)h(the)
-i(scanner;)h(the)f(generated)g(co)q(de)g(simply)c(assumes)j(that)g(the)
-g(user)h(has)f(de\014ned)h(three)g(p)q(oin)o(ters:)-42
-1569 y Fm(YYCURSOR)p Fr(,)9 b Fm(YYLIMIT)g Fr(and)h Fm(YYMARKER)p
-Fr(,)e(and)i(a)h(routine)f Fm(YYFILL\()p Fl(n)p Fm(\))p
-Fr(.)15 b(Before)d(executing)f(the)g(generated)h(co)q(de,)f
-Fm(YYCURSOR)-42 1619 y Fr(and)h Fm(YYLIMIT)d Fr(m)o(ust)h(b)q(e)i(set)g
-(to)g(p)q(oin)o(t)e(to)h(the)h(\014rst)g(and)f(one)h(past)f(the)h(last)
-f(c)o(haracter)i(in)e(the)g(bu\013er,)i(resp)q(ectiv)o(ely)m(.)18
-b(After)-42 1669 y(a)f(tok)o(en)g(is)f(recognized,)i(and)f(b)q(efore)g
-(an)o(y)f(action)g(is)h(executed,)i Fm(YYCURSOR)c Fr(is)h(set)i(to)e(p)
-q(oin)o(t)g(to)h(just)g(past)g(the)g(tok)o(en.)-42 1718
-y Fm(YYFILL)d Fr(will)g(b)q(e)i(called)f(as)g(the)h(bu\013er)h(needs)f
-(\014lling;)e(at)h(least)h Fl(n)f Fr(additional)e(input)i(c)o
-(haracters)i(should)e(b)q(e)h(pro)o(vided.)-42 1768 y(When)g
-Fm(YYFILL)d Fr(is)i(called,)f Fm(YYCURSOR)f Fr(will)h(p)q(oin)o(t)g(to)
-h(the)g(next)h(c)o(haracter)g(to)f(b)q(e)g(scanned)h(and)f
-Fm(YYMARKER)p Fr(,)d(if)i(set,)i(will)-42 1818 y(p)q(oin)o(t)f(to)f(a)g
-(p)q(ossible)h(bac)o(ktrac)o(king)g(p)q(oin)o(t)f(in)g(the)h(bu\013er.)
-21 b Fm(YYFILL)14 b Fr(m)o(ust)f(up)q(date)j Fm(YYLIMIT)p
-Fr(,)c(and)j(p)q(ossibly)f Fm(YYCURSOR)-42 1868 y Fr(and)f
-Fm(YYMARKER)f Fr(b)q(efore)h(returning.)18 b(T)o(ypically)12
-b Fm(YYCURSOR)p Fr(,)f Fm(YYLIMIT)p Fr(,)g Fm(YYMARKER)p
-Fr(,)f(and)j Fm(YYFILL\()p Fl(n)p Fm(\))e Fr(will)h(b)q(e)h(de\014ned)h
-(as)-42 1918 y(macros.)-42 2034 y Fj(2.1)56 b(Things)19
-b(That)g(RE2C)f(Do)r(esn't)g(Pro)n(vide)-42 2111 y Fr(RE2C)11
-b(do)q(esn't)h(pro)o(vide)f(man)o(y)e(things)j(a)o(v)n(ailable)d(in)h
-(more)h(con)o(v)o(en)o(tional)f(scanner)j(generators)f(including)e
-(default)h(rules,)-42 2160 y(end-of-input)17 b(pseudo-tok)o(ens,)i(and)
-e(bu\013er)i(managemen)o(t)14 b(routines.)29 b(All)17
-b(of)f(these)j(m)o(ust)d(b)q(e)i(supplied)g(b)o(y)f(the)h(user.)-42
-2210 y(Rather)10 b(than)g(b)q(eing)f(a)g(handicap,)h(this)g(allo)o(ws)e
-(RE2C-generated)i(scanners)h(to)f(b)q(e)g(tailored)f(to)g(almost)f(an)o
-(y)h(en)o(vironmen)o(t.)-42 2260 y(F)m(or)k(example,)f(the)i(scanner)h
-(de\014ned)f(in)f(Figure)h(1)f(compiles)f(in)o(to)h(32)g(b)o(ytes)h(of)
-e(i486)h(co)q(de)h(\(using)f(W)m(atcom)e(C)j(9.5\);)e(the)-42
-2310 y(same)g(size)h(as)f(an)g(equiv)n(alen)o(t)g(hand-co)q(ded)h
-(routine.)k(Most)c(other)g(scanner)g(generators)h(cannot)e(pro)q(duce)h
-(scanners)h(that)-42 2360 y(are)k(comp)q(etitiv)o(e)e(with)g(hand-co)q
-(ded)i(analyzers)f(in)f(this)h(case.)28 b(F)m(urther,)18
-b(it)f(is)g(not)f(o)o(v)o(erly)h(di\016cult)f(to)h(implem)o(en)o(t)e(a)
--42 2409 y(more)c(traditional)f(scanner)j(using)f(RE2C.)e(F)m(or)h
-(example,)g(App)q(endix)h(A)f(con)o(tains)h(the)g(supp)q(ort)h(co)q(de)
-f(for)f(the)i(C)e(scanner)-42 2459 y(b)q(enc)o(hmark)o(ed)j(in)f(T)m
-(able)g(1.)k(Note)d(that)g(this)f(co)q(de)h(allo)o(ws)f(for)g
-(arbitrarily)f(long)h(con)o(tiguous)g(tok)o(ens)h(and)f(pro)o(vides)h
-(line)-42 2509 y(and)g(column)e(n)o(um)o(b)q(er)i(information.)923
-2748 y(3)p eop
-%%Page: 4 4
-4 3 bop -42 195 a Fs(3)67 b(Generating)23 b(Directly)h(Executable)g
-(Scanners)-42 286 y Fr(As)14 b(demonstrated)g(b)o(y)f(GLA)g([7)o(])g
-(generating)h(directly)g(executable)g(co)q(de)g(instead)g(of)f(tables)h
-(can)f(result)i(in)e(m)o(uc)o(h)f(faster)-42 336 y(scanners.)20
-b(Ho)o(w)o(ev)o(er,)13 b(to)g(ac)o(hiev)o(e)h(this)f(sp)q(eed,)h
-(GLA-generated)h(scanners)f(mak)o(e)e(some)g(assumptions)h(ab)q(out)g
-(the)h(input)-42 386 y(and)i(place)g(certain)g(restrictions)g(on)g(tok)
-o(ens)680 371 y Fq(4)699 386 y Fr(.)23 b(In)15 b(this)h(section)g(w)o
-(e)g(will)e(sho)o(w)h(ho)o(w)g(to)h(generate)g(directly)g(executable)
--42 435 y(scanners)22 b(whic)o(h)d(not)g(only)g(a)o(v)o(oid)f(suc)o(h)i
-(restrictions,)h(but)f(are)g(also)e(faster)i(and)f(usually)g(smaller.)
-33 b(The)19 b(approac)o(h)-42 485 y(presen)o(ted)f(here)f(has)f(the)g
-(added)g(b)q(ene\014t)h(that)f(ev)o(en)g(faster)h(scanners)g(can)f(b)q
-(e)g(easily)f(b)q(e)i(created,)g(at)e(the)i(exp)q(ense)g(of)-42
-535 y(increased)f(co)q(de)e(size,)h(b)o(y)e(using)h(a)f(tec)o(hnique)i
-(akin)e(to)h(lo)q(op)f(unrolling.)-42 651 y Fj(3.1)56
-b(Constructing)19 b(a)g(DF)-6 b(A)-42 728 y Fr(The)15
-b(\014rst)g(step)g(in)f(generating)h(a)f(directly)g(executable)h
-(scanner)h(is)e(to)g(construct)i(a)e(DF)-5 b(A)15 b(that)f(recognizes)i
-(the)e(regular)-42 778 y(expressions)g(in)e(the)h(sp)q(eci\014cation.)
-18 b(Figure)12 b(3)g(presen)o(ts)i(a)e(DF)-5 b(A)13 b(that)f
-(recognizes)h(the)g(regular)f(expressions)i(in)e(Figure)g(2.)-42
-828 y(One)18 b(p)q(ossible)f(algorithm)e(for)h(constructing)i(suc)o(h)g
-(a)e(DF)-5 b(A)18 b(can)f(b)q(e)g(found)g(in)f([1].)26
-b(Giv)o(en)16 b(suc)o(h)i(a)f(DF)-5 b(A,)16 b(the)i(task)f(of)p
--42 864 780 2 v 5 891 a Fn(4)22 903 y Fo(These)11 b(assumptions)e(and)h
-(restrictions)f(are)i(discussed)e(in)j(more)e(detail)g(in)h(Sections)e
-(3.3.1)i(and)f(5.1.)923 2748 y Fr(4)p eop
-%%Page: 5 5
-5 4 bop -42 195 a Fr(scanning)14 b(the)h(input)f(can)g(b)q(e)g
-(expressed)i(as)e(follo)o(ws:)125 278 y(Starting)i(from)g(the)i(start)g
-(state,)g(mo)o(v)o(e)e(from)f(state)j(to)f(state)h(along)e(transitions)
-i(lab)q(eled)f(with)g(con-)62 328 y(secutiv)o(e)f(c)o(haracters)h(from)
-c(the)i(input.)21 b(When)15 b(no)f(further)i(transitions)f(can)g(b)q(e)
-g(made,)e(bac)o(ktrac)o(k)i(to)g(the)62 378 y(last)h(accepting)g
-(state,)h(sa)o(y)f Fl(q)q Fr(.)24 b(The)16 b(path)g(to)f
-Fl(q)i Fr(sp)q(ells)g(the)f(next)g(tok)o(en)g(and)g(the)g(rule)h(asso)q
-(ciated)f(with)g Fl(q)62 428 y Fr(determines)e(the)h(co)q(de)g(to)e(b)q
-(e)i(executed.)-42 511 y(As)d(a)e(result,)h(the)h(problem)d(of)h
-(generating)h(scanners)h(essen)o(tially)f(reduces)h(to)f(the)g(problem)
-e(of)h(generating)h(an)f(executable)-42 560 y(represen)o(tation)16
-b(for)d(a)h(DF)-5 b(A.)-42 677 y Fj(3.2)56 b(Generating)18
-b(Co)r(de)-42 753 y Fr(If)g(w)o(e)g(assume)g(that)g(the)h(input)f(is)g
-(en)o(tirely)g(con)o(tained)g(in)g(a)f(single)h(bu\013er)h(then)g
-(generating)f(co)q(de)h(for)f(the)g(DF)-5 b(A)19 b(is)-42
-803 y(relativ)o(ely)13 b(straigh)o(tforw)o(ard,)f(as)h(is)g
-(illustrated)g(b)o(y)f(the)i(co)q(de)g(templates)e(in)h(Figure)g(4.)35
-b(Note)14 b(that)f(the)g(only)g(di\013erence)p 575 863
-717 2 v 575 912 2 50 v 856 897 a Fi(Pr)n(olo)n(gue)p
-1290 912 V 575 914 717 2 v 575 964 2 50 v 720 949 a Fm(int)21
-b(yyaccept;)p 1290 964 V 575 1014 V 720 999 a(goto)g(M)p
-Fi(start)p Fm(;)p 1290 1014 V 575 1063 V 720 1049 a(fin:)g(YYCURSOR)f
-(=)i(YYMARKER;)p 1290 1063 V 575 1113 V 720 1098 a(switch\(yyaccept\))p
-Fk(f)p 1290 1113 V 575 1163 V 807 1148 a Fl(:)7 b(:)g(:)p
-1290 1163 V 575 1213 V 602 1198 a Fm(A)p Fl(n)p Fm(:)93
-b(case)21 b Fl(n)p Fm(:)43 b Fi(action)p Fr(\()p Fl(n)p
-Fr(\))p Fm(;)p 1290 1213 V 575 1263 V 807 1248 a Fl(:)7
-b(:)g(:)p 1290 1263 V 575 1313 V 720 1298 a Fk(g)p 1290
-1313 V 575 1362 V 720 1347 a Fi(c)n(o)n(de)15 b(for)g(states)p
-1290 1362 V 575 1364 717 2 v 204 1370 720 2 v 204 1420
-2 50 v 346 1405 a(Co)n(de)g(for)f(ac)n(c)n(epting)h(state)p
-921 1420 V 204 1421 720 2 v 204 1471 2 50 v 230 1456
-a Fm(L)p Fl(q)q Fm(:)50 b(++YYCURSOR;)p 921 1471 V 204
-1521 V 344 1506 a(yyaccept)20 b(=)h Fi(rule)p Fr(\()p
-Fl(q)q Fr(\))p Fm(;)p 921 1521 V 204 1571 V 344 1556
-a(YYMARKER)f(=)h(YYCURSOR;)p 921 1571 V 204 1621 V 230
-1606 a(M)p Fl(q)q Fm(:)50 b(switch\(*YYCURSO)o(R\))p
-Fk(f)p 921 1621 V 204 1670 V 431 1655 a Fl(:)7 b(:)g(:)p
-921 1670 V 204 1720 V 387 1705 a Fm(case)21 b Fl(c)p
-Fm(:)43 b(goto)21 b(L)p Fi(goto)q Fr(\()p Fl(q)q(;)7
-b(c)p Fr(\))p Fm(;)p 921 1720 V 204 1770 V 431 1755 a
-Fl(:)g(:)g(:)p 921 1770 V 204 1820 V 387 1805 a Fm(default:)42
-b(goto)21 b(fin;)p 921 1820 V 204 1870 V 344 1855 a Fk(g)p
-921 1870 V 204 1871 720 2 v 944 1370 V 944 1420 2 50
-v 1045 1405 a Fi(Co)n(de)15 b(for)g(non-ac)n(c)n(epting)h(state)p
-1662 1420 V 944 1421 720 2 v 944 1471 2 50 v 971 1456
-a Fm(L)p Fl(q)q Fm(:)49 b(++YYCURSOR;)p 1662 1471 V 944
-1521 V 1662 1521 V 944 1571 V 1662 1571 V 944 1621 V
-971 1606 a(M)p Fl(q)q Fm(:)g(switch\(*YYCURSOR\))p Fk(f)p
-1662 1621 V 944 1670 V 1172 1655 a Fl(:)7 b(:)g(:)p 1662
-1670 V 944 1720 V 1128 1705 a Fm(case)21 b Fl(c)p Fm(:)43
-b(goto)21 b(L)p Fi(goto)p Fr(\()p Fl(q)q(;)7 b(c)p Fr(\))p
-Fm(;)p 1662 1720 V 944 1770 V 1172 1755 a Fl(:)g(:)g(:)p
-1662 1770 V 944 1820 V 1128 1805 a Fm(default:)42 b(goto)21
-b(fin;)p 1662 1820 V 944 1870 V 1084 1855 a Fk(g)p 1662
-1870 V 944 1871 720 2 v 108 1946 a Fr(Figure)g(4:)30
-b(Directly)20 b(executable)h(scanner.)38 b(The)20 b(co)q(de)h
-(generated)g(for)f(a)g(scanner)h(consists)g(of)f(a)108
-1996 y(prologue)12 b(follo)o(w)o(ed)f(b)o(y)h(co)q(de)i(for)e(eac)o(h)h
-(state.)18 b Fi(start)11 b Fr(is)i(the)g(start)g(state.)18
-b Fi(action)p Fr(\()p Fl(n)p Fr(\))13 b(denotes)h(the)f(co)q(de)108
-2045 y(asso)q(ciated)h(with)e(rule)h Fl(n)p Fr(,)f Fi(goto)p
-Fr(\()p Fl(q)q(;)7 b(c)p Fr(\))12 b(denotes)i(the)f(state)g(reac)o(hed)
-h(from)d(state)i Fl(q)h Fr(along)d(the)i(transition)108
-2095 y(lab)q(eled)18 b(with)e Fl(c)h Fr(and)g Fi(rule)p
-Fr(\()p Fl(q)q Fr(\))g(denotes)i(the)e(rule)h(asso)q(ciated)g(with)e
-(state)i Fl(q)q Fr(.)28 b Fm(yyaccept)16 b Fr(is)h(used)h(to)108
-2145 y(sa)o(v)o(e)d(bac)o(ktrac)o(king)e(information.)i(The)g
-Fm(M)p Fr(-lab)q(els)e(will)f(b)q(e)j(used)g(in)e(section)i(3.4.2.)-42
-2245 y(b)q(et)o(w)o(een)j(the)f(templates)f(for)g(accepting)g(and)h
-(non-accepting)f(states)i(is)e(that)g(the)h(accepting)g(states)g(ha)o
-(v)o(e)f(additional)-42 2294 y(co)q(de)e(to)f(sa)o(v)o(e)g(bac)o(ktrac)
-o(king)f(information.)j(Figure)e(5)g(sho)o(ws)g(co)q(de)h(that)f(migh)o
-(t)d(b)q(e)k(generated)g(for)f(state)g(1)g(in)f(Figure)h(3.)-42
-2460 y Fj(3.3)56 b(Bu\013ering)-42 2537 y Fr(Complications)13
-b(arise)i(when)g(the)g(input)g(is)g(not)f(con)o(tained)h(in)g(a)f
-(single)g(bu\013er:)21 b(additional)13 b(co)q(de)j(is)e(needed)j(for)d
-(\014lling)-42 2587 y(the)h(bu\013er)g(as)f(necessary)m(.)923
-2748 y(5)p eop
-%%Page: 6 6
-6 5 bop 647 188 a Fm(L1:)49 b(++YYCURSOR;)762 238 y(yyaccept)20
-b(=)i(4;)762 288 y(YYMARKER)e(=)i(YYCURSOR;)647 338 y(M1:)49
-b(switch\(*YYCURSOR\))p Fk(f)806 388 y Fm(case)21 b('a':)43
-b(goto)21 b(L6;)849 438 y Fl(:)7 b(:)g(:)806 487 y Fm(case)21
-b('q':)43 b(goto)21 b(L6;)806 537 y(case)g('r':)43 b(goto)21
-b(L2;)806 587 y(case)g('s':)43 b(goto)21 b(L6;)849 637
-y Fl(:)7 b(:)g(:)806 687 y Fm(case)21 b('z':)43 b(goto)21
-b(L6;)806 736 y(default:)42 b(goto)21 b(fin;)762 786
-y Fk(g)690 876 y Fr(Figure)14 b(5:)k(Co)q(de)c(for)g(state)g(1.)505
-968 y Fm(L6:)50 b(++YYCURSOR;)621 1018 y(if\(YYLIMIT)19
-b(==)j(YYCURSOR\))e(YYFILL\(1\);)621 1068 y(yyaccept)g(=)h(4;)621
-1118 y(YYMARKER)f(=)h(YYCURSOR;)505 1168 y(M6:)50 b(switch\(*YYCURSO)o
-(R\))p Fk(f)708 1217 y Fl(:)7 b(:)g(:)621 1267 y Fk(g)690
-1357 y Fr(Figure)14 b(6:)k(Co)q(de)c(for)g(state)g(6.)-42
-1489 y Fh(3.3.1)48 b(The)16 b(Sen)o(tinel)c(Metho)q(d)-42
-1566 y Fr(Most)20 b(scanner)g(generators)g(use)g(the)g(sen)o(tinel)f
-(metho)q(d)g([1)o(])f(to)h(determine)g(when)h(the)f(bu\013er)i(needs)f
-(\014lling.)32 b(In)19 b(the)-42 1616 y(simplest)d(case,)h(a)f(sym)o(b)
-q(ol)f(that)h(do)q(es)i(not)e(app)q(ear)h(in)f(v)n(alid)f(input)h(is)g
-(c)o(hosen)h(as)g(the)g(sen)o(tinel)g(c)o(haracter.)26
-b(An)17 b(extra)-42 1666 y(state)12 b(is)f(added)g(to)g(the)h(DF)-5
-b(A)11 b(and)g(transitions)f(to)h(this)g(state)h(on)f(the)g(sen)o
-(tinel)h(sym)o(b)q(ol)d(are)i(added)g(to)g(the)h(original)d(states.)-42
-1715 y(When)16 b(the)g(DF)-5 b(A)16 b(arriv)o(es)f(in)g(this)h(new)f
-(state)i(it)e(is)g(time)f(to)h(re\014ll)g(the)h(bu\013er.)23
-b(After)16 b(the)g(bu\013er)h(is)e(re\014lled,)g(scanning)-42
-1765 y(m)o(ust)h(b)q(e)g(restarted)i(in)e(the)h(previous)f(state.)26
-b(Unfortunately)m(,)16 b(this)g(is)g(not)g(p)q(ossible)g(with)g(the)h
-(approac)o(h)f(outlined)g(in)-42 1815 y(Figure)j(4:)26
-b(the)19 b(necessary)h(information)15 b(is)j(simply)e(not)i(a)o(v)n
-(ailable.)28 b(Co)q(de)19 b(could)f(b)q(e)g(added)h(to)f(eac)o(h)g
-(state)h(to)f(sa)o(v)o(e)-42 1865 y(the)e(necessary)g(information)c
-(but)j(this)g(w)o(ould)e(result)j(in)e(slo)o(w)o(er)h(and)f(larger)h
-(scanners.)22 b(GLA)14 b(solv)o(es)h(this)f(problem)g(b)o(y)-42
-1915 y(ensuring)i(that)g(the)f(sen)o(tinel)h(only)f(gets)g(inserted)i
-(b)q(et)o(w)o(een)g(tok)o(ens:)k(if)14 b(this)i(is)f(the)h(case,)g(the)
-g(scanner)g(can)g(alw)o(a)o(ys)e(b)q(e)-42 1964 y(restarted)k(from)c
-(the)j(start)f(state.)25 b(T)m(o)15 b(ensure)i(that)f(the)h(sen)o
-(tinel)f(only)f(gets)i(inserted)g(b)q(et)o(w)o(een)g(tok)o(ens,)f(GLA)g
-(allo)o(ws)-42 2014 y(newline)g(\(ASCI)q(I)g(LF\))g(c)o(haracters)h(to)
-f(app)q(ear)g(only)f(at)g(the)h(end)g(of)f(a)h(tok)o(en)g(and)f
-(disallo)o(ws)f(the)i(bu\013ering)g(of)f(partial)-42
-2064 y(lines)39 2049 y Fq(5)58 2064 y Fr(.)-42 2172 y
-Fh(3.3.2)48 b(Bu\013ering)-42 2249 y Fr(RE2C-generated)17
-b(scanners)h(c)o(hec)o(k)f(if)e(the)i(bu\013er)g(needs)g(\014lling)e
-(simply)f(b)o(y)i(comparing)e Fm(YYCURSOR)g Fr(and)i
-Fm(YYLIMIT)p Fr(.)e(A)-42 2298 y(metho)q(d)d(inspired)g(b)o(y)g(the)h
-(mec)o(hanism)d(used)j(to)f(guard)g(against)g(stac)o(k)g(o)o(v)o
-(er\015o)o(w)g(in)g([17)o(])1365 2283 y Fq(6)1394 2298
-y Fr(is)g(used)i(to)e(reduce)h(the)g(amoun)o(t)-42 2348
-y(of)i(c)o(hec)o(king.)21 2398 y(Chec)o(ks)j(are)g(only)f(inserted)h
-(in)f(certain)h(k)o(ey)f(states.)27 b(These)18 b(c)o(hec)o(ks)g(simply)
-c(ensure)k(that)e(there)i(is)e(enough)h(input)-42 2448
-y(in)g(the)g(bu\013er)h(for)f(the)h(scan)f(to)g(pro)q(ceed)h(un)o(til)e
-(the)i(next)f(k)o(ey)g(state.)28 b(F)m(or)17 b(example,)f(in)g(the)i
-(DF)-5 b(A)17 b(of)f(Figure)h(3)g(it)g(is)-42 2498 y(su\016cien)o(t)e
-(to)e(c)o(hec)o(k)i(that)f(there)h(are)g(at)e(least)h(6)g(c)o
-(haracters)h(in)f(the)g(bu\013er)h(when)f(it)g(starts,)g(and)g(that)g
-(there)h(is)f(at)f(least)-42 2547 y(one)i(c)o(haracter)g(in)e(the)i
-(bu\013er)g(when)f(the)h(DF)-5 b(A)14 b(is)g(in)f(states)j(6,)d(8,)g
-(or)h(10.)k(No)13 b(other)i(c)o(hec)o(ks)g(are)g(required.)k(The)14
-b(c)o(hec)o(ks)-42 2597 y(inserted)i(in)d(k)o(ey)h(states)h(are)f(of)g
-(the)g(form)923 2748 y(6)p eop
-%%Page: 7 7
-7 6 bop 62 195 a Fm(if\(\(YYLIMIT)20 b(-)h(YYCURSOR\))f(<)i
-Fl(n)p Fm(\))f(YYFILL\()p Fl(n)p Fm(\);)-42 278 y Fr(where)c
-Fl(n)f Fr(is)f(the)i(maxim)n(um)11 b(n)o(um)o(b)q(er)k(of)g(c)o
-(haracters)i(that)f(can)g(b)q(e)g(consumed)g(b)q(efore)g(another)g(k)o
-(ey)g(state)g(is)g(reac)o(hed.)-42 328 y(F)m(or)e(example,)e(Figure)i
-(6)g(sho)o(ws)g(the)g(co)q(de)h(generated)g(for)f(state)h(6)e(in)h
-(Figure)g(3.)21 378 y(A)h(set)g(of)f(k)o(ey)h(states)h(can)f(b)q(e)g
-(determined)g(b)o(y)f(disco)o(v)o(ering)h(the)g(strongly-connected)h
-(comp)q(onen)o(ts)e(\(SCCs\))i(of)e(the)-42 428 y(DF)-5
-b(A.)12 b(An)h(SCC)f(is)f(a)h(maxima)o(l)d(subset)k(of)f(states)h(suc)o
-(h)g(that)f(there)h(exists)g(a)f(path)g(from)e(an)o(y)i(state)g(in)g
-(the)h(subset)g(to)f(an)o(y)-42 477 y(other.)24 b(The)16
-b(set)g(of)f(k)o(ey)h(states)g(consists)h(of)e(all)f(of)h(the)h(states)
-h(in)e(non-trivial)f(SCCs,)h(together)i(with)e(the)h(start)g(state.)-42
-527 y(Note)d(that)f(for)g(eac)o(h)g(SCC)g Fl(S)r Fr(,)h(w)o(e)f
-(actually)g(only)f(ha)o(v)o(e)h(to)g(include)g(a)f(subset)j(of)d
-(states)j(of)d Fl(S)k Fr(suc)o(h)e(that)f(when)g(the)h(subset)-42
-577 y(is)f(remo)o(v)o(ed,)f Fl(S)k Fr(b)q(ecomes)d(acyclic.)17
-b(Indeed,)c([17)o(])e(describ)q(es)j(a)e(simple)e(heuristic)j(for)e(c)o
-(ho)q(osing)h(suc)o(h)g(a)g(subset.)18 b(Ho)o(w)o(ev)o(er,)-42
-627 y(since)c(in)f(practice)h(most)d(of)i(the)g(\(non-trivial\))f(SCCs)
-h(encoun)o(tered)i(will)c(consist)j(of)e(a)h(single)g(state)g(the)h
-(curren)o(t)g(v)o(ersion)-42 677 y(of)f(RE2C)g(simply)e(includes)j(all)
-d(states)k(in)e(non-trivial)e(SCCs)943 662 y Fq(7)962
-677 y Fr(.)18 b(An)13 b(algorithm)e(giv)o(en)h(in)h([3)o(])g(w)o(as)g
-(used)h(to)f(compute)g(the)-42 726 y(SCCs.)-42 843 y
-Fj(3.4)56 b(Optimizations)-42 919 y Fr(Ev)o(en)17 b(go)q(o)q(d)f
-(optimizing)e(C)i(compilers)f(can)i(b)q(e)g(coaxed)f(in)o(to)g
-(generating)g(m)o(uc)o(h)f(smaller)g(and)h(sligh)o(tly)f(faster)i(co)q
-(de)g(if)-42 969 y(some)c(transformations)g(are)h(\014rst)h(applied)e
-(to)h(the)g(generated)i(co)q(de.)-42 1077 y Fh(3.4.1)48
-b(Eliminatin)o(g)13 b(Bac)o(ktrac)o(king)-42 1154 y Fr(Consider)19
-b(state)g(1)f(in)g(the)h(DF)-5 b(A)18 b(in)g(Figure)g(3.)31
-b(Note)19 b(that)f(since)h(all)e(of)h(the)h(transitions)f(from)e(state)
-j(1)f(reac)o(h)h(only)-42 1203 y(accepting)f(states,)h(bac)o(ktrac)o
-(king)f(information)c(do)q(es)k(not)f(need)i(to)e(b)q(e)h(sa)o(v)o(ed)g
-(if)e(the)i(co)q(de)g(for)f(the)h Fm(default)e Fr(case)j(is)-42
-1253 y(c)o(hanged)h(to)e(go)g(directly)h(to)g(the)g(co)q(de)h(asso)q
-(ciated)f(with)f(state)i(1.)32 b(The)19 b(result)h(of)e(this)h
-(optimization)d(is)i(sho)o(wn)h(in)-42 1303 y(Figure)d(7.)48
-b(More)17 b(generally)m(,)e(this)h(optimization)d(can)j(b)q(e)g
-(applied)f(to)h(all)f(accepting)h(states)h(whic)o(h)f(ha)o(v)o(e)g
-(transitions)647 1396 y Fm(L1:)49 b(++YYCURSOR;)647 1446
-y(M1:)g(switch\(*YYCURSOR\))p Fk(f)806 1495 y Fm(case)21
-b('a':)43 b(goto)21 b(L6;)849 1545 y Fl(:)7 b(:)g(:)806
-1595 y Fm(case)21 b('q':)43 b(goto)21 b(L6;)806 1645
-y(case)g('r':)43 b(goto)21 b(L2;)806 1695 y(case)g('s':)43
-b(goto)21 b(L6;)849 1744 y Fl(:)7 b(:)g(:)806 1794 y
-Fm(case)21 b('z':)43 b(goto)21 b(L6;)806 1844 y(default:)42
-b(goto)21 b(A4;)762 1894 y Fk(g)419 1983 y Fr(Figure)14
-b(7:)k(Co)q(de)c(for)g(state)g(1)g(with)g(bac)o(ktrac)o(king)f
-(eliminated.)-42 2083 y(only)h(to)f(accepting)i(states.)-42
-2191 y Fh(3.4.2)48 b(Optimizing)12 b Fm(switch)p Fh(es)-42
-2268 y Fr(Most)21 b(C)g(compilers)f(will)f(generate)j(either)f(a)g
-(jump)e(table)h(or)h(a)g(set)g(of)f Fm(if)g Fr(statemen)o(ts)h(for)g(a)
-f Fm(switch)g Fr(statemen)o(t)-42 2317 y(dep)q(ending)e(on)e(the)i
-(distribution)e(of)g(the)i Fm(case)e Fr(lab)q(els.)26
-b(In)17 b(man)o(y)e(compilers)h(the)h(decision)g(as)g(to)g(whic)o(h)g
-(metho)q(d)f(to)-42 2367 y(use)j(is)f(biased)f(to)o(w)o(ards)h
-(generating)g(jump)e(tables)i(since)g(in)g(most)e(cases)j(this)f
-(results)h(in)e(faster)h(alb)q(eit)f(larger)h(co)q(de.)-42
-2417 y(Ho)o(w)o(ev)o(er,)c(exp)q(erience)h(with)e(directly)h
-(executable)h(scanners)g(has)e(sho)o(wn,)g(that)g(replacing)h(man)o(y)d
-(of)i(these)h(jump)e(tables)p -42 2452 780 2 v 5 2478
-a Fn(5)22 2490 y Fo(If)f(the)g(input)f(con)o(tains)g(no)h(newlines,)f
-(a)h(GLA)h(scanner)e(will)h(attempt)f(to)h(bu\013er)f(the)g(en)o(tire)g
-(input)h(stream.)5 2518 y Fn(6)22 2530 y Fo(The)h(problem)d(of)i
-(detecting)e(stac)o(k)h(o)o(v)o(er\015o)o(w)g(in)i(LR)f(parsers)f(is)i
-(probably)d(b)q(est)i(left)f(to)h(hardw)o(are)f(mec)o(hanisms)f([12)o
-(].)5 2558 y Fn(7)22 2569 y Fo(It)i(should)f(b)q(e)h(noted)f(that)g
-(\014nding)f(the)i(minimal)e(set)i(of)g(states)f(to)h(remo)o(v)o(e)f
-(from)g(an)h(SCC)h(in)f(order)f(to)h(render)f(it)h(acyclic)e(is)j
-(equiv)n(alen)o(t)-42 2609 y(to)g(the)e(FEEDBA)o(CK)j(VER)m(TEX)h(SET)d
-(problem)f(whic)o(h)h(is)g(NP-complete)e([6].)923 2748
-y Fr(7)p eop
-%%Page: 8 8
-8 7 bop -42 195 a Fr(with)12 b Fm(if)g Fr(statemen)o(ts)g(results)h(in)
-f(scanners)i(whic)o(h)d(are)i(m)o(uc)o(h)e(smaller,)f(and)i
-(surprisingly)m(,)f(in)h(some)f(cases)i(sligh)o(tly)e(faster)-42
-245 y(as)h(w)o(ell)78 230 y Fq(8)96 245 y Fr(.)17 b(As)c(a)e(result,)h
-(the)h(capabilit)o(y)d(of)h(replacing)g(a)h Fm(switch)e
-Fr(statemen)o(t)i(with)f Fm(if)g Fr(statemen)o(ts)h(w)o(as)g(added)g
-(to)f(RE2C.)21 295 y(RE2C)j(bases)j(its)e(decision)g(on)g(whether)i(to)
-e(generate)i(a)d Fm(switch)g Fr(statemen)o(t)i(or)f(to)g(replace)h(it)f
-(with)g Fm(if)p Fr(s)g(solely)g(on)-42 345 y(the)j(densit)o(y)162
-329 y Fq(9)198 345 y Fr(of)f(the)g Fm(switch)f Fr(statemen)o(t.)27
-b(It)18 b(is)e(surprising)i(that)f(suc)o(h)h(a)e(simple)g(heuristic)i
-(w)o(orks)f(w)o(ell.)27 b(F)m(or)16 b(more)-42 394 y(esoteric)h
-(applications)e(in)g(whic)o(h)h(the)g(input)f(alphab)q(et)h(is)f(not)h
-(a)f(simple)f(in)o(terv)n(al)h(RE2C)g(has)g(the)i(adv)n(an)o(tage)d(in)
-h(that)-42 444 y(there)f(is)e(no)g(pro)o(vision)f(for)h(don't)f(care)i
-(en)o(tries)g(in)f(a)g Fm(switch)f Fr(statemen)o(t:)17
-b(if)11 b(no)h Fm(case)f Fr(matc)o(hes)h(none)g(of)f(the)i(statemen)o
-(ts)-42 494 y(in)i(the)g Fm(switch)e Fr(m)o(ust)g(b)q(e)i(executed.)22
-b(Ho)o(w)o(ev)o(er,)15 b(for)f(the)h(examples)f(in)g(T)m(able)f(1)h
-(this)h(is)f(not)h(so:)k(RE2C)14 b(simply)f(do)q(es)i(a)-42
-544 y(b)q(etter)j(job)d(of)g(generating)g(co)q(de)i(for)e
-Fm(switch)f Fr(statemen)o(ts)i(than)g(the)g(compiler.)21
-b([18)o(],)15 b([11)o(],)g(and)h([2)o(])f(also)g(address)i(the)-42
-594 y(problem)c(of)g(generating)h(go)q(o)q(d)g(co)q(de)h(for)e
-Fm(switch)g Fr(statemen)o(ts.)-42 702 y Fh(Replacing)18
-b Fm(switch)p Fh(es)g(with)g Fm(if)p Fh(s)41 b Fr(When)17
-b(replacing)g(a)f Fm(switch)g Fr(statemen)o(t)h(with)g
-Fm(if)f Fr(statemen)o(ts,)i(it)f(is)f(useful)i(to)-42
-751 y(sort)g(the)f Fm(case)p Fr(s)f(b)o(y)h(lab)q(el)f(and)g(then)h
-(group)g(them)f(according)h(to)f(rule)h(in)o(to)f(subranges,)i(as)f
-(illustrated)f(in)g(Figure)h(8.)-42 801 y(RE2C)c(replaces)h(a)f
-Fm(switch)f Fr(with)g(either)i(a)f(linear)f(or)h(binary)g(searc)o(h,)h
-(dep)q(ending)f(on)g(the)h(n)o(um)o(b)q(er)e(of)g(subranges)i(in)f(the)
-467 894 y Fm(switch\(*YYCURSOR\))p Fk(f)511 944 y Fm(case)21
-b('\\)o(000':)49 b Fl(:)7 b(:)g(:)20 b Fm(case)h('/':)115
-b(goto)21 b(L11;)576 994 y(case)g('0':)431 b(goto)21
-b(L7;)576 1043 y(case)g('1':)49 b Fl(:)7 b(:)g(:)20 b
-Fm(case)h('9':)115 b(goto)21 b(L8;)576 1093 y(case)g(':':)49
-b Fl(:)7 b(:)g(:)20 b Fm(case)h('`':)115 b(goto)21 b(L11;)576
-1143 y(case)g('a':)49 b Fl(:)7 b(:)g(:)20 b Fm(case)h('o':)115
-b(goto)21 b(L6;)576 1193 y(case)g('p':)431 b(goto)21
-b(L1;)576 1243 y(case)g('r':)49 b Fl(:)7 b(:)g(:)20 b
-Fm(case)h('z':)115 b(goto)21 b(L6;)577 1292 y(case)g(')p
-Fk(f)p Fm(':)49 b Fl(:)7 b(:)g(:)20 b Fm(case)h('\\377':)49
-b(goto)21 b(L11;)467 1342 y Fk(g)672 1432 y Fr(Figure)14
-b(8:)j Fm(switch)c Fr(for)g(state)i(0.)-42 1531 y Fm(switch)p
-Fr(.)i(If)d(there)h(are)f(only)f(a)h(few)g(subranges)h(a)e(linear)h
-(searc)o(h)h(is)f(generated;)g(otherwise,)h(a)e(binary)h(searc)o(h)h
-(is)f(used.)21 1581 y(Figure)f(9)f(and)g(Figure)h(10)f(sho)o(w)h
-(linear)f(and)h(binary)f(searc)o(hes,)i(resp)q(ectiv)o(ely)m(,)g(that)f
-(could)f(b)q(e)h(used)h(to)e(replace)52 b(the)607 1674
-y Fm(if\(*YYCURSOR)19 b(<=)i('/'\))g(goto)g(L11;)607
-1724 y(if\(*YYCURSOR)e(<=)i('0'\))g(goto)g(L7;)607 1773
-y(if\(*YYCURSOR)e(<=)i('9'\))g(goto)g(L8;)607 1823 y(if\(*YYCURSOR)e
-(<=)i('`'\))g(goto)g(L11;)607 1873 y(if\(*YYCURSOR)e(==)i('p'\))g(goto)
-g(L1;)607 1923 y(if\(*YYCURSOR)e(<=)i('z'\))g(goto)g(L6;)607
-1973 y(goto)g(L11;)477 2062 y Fr(Figure)14 b(9:)k(Linear)c(lo)q(okup)f
-(co)q(de)h(sequence)i(for)e(state)h(0.)p -42 2147 780
-2 v 5 2173 a Fn(8)22 2185 y Fo(See)c(T)m(able)g(1)g(for)g(examples.)5
-2213 y Fn(9)22 2225 y Fo(The)h(n)o(um)o(b)q(er)d(of)i(distinct)f
-(subranges)f(divided)g(b)o(y)i(the)g(total)f(n)o(um)o(b)q(er)g(of)h
-Fg(case)p Fo(s.)923 2748 y Fr(8)p eop
-%%Page: 9 9
-9 8 bop 563 188 a Fm(if\(*YYCURSOR)19 b(<=)j('`'\))p
-Fk(f)650 238 y Fm(if\(*YYCURSOR)d(<=)j('/'\))f(goto)g(L11;)650
-288 y(if\(*YYCURSOR)e(<=)j('0'\))f(goto)g(L7;)650 338
-y(if\(*YYCURSOR)e(<=)j('9'\))f(goto)g(L8;)650 388 y(goto)g(L11;)563
-438 y Fk(g)h Fm(else)f Fk(f)650 487 y Fm(if\(*YYCURSOR)e(==)j('p'\))f
-(goto)g(L1;)650 537 y(if\(*YYCURSOR)e(<=)j('z'\))f(goto)g(L6;)650
-587 y(goto)g(L11;)563 637 y Fk(g)463 726 y Fr(Figure)14
-b(10:)k(Binary)13 b(lo)q(okup)h(co)q(de)g(sequence)i(for)e(state)g(0.)
--42 826 y Fm(switch)e Fr(in)g(Figure)h(8.)k(Note)d(in)e(particular)g
-(the)i(comparison)d(for)i(the)g(\\)p Fm(p)p Fr(")f(in)g(Figure)h(9.)k
-(This)c(optimization)d(eliminates)-42 876 y(a)k(comparison)f(eac)o(h)i
-(time)d(it)i(is)g(applied.)k(Also)c(note)h(that)f(no)g(comparisons)f
-(are)i(required)g(at)f(the)g(top)g(and)g(b)q(ottom)f(of)-42
-925 y(the)i(range.)-42 1033 y Fh(Simplifyi)o(ng)j Fm(switch)p
-Fh(es)40 b Fr(As)19 b(a)f(general)g(rule,)i(b)q(etter)g(replacemen)o(t)
-e(co)q(de)h(can)g(b)q(e)g(generated)h(for)e(a)g Fm(switch)f
-Fr(if)h(it)-42 1083 y(con)o(tains)g(few)o(er)g(subranges.)31
-b(One)18 b(w)o(a)o(y)f(of)g(reducing)h(the)g(n)o(um)o(b)q(er)f(of)g
-(subranges)i(in)e(a)g Fm(switch)p Fr(,)g(at)g(the)i(exp)q(ense)g(of)-42
-1133 y(some)c(sp)q(eed,)j(is)d(to)h(lo)q(cate)g(a)f Fi(b)n(ase)h
-Fm(switch)f Fr(whic)o(h)g(is)h(v)o(ery)g(similar)d(and)j(then)g
-(replace)h(the)f(co)q(de)h(for)e(all)f(cases)k(whic)o(h)-42
-1183 y(app)q(ear)d(iden)o(tically)d(in)i(the)g(base)h
-Fm(switch)d Fr(with)i(a)f Fm(goto)g Fr(to)h(\(the)h(co)q(de)f
-(generated)i(for\))d(the)i(base)f Fm(switch)p Fr(.)j(RE2C)c(uses)-42
-1233 y(this)18 b(optimization)d(to)i(go)q(o)q(d)g(adv)n(an)o(tage)g
-(when)h(generating)g(co)q(de)g(in)f(the)h(transitions)g(of)f(states)i
-(used)f(for)f(matc)o(hing)-42 1282 y(k)o(eyw)o(ords.)i(F)m(or)12
-b(example,)f(note)j(that)f(the)g Fm(switch)p Fr(es)f(for)h(states)h(1)f
-(through)g(4)f(di\013er)h(from)f(the)h Fm(switch)f Fr(of)g(state)i(6)e
-(only)-42 1332 y(on)i(\\)p Fm(r)p Fr(",)f(\\)p Fm(i)p
-Fr(",)g(\\)p Fm(n)p Fr(",)f(and)i(\\)p Fm(t)p Fr(",)f(resp)q(ectiv)o
-(ely)m(.)19 b(Figure)14 b(11)f(sho)o(ws)h(the)h(co)q(de)g(generated)g
-(for)e(these)j(states.)37 b(Another)15 b(w)o(a)o(y)560
-1425 y Fm(L1:)49 b(++YYCURSOR;)560 1475 y(M1:)g(if\(*YYCURSOR)19
-b(!=)j('r'\))f(goto)g(M6;)560 1525 y(L2:)49 b(++YYCURSOR;)560
-1574 y(M2:)g(if\(*YYCURSOR)19 b(!=)j('i'\))f(goto)g(M6;)560
-1624 y(L3:)49 b(++YYCURSOR;)560 1674 y(M3:)g(if\(*YYCURSOR)19
-b(!=)j('n'\))f(goto)g(M6;)560 1724 y(L4:)49 b(++YYCURSOR;)560
-1774 y(M4:)g(if\(*YYCURSOR)19 b(!=)j('t'\))f(goto)g(M6;)675
-1824 y(goto)g(L5;)444 1913 y Fr(Figure)14 b(11:)j(Co)q(de)d(for)g
-(states)h(1{4)e(after)h(all)f(optimizations.)-42 2013
-y(of)h(implemen)o(ting)d(this)j(optimization)e(is)i(to)g(construct)i(a)
-e(tunnel)g(automaton)f([9)o(])h(from)e(the)j(DF)-5 b(A,)14
-b(and)g(then)h(generate)-42 2062 y(co)q(de)g(from)d(the)j(tunnel)f
-(automaton.)-42 2170 y Fh(Common)i(Sub)q(expression)d(Eliminatio)o(n)38
-b Fr(Man)o(y)14 b(compilers)g(will)f(miss)g(the)i(fact)f(that)h
-Fm(*YYCURSOR)d Fr(in)i(Figures)h(9)-42 2220 y(and)e(10)f(should)h(b)q
-(e)g(loaded)f(in)o(to)g(a)h(register.)19 b(Most)13 b(can)f(b)q(e)i
-(coaxed)f(to)f(do)h(so)g(b)o(y)f(\014rst)i(assigning)e
-Fm(*YYCURSOR)e Fr(to)j(a)f(lo)q(cal)-42 2270 y(v)n(ariable.)-42
-2407 y Fs(4)67 b(Exp)r(erimen)n(tal)25 b(Results)-42
-2498 y Fr(T)m(able)16 b(1)h(compares)f(t)o(w)o(o)g(RE2C-generated)h(C)g
-(scanners)h(with)e(the)i(\(hand-co)q(ded\))f(lcc)g(scanner)h([5)o(])e
-(and)h(comparable)-42 2548 y(GLA-)f(and)g(\015ex-generated)i(scanners)f
-(on)f(a)g(v)n(ariet)o(y)g(of)f(platforms.)48 b(It)16
-b(rep)q(orts)i(the)e(times)f(in)h(seconds)i(required)f(b)o(y)-42
-2598 y(the)e(v)n(arious)e(scanners)i(to)e(scan)h(ab)q(out)g(170,000)e
-(lines)h(of)g(C)h(source.)19 b(The)14 b(5,607,820)d(b)o(yte)j(source)g
-(\014le)g(used)h(essen)o(tially)923 2748 y(9)p eop
-%%Page: 10 10
-10 9 bop 707 452 a Fr(time)438 b(space)328 502 y(program)p
-516 517 2 50 v 82 w(user)83 b(sys)76 b(total)p 975 517
-V 82 w(text)j(data)d(bss)f(total)p 292 519 1284 2 v 860
-554 a Fi(R4000)16 b(/)f(gc)n(c2.3.3)h(-O)p 292 570 V
-317 605 a Fr(\015ex)e(-Cem)p 516 620 2 50 v 71 w(10.36)p
-683 620 V 50 w(0.87)p 808 620 V 71 w(11.23)p 975 620
-V 71 w(5200)p 1130 620 V 71 w(4192)p 1285 620 V 92 w(48)p
-1420 620 V 72 w(9440)357 655 y(\015ex)h(-Cf)p 516 670
-V 92 w(5.44)p 683 670 V 50 w(0.72)p 808 670 V 92 w(6.16)p
-975 670 V 71 w(4688)p 1130 670 V 51 w(64384)p 1285 670
-V 91 w(48)p 1420 670 V 51 w(69120)443 705 y(lcc)p 516
-720 V 93 w(3.19)p 683 720 V 50 w(0.67)p 808 720 V 92
-w(3.86)p 975 720 V 71 w(7328)p 1130 720 V 71 w(1216)p
-1285 720 V 51 w(8256)p 1420 720 V 50 w(16800)438 754
-y(gla)p 516 769 V 92 w(2.89)p 683 769 V 50 w(0.63)p 808
-769 V 92 w(3.52)p 975 769 V 50 w(11552)p 1130 769 V 71
-w(3056)p 1285 769 V 72 w(144)p 1420 769 V 50 w(14752)417
-804 y(re2c)p 516 819 V 94 w(2.54)p 683 819 V 50 w(0.68)p
-808 819 V 92 w(3.22)p 975 819 V 50 w(13264)p 1130 819
-V 92 w(512)p 1285 819 V 113 w(0)p 1420 819 V 51 w(13776)373
-854 y(re2c)g(-s)p 516 869 V 93 w(2.38)p 683 869 V 50
-w(0.67)p 808 869 V 92 w(3.05)p 975 869 V 50 w(11056)p
-1130 869 V 71 w(4528)p 1285 869 V 113 w(0)p 1420 869
-V 51 w(15584)p 292 871 1284 2 v 737 906 a Fi(R4000)h(/)f(c)n(c2.11.2)g
-(-O)g(-Olimit)e(5000)p 292 922 V 317 957 a Fr(\015ex)h(-Cem)p
-516 972 2 50 v 92 w(9.97)p 683 972 V 50 w(0.89)p 808
-972 V 71 w(10.86)p 975 972 V 71 w(4704)p 1130 972 V 71
-w(4240)p 1285 972 V 92 w(32)p 1420 972 V 72 w(8976)357
-1007 y(\015ex)h(-Cf)p 516 1022 V 92 w(6.19)p 683 1022
-V 50 w(0.72)p 808 1022 V 92 w(6.91)p 975 1022 V 71 w(4256)p
-1130 1022 V 51 w(64432)p 1285 1022 V 91 w(32)p 1420 1022
-V 51 w(68720)443 1057 y(lcc)p 516 1072 V 93 w(2.74)p
-683 1072 V 50 w(0.72)p 808 1072 V 92 w(3.46)p 975 1072
-V 71 w(9664)p 1130 1072 V 92 w(864)p 1285 1072 V 51 w(8256)p
-1420 1072 V 50 w(18784)438 1106 y(gla)p 516 1121 V 92
-w(2.46)p 683 1121 V 50 w(0.69)p 808 1121 V 92 w(3.15)p
-975 1121 V 50 w(19232)p 1130 1121 V 71 w(2992)p 1285
-1121 V 72 w(128)p 1420 1121 V 50 w(22352)417 1156 y(re2c)p
-516 1171 V 94 w(2.97)p 683 1171 V 50 w(0.63)p 808 1171
-V 92 w(3.60)p 975 1171 V 50 w(15088)p 1130 1171 V 92
-w(528)p 1285 1171 V 113 w(0)p 1420 1171 V 51 w(15616)373
-1206 y(re2c)g(-s)p 516 1221 V 93 w(2.94)p 683 1221 V
-50 w(0.61)p 808 1221 V 92 w(3.55)p 975 1221 V 50 w(16080)p
-1130 1221 V 51 w(11808)p 1285 1221 V 112 w(0)p 1420 1221
-V 51 w(27888)p 292 1223 1284 2 v 849 1258 a Fi(SP)m(AR)o(C)g(/)g(gc)n
-(c2.3.3)g(-O)p 292 1274 V 317 1309 a Fr(\015ex)f(-Cem)p
-516 1324 2 50 v 71 w(16.03)p 683 1324 V 50 w(2.78)p 808
-1324 V 71 w(18.81)p 975 1324 V 71 w(8992)p 1130 1324
-V 113 w(24)p 1285 1324 V 92 w(48)p 1420 1324 V 72 w(9064)357
-1359 y(\015ex)h(-Cf)p 516 1374 V 92 w(7.84)p 683 1374
-V 50 w(2.69)p 808 1374 V 71 w(10.53)p 975 1374 V 71 w(6560)p
-1130 1374 V 51 w(62232)p 1285 1374 V 91 w(48)p 1420 1374
-V 51 w(68840)443 1409 y(lcc)p 516 1424 V 93 w(4.46)p
-683 1424 V 50 w(2.01)p 808 1424 V 92 w(6.47)p 975 1424
-V 71 w(7800)p 1130 1424 V 92 w(384)p 1285 1424 V 51 w(8256)p
-1420 1424 V 50 w(16440)438 1459 y(gla)p 516 1473 V 92
-w(4.08)p 683 1473 V 50 w(1.56)p 808 1473 V 92 w(5.64)p
-975 1473 V 50 w(10864)p 1130 1473 V 71 w(2168)p 1285
-1473 V 72 w(136)p 1420 1473 V 50 w(13168)417 1508 y(re2c)p
-516 1523 V 94 w(3.67)p 683 1523 V 50 w(1.76)p 808 1523
-V 92 w(5.43)p 975 1523 V 50 w(13552)p 1130 1523 V 134
-w(0)p 1285 1523 V 113 w(0)p 1420 1523 V 51 w(13552)373
-1558 y(re2c)g(-s)p 516 1573 V 93 w(3.48)p 683 1573 V
-50 w(1.70)p 808 1573 V 92 w(5.18)p 975 1573 V 50 w(15464)p
-1130 1573 V 134 w(0)p 1285 1573 V 113 w(0)p 1420 1573
-V 51 w(15464)p 292 1575 1284 2 v 880 1610 a Fi(i486)g(/)g(gc)n(c2.4.5)g
-(-O)p 292 1626 V 317 1661 a Fr(\015ex)f(-Cem)p 516 1676
-2 50 v 71 w(21.86)p 683 1676 V 50 w(1.26)p 808 1676 V
-71 w(23.12)p 975 1676 V 71 w(8536)p 1130 1676 V 113 w(20)p
-1285 1676 V 92 w(24)p 1420 1676 V 72 w(8580)357 1711
-y(\015ex)h(-Cf)p 516 1726 V 92 w(9.12)p 683 1726 V 50
-w(1.18)p 808 1726 V 71 w(10.30)p 975 1726 V 71 w(6200)p
-1130 1726 V 51 w(62228)p 1285 1726 V 91 w(24)p 1420 1726
-V 51 w(68452)443 1761 y(lcc)p 516 1776 V 93 w(5.45)p
-683 1776 V 50 w(1.22)p 808 1776 V 92 w(6.67)p 975 1776
-V 71 w(5924)p 1130 1776 V 92 w(384)p 1285 1776 V 51 w(8240)p
-1420 1776 V 50 w(14548)438 1811 y(gla)p 516 1825 V 92
-w(5.11)p 683 1825 V 50 w(1.18)p 808 1825 V 92 w(6.29)p
-975 1825 V 50 w(15496)p 1130 1825 V 71 w(2144)p 1285
-1825 V 72 w(108)p 1420 1825 V 50 w(17748)417 1860 y(re2c)p
-516 1875 V 94 w(4.73)p 683 1875 V 50 w(1.13)p 808 1875
-V 92 w(5.86)p 975 1875 V 71 w(9800)p 1130 1875 V 134
-w(0)p 1285 1875 V 113 w(0)p 1420 1875 V 72 w(9800)373
-1910 y(re2c)g(-s)p 516 1925 V 93 w(4.85)p 683 1925 V
-50 w(1.17)p 808 1925 V 92 w(6.02)p 975 1925 V 50 w(12968)p
-1130 1925 V 134 w(0)p 1285 1925 V 113 w(0)p 1420 1925
-V 51 w(12968)p 292 1927 1284 2 v 871 1962 a Fi(68020)h(/)f(gc)n(c1.40)h
-(-O)p 292 1978 V 317 2013 a Fr(\015ex)e(-Cem)p 516 2028
-2 50 v 50 w(117.37)p 683 2028 V 50 w(5.89)p 808 2028
-V 51 w(123.26)p 975 2028 V 70 w(7700)p 1130 2028 V 113
-w(20)p 1285 2028 V 92 w(22)p 1420 2028 V 72 w(7742)357
-2063 y(\015ex)h(-Cf)p 516 2078 V 71 w(50.93)p 683 2078
-V 50 w(5.27)p 808 2078 V 71 w(56.20)p 975 2078 V 71 w(5388)p
-1130 2078 V 51 w(62228)p 1285 2078 V 91 w(22)p 1420 2078
-V 51 w(67638)443 2113 y(lcc)p 516 2128 V 72 w(33.28)p
-683 2128 V 50 w(6.28)p 808 2128 V 71 w(39.56)p 975 2128
-V 71 w(4956)p 1130 2128 V 92 w(384)p 1285 2128 V 51 w(8236)p
-1420 2128 V 50 w(13576)438 2163 y(gla)p 516 2177 V 71
-w(33.80)p 683 2177 V 50 w(4.20)p 808 2177 V 71 w(38.00)p
-975 2177 V 50 w(13904)p 1130 2177 V 71 w(2144)p 1285
-2177 V 72 w(106)p 1420 2177 V 50 w(16154)417 2212 y(re2c)p
-516 2227 V 73 w(28.92)p 683 2227 V 50 w(2.91)p 808 2227
-V 71 w(31.83)p 975 2227 V 71 w(8556)p 1130 2227 V 134
-w(0)p 1285 2227 V 113 w(0)p 1420 2227 V 72 w(8556)373
-2262 y(re2c)g(-s)p 516 2277 V 72 w(30.72)p 683 2277 V
-50 w(3.19)p 808 2277 V 71 w(33.91)p 975 2277 V 71 w(9856)p
-1130 2277 V 134 w(0)p 1285 2277 V 113 w(0)p 1420 2277
-V 72 w(9856)513 2352 y(T)m(able)e(1:)18 b(Comparison)12
-b(of)h(generated)j(C)d(scanners.)913 2748 y(10)p eop
-%%Page: 11 11
-11 10 bop -42 195 a Fr(consists)15 b(of)d(10)h(copies)h(of)e(the)i
-(source)h(to)e(James)f(Clark's)h(SGML)f(parser,)i(sgmls)1263
-180 y Fq(10)1297 195 y Fr(.)k(The)c(times)e(rep)q(orted)i(are)g(a)o(v)o
-(erages)-42 245 y(for)j(10)g(trials;)h(the)g(sizes)g(rep)q(orted)h
-(include)e(ev)o(erything)h(but)g(C)f(library)f(co)q(de)1251
-230 y Fq(11)1287 245 y Fr(.)28 b(\015ex)18 b(pro)o(vides)f(a)g(n)o(um)o
-(b)q(er)g(of)g(table)-42 295 y(compression)e(options)g(including)f
-Fm(-Cem)g Fr(for)h(tables)g(optimized)f(for)h(space,)h(and)f
-Fm(-Cf)f Fr(for)h(tables)g(optimized)f(for)g(sp)q(eed.)-42
-345 y(By)f(default,)e(RE2C)h(will)f(use)h(a)g(heuristic)h(to)f(decide)h
-(if)e(a)h Fm(switch)f Fr(should)h(b)q(e)g(replaced)h(with)f
-Fm(if)p Fr(s:)17 b(the)c Fm(-s)e Fr(option)h(forces)-42
-394 y(RE2C)i(to)g(alw)o(a)o(ys)e(generate)k Fm(switch)p
-Fr(es.)21 444 y(T)m(o)21 b(mak)o(e)g(comparisons)g(more)g(meaningful,)h
-(all)e(seman)o(tic)i(pro)q(cessing)h(co)q(de)g(w)o(as)f(remo)o(v)o(ed)g
-(from)e(the)j(GLA-)-42 494 y(generated)d(and)f(lcc)f(scanners,)j(and)d
-(co)q(de)i(to)e(pro)o(vide)g(line)g(and)g(column)f(n)o(um)o(b)q(er)h
-(information)d(w)o(as)k(added)g(to)f(the)-42 544 y(RE2C)c(sp)q
-(eci\014cation.)19 b(The)14 b(remaining)e(di\013erences)k(of)d(note)h
-(b)q(et)o(w)o(een)i(the)e(scanners)i(include:)21 627
-y Fk(\017)k Fr(The)15 b(\015ex-generated)g(scanners)h(do)d(not)h(pro)o
-(vide)g(line)f(or)h(column)e(n)o(um)o(b)q(er)i(information.)21
-710 y Fk(\017)20 b Fr(The)15 b(GLA-generated)f(scanner)i(assumes)d
-(7-bit)h(input.)21 793 y(As)e(a)g(general)g(rule,)h(the)f
-(RE2C-generated)h(scanners)h(w)o(ere)f(the)f(fastest,)h(follo)o(w)o(ed)
-e(b)o(y)h(the)g(GLA-generated)h(scanner)-42 843 y(and)j(then)g(the)g
-(lcc)g(scanner.)24 b(The)15 b(\015ex-generated)i(scanners)h(w)o(ere)e
-(signi\014can)o(tly)e(slo)o(w)o(er.)23 b(Only)15 b(the)h
-(space-optimized)-42 892 y(\015ex)i(scanner)h(w)o(as)e(smaller)f(than)h
-(the)h(default)f(RE2C)g(scanner,)i(and)e(only)g(b)o(y)g(a)g(narro)o(w)g
-(margin.)26 b(There)19 b(are)e(some)-42 942 y(arc)o(hitectures,)j
-(notably)d(the)g(IBM)h(370,)f(on)g(whic)o(h)g(table)g(driv)o(en)g
-(scanners)i(will)d(probably)h(pro)q(duce)h(b)q(etter)h(results:)-42
-992 y(IBM)c(370)e(compilers)g(t)o(ypically)f(generate)j(p)q(o)q(or)f
-(co)q(de)h(for)f(large)f(routines.)21 1042 y(The)22 b(v)n(arious)f
-(scanners)j(and)d(input)h(\014les)g(used)h(for)e(the)i(tests)g(are)f(a)
-o(v)n(ailable)e(for)h(anon)o(ymous)f(ftp)i(from)e Ff(csg.-)-42
-1092 y(u)o(w)o(aterlo)q(o.ca)10 b Fr(in)f Ff(/pub/p)q
-(eter/re2c/sampler.ta)o(r.Z)p Fr(.)i(\015ex)f(is)f(a)o(v)n(ailable)e
-(for)i(anon)o(ymous)e(ftp)i(from)f Ff(ftp.uu.net)i Fr(as)f
-Ff(/pack)o(ages/-)-42 1142 y(gnu/\015ex-2.3.7.ta)o(r.Z)p
-Fr(,)14 b(GLA)h(is)g(a)o(v)n(ailable)e(for)i(anon)o(ymous)f(ftp)h(from)
-f Ff(ftp.cs.colo)o(rado.edu)i Fr(as)f(part)g(of)g(the)h(Eli)f(pac)o(k)n
-(age)-42 1191 y Ff(/pub/cs/distribs/eli/Eli3.4.2.ta)o(r.Z)p
-Fr(,)i(and)h(the)g(lcc)h(fron)o(t)e(end)i(is)f(a)o(v)n(ailable)e(for)h
-(anon)o(ymous)g(ftp)g(from)g Ff(p)o(rinceton.edu)-42
-1241 y Fr(as)f Ff(/pub/lcc/lccfe-1.9.ta)o(r.Z)p Fr(.)g(An)f(alpha)g(v)o
-(ersion)g(of)g(RE2C)g(will)f(so)q(on)i(b)q(e)g(made)e(a)o(v)n(ailable)f
-(for)i(anon)o(ymous)f(ftp)h(from)-42 1291 y Ff(csg.u)o(w)o(aterlo)q
-(o.ca)g Fr(as)f Ff(/pub/p)q(eter/re2c/re2c-0.5.ta)o(r.Z)p
-Fr(.)-42 1428 y Fs(5)67 b(Related)23 b(W)-6 b(ork)-42
-1519 y Fr(The)18 b(k)o(ey)g(to)f(the)h(p)q(erformance)f(and)g
-(\015exibilit)o(y)e(of)i(an)g(RE2C-generated)h(scanner)h(is)e(the)h
-(approac)o(h)f(used)h(to)f(deter-)-42 1569 y(mine)e(when)i(the)g
-(bu\013er)g(needs)g(\014lling.)23 b(In)o(terestingly)m(,)16
-b(the)h(lcc)g(scanner)g([5)o(])f(uses)h(a)f(similar)e(approac)o(h)i
-(\(with)g(certain)-42 1619 y(concessions)g(to)e(k)o(eep)g(the)h(b)q(o)q
-(okk)o(eeping)e(manageable.\))-42 1735 y Fj(5.1)56 b(Comparison)18
-b(With)g(GLA)-42 1812 y Fr(It)h(is)f(natural)f(to)h(compare)f(RE2C)h
-(to)g(GLA)f([7])g(as)h(it)g(also)f(generates)j(directly)f(executable)g
-(scanners.)32 b(RE2C)18 b(and)-42 1861 y(GLA)d(ha)o(v)o(e)g(man)o(y)e
-(di\013erences)k(simply)c(b)q(ecause)j(they)g(are)f(targeted)h(for)e
-(di\013eren)o(t)i(t)o(yp)q(es)g(of)e(users:)22 b(GLA)14
-b(is)h(in)o(tended)-42 1911 y(for)g(p)q(eople)h(who)f(simply)e(wish)i
-(to)f(lev)o(erage)i(their)f(e\013orts)i(with)d(existing)h(to)q(ols)g
-(and)g(libraries;)g(RE2C)f(is)h(in)o(tended)h(for)-42
-1961 y(p)q(eople)d(that)g(ha)o(v)o(e)f(more)g(sp)q(ecialized)h(needs)h
-(and)e(are)h(willing)d(to)j(pro)o(vide)f(their)h(o)o(wn)f(supp)q(ort)h
-(routines.)18 b(F)m(or)12 b(example,)-42 2011 y(GLA)h(pro)o(vides)h(a)f
-(go)q(o)q(d)f(bu\013ering)i(mec)o(hanism,)c(RE2C)j(users)i(m)o(ust)d
-(supply)h(their)h(o)o(wn.)j(These)d(di\013erences,)i(ho)o(w)o(ev)o(er,)
--42 2061 y(are)f(not)f(unique)f(to)h(GLA)g(and)f(ha)o(v)o(e)h(b)q(een)h
-(addressed)h(for)d(the)i(most)e(part)h(in)f(previous)h(sections.)21
-2111 y(Of)j(more)f(in)o(terest)i(is)f(the)h(di\013erences)i(in)c(the)i
-(co)q(de)g(that)f(RE2C)g(and)g(GLA)g(generate.)29 b(Scanners)18
-b(generated)h(b)o(y)-42 2160 y(RE2C)14 b(and)g(GLA)f(di\013er)h
-(primarily)e(in)h(t)o(w)o(o)h(asp)q(ects:)19 b(ho)o(w)14
-b(they)g(determine)g(when)h(the)f(bu\013er)h(needs)g(\014lling,)d(and)i
-(ho)o(w)-42 2210 y(they)h(generate)g(co)q(de)g(for)e
-Fm(switch)p Fr(es.)21 2260 y(GLA)d(uses)i(the)f(ASCI)q(I)g(NUL)f(c)o
-(haracter)i(as)f(the)g(sen)o(tinel)g(to)f(determine)h(when)g(the)g
-(bu\013er)g(needs)h(\014lling.)j(T)m(o)10 b(impro)o(v)o(e)-42
-2310 y(the)j(sp)q(eed)h(and)e(reduce)i(the)f(size)g(of)e(the)i
-(generated)g(scanners)h(GLA)e(bu\013ers)i(only)d(complete)h(lines)g
-(and)g(restricts)i(tok)o(ens)-42 2360 y(to)d(those)g(that)f(do)g(not)g
-(con)o(tain)g(newline)g(\(ASCI)q(I)h(LF\))f(c)o(haracters)1013
-2345 y Fq(12)1050 2360 y Fr(.)17 b(If)10 b(a)g(tok)o(en)g(with)g(an)g
-(em)o(b)q(edded)h(newline)f(c)o(haracter)-42 2409 y(\(suc)o(h)k(as)f(a)
-f(commen)o(t\))f(is)h(required)i(it)e(m)o(ust)f(b)q(e)j(recognized)g
-(with)e(an)g(auxiliary)f(scanner)j(written)f(in)f(C.)g(This)h(co)q(de)g
-(has)-42 2459 y(to)h(p)q(erform)f(the)i(bu\013ering-related)f(b)q(o)q
-(okk)o(eeping)g(that)g(is)g(done)g(automatically)d(b)o(y)i
-(GLA-generated)i(co)q(de.)p -42 2494 780 2 v -11 2521
-a Fn(10)22 2532 y Fo(Av)n(ailable)10 b(for)h(anon)o(ymous)d(ftp)j(from)
-f Fe(ftp.uu.net)i Fo(as)f Fe(/pub/text-p)o(ro)q(cessing/sg)o(ml/sgmls-)
-o(1.1.)o(ta)o(r.Z)o Fo(.)-11 2560 y Fn(11)22 2572 y Fo(The)h
-(GLA-generated)c(scanner)i(sizes)h(also)f(do)h(not)g(include)f(the)g
-(size)h(of)g(an)g(error)g(rep)q(orting)e(mo)q(dule)g
-Fg(err.o)p Fo(.)-11 2600 y Fn(12)22 2612 y Fo(This)j(is)f(discussed)f
-(in)h(more)f(detail)g(in)h(Section)f(3.3.1.)913 2748
-y Fr(11)p eop
-%%Page: 12 12
-12 11 bop 21 195 a Fr(The)20 b(mec)o(hanism)e(RE2C)h(uses)i(to)f
-(re\014ll)g(the)g(bu\013er)h(eliminates)d(these)k(restrictions)f(and)e
-(y)o(et)i(allo)o(ws)d(RE2C)i(to)-42 245 y(generate)15
-b(faster)f(and)g(smaller)e(scanners.)19 b(RE2C)13 b(also)g(allo)o(ws)g
-(b)q(oth)g(auxiliary)f(and)h(primary)f(scanners)j(to)f(b)q(e)g(sp)q
-(eci\014ed)-42 295 y(using)g(regular)g(expressions.)20
-b(F)m(or)13 b(example,)f(App)q(endix)i(A)g(con)o(tains)g(an)g
-(auxiliary)e(scanner)j(for)f(commen)o(ts.)21 345 y(Lik)o(e)i(RE2C,)g
-(GLA)h(usually)f(replaces)i Fm(switch)p Fr(es)e(with)h
-Fm(if)p Fr(s.)27 b(Unlik)o(e)16 b(RE2C,)g(GLA)g(do)q(es)i(not)f(use)g
-(a)g Fm(case)p Fr(-based)-42 394 y(heuristic)f(to)f(decide)h(whic)o(h)f
-Fm(switch)p Fr(es)g(to)g(replace:)21 b(rather,)16 b(it)f(alw)o(a)o(ys)f
-(generates)j(a)e Fm(switch)e Fr(for)i(the)h(start)g(state)g(and)-42
-444 y(uses)g Fm(if)p Fr(s)d(for)h(the)g(rest.)20 b(GLA)13
-b(replaces)i Fm(switch)p Fr(es)f(with)f(co)q(de)i(sequences)h(of)e(the)
-g(form:)138 518 y Fm(if\(*YYCURSOR)20 b Fi(in)i Fl(S)505
-524 y Fq(1)524 518 y Fm(\))f(goto)g(L)698 524 y Fq(1)717
-518 y Fm(;)226 562 y(.)226 579 y(.)226 595 y(.)138 645
-y(if\(*YYCURSOR)f Fi(in)i Fl(S)505 651 y Fd(n)528 645
-y Fm(\))f(goto)g(L)702 651 y Fd(n)725 645 y Fm(;)-42
-737 y Fr(Bit)12 b(v)o(ectors)h(are)f(used)h(for)e(all)f(mem)o(b)q
-(ership)g(tests)k(in)o(v)o(olving)9 b(sets)k(with)e(more)g(than)g(one)h
-(elemen)o(t.)17 b(As)12 b(an)g(optimization,)-42 787
-y(if)k(a)f(state)i(has)f(a)g(transition)g(to)g(itself)f(the)i(test)g
-(as)f(to)g(whether)h(to)f(remain)f(in)g(the)i(same)e(state)i(or)f(not)g
-(is)g(p)q(erformed)-42 837 y(\014rst.)25 b(F)m(or)16
-b(example,)e(Figure)i(12)f(sho)o(ws)i(the)f(GLA-generated)h(co)q(de)f
-(for)g(state)g(8)g(in)f(Figure)h(2)1506 822 y Fq(13)1541
-837 y Fr(.)73 b(Note)16 b(the)g(use)h(of)291 926 y Fm(static)j
-(unsigned)g(char)h(yytable[])f(=)i Fk(f)291 976 y Fm(0x00,)e(0x00,)h
-(0x00,)g(0x00,)g(/*)65 b(0.)g(1.)g(2.)f(3.)22 b(*/)291
-1025 y Fl(:)7 b(:)g(:)291 1075 y Fm(0x00,)20 b(0x00,)h(0x00,)g(0x00,)g
-(/*)43 b(,)g(-)h(.)f(/)22 b(*/)291 1125 y(0x01,)e(0x01,)h(0x01,)g
-(0x01,)g(/*)43 b(0)g(1)h(2)f(3)22 b(*/)291 1175 y(0x01,)e(0x01,)h
-(0x01,)g(0x01,)g(/*)43 b(4)g(5)h(6)f(7)22 b(*/)291 1225
-y(0x01,)e(0x01,)h(0x00,)g(0x00,)g(/*)43 b(8)g(9)h(:)f(;)22
-b(*/)291 1275 y(0x00,)e(0x00,)h(0x00,)g(0x00,)g(/*)43
-b(<)g(=)h(>)f(?)22 b(*/)291 1324 y Fl(:)7 b(:)g(:)291
-1374 y Fm(0x00,)20 b(0x00,)h(0x00,)g(0x00)g Fk(g)p Fm(;)g(/*)43
-b(|)h Fk(g)108 b Fm(127.)21 b(*/)378 1419 y(.)378 1435
-y(.)378 1452 y(.)291 1502 y(L8:)g(if\(yytable[\(*YYC)o(URSOR)o(++\)+0)o
-(])e(&)j(1<<0\))e(goto)h(L8;--YYCURSOR;)291 1552 y(goto)g(A3;)527
-1631 y Fr(Figure)14 b(12:)j(GLA)d(co)q(de)h(for)e(state)i(8)e(in)h
-(Figure)g(2.)-42 1731 y(128)i(elemen)o(t)f(en)o(tries)i(for)e(the)i
-(bit)f(v)o(ectors)h(to)e(reduce)j(the)e(scanner)i(size:)k(A)16
-b(GLA-generated)h(scanner)g(will)e(crash)h(or)-42 1781
-y(otherwise)f(b)q(eha)o(v)o(e)g(unpredictably)f(if)f(a)h(non-ASCI)q(I)f
-(c)o(haracter)j(app)q(ears)e(in)g(the)g(source)1395 1766
-y Fq(14)1432 1781 y Fr(.)21 1831 y(In)k(some)g(sense)j(the)e(results)h
-(of)e(Section)h(4)f(are)i(a)e(bit)g(misleading:)26 b(the)19
-b(GLA)f(sp)q(eci\014cation)i(that)e(w)o(as)h(used)h(to)-42
-1880 y(obtain)15 b(the)g(\014gures)h(in)e(T)m(able)g(1)h(is)g(not)f(a)h
-(t)o(ypical)f(GLA)g(sp)q(eci\014cation.)22 b(Usually)14
-b(scanners)j(implem)o(en)o(ted)c(using)i(GLA)-42 1930
-y(will)h(handle)i(k)o(eyw)o(ords)f(as)h(iden)o(ti\014ers)g(as)g(GLA)f
-(has)g(b)q(een)i(optimized)d(for)h(this)g([7)o(].)29
-b(T)m(able)16 b(2)h(presen)o(ts)j(a)d(more)f(fair)-42
-1980 y(comparison:)h(the)e(k)o(eyw)o(ord)f(matc)o(hing)e(rules)j(w)o
-(ere)g(remo)o(v)o(ed)e(from)f(b)q(oth)j(the)f(GLA)g(and)g(RE2C)f(sp)q
-(eci\014cations.)39 b(The)-42 2030 y(RE2C-generated)18
-b(scanners)g(w)o(ere)f(still)e(faster)i(and)g(smaller)d(except)k(on)e
-(the)h(MIPS)g(R4000,)e(where)i(the)g(cc-compiled)-42
-2080 y(GLA)d(scanner)h(w)o(as)f(sligh)o(tly)f(faster.)21
-2130 y(Note)k(ho)o(w)o(ev)o(er,)g(that)g(the)g(RE2C)g(sp)q
-(eci\014cation)g(can)g(b)q(e)g(substan)o(tially)f(sp)q(ed)i(up)f(b)o(y)
-f(using)h(a)f(tec)o(hnique)i(akin)e(to)-42 2179 y(lo)q(op)e(unrolling.)
-i(Replacing)d(the)i(original)d(k)o(eyw)o(ord)h(matc)o(hing)f(rule)j(in)
-e(the)i(RE2C)e(sp)q(eci\014cation)1548 2164 y Fq(15)138
-2252 y Fm(L)22 b(I*)435 b Fk(f)22 b Fm(RET\(ID\);)e Fk(g)-42
-2345 y Fr(with)14 b(the)h(follo)o(wing)c(rules)p -42
-2380 780 2 v -11 2407 a Fn(13)22 2419 y Fo(Actually)m(,)f(GLA)i(w)o
-(ould)f(generate)e(a)i Fg(while)f Fo(statemen)o(t.)j(Most)e(compilers)e
-(will)j(generate)d(the)i(same)f(ob)r(ject)g(co)q(de)g(for)h(b)q(oth.)
--11 2446 y Fn(14)22 2458 y Fo(No)h(c)o(hec)o(ks)e(are)h(made)f(to)h
-(ensure)f(that)g(only)h(7-bit)f(c)o(haracters)f(app)q(ear)h(in)h(the)g
-(input.)-11 2486 y Fn(15)22 2498 y Fg(L)e Fo(=)i Fg([a-zA-Z)p
-215 2498 11 2 v 10 w(])g Fo(and)g Fg(I)e Fo(=)i Fg([a-zA-Z)p
-514 2498 V 10 w(0-9])n Fo(.)913 2748 y Fr(12)p eop
-%%Page: 13 13
-13 12 bop 727 776 a Fr(time)387 b(space)380 826 y(program)p
-557 841 2 50 v 61 w(user)72 b(sys)65 b(total)p 974 841
-V 62 w(text)58 b(data)e(bss)64 b(total)p 355 842 1158
-2 v 850 877 a Fi(R4000)16 b(/)f(gc)n(c2.3.3)g(-O)p 355
-894 V 479 929 a Fr(gla)p 557 944 2 50 v 71 w(2.63)p 703
-944 V 51 w(0.58)p 828 944 V 71 w(3.21)p 974 944 V 50
-w(5040)p 1109 944 V 50 w(2496)p 1243 944 V 51 w(144)p
-1357 944 V 71 w(7680)458 979 y(re2c)p 557 994 V 73 w(2.50)p
-703 994 V 51 w(0.65)p 828 994 V 71 w(3.15)p 974 994 V
-50 w(6448)p 1109 994 V 71 w(512)p 1243 994 V 92 w(0)p
-1357 994 V 72 w(6960)414 1028 y(re2c)g(-s)p 557 1043
-V 72 w(2.49)p 703 1043 V 51 w(0.67)p 828 1043 V 71 w(3.16)p
-974 1043 V 50 w(4976)p 1109 1043 V 50 w(4224)p 1243 1043
-V 92 w(0)p 1357 1043 V 72 w(9200)382 1078 y(re2c)g(-s)f
-Fk(y)p 557 1093 V 72 w Fr(2.08)p 703 1093 V 51 w(0.59)p
-828 1093 V 71 w(2.67)p 974 1093 V 50 w(5792)p 1109 1093
-V 50 w(4224)p 1243 1093 V 92 w(0)p 1357 1093 V 52 w(10016)p
-355 1095 1158 2 v 726 1130 a Fi(R4000)i(/)f(c)n(c2.11.2)g(-O)g(-Olimit)
-e(5000)p 355 1146 V 479 1181 a Fr(gla)p 557 1196 2 50
-v 71 w(2.43)p 703 1196 V 51 w(0.64)p 828 1196 V 71 w(3.07)p
-974 1196 V 50 w(6512)p 1109 1196 V 50 w(2416)p 1243 1196
-V 51 w(128)p 1357 1196 V 71 w(9056)458 1231 y(re2c)p
-557 1246 V 73 w(2.93)p 703 1246 V 51 w(0.67)p 828 1246
-V 71 w(3.60)p 974 1246 V 50 w(8048)p 1109 1246 V 71 w(528)p
-1243 1246 V 92 w(0)p 1357 1246 V 72 w(8576)414 1281 y(re2c)i(-s)p
-557 1296 V 72 w(3.04)p 703 1296 V 51 w(0.64)p 828 1296
-V 71 w(3.68)p 974 1296 V 50 w(9952)p 1109 1296 V 50 w(2208)p
-1243 1296 V 92 w(0)p 1357 1296 V 52 w(12160)p 355 1297
-1158 2 v 838 1332 a Fi(SP)m(AR)o(C)g(/)g(gc)n(c2.3.3)g(-O)p
-355 1349 V 479 1384 a Fr(gla)p 557 1399 2 50 v 71 w(4.08)p
-703 1399 V 51 w(1.65)p 828 1399 V 71 w(5.73)p 974 1399
-V 50 w(5472)p 1109 1399 V 50 w(1656)p 1243 1399 V 51
-w(136)p 1357 1399 V 71 w(7264)458 1434 y(re2c)p 557 1449
-V 73 w(3.77)p 703 1449 V 51 w(1.67)p 828 1449 V 71 w(5.44)p
-974 1449 V 50 w(7008)p 1109 1449 V 113 w(0)p 1243 1449
-V 92 w(0)p 1357 1449 V 72 w(7008)414 1483 y(re2c)g(-s)p
-557 1498 V 72 w(3.66)p 703 1498 V 51 w(2.37)p 828 1498
-V 71 w(6.03)p 974 1498 V 50 w(9112)p 1109 1498 V 113
-w(0)p 1243 1498 V 92 w(0)p 1357 1498 V 72 w(9112)p 355
-1500 1158 2 v 869 1535 a Fi(i486)g(/)g(gc)n(c2.4.5)g(-O)p
-355 1551 V 479 1586 a Fr(gla)p 557 1601 2 50 v 71 w(5.04)p
-703 1601 V 51 w(1.15)p 828 1601 V 71 w(6.19)p 974 1601
-V 50 w(5368)p 1109 1601 V 50 w(1632)p 1243 1601 V 51
-w(108)p 1357 1601 V 71 w(7108)458 1636 y(re2c)p 557 1651
-V 73 w(4.75)p 703 1651 V 51 w(1.17)p 828 1651 V 71 w(5.92)p
-974 1651 V 50 w(5448)p 1109 1651 V 113 w(0)p 1243 1651
-V 92 w(0)p 1357 1651 V 72 w(5448)414 1686 y(re2c)g(-s)p
-557 1701 V 72 w(5.06)p 703 1701 V 51 w(1.13)p 828 1701
-V 71 w(6.19)p 974 1701 V 50 w(8248)p 1109 1701 V 113
-w(0)p 1243 1701 V 92 w(0)p 1357 1701 V 72 w(8248)p 355
-1703 1158 2 v 860 1737 a Fi(68020)h(/)f(gc)n(c1.40)h(-O)p
-355 1754 V 479 1789 a Fr(gla)p 557 1804 2 50 v 51 w(32.69)p
-703 1804 V 50 w(3.37)p 828 1804 V 50 w(36.06)p 974 1804
-V 50 w(4772)p 1109 1804 V 50 w(1632)p 1243 1804 V 51
-w(106)p 1357 1804 V 71 w(6510)458 1839 y(re2c)p 557 1854
-V 53 w(29.86)p 703 1854 V 50 w(3.74)p 828 1854 V 50 w(33.60)p
-974 1854 V 50 w(4468)p 1109 1854 V 113 w(0)p 1243 1854
-V 92 w(0)p 1357 1854 V 72 w(4468)414 1889 y(re2c)f(-s)p
-557 1904 V 52 w(28.77)p 703 1904 V 50 w(3.55)p 828 1904
-V 50 w(32.32)p 974 1904 V 50 w(5616)p 1109 1904 V 113
-w(0)p 1243 1904 V 92 w(0)p 1357 1904 V 72 w(5616)108
-1978 y(T)m(able)i(2:)24 b(Scanner)18 b(p)q(erformance)f(with)g(k)o(eyw)
-o(ords)g(treated)h(as)f(iden)o(ti\014ers.)29 b Fk(y)17
-b Fr(uses)h(an)f(\\unrolled")108 2028 y(sp)q(eci\014cation.)913
-2748 y(13)p eop
-%%Page: 14 14
-14 13 bop 138 185 a Fm(L)501 b Fk(f)22 b Fm(RET\(ID\);)e
-Fk(g)138 235 y Fm(L)i(I)457 b Fk(f)22 b Fm(RET\(ID\);)e
-Fk(g)138 284 y Fm(L)i(I)g(I)413 b Fk(f)22 b Fm(RET\(ID\);)e
-Fk(g)138 334 y Fm(L)i(I)g(I)f(I)370 b Fk(f)22 b Fm(RET\(ID\);)e
-Fk(g)138 384 y Fm(L)i(I)g(I)f(I)h(I)326 b Fk(f)22 b Fm(RET\(ID\);)e
-Fk(g)138 434 y Fm(L)i(I)g(I)f(I)h(I)f(I)283 b Fk(f)22
-b Fm(RET\(ID\);)e Fk(g)138 484 y Fm(L)i(I)g(I)f(I)h(I)f(I)h(I)239
-b Fk(f)22 b Fm(RET\(ID\);)e Fk(g)138 533 y Fm(L)i(I)g(I)f(I)h(I)f(I)h
-(I)f(I)196 b Fk(f)22 b Fm(RET\(ID\);)e Fk(g)138 583 y
-Fm(L)i(I*)435 b Fk(f)22 b Fm(RET\(ID\);)e Fk(g)-42 677
-y Fr(reduces)f(the)e(n)o(um)o(b)q(er)f(of)g(end-of-bu\013er)h(c)o(hec)o
-(ks)h(and)e(results)i(in)e(a)g(signi\014can)o(t)g(sp)q(eed)i(impro)o(v)
-o(emen)o(t)13 b(o)o(v)o(er)k(the)g(GLA-)-42 726 y(generated)f(scanner.)
--42 864 y Fs(6)67 b(Summary)24 b(and)f(F)-6 b(urther)25
-b(W)-6 b(ork)-42 955 y Fr(This)16 b(pap)q(er)h(has)f(describ)q(ed)h
-(RE2C,)e(a)h(to)q(ol)f(for)g(creating)h(lexical)f(analyzers.)24
-b(Unlik)o(e)16 b(other)g(suc)o(h)h(to)q(ols,)e(RE2C)g(con-)-42
-1004 y(cen)o(trates)i(solely)d(on)g(generating)g(e\016cien)o(t)h(co)q
-(de)g(for)f(matc)o(hing)f(regular)h(expressions.)21 b(Not)14
-b(only)g(do)q(es)h(this)g(singleness)-42 1054 y(of)h(purp)q(ose)i(mak)o
-(e)c(RE2C)i(more)g(suitable)g(for)g(a)g(wider)g(v)n(ariet)o(y)g(of)g
-(applications,)f(it)h(allo)o(ws)f(it)h(to)g(generate)i(scanners)-42
-1104 y(whic)o(h)c(approac)o(h)g(hand-crafted)h(scanners)g(in)f(terms)g
-(of)f(size)i(and)e(sp)q(eed.)20 b(Compared)13 b(to)h(scanners)i
-(generated)f(b)o(y)f(\015ex,)-42 1154 y(and)g(GLA,)f(RE2C-generated)i
-(scanners)g(are)g(faster)f(and)g(in)f(man)o(y)f(cases)k(smaller)c(as)i
-(w)o(ell.)21 1204 y(While)g(RE2C-generated)h(scanners)h(p)q(erform)e(w)
-o(ell,)g(there)i(is)e(still)g(ro)q(om)f(for)h(impro)o(v)o(emen)o(t.)k
-(Near)d(term)f(impro)o(v)o(e-)-42 1254 y(men)o(ts)g(include)g(using)f
-(GLA's)h(bit)f(v)o(ectors)i(to)f(simplify)d(some)i Fm(switch)p
-Fr(es)h(and)f(adding)g(a)h(state)h(unrolling)d(op)q(erator.)21
-1303 y(In)i(the)g(longer)g(term,)f(inline)g(actions)h(will)e(b)q(e)i
-(added)h(to)e(RE2C.)g(F)m(or)h(example,)e(a)h(sp)q(eci\014cation)i(lik)
-o(e)138 1386 y Fm(D)22 b Fk(f)p Fm(c)f(=)h($)p Fk(g)f
-Fm(\(D)h Fk(f)p Fm(c)f(=)h(10*c)e(+)i($)p Fk(g)p Fm(\)*)-42
-1469 y Fr(migh)o(t)15 b(b)q(e)i(used)g(to)f(obtain)g(the)h(v)n(alue)f
-(of)g(a)g(previously)g(scanned)i(in)o(teger.)26 b(T)o(ypically)m(,)14
-b(these)k(sorts)g(of)d(sp)q(eci\014cations)-42 1519 y(w)o(ould)f(b)q(e)
-g(used)h(as)f(an)f(action)h(in)f(some)g(other)i(sp)q(eci\014cation.)-42
-1656 y Fs(7)67 b(Ac)n(kno)n(wledgmen)n(ts)-42 1747 y
-Fr(The)15 b(authors)f(thank)g(the)g(referees)j(for)c(their)h(man)o(y)e
-(v)n(aluable)h(commen)o(ts)f(and)i(suggestions.)913 2748
-y(14)p eop
-%%Page: 15 15
-15 14 bop -42 195 a Fs(A)68 b(C)22 b(Scanner)-42 276
-y Fg(#define)16 b(BSIZE)192 b(8192)-42 315 y(#define)16
-b(RET\(i\))174 b({s->cur)15 b(=)i(cursor;)e(return)h(i;})-42
-394 y(#define)g(YYCTYPE)156 b(uchar)-42 433 y(#define)16
-b(YYCURSOR)138 b(cursor)-42 473 y(#define)16 b(YYLIMIT)156
-b(s->lim)-42 512 y(#define)16 b(YYMARKER)138 b(s->ptr)-42
-552 y(#define)16 b(YYFILL\(n\))120 b({cursor)15 b(=)i(fill\(s,)e
-(cursor\);})-42 631 y(typedef)h(struct)f(Scanner)g({)29
-670 y(int)299 b(fd;)29 709 y(uint)281 b(line;)29 749
-y(uchar)263 b(*bot,)16 b(*tok,)g(*ptr,)f(*cur,)h(*pos,)g(*lim,)g(*top,)
-g(*eof;)-42 788 y(})i(Scanner;)-42 867 y(uchar)e(*fill\(Scann)o(er)e
-(*s,)j(uchar)f(*cursor\){)29 907 y(if\(!s->eof)o(\){)100
-946 y(uint)g(cnt)g(=)i(s->tok)d(-)i(s->bot;)100 985 y(if\(cnt\){)d(/*)j
-(move)g(partial)e(token)h(to)g(bottom)g(*/)170 1025 y(memcpy\(s->b)o
-(ot,)e(s->tok,)h(s->lim)g(-)j(s->tok\);)d(s->tok)g(=)i(s->bot;)170
-1064 y(s->ptr)f(-=)h(cnt;)f(cursor)f(-=)i(cnt;)f(s->pos)g(-=)h(cnt;)f
-(s->lim)g(-=)h(cnt;)100 1104 y(})100 1143 y(if\(\(s->to)o(p)e(-)i
-(s->lim\))e(<)i(BSIZE\){)f(/*)g(buffer)g(needs)g(to)h(be)g(expanded)d
-(*/)170 1183 y(uchar)i(*buf)g(=)i(\(uchar*\))c(malloc\(\(\(s-)o(>li)o
-(m)h(-)i(s->bot\))e(+)i(BSIZE\)*size)o(of\()o(uch)o(ar\))o(\);)170
-1222 y(memcpy\(buf,)d(s->tok,)h(s->lim)h(-)h(s->tok\);)e(s->tok)g(=)i
-(buf;)170 1262 y(s->ptr)f(=)h(&buf[s->pt)o(r)e(-)i(s->bot];)e(cursor)g
-(=)j(&buf[curs)o(or)c(-)k(s->bot];)170 1301 y(s->pos)e(=)h(&buf[s->po)o
-(s)e(-)i(s->bot];)e(s->lim)g(=)j(&buf[s->l)o(im)c(-)k(s->bot];)170
-1340 y(s->top)e(=)h(&s->lim[BS)o(IZE)o(];)170 1380 y(free\(s->bot)o
-(\);)d(s->bot)i(=)h(buf;)100 1419 y(})100 1459 y(if\(\(cnt)e(=)i
-(read\(s->fd)o(,)e(\(char*\))g(s->lim,)g(BSIZE\)\))g(!=)i(BSIZE\){)e
-(/*)i(EOF)g(*/)170 1498 y(s->eof)f(=)h(&s->lim[cn)o(t];)d(*\(s->eof\)+)
-o(+)h(=)i('\\n';)100 1538 y(})100 1577 y(s->lim)e(+=)i(cnt;)29
-1616 y(})29 1656 y(return)f(cursor;)-42 1695 y(})-42
-1774 y(int)h(scan\(Scann)o(er)d(*s\){)100 1814 y(uchar)h(*cursor)h(=)h
-(s->cur;)-42 1853 y(std:)70 b(s->tok)15 b(=)i(cursor;)-42
-1892 y(/*!re2c)100 1932 y("/*")157 b({)17 b(goto)f(comment;)f(})-42
-2013 y Fc(:)6 b(:)g(:)11 b Fb(mor)n(e)j(rules)e Fc(:)6
-b(:)g(:)100 2086 y Fg([)17 b(\\t\\v\\f]+)50 b({)17 b(goto)f(std;)h(})
-100 2125 y("\\n")157 b({)17 b(if\(cursor)e(==)i(s->eof\))e(RET\(EOI\);)
-f(s->pos)i(=)h(cursor;)e(s->line++;)364 2164 y(goto)h(std;)h(})100
-2204 y([\\000-\\37)o(7])32 b({)17 b(printf\("une)o(xpe)o(cte)o(d)d
-(character:)h('\045c'\\n",)f(*s->tok\);)364 2243 y(goto)i(std;)h(})-42
-2283 y(*/)-42 2322 y(comment:)-42 2362 y(/*!re2c)100
-2401 y("*/")157 b({)17 b(goto)f(std;)h(})100 2440 y("\\n")157
-b({)17 b(if\(cursor)e(==)i(s->eof\))e(RET\(EOI\);)f(s->tok)i(=)h
-(s->pos)e(=)j(cursor;)d(s->line++;)364 2480 y(goto)h(comment;)f(})100
-2519 y([\\000-\\37)o(7])32 b({)17 b(goto)f(comment;)f(})-42
-2559 y(*/)-42 2598 y(})913 2748 y Fr(15)p eop
-%%Page: 16 16
-16 15 bop -42 195 a Fs(References)-21 286 y Fr([1])20
-b Fa(Aho,)d(A.)g(V.,)f(Sethi,)h(R.,)h(and)f(Ullman,)h(J.)e(D.)21
-b Fi(Compilers:)e(principles,)c(te)n(chniques,)h(and)g(to)n(ols)p
-Fr(.)k(Addison-)44 336 y(W)m(esley)m(,)13 b(1988.)k(Reprin)o(ted)d
-(with)f(corrections.)-21 419 y([2])20 b Fa(Bernstein,)c(R.)f(L.)k
-Fr(Pro)q(ducing)13 b(go)q(o)q(d)g(co)q(de)i(for)e(the)h(case)g
-(statemen)o(t.)j Fi(Softwar)n(e{Pr)n(actic)n(e)d(and)h(Exp)n(erienc)n
-(e)g(15)p Fr(,)44 469 y(10)e(\(Octob)q(er)j(1985\),)c(1021{1024.)-21
-552 y([3])20 b Fa(DeRemer,)e(F.,)f(and)g(Pennello,)i(T.)h
-Fr(E\016cien)o(t)15 b(computation)e(of)h Fl(LALR)p Fr(\(1\))h(lo)q
-(ok-ahead)f(sets.)21 b Fi(A)o(CM)15 b(T)m(r)n(ans-)44
-602 y(actions)g(on)g(Pr)n(o)n(gr)n(amming)g(L)n(anguages)h(and)f
-(Systems)g(4)p Fr(,)f(4)g(\(Octob)q(er)h(1982\),)e(615{649.)-21
-685 y([4])20 b Fa(Ellis,)c(M.,)g(and)g(Str)o(oustr)o(up,)h(B.)i
-Fi(The)c(A)o(nnotate)n(d)h(C++)e(R)n(efer)n(enc)n(e)h(Manual)p
-Fr(.)j(Addison-W)m(esley)m(,)13 b(1990.)-21 768 y([5])20
-b Fa(Fraser,)c(C.)f(W.,)h(and)g(Hanson,)h(D.)f(R.)i Fr(A)c
-(retargetable)g(compiler)e(for)h(ANSI)h(C.)j Fi(SIGPLAN)e(Notic)n(es)f
-(26)p Fr(,)g(10)44 817 y(\(Octob)q(er)h(1991\),)e(29{43.)-21
-900 y([6])20 b Fa(Garey,)g(M.)d(R.,)i(and)g(Johnson,)h(D.)e(S.)25
-b Fi(Computers)16 b(and)h(Intr)n(actability:)k(A)c(Guide)g(to)f(the)h
-(The)n(ory)f(of)h(NP-)44 950 y(Completeness)p Fr(.)h(W.)13
-b(H.)g(F)m(reeman)g(and)h(Compan)o(y)m(,)d(1991.)-21
-1033 y([7])20 b Fa(Gra)m(y,)14 b(R.)e(W.)g Fl(\015)r
-Fr(-GLA)e(-)g(A)g(generator)g(for)g(lexical)f(analyzers)h(that)g
-(programmers)e(can)i(use.)i Fi(USENIX)g(Confer)n(enc)n(e)44
-1083 y(Pr)n(o)n(c)n(e)n(e)n(dings)17 b Fr(\(June)e(1988\),)d(147{160.)
--21 1166 y([8])20 b Fa(Gra)m(y,)c(R.)f(W.,)g(Heuring,)g(V.)f(P.,)h
-(Levi,)h(S.)f(P.,)g(Slo)o(ane,)i(A.)d(M.,)h(and)g(W)-5
-b(aite,)15 b(W.)g(M.)h Fr(Eli:)h(A)c(complete,)44 1216
-y(\015exible)h(compiler)e(construction)j(system.)j Fi(Communic)n
-(ations)d(of)g(the)g(A)o(CM)f(35)p Fr(,)g(2)g(\(F)m(ebruary)g(1992\),)f
-(121{131.)-21 1299 y([9])20 b Fa(Gr)o(osch,)e(J.)i Fr(E\016cien)o(t)15
-b(generation)g(of)f(lexical)f(analysers.)21 b Fi(Softwar)n(e{Pr)n
-(actic)n(e)15 b(and)h(Exp)n(erienc)n(e)g(19)p Fr(,)f(11)f(\(1989\),)44
-1349 y(1089{1103.)-42 1432 y([10])20 b Fa(Harrison,)c(M.)g(A.)j
-Fi(Intr)n(o)n(duction)c(to)g(F)m(ormal)f(L)n(anguage)i(The)n(ory)p
-Fr(.)i(Addison-W)m(esley)m(,)13 b(1978.)-42 1515 y([11])20
-b Fa(Hennessy,)15 b(J.)e(L.,)i(and)f(Mendelsohn,)i(N.)f
-Fr(Compilation)8 b(of)j(the)h(Pascal)g(case)g(statemen)o(t.)i
-Fi(Softwar)n(e{Pr)n(actic)n(e)44 1565 y(and)h(Exp)n(erienc)n(e)h(12)p
-Fr(,)d(9)h(\(Septem)o(b)q(er)h(1982\),)d(879{882.)-42
-1648 y([12])20 b Fa(Horspool,)c(R.)g(N.,)f(and)g(Whitney,)h(M.)h
-Fr(Ev)o(en)d(faster)g(LR)e(parsing.)k Fi(Softwar)n(e{Pr)n(actic)n(e)d
-(and)i(Exp)n(erienc)n(e)g(20)p Fr(,)44 1697 y(6)e(\(1990\),)g(515{535.)
--42 1780 y([13])20 b Fa(Ja)o(cobson,)d(V.)i Fr(T)m(uning)14
-b(UNIX)g(Lex)h(or)f(it's)f(NOT)i(true)g(what)f(they)h(sa)o(y)f(ab)q
-(out)g(Lex.)19 b(In)14 b Fi(USENIX)i(Confer)n(enc)n(e)44
-1830 y(Pr)n(o)n(c)n(e)n(e)n(dings)h Fr(\(W)m(ashington,)12
-b(DC,)h(Win)o(ter)h(1987\),)f(pp.)g(163{164.)j(Abstract)f(only)m(.)-42
-1913 y([14])20 b Fa(Kernighan,)h(B.)e(W.,)h(and)g(Ritchie,)f(D.)h(M.)28
-b Fi(The)18 b(C)f(Pr)n(o)n(gr)n(amming)g(L)n(anguage,)i(2nd)g(Ed.)28
-b Fr(Pren)o(tice-Hall,)44 1963 y(Inc.,)13 b(1988.)-42
-2046 y([15])20 b Fa(Lesk,)25 b(M.)e(E.)38 b Fr(LEX)20
-b({)g(a)g(lexical)g(analyzer)g(generator.)38 b(Computing)18
-b(Science)k(T)m(ec)o(hnical)e(Rep)q(ort)h(39,)g(Bell)44
-2096 y(T)m(elephone)14 b(Lab)q(oratories,)g(Murra)o(y)g(Hill,)e(NJ,)h
-(1975.)-42 2179 y([16])20 b Fa(P)l(axson,)e(V.)h Fr(\015ex)14
-b({)g(man)e(pages,)i(1988.)j(In)d Ff(\015ex-2.3.7.ta)o(r.Z)p
-Fr(.)e(Av)n(ailable)g(for)i(anon)o(ymous)e(ftp)i(from)e
-Ff(ftp.uu.net)j Fr(in)44 2229 y Ff(/pack)o(ages/gnu)p
-Fr(.)-42 2312 y([17])20 b Fa(Pennello,)k(T.)d(J.)33 b
-Fr(V)m(ery)19 b(fast)g(LR)f(parsing.)33 b(In)19 b Fi(Pr)n(o)n(c)n(e)n
-(e)n(dings)g(of)g(the)h(A)o(CM)f(SIGPLAN'86)h(Symp)n(osium)g(on)44
-2362 y(Compiler)14 b(Construction)j Fr(\(July)c(1986\),)g(A)o(CM.)-42
-2445 y([18])20 b Fa(Sale,)g(A.)25 b Fr(The)17 b(implemen)o(tatio)o(n)c
-(of)j(case)h(statemen)o(ts)g(in)e(Pascal.)25 b Fi(Softwar)n(e{Pr)n
-(actic)n(e)16 b(and)i(Exp)n(erienc)n(e)f(11)p Fr(,)g(9)44
-2494 y(\(Septem)o(b)q(er)d(1981\),)f(929{942.)913 2748
-y(16)p eop
-%%Trailer
-end
-userdict /end-hook known{end-hook}if
-%%EOF
\documentclass{article}
-\usepackage[margin=2cm]{geometry}
+\usepackage[margin=1.9cm]{geometry}
\usepackage{amsmath,amssymb,amsthm,amsfonts}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[justification=centering]{caption}
\usepackage{url}
\usepackage{multicol}\setlength{\columnsep}{1cm}
-%\usepackage[vlined]{algorithm2e}\setlength{\algomargin}{0em}\SetArgSty{textnormal}
\usepackage[noline,noend]{algorithm2e}
\setlength{\algomargin}{0em}
\SetArgSty{textnormal}
\title{Tagged Deterministic Finite Automata with Lookahead}
\author{Ulya Trofimovich\\
-\texttt{\small{skvadrik@.gmail.com}}}
+\texttt{\small{skvadrik@gmail.com}}}
\date{August 2017}
\begin{document}
in particular, Kleene raised the question whether regular events could be reformulated
as a deductive system based on logical axioms and algebraic laws.
This question was thoroughly investigated by many authors (see \cite{Koz94} for a historic overview)
-and the formalism became known as \emph{the algebra of regular events} %$\mathcal{K} \Xeq (K, +, \cdot, *, 1, 0)$
+and the formalism became known as \emph{the algebra of regular events}
or, more generally, the \emph{Kleene algebra} $\mathcal{K} \Xeq (K, +, \cdot, *, 1, 0)$.
Several different axiomatizations of Kleene algebra were given;
in particular, Kozen gave a finitary axiomatization based on equations and equational implications and sound for all interpretations \cite{Koz94}.
\item[] $(e^*)$, where $e$ is a RE over $\Sigma$ (\emph{iteration})
\medskip
\end{enumerate}
- $\square$
\end{Xdef}
The usual assumption is that iteration has precedence over product and product has precedence over sum,
\begin{Xdef}
\emph{Language} over $\Sigma$ is a subset of $\Sigma^*$.
- $\square$
\end{Xdef}
\begin{Xdef}\label{langunion}
\emph{Union} of two languages $L_1$ and $L_2$ is
$L_1 \cup L_2 = \{ x \mid x \Xin L_1 \vee x \Xin L_2 \}$
- $\square$
\end{Xdef}
\begin{Xdef}\label{langproduct}
\emph{Product} of two languages $L_1$ and $L_2$ is
$L_1 \cdot L_2 = \{ x_1 x_2 \mid x_1 \Xin L_1 \wedge x_2 \Xin L_2 \}$
- $\square$
\end{Xdef}
\begin{Xdef}\label{langiterate}
\{ \epsilon \} & \text{if } n \Xeq 0 \\[-0.5em]
L \cdot L^{n - 1} & \text{if } n\!>\!0
\end{cases}$$
- $\square$
\end{Xdef}
\begin{Xdef}\label{langiterate}
\emph{Iterate} of language $L$ is
$L^* = \bigcup\limits_{n = 0}^\infty L^n$.
- $\square$
\end{Xdef}
\begin{Xdef}
\XL \Xlb e_1 e_2 \Xrb &= \XL \Xlb e_1 \Xrb \cdot \XL \Xlb e_2 \Xrb \\
\XL \Xlb e^* \Xrb &= \XL \Xlb e \Xrb ^*
\end{align*}
- $\square$
\end{Xdef}
Other interpretations are also possible;
\begin{Xdef}
Language $L$ over $\Sigma$ is \emph{regular} iff exists RE $e$ over $\Sigma$
such that $L$ is denoted by $e$: $\XL \Xlb e \Xrb \Xeq L$.
- $\square$
\end{Xdef}
For the most useful RE there are special shortcuts:
\hphantom{\qquad} and $0 \!\leq\! n \!\leq\! m \!\leq\! \infty$ (\emph{repetition})
\medskip
\end{enumerate}
- $\square$
\end{Xdef}
As usual, we assume that repetition has precedence over product and product has precedence over sum,
and redundant parentheses may be omitted.
Additionally, the following shorthand notation may be used:
\begin{align*}
-% e^n &\quad\text{for}\quad \overbrace{e \dots e}^{n} \\[-0.5em]
-% e^{n,m} &\quad\text{for}\quad e^{n-1} e^{1,m-n} \\[-0.5em]
e^* &\quad\text{for}\quad e^{0,\infty} \\[-0.5em]
e^+ &\quad\text{for}\quad e^{1,\infty} \\[-0.5em]
e^? &\quad\text{for}\quad e^{0,1} \\[-0.5em]
TRE over $\Sigma$, $T$ is \emph{well-formed} iff
all tags in it are pairwise different
and $T \Xeq \{ 1, \dots, |T| \}$.
- $\square$
We will consider only well-formed TRE.
\end{Xdef}
\XS \Xlb e_1 e_2 \Xrb &= \XS \Xlb e_1 \Xrb \cdot \XS \Xlb e_2 \Xrb \\
\XS \Xlb e^{n,m} \Xrb &= \bigcup\limits_{i=n}^m \XS \Xlb e \Xrb ^i
\end{align*}
- $\square$
\end{Xdef}
On the other hand, if we interpret tags as symbols, then every TRE over $\Sigma$, $T$ is a RE over the joined alphabet $\Sigma \cup T$.
\chi(e) &= \Xbar{t_1} \dots \Xbar{t_n}, \text{ such that} \\
&t_1 \dots t_n \text{ are all tags in } e
\end{align*}
- $\square$
\end{Xdef}
\begin{Xdef}\label{deftlang}
TRE over $\Sigma$, $T$ denotes a language over $\Sigma \cup T \cup \Xbar{T}$:
$\XT \Xlb e \Xrb = \XL \Xlb \widetilde{e} \Xrb$, where $\widetilde{e}$ is a RE
syntactically identical to TRE $\XX(e)$.
- $\square$
\end{Xdef}
The language over $\Sigma \cup T \cup \Xbar{T}$ is called \emph{T-language}
\gamma_i &\text{if } \gamma_i \Xin \Sigma \\[-0.5em]
\epsilon &\text{otherwise}
\end{cases}$$
- $\square$
\end{Xdef}
It is easy to see that for any TRE $e$, $\XS \Xlb e \Xrb$
\begin{Xdef}
T-strings $x$ and $y$ are \emph{ambiguous} iff $x \!\neq\! y$ and $S(x) \Xeq S(y)$.
- $\square$
\end{Xdef}
We can define equivalence relation $\simeq$ on the T-language: let $x \simeq y \Leftrightarrow S(x) \Xeq S(y)$.
for each subset of pairwise ambiguous T-strings
it is total ($\forall$ ambiguous $x, y \Xin L$: either $x \prec y$ or $y \prec x$),
and the minimal T-string in this subset exists ($\exists x \Xin L: \forall y \Xin L \mid$ ambiguous $x, y: x \prec y$).
- $\square$
\end{Xdef}
We will return to disambiguation in section \ref{section_disambiguation}.
|S(\gamma_1 \dots \gamma_i)| &\text{if } \gamma_i \Xeq t \\[-0.5em]
\epsilon &\text{otherwise}
\end{cases}$$
- $\square$
\end{Xdef}
Negative submatches have no exact offset: they can be attributed to any point on the alternative path of TRE.
\item[] $\Delta^\Sigma \subseteq Q \times \Sigma \times \{\epsilon\} \times Q$
\item[] $\Delta^\epsilon \subseteq Q \times (P \cup \{\epsilon\}) \times (T \cup \Xbar{T} \cup \{\epsilon\}) \times Q$
\end{itemize}
-
-% \item[] $\Delta \Xeq \Delta^\Sigma \sqcup \Delta^\epsilon \sqcup \Delta^T \sqcup \Delta^P$ is the \emph{transition} relation, which includes
-% transitions on symbols, $\epsilon$-transitions, tagged $\epsilon$-transitions and prioritized $\epsilon$-transitions:
-% \begin{itemize}
-% \item[] $\Delta^\Sigma \subseteq Q \times \Sigma \times \{\epsilon\} \times Q$
-% \item[] $\Delta^\epsilon \subseteq Q \times \{\epsilon\} \times \{\epsilon\} \times Q$
-% \item[] $\Delta^T \subseteq Q \times \{\epsilon\} \times (T \cup \Xbar{T}) \times Q$
-% \item[] $\Delta^P \subseteq Q \times P \times \{\epsilon\} \times Q$
-% \end{itemize}
-
and all $\epsilon$-transitions from the same state have different priorities:
$\forall (x, r, \epsilon, y), (\widetilde{x}, \widetilde{r}, \epsilon, \widetilde{y}) \Xin \Delta^\epsilon:
x \Xeq \widetilde{x} \wedge y \Xeq \widetilde{y} \Rightarrow r \!\neq\! \widetilde{r}$.
\end{itemize}
- $\square$
\end{Xdef}
TNFA construction is similar to Thompson NFA construction,
\end{align*}
%
\begin{Xfig}
-\includegraphics[width=0.3\linewidth]{img/tnfa/union.png}\\*
+\includegraphics[width=0.3\linewidth]{img/tnfa_union.png}\\*
\captionof{figure}{Automata union.}
\end{Xfig}
%
\end{align*}
%
\begin{Xfig}
-\includegraphics[width=0.25\linewidth]{img/tnfa/concat.png}\\*
+\includegraphics[width=0.25\linewidth]{img/tnfa_concat.png}\\*
\captionof{figure}{Automata product.}
\end{Xfig}
%
\end{align*}
%
\begin{Xfig}
-\includegraphics[width=0.55\linewidth]{img/tnfa/repeat_unbound.png}\\*
+\includegraphics[width=0.55\linewidth]{img/tnfa_repeat_unbound.png}\\*
\captionof{figure}{Unbounded repetition of automata.}
\end{Xfig}
%
\end{align*}
%
\begin{Xfig}
-\includegraphics[width=0.9\linewidth]{img/tnfa/repeat_bound.png}\\*
+\includegraphics[width=0.9\linewidth]{img/tnfa_repeat_bound.png}\\*
\captionof{figure}{Bounded repetition of automata.}
\end{Xfig}
A \emph{path} in TNFA $(\Sigma, T, P, Q, F, q_0, \Delta)$ is a sequence of transitions
$\{(q_i, \alpha_i, a_i, \widetilde{q}_i)\}_{i=1}^n \subseteq \Delta$, where $n \!\geq\! 0$
and $\widetilde{q}_i \Xeq q_{i+1} \; \forall i \Xeq \overline{1,n-1}$.
- $\square$
\end{Xdef}
\begin{Xdef}
Path $\{(q_i, \alpha_i, a_i, \widetilde{q}_i)\}_{i=1}^n$ in TNFA $(\Sigma, T, P, Q, F, q_0, \Delta)$ is \emph{accepting}
if either $n \Xeq 0 \wedge q_0 \Xin F$ or $n\!>\!0 \wedge q_1 \Xeq q_0 \wedge \widetilde{q}_n \Xin F$.
- $\square$
\end{Xdef}
\begin{Xdef}
\epsilon &\text{otherwise}
\end{cases}
\end{align*}
- $\square$
\end{Xdef}
\begin{Xdef}
TNFA $\XN$ \emph{transduces} S-string $s$ to a T-string $x$, denoted $s \xrightarrow{\XN} x$
if $s \Xeq S(x)$ and there is an accepting path $\pi$ in $\XN$, such that $\XT(\pi) \Xeq x$.
- $\square$
\end{Xdef}
The set of all S-strings that are transduced to some T-string is the \emph{input language} of TNFA;
$\pi_2 \Xeq \{(p_i, \beta_i, b_i, \widetilde{p}_i)\}_{i=1}^m$
are \emph{ambiguous} if their start and end states coincide: $q_1 \Xeq p_1$, $\widetilde{q}_n \Xeq \widetilde{p}_m$
and their induced T-strings $\XT(\pi_1)$ and $\XT(\pi_2)$ are ambiguous.
- $\square$
\end{Xdef}
\begin{Xdef}
so that for any ambiguous paths $\pi_1 $, $\pi_2 $ in TNFA $\XN \Xlb e \Xrb$
and any common suffix $\pi_3$ the following holds:
$\XT(\pi_1) \prec \XT(\pi_2) \Leftrightarrow \XT(\pi_1 \pi_3) \prec \XT(\pi_2 \pi_3)$.
- $\square$
\end{Xdef}
The problem of closure construction can be expressed in terms of single-source shortest-path problem
\begin{multicols}{2}
-%\end{multicols}
-%\begin{minipage}{\linewidth}
-%\begin{center}\includegraphics[width=\linewidth]{img/plot_acyc_neg_both.png}
-%\\
-%\small{Behavior of LAU, LAU1 and GOR algorithms on Acyc-Neg family
-%(left -- normal scale, right -- logarithmic scale on both axes).}
-%\end{center}
-%\end{minipage}
-%\begin{minipage}{\linewidth}
-%\begin{center}\includegraphics[width=\linewidth]{img/plot_grid_nhard_both.png}
-%\\
-%\small{Behavior of LAU, LAU1 and GOR algorithms on Grid-NHard family
-%(left -- normal scale, right -- logarithmic scale on both axes).}
-%\end{center}
-%\end{minipage}
-%\\
-%\begin{multicols}{2}
-
\section{Disambiguation}\label{section_disambiguation}
In section \ref{section_tagged_extension} we defined disambiguation policy as strict partial order on the T-language of the given TRE.
if there is a nonempty loop in TNFA, determinization must eventually construct a loop in TDFA
(otherwise it won't terminate).
To do this, determinization must establish \emph{equivalence} of two TDFA states.
-%We cannot define equivalence as exact coincidence: if there is a loop, histories in one state are prefixes of histories in the other.
-%But we can use a weaker definition:
From disambiguation point of view equivalence means that all ambiguities stemming from one state
are resolved in the same way as ambiguities stemming from the other.
However, we cannot demand exact coincidence of all state attributes engaged in disambiguation:
Paths that contain $\epsilon$-loops are called \emph{problematic} (see \cite{Gra15}, definition 3.28).
If we limit ourselves to non-problematic paths (e.g. by cancelling loops in $\epsilon$-closure),
then the minimal element exists and bitcodes are well-ordered.
-%The following lemma states an important property of bitcodes induced by paths gathered by $\epsilon$-closure:
\begin{XLem}\label{lemma_bitcodes}
Let $\Pi$ be a set of TNFA paths that start in the same state, induce the same S-string and end in a core state
}
\end{algorithm}
-%Disambiguation algorithm should compare individual subhistories, not histories as a whole.
-%The number of subhistories depends on the number of iterations of enclosing repetition subexpressions.
Due to the hierarchical nature of POSIX disambiguation, if comparison reaches $i$-th subexpression,
it means that all enclosing subexpressions have already been compared and their tags coincide.
Consequently the number of subhistories of tags $2i - 1$ and $2i$ in the compared T-strings must be equal.
and for $t$ the conditions of lemma are satisfied.
Let $r$ be the start tag of a subexpression in which $t$ is immediately enclosed.
Since $r \!<\! t$, the lemma is true for $r$ by inductive hypothesis;
-%let $history(x, r) \Xeq C_1 \dots C_m$, $history(y, r) \Xeq D_1 \dots D_m$ and
let $c_1 \dots c_m$, $d_1 \dots d_m$ be the corresponding path decompositions.
Each subhistory of $t$ is covered by some subhistory of $r$ (by definition $history$ doesn't break at lower-priority tags),
therefore decompositions $a_1 \dots a_n$, $b_1 \dots b_n$ can be constructed as a refinement of $c_1 \dots c_m$, $d_1 \dots d_m$.
By construction of TNFA for $e_1 | e_2$
all paths through it contain a single $t$-tagged transition at the very end (either positive or negative).
Therefore both $\varnothing$ and non-$\varnothing$ must be discovered at the same step when ambiguous paths join.
-%subautomata for $e_1$ and $e_2$ contain a single $t$-tagged transition at the very end (positive and negative respectively).
$\square$
\end{XLem}
$A_1 \dots A_m \Xset \epsilon \Xund history(x_i, t)$ \;
$B_i \Xset A_m$ \;
\lIf {$m \Xeq 1$} {$B_i \Xset o_i(t) B_i$}
-% \If {$m \Xeq 1$ and ($orbit(t)$ or $B_i \Xeq \epsilon$)} {
-% $B_i \Xset o_{i t} B_i$ \;
-% }
}
\BlankLine
$\{(p_i, C_i)\} \Xset $ sort $\{(i, B_i)\}$ by second component using inverted $\prec_{subhistory}$ \;
$A_1 \Xset a A_1$ \;
$B_1 \Xset b B_1$ \;
-% $A_1 \dots A_n \Xset \epsilon \Xund history(x, 2t), \; a \Xset ox_{2t}$ \;
-% $B_1 \dots B_n \Xset \epsilon \Xund history(y, 2t), \; b \Xset oy_{2t}$ \;
-% \If {$orbit(2t)$} {
-% $A_1 \Xset a A_1$ \;
-% $B_1 \Xset b B_1$ \;
-% } \Else {
-% \lIf {$A_1 \Xeq \epsilon$} {$A_1 \Xset a$}
-% \lIf {$B_1 \Xeq \epsilon$} {$B_1 \Xset b$}
-% }
-
\For {$i \Xeq \overline{1, n}$} {
\lIf {$A_i \!\neq\! B_i$} {\Return $A_i \prec_{subhistory} B_i$}
}
They are probably not many: POSIX RE use the same operator for grouping and submatching,
and compound expressions usually need grouping to override operator precedence,
so it is uncommon to construct a large RE without submatches.
-%(otherwise union cannot be enclosed in concatenation and repetition of non-atomic subexpressions cannot be used at all).
However, fictive tags must be inserted into RE; neither Laurikari nor Kuklewicz mention it,
but both their libraries seem to do it (judging by the source code).
\\
Laurikari determinization algorithm has the same basic principle as the usual powerset construction (see e.g. \cite{HU90}, Theorem 2.1 on page 22):
simulation of nondeterministic automaton on all possible inputs combined with merging of equivalent states.
The most tricky part is merging: extended configuration sets are no longer equal, as they contain absolute tag values.
-%(in fact, they cannot coincide in case of tagged non-empty loops in TNFA).
In section \ref{section_disambiguation} we solved similar problem with respect to disambiguation
by moving from absolute T-strings to relative ordinals.
However, this wouldn't work with tag values, as we need the exact offsets.
is the \emph{register initialize} function
\end{itemize}
where $\YB$ is the boolean set $\{0,1\}$.
- $\square$
\end{Xdef}
Operations on registers are associated with transitions, final states and start state,
(also called \emph{one-pass} in \cite{Cox10}).
As with LR(0) and LR(1), many RE are tag-deterministic with respect to TDFA(1), but not TDFA(0).
Unlike LR automata, TDFA with conflicts are correct, but they can be very inefficient:
-%tags with high degree of nondeterminizm induce a lot of register operations.
the higher tag's degree of nondeterminism, the more registers it takes to hold its values,
and the more operations are required to manage these registers.
Deterministic tags need only a single register and can be implemented without copy operations.
Determinization algorithm can handle both POSIX and leftmost greedy policies,
but in the latter case it can be simplified to avoid explicit calculation of ordinals, as discussed in section \ref{section_disambiguation}.
-%\begin{Xfig}\label{fig_det}
\begin{figure*}
+\begin{algorithm}[H] \DontPrintSemicolon \SetKw{Let}{let} \SetKw{Und}{undefined} \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
\begin{multicols}{2}
- \begin{algorithm}[H] \DontPrintSemicolon \SetKw{Let}{let} \SetKw{Und}{undefined} \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
\Fn {$\underline{determinization(\XN \Xeq (\Sigma, T, Q, F, q_0, T, \Delta), \ell)} \smallskip$} {
-% \Indm
\tcc {initialization}
\Let $initord(t) \Xeq 0$ \;
\BlankLine
\tcc {final state and reg-finalize function}
-% \If {$X$ contains configuration $(q, v, o, x)$ with final state $q \Xin F$} {
\If {exists $(q, v, o, x) \Xin X \mid q \Xin F$} {
add $X$ to $\YF$ \;
\ForEach {tag $t \Xin T$} {
\Let $R \Xeq \{ 1, \dots, maxreg \}$ \;
\Return $(\Sigma, T, \YQ, \YF, Q_0, R, \delta, \zeta, \eta, \iota)$ \;
}
- \end{algorithm}
+ \BlankLine
+ \BlankLine
- \begin{algorithm}[H] \DontPrintSemicolon \SetKw{Let}{let} \SetKw{Und}{undefined} \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
\Fn {$\underline{op(x, t)} \smallskip$} {
-% \lIf {$x \Xeq \epsilon$} {\Return $\epsilon$}
-% \Let $x \Xeq a y$
-% \Switch {$a$} {
-% \lCase {$\Xbar{t}$} {\Return $0 \cdot op(y, t)$}
-% \lCase {$t$} {\Return $1 \cdot op(y, t)$}
-% \lOther {\Return $op(y, t)$}
-% }
\Switch {$x$} {
\lCase {$\epsilon$} {\Return $\epsilon$}
\lCase {$\Xbar{t} y$} {\Return $0 \cdot op(y, t)$}
\lCase {$a y$} {\Return $op(y, t)$}
}
}
- \end{algorithm}
+ \vfill\null
+
+\columnbreak
- \begin{algorithm}[H] \DontPrintSemicolon \SetKw{Let}{let} \SetKw{Und}{undefined} \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
\Fn {$\underline{closure(\XN, lookahead, X, maxreg, newreg)} \smallskip$} {
\tcc {construct closure and update ordinals}
$regops \Xset \{(newreg(o), r, h) | o \Xeq (t, r, h) \Xin newops\}$ \;
\Return $(X, regops, maxreg, newreg)$ \;
}
- \end{algorithm}
+ \BlankLine
+ \BlankLine
- \begin{algorithm}[H] \DontPrintSemicolon \SetKw{Let}{let} \SetKw{Und}{undefined} \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
\Fn {$\underline{map(X, Y, T, ops)} \smallskip$} {
\Let $xregs(t) \Xeq \{v(t) \mid (q, v, o, x) \Xin X \}$ \;
\Let $yregs(t) \Xeq \{v(t) \mid (q, v, o, x) \Xin Y \}$ \;
\BlankLine
-% \If {exists bijection $M$ between states $X$ and $Y$,
-% and for each tag $t \Xin T$ exists bijection $m(t)$ between $xregs(t)$ and $yregs(t)$, such that
-% corresponding configurations $(q, v, o, x)$, $(\widetilde{q}, \widetilde{v}, \widetilde{o}, \widetilde{x})$ in $M$
-% have equal states $q \Xeq \widetilde{q}$, equal ordinals $o \Xeq \widetilde{o}$,
-% equal lookahead operations $op(x, t) \Xeq op(\widetilde{x}, t)$ $\forall t \Xin T$
-% and their registers correspond $(v(t), \widetilde{v}(t)) \Xin m(t)$ $\forall t \Xin T$,
-% } {
-
\tcc {map one state to the other
so that the corresponding configurations have equal TNFA states, ordinals and lookahead operations,
and there is bijection between registers}
and $(v(t), \widetilde{v}(t)) \Xin m(t)$,
} {
-% \If {exists bijection $M: X \leftrightarrow Y$,
-% and for each tag $t \Xin T$ exists bijection $m(t): xregs(t) \leftrightarrow yregs(t)$, such that
-% corresponding configurations $(q, v, o, x)$, $(\widetilde{q}, \widetilde{v}, \widetilde{o}, \widetilde{x})$ in $M$
-% have equal states $q \Xeq \widetilde{q}$, equal ordinals $o \Xeq \widetilde{o}$,
-% equal lookahead operations $op(x, t)$ $\Xeq$ $op(\widetilde{x}, t)$ $\forall t \Xin T$
-% and their registers correspond $(v(t), \widetilde{v}(t)) \Xin m(t)$ $\forall t \Xin T$,
-% } {
-
\Let $m \Xeq \bigcup_{t \in T} m(t)$ \;
\tcc {fix target register in existing operations}
\Return \Und
}
}
- \end{algorithm}
\end{multicols}
+\end{algorithm}
\begin{center}
\caption{Determinization algorithm.\\
Functions $reach'$ and $closure'$ are exactly as
}
\end{center}
\end{figure*}
-%\end{Xfig}
\begin{XThe}
Determinization algorithm terminates.
\end{multicols}
\begin{Xfig}
-\includegraphics[width=0.9\linewidth]{img/example1/all.png}\\*
+\includegraphics[width=0.9\linewidth]{img/example1_all.png}\\*
\textbf{Example 1.} $a^* 1 b^*$ (the TRE mentioned in the introduction).\\*
(a) --- TNFA, (b) --- construction of TDFA(0), (c) --- TDFA(0), (d) --- construction of TDFA(1), (e) --- TDFA(1).
\\*\medskip
\end{Xfig}
\begin{Xfig}
-\includegraphics[width=0.9\linewidth]{img/example2/all.png}\\*
+\includegraphics[width=0.9\linewidth]{img/example2_all.png}\\*
\textbf{Example 2.} $a^* 1 a^* a$ (the TRE used by Laurikari to explain his algorithm).\\*
(a) --- TNFA, (b) --- construction of TDFA(0), (c) --- TDFA(0), (d) --- construction of TDFA(1), (e) --- TDFA(1).\\*
This TRE has a modest degree of nondeterminism: 2 for TDFA(1) and 3 for TDFA(0).
\end{Xfig}
\begin{Xfig}
-\includegraphics[width=0.8\linewidth]{img/example6/all.png}\\*
+\includegraphics[width=0.8\linewidth]{img/example6_all.png}\\*
\textbf{Example 3.} $(1 a)^*$ .\\*
(a) --- TNFA, (b) --- construction of TDFA(0), (c) --- TDFA(0), (d) --- construction of TDFA(1), (e) --- TDFA(1).\\*
This example shows the typical difference between automata:
\end{Xfig}
\begin{Xfig}
-\includegraphics[width=0.8\linewidth]{img/example5/all.png}\\*
+\includegraphics[width=0.8\linewidth]{img/example5_all.png}\\*
\textbf{Example 4.} $(1 a^+ 2 b^+)^+$ .\\*
(a) --- TNFA, (b) --- construction of TDFA(0), (c) --- TDFA(0), (d) --- construction of TDFA(1), (e) --- TDFA(1).\\*
Like Example 1, this example shows that TDFA(0) tends to pull operations inside of loops
\end{Xfig}
\begin{Xfig}
-\includegraphics[width=0.9\linewidth]{img/example3/all.png}\\*
+\includegraphics[width=0.9\linewidth]{img/example3_all.png}\\*
\textbf{Example 5.} $a^* 1 a^{3}$ .\\*
(a) --- TNFA, (b) --- construction of TDFA(0), (c) --- TDFA(0), (d) --- construction of TDFA(1), (e) --- TDFA(1).\\*
This example demonstrates a pathological case for both types of automata:
\end{Xfig}
\begin{Xfig}
-\includegraphics[width=\linewidth]{img/example4/all.png}\\*
+\includegraphics[width=\linewidth]{img/example4_all.png}\\*
\textbf{Example 6.} $1 (3 (a | aa) 4)^* 2$, corresponding to POSIX RE \texttt{(a|aa)+}.\\*
(a) --- TNFA, (b) --- construction of TDFA(0), (c) --- TDFA(0), (d) --- construction of TDFA(1), (e) --- TDFA(1).\\*
This example uses POSIX disambiguation.
and low submatch detalisation: TDFA can be applied to full parsing, but other methods would probably outperform them.
However, RE of such form are very common in practice and for them TDFA can be very efficient.
-%\vfill\null\pagebreak
-
-%\begin{minipage}{\linewidth}
-% \centering
-% \footnotesize
-% \includegraphics[width=0.5\linewidth]{img/x1.png}
-% \\ A picture of the same gull looking the other way!
-%\end{minipage}
-%\begin{center}\includegraphics[width=\linewidth]{img/x0.png}\end{center}
-%\begin{center}\includegraphics[width=0.5\linewidth]{img/x1.png}\end{center}
-%\begin{center}\includegraphics[width=0.5\linewidth]{img/x2.png}\end{center}
\section{Implementation}\label{section_implementation}
(labels 1, 2 and 3 on transitions correspond to symbols \texttt{a}, \texttt{b} and \texttt{c}):
\begin{Xfig}
-\includegraphics[width=\linewidth]{img/fallback/tdfa0.png}
+\includegraphics[width=\linewidth]{img/fallback_tdfa0.png}
\captionof{figure}{TDFA(0) for $(a 1 bc)^+$.}
\end{Xfig}
\begin{Xfig}
-\includegraphics[width=\linewidth]{img/fallback/tdfa1.png}
+\includegraphics[width=\linewidth]{img/fallback_tdfa1.png}
\captionof{figure}{TDFA(1) for $(a 1 bc)^+$.}
\end{Xfig}
(register 3 is renamed to 2, register 1 is backup, fallback transitions are not shown):
\begin{Xfig}
-\includegraphics[width=\linewidth]{img/fallback/tdfa0_fallback.png}
+\includegraphics[width=\linewidth]{img/fallback_tdfa0_fallback.png}
\captionof{figure}{TDFA(0) for $(a 1 bc)^+$ with backup registers.}
\end{Xfig}
\begin{Xfig}
-\includegraphics[width=\linewidth]{img/fallback/tdfa1_fallback.png}
+\includegraphics[width=\linewidth]{img/fallback_tdfa1_fallback.png}
\captionof{figure}{TDFA(1) for $(a 1 bc)^+$ with backup registers.}
\end{Xfig}
It may happen that two tags in TRE are separated by a fixed number of characters:
each offset of one tag is equal to the corresponding offset of the other tag plus some static offset.
-%the value of one tag is always equal to the value of the other plus some static offset.
In this case we can track only one of the tags; we say that the second tag is \emph{fixed} on the first one.
For example, in TRE $a^* 1 b 2 c^*$ tag 1 is always one character behind of tag 2,
therefore it is fixed on tag 2 with offset -1.
When optimizing out fixed tags, one should be careful in two respects.
First, negative submatches: if the value of representative is $\varnothing$,
then all fixed tags are also $\varnothing$ and their offsets should be ignored.
-%if tag $t_1$ is fixed on tag $t_2$ with offset $n$
Second, fixed tags may be used by disambiguation policy:
in this case they should be kept until disambiguation is finished;
then they can be removed from TDFA with all associated operations.
Each example has two implementations: RFC-compliant and simplified (both forms may be useful in practice).
The input to each parser is a 1G file of randomly generated URIs or HTTP messages; it is buffered in 4K chunks.
Programs are written so that they spend most of the time on parsing,
-%and do only the bare minimum of work necesssary to convince compiler that parse results cannot be optimized out ---
-%this way benchmarks measure the efficiency of parsing, not the accompanying code or the operating system.
so that benchmarks measure the efficiency of parsing, not the accompanying code or the operating system.
-%Alternatively each parser can be built in ``verification mode'', in which it prints out parse results.
For each of the four parsers there is a corresponding DFA-based recognizer:
it sets a baseline for expectations of how fast and small the lexer can be and what is the real overhead on submatch extraction.
Benchmarks are written in C-90 and compiled with \cite{RE2C} version 1.0
\end{Xtab}
\begin{Xfig}
-\includegraphics[width=\linewidth]{img/bench/size_gcc_clang.png}
-\includegraphics[width=\linewidth]{img/bench/size_tcc_pcc.png}
+\includegraphics[width=\linewidth]{img/bench_size_gcc_clang.png}
+\includegraphics[width=\linewidth]{img/bench_size_tcc_pcc.png}
\captionof{figure}{Binary size for GCC, Clang, TCC and PCC.}
\end{Xfig}
\begin{Xfig}
-\includegraphics[width=\linewidth]{img/bench/time_gcc_clang.png}
-\includegraphics[width=\linewidth]{img/bench/time_tcc_pcc.png}
+\includegraphics[width=\linewidth]{img/bench_time_gcc_clang.png}
+\includegraphics[width=\linewidth]{img/bench_time_tcc_pcc.png}
\captionof{figure}{Run time for GCC, Clang, TCC and PCC.}
\end{Xfig}
\pagebreak
\nocite{*}
-\bibliographystyle{abstract}
-\bibliography{bibliography}
+
+\newcommand{\etalchar}[1]{$^{#1}$}
+\begin{thebibliography}{GHR{\etalchar{+}}16}
+
+\bibitem[AC11]{AC11}
+Rajeev Alur and Pavol {\v{C}}ern{\`y}.
+\newblock Streaming transducers for algorithmic verification of single-pass
+ list-processing programs.
+\newblock In {\em ACM SIGPLAN Notices}, volume~46, pages 599--610. ACM, 2011.
+
+\bibitem[BC93]{BC93}
+Peter Bumbulis and Donald~D Cowan.
+\newblock {RE2C}: A more versatile scanner generator.
+\newblock {\em ACM Letters on Programming Languages and Systems (LOPLAS)},
+ 2(1-4):70--84, 1993.
+
+\bibitem[BSU]{BSU}
+{B}elarusian {S}tate {U}niversity.
+\newblock URL: \url{http://bsu.by/}.
+
+\bibitem[BT10]{BT10}
+Claus Brabrand and Jakob~G Thomsen.
+\newblock Typed and unambiguous pattern matching on strings using regular
+ expressions.
+\newblock In {\em Proceedings of the 12th international ACM SIGPLAN symposium
+ on Principles and practice of declarative programming}, pages 243--254. ACM,
+ 2010.
+
+\bibitem[Bec09]{Bec09}
+Michela Becchi.
+\newblock {\em Data structures, algorithms and architectures for efficient
+ regular expression evaluation}.
+\newblock PhD thesis, Washington University In St. Louis, School of Engineering
+ and Applied Science, Department of Computer Science and Engineering, 2009.
+
+\bibitem[Ber13]{Ber13}
+Jean Berstel.
+\newblock {\em Transductions and context-free languages}.
+\newblock Springer-Verlag, 2013.
+
+\bibitem[CGR96]{CGR96}
+Boris~V Cherkassky, Andrew~V Goldberg, and Tomasz Radzik.
+\newblock Shortest paths algorithms: Theory and experimental evaluation.
+\newblock {\em Mathematical programming}, 73(2):129--174, 1996.
+
+\bibitem[CH11]{CH11}
+Koen Claessen and John Hughes.
+\newblock Quickcheck: a lightweight tool for random testing of haskell
+ programs.
+\newblock {\em Acm sigplan notices}, 46(4):53--64, 2011.
+
+\bibitem[Clang]{Clang}
+{Clang}: a {C} language family frontend for {LLVM}.
+\newblock URL: \url{http://clang.llvm.org/}.
+
+\bibitem[Cor09]{Cor09}
+Thomas~H Cormen.
+\newblock {\em Introduction to algorithms}.
+\newblock MIT press, 3rd edition, 2009.
+
+\bibitem[Cox10]{Cox10}
+Russ Cox.
+\newblock Regular expression matching in the wild.
+\newblock URL: \url{http://swtch.com/~rsc/regexp/regexp3.html}, 2010.
+
+\bibitem[Cox17]{Cox17}
+Russ Cox.
+\newblock Comments on {RE2} bug tracker.
+\newblock URL: \url{http://github.com/google/re2/issues/146}, 2017.
+
+\bibitem[Fow03]{Fow03}
+Glenn Fowler.
+\newblock An {I}nterpretation of the {POSIX} {R}egex {S}tandard.
+\newblock URL:
+ \url{https://web.archive.org/web/20050408073627/http://www.research.att.com/~gsf/testregex/re-interpretation.html},
+ 2003.
+
+\bibitem[GCC]{GCC}
+{GCC}, the {GNU} {C}ompiler {C}ollection.
+
+\bibitem[GHRST16]{GHRST16}
+Bj{\o}rn~Bugge Grathwohl, Fritz Henglein, Ulrik~Terp Rasmussen,
+ Kristoffer~Aalund S{\o}holm, and Sebastian~Paaske T{\o}rholm.
+\newblock {Kleenex}: Compiling nondeterministic transducers to deterministic
+ streaming transducers.
+\newblock {\em ACM SIGPLAN Notices}, 51(1):284--297, 2016.
+
+\bibitem[GR93]{GR93}
+Andrew~V Goldberg and Tomasz Radzik.
+\newblock A heuristic improvement of the {Bellman-Ford} algorithm.
+\newblock {\em Applied Mathematics Letters}, 6(3):3--6, 1993.
+
+\bibitem[Gra15]{Gra15}
+Niels Bj{\o}rn~Bugge Grathwohl.
+\newblock {\em Parsing with Regular Expressions \& Extensions to {K}leene
+ Algebra}.
+\newblock PhD thesis, DIKU, University of Copenhagen, 2015.
+
+\bibitem[Gro89]{Gro89}
+Josef Grosch.
+\newblock Efficient generation of table-driven scanners.
+\newblock {\em Software Practice and Experience 19}, pages 1089--1103, 1989.
+
+\bibitem[HU90]{HU90}
+John~E. Hopcroft and Jeffrey~D. Ullman.
+\newblock {\em Introduction To Automata Theory, Languages, And Computation}.
+\newblock Addison-Wesley Longman Publishing Co., Inc. Boston, MA, USA ©1990,
+ 1st edition, 1990.
+
+\bibitem[Kar14]{Kar14}
+Aaron Karper.
+\newblock {\em Efficient regular expressions that produce parse trees}.
+\newblock epubli GmbH, 2014.
+
+\bibitem[Kle51]{Kle51}
+Stephen~Cole Kleene.
+\newblock Representation of events in nerve nets and finite automata.
+\newblock Technical report, RAND Project US Air Force, 1951.
+
+\bibitem[Kle56]{Kle56}
+Stephen~Cole Kleene.
+\newblock Representation of events in nerve nets and finite automata.
+\newblock {\em In: Shannon, C.E., McCarthy, J. (eds.) Automata Studies}, page
+ 3–41, 1956.
+
+\bibitem[Koz94]{Koz94}
+Dexter Kozen.
+\newblock A completeness theorem for {Kleene} algebras and the algebra of
+ regular events.
+\newblock {\em Information and computation}, 110(2):366--390, 1994.
+
+\bibitem[Kuk07]{Kuk07}
+Chris Kuklewicz.
+\newblock Regular expressions/bounded space proposal.
+\newblock URL:
+ \url{http://wiki.haskell.org/index.php?title=Regular_expressions/Bounded_space_proposal&oldid=11475},
+ alternative URL:
+ \url{https://web.archive.org/web/20170808092516/https://wiki.haskell.org/index.php?title=Regular_expressions/Bounded_space_proposal&oldid=11475},
+ 2007.
+
+\bibitem[Kuk09]{Kuk09}
+Chris Kuklewicz.
+\newblock Regex-posix-unittest: unit tests for the plaform's {POSIX} regex
+ library.
+\newblock URL:
+ \url{http://hackage.haskell.org/package/regex-posix-unittest-1.1}, 2009.
+
+\bibitem[LTU]{LTU}
+{Lambda The Ultimate}: comments on thread ``regular expression matching can be
+ simple and fast''.
+\newblock URL: \url{http://lambda-the-ultimate.org/node/2064}, alternative URL:
+ \url{http://web.archive.org/web/20170808091628/http://lambda-the-ultimate.org/node/2064},
+ 2007.
+
+\bibitem[Lau00]{Lau00}
+Ville Laurikari.
+\newblock {NFA}s with tagged transitions, their conversion to deterministic
+ automata and application to regular expressions.
+\newblock In {\em String Processing and Information Retrieval, 2000. SPIRE
+ 2000. Proceedings. Seventh International Symposium on}, pages 181--187. IEEE,
+ 2000.
+\newblock URL: \url{http://laurikari.net/ville/spire2000-tnfa.pdf}.
+
+\bibitem[Lau01]{Lau01}
+Ville Laurikari.
+\newblock Efficient submatch addressing for regular expressions.
+\newblock {\em Helsinki University of Technology}, 2001.
+\newblock URL: \url{http://laurikari.net/ville/regex-submatch.pdf}.
+
+\bibitem[NPX99]{NPX99}
+Maddalena Nonato, Stefano Pallottino, and Bao Xuewen.
+\newblock {SPT\_L} shortest path algorithms: review, new proposals and some
+ experimental results, 1999.
+
+\bibitem[PCC]{PCC}
+{PCC}, the {P}ortable {C} {C}ompiler.
+\newblock URL: \url{http://pcc.ludd.ltu.se/}.
+
+\bibitem[POSIX]{POSIX}
+The IEEE and The Open Group.
+\newblock {\em {POSIX-1.2008} a.k.a. {IEEE Std 1003.1-2008} a.k.a {The Open
+ Group Technical Standard Base Specifications, Issue 7}}, 2016 edition,
+ 2001-2016.
+
+\bibitem[RE2]{RE2}
+{RE2}: regular expression library.
+\newblock URL: \url{http://github.com/google/re2}.
+
+\bibitem[RE2C]{RE2C}
+{RE2C}: lexer generator for {C}.
+\newblock URL: \url{http://re2c.org}, URL:
+ \url{http://github.com/skvadrik/re2c}.
+
+\bibitem[RFC-3986]{RFC-3986}
+Tim Berners-Lee, Roy Fielding, and Larry Masinter.
+\newblock {U}niform {R}esource {I}dentifier ({URI}): {G}eneric {S}yntax.
+\newblock {\em Internet Engineering Task Force (IETF)}, 2005.
+\newblock URL: \url{http://tools.ietf.org/html/rfc3986}.
+
+\bibitem[RFC-7230]{RFC-7230}
+Roy Fielding and Julian Reschke.
+\newblock {H}ypertext {T}ransfer {P}rotocol ({HTTP/1.1}): {M}essage {S}yntax
+ and {R}outing.
+\newblock {\em Internet Engineering Task Force (IETF)}, 2014.
+\newblock URL: \url{http://tools.ietf.org/html/rfc7230}.
+
+\bibitem[Regex-TDFA]{Regex-TDFA}
+Chris Kuklewicz.
+\newblock {Regex-TDFA}: {POSIX}-compliant regular expression library for
+ {Haskell}.
+\newblock URL: \url{http://hackage.haskell.org/package/regex-tdfa}.
+
+\bibitem[SS88]{SS88}
+Seppo Sippu and Eljas Soisalon-Soininen.
+\newblock {\em Parsing Theory}, volume 1: Languages and Parsing.
+\newblock Springer, 1988.
+
+\bibitem[SSA]{SSA}
+{Lots of authors}.
+\newblock {\em {Static} {Single} {Assignment} {Book}}.
+\newblock Springer, 2015.
+\newblock URL: \url{http://ssabook.gforge.inria.fr/latest/book.pdf}.
+
+\bibitem[SW81]{SW81}
+Douglas~R Shier and Christoph Witzgall.
+\newblock Properties of labeling methods for determining shortest path trees.
+\newblock {\em Journal of Research of the National Bureau of Standards},
+ 86(3):317--330, 1981.
+
+\bibitem[TCC]{TCC}
+{T}iny {C} {C}ompiler.
+\newblock URL: \url{http://bellard.org/tcc/}.
+
+\bibitem[TRE]{TRE}
+{TRE}: The free and portable approximate regex matching library.
+\newblock URL: \url{http://laurikari.net/tre/}, URL:
+ \url{http://github.com/laurikari/tre/}.
+
+\bibitem[Tro17]{Tro17}
+Ulya Trofimovich.
+\newblock Fork of the test suite for shortest path algorithms by {Cherkassky},
+ {Goldberg}, {Radzik}.
+\newblock URL: \url{https://github.com/skvadrik/cherkassky_goldberg_radzik},
+ 2017.
+
+\bibitem[Wat93]{Wat93}
+Bruce~William Watson.
+\newblock A taxonomy of finite automata construction algorithms.
+\newblock {\em Eindhoven University of Technology, Department of Mathematics
+ and Computing Science, Computing Science Section}, 1993.
+
+\end{thebibliography}
\end{document}
--- /dev/null
+#!/bin/sh -e
+
+pdflatex -shell-escape 2017_trofimovich_tagged_deterministic_finite_automata_with_lookahead.tex </dev/null > tdfa.build_log
--- /dev/null
+\documentclass[AMA,STIX1COL]{WileyNJD-v2}
+
+\articletype{Research Article}
+
+\received{xx July 2019}
+\revised{xx July 2019}
+\accepted{xx July 2019}
+
+\raggedbottom
+
+\let\procedure\relax
+\let\endprocedure\relax
+
+\usepackage[utf8]{inputenc}
+\usepackage{amsmath, amssymb, amsthm, amsfonts}
+\usepackage{accents}
+\usepackage{mathtools}
+\usepackage{graphicx}
+\usepackage{enumitem}
+\usepackage[justification=centering]{caption}
+\usepackage{url}
+\usepackage[section]{placeins}
+\usepackage{proof-at-the-end}
+\usepackage{setspace}
+\usepackage{tikz, pgfplots}
+
+\usepackage[noline, noend, nofillcomment, linesnumbered]{algorithm2e}
+\SetArgSty{textnormal}
+\newcommand\Xcommentfont[1]{\selectfont\textnormal{#1}}
+\SetCommentSty{Xcommentfont}
+\SetNoFillComment
+\SetNlSty{textnormal}{}{}
+\renewcommand{\algorithmcfname}{ALGORITHM}
+
+
+\let\oldnl\nl
+\newcommand{\nonl}{\renewcommand{\nl}{\let\nl\oldnl}} % Remove line number for one line
+
+\newcommand{\Xl}{\langle}
+\newcommand{\Xr}{\rangle}
+\newcommand{\Xm}{\langle\!\rangle}
+\newcommand{\Xset}{\!\leftarrow\!}
+\newcommand{\Xund}{\rule{.4em}{.4pt}}
+\newcommand{\Xlb}{[\![}
+\newcommand{\Xrb}{]\!]}
+\newcommand{\Xmap}{\!\mapsto\!}
+\newcommand{\XB}{\mathcal{B}}
+\newcommand{\XD}{\mathcal{D}}
+\newcommand{\XE}{\mathcal{E}}
+\newcommand{\XF}{\mathcal{F}}
+\newcommand{\XI}{\mathcal{I}}
+\newcommand{\XPT}{\XP\!\XT}
+\newcommand{\XIT}{\XI\!\XT}
+\newcommand{\XIR}{\XI\!\XR}
+\newcommand{\XL}{\mathcal{L}}
+\newcommand{\XN}{\mathcal{N}}
+\newcommand{\XM}{\mathcal{M}}
+\newcommand{\XO}{\mathcal{O}}
+\newcommand{\XP}{\mathcal{P}}
+\newcommand{\XR}{\mathcal{R}}
+\newcommand{\XS}{\mathcal{S}}
+\newcommand{\XT}{\mathcal{T}}
+\newcommand{\XX}{\mathcal{X}}
+\newcommand{\YB}{\mathbb{B}}
+\newcommand{\YC}{\mathbb{C}}
+\newcommand{\YK}{\mathbb{K}}
+\newcommand{\YF}{\mathbb{F}}
+\newcommand{\YN}{\mathbb{N}}
+\newcommand{\YT}{\mathbb{T}}
+\newcommand{\YQ}{\mathbb{Q}}
+\newcommand{\YP}{\mathbb{P}}
+\newcommand{\YZ}{\mathbb{Z}}
+\newcommand{\PT}{PT}
+\newcommand{\PE}{P\!E}
+\newcommand{\PR}{P\!R}
+\newcommand{\IPT}{I\!PT}
+\newcommand{\IRE}{I\!RE}
+
+\newcommand{\Xstirling}[2]{\genfrac{\{}{\}}{0pt}{}{#1}{#2}}
+\newcommand*{\Xbar}[1]{\overline{#1}}
+\newcommand{\pnorm}[2]{\|{#1}\|^{pos}_{#2}}
+\newcommand{\snorm}[2]{\|{#1}\|^{sub}_{#2}}
+
+\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
+\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
+
+\setlist{nosep}
+
+\newenvironment{Xfig}
+ {\par\medskip\noindent\minipage{\linewidth}\begin{center}}
+ {\end{center}\endminipage\par\medskip}
+\newenvironment{Xtab}
+ {\par\medskip\noindent\minipage{\linewidth}\begin{center}}
+ {\end{center}\endminipage\par\medskip}
+
+\setlength{\parindent}{0pt}
+\setlength{\belowcaptionskip}{-1em}
+
+
+\begin{document}
+
+\title{Efficient POSIX Submatch Extraction on NFA}
+
+\author[1]{Angelo Borsotti}
+\author[2]{Ulya Trofimovich}
+
+\address[1]{\email{angelo.borsotti@mail.polimi.it}}
+\address[2]{\email{skvadrik@gmail.com}}
+
+\abstract[Summary]{
+In this paper we further develop the POSIX disambiguation algorithm by Okui and Suzuki.
+We extend its theoretical foundations on a few important practical cases
+and introduce numerous performance improvements.
+%
+Our algorithm works in worst-case $O(n \, m^2 \, t)$ time and $O(m^2)$ space,
+where $n$ is the length of input, $m$ is the size of the regular expression with bounded repetition expanded
+and $t$ is the number of capturing groups and subexpressions that contain groups.
+%
+Benchmarks show that in practice our algorithm is \textasciitilde{}5x slower than leftmost-greedy matching.
+%
+We present a lazy version of the algorithm that is much faster, but requires memory proportional to the size of input.
+%
+We study other NFA-based algorithms
+and show that the Kuklewicz algorithm is slower in practice,
+and the backward matching algorithm by Cox is incorrect.
+}
+
+\keywords{Regular Expressions, Parsing, Submatch Extraction, Finite-State Automata, POSIX}
+
+\maketitle
+
+
+\section{Introduction}
+
+In this paper we study NFA-based approaches to the problem of POSIX regular expression parsing and submatch extraction.
+A number of algorithms have been proposed in recent years,
+but not all of them have been properly studied and formalized.
+We experimented with different approaches and found that in practice the algorithm by Okui and Suzuki \cite{OS13} is the most efficient one.
+In the process, we have discovered a number of improvements
+that require careful reconstruction of the underlying theory and introduction of new algorithms and proofs.
+In our experience, the Okui and Suzuki approach is not easy to understand,
+therefore we include illustrative examples and detailed pseudocode of the extended algorithm.
+%
+It should be noted that there is a totally different (and very elegant) approach to the problem
+based on Brzozowski derivatives \cite{SL14}.
+We choose to focus on NFA-based approach because
+in our experience, derivative-based approach is slow in practice
+(we also discuss theoretical bounds below).
+%
+Both NFA and derivatives can be used to construct DFA with POSIX longest-match semantics \cite{SL13} \cite{Bor15} \cite{Tro17}.
+The resulting DFA-based algorithms are very fast, because there is no run-time overhead on disambiguation.
+However, DFA construction is not always viable due to its exponential worst-case complexity,
+and if viable, it needs to be efficient.
+Therefore we concentrate on NFA-based algorithms
+that can be used directly for matching or serve as a basis for DFA construction.
+We give an overview of existing algorithms, including some that are incorrect but interesting.
+
+\subparagraph{Laurikari, 2001 (incorrect).}
+
+Laurikari described an algorithm based on TNFA, which is an $\epsilon$-NFA with tagged transitions \cite{Lau01}.
+In his algorithm each submatch group is represented with a pair of \emph{tags} (opening and closing).
+Disambiguation is based on minimizing the value of opening tags and maximizing the value of closing tags, where
+different tags have priority according to POSIX subexpression hierarchy.
+Notably, Laurikari used the idea of topological order to avoid worst-case exponential time of $\epsilon$-closure construction.
+His algorithm doesn't track history of iteration subexpressions and gives incorrect result in cases like \texttt{(a|aa)*} and string \texttt{aa}.
+Reported computational complexity is $O(n \, m \, c \, t \, log(t))$, where
+$n$ is input length,
+$m$ is TNFA size,
+$c$ is the time for comparing tag values
+and $t$ is the number of tags.
+Memory requirement is $O(m \, t)$.
+
+\subparagraph{Kuklewicz, 2007.}
+
+Kuklewicz fixed Laurikari algorithm by introducing \emph{orbit} tags for iteration subexpressions.
+He gave only an informal description \cite{Kuk07}, but the algorithm was later formalized in \cite{Tro17}.
+It works in the same way as the Laurikari algorithm,
+except that comparison of orbit tags is based on their previous history, not just the most recent value.
+The clever idea is to avoid recording full history
+by compressing histories in a matrix of size $t \times m$, where $m$ is TNFA size and $t$ is the number of tags.
+$t$-Th row of the matrix represents ordering of closure states with respect to $t$-th tag
+(with possible ties --- different states may have the same order).
+Matrix is updated at each step using continuations of tag histories.
+The algorithm requires $O(m \, t)$ memory and $O(n \, m \, t \, (m + t \, log(m))$ time, where $n$ is the input length
+(we assume that worst-case optimal $O(m^2 \, t)$ algorithm for $\epsilon$-closure is used,
+and matrix update takes $O(m \, log(m) \, t^2)$ because for $t$ tags we need to sort $m$ states with $O(t)$ comparison function).
+%Kuklewicz disambiguation is combined with Laurikari determinization [Lau00] in [Tro17].
+
+\subparagraph{Cox, 2009 (incorrect).}
+
+Cox came up with the idea of backward POSIX matching \cite{Cox09},
+which is based on the observation that it is easier to maximize submatch on the last iteration than on the first one
+because we do not need to remember the history of previous iterations.
+The algorithm consumes input from right to left
+and tracks two pairs of offsets for each submatch group:
+the \emph{active} pair of the most recent offsets (used in disambiguation)
+and the \emph{final} pair of offsets on the backwards-first (i.e. the last) iteration.
+The algorithm gives incorrect results under two conditions:
+(1) ambiguous matches have equal offsets on some iteration,
+and (2) disambiguation happens too late, when active offsets have already been updated and the difference between ambiguous matches is erased.
+We found that such situations may occur for two reasons.
+First, $\epsilon$-closure algorithm sometimes compares ambiguous paths \emph{after} their join point,
+when both paths have a common suffix with tagged transitions.
+This is the case with Cox prototype implementation \cite{Cox09}; for example, it gives incorrect results for \texttt{(aa|a)*} and string \texttt{aaaaa}.
+Most of such failures can be repaired by exploring states in topological order,
+but a topological order does not exist in the presence of $\epsilon$-loops.
+The second reason is bounded repetition: ambiguous paths may not have an intermediate join point at all.
+For example, in case of \texttt{(aaaa|aaa|a)\{3,4\}} and string \texttt{aaaaaaaaaa}
+we have matches \texttt{(aaaa)(aaaa)(a)(a)} and \texttt{(aaaa)(aaa)(aaa)}
+with different number of iterations.
+Assuming that bounded repetition is modeled by chaining three non-optional sub-automata for \texttt{(aaaa|aaa|a)} and the optional fourth one,
+by the time ambiguous paths meet both have active offsets \texttt{(0,4)}.
+Despite the flaw, Cox algorithm is interesting: if somehow delayed comparison problem was fixed, it would work.
+The algorithm requires $O(m \, t)$ memory and $O(n \, m^2 \, t)$ time
+(assuming worst-case optimal closure algorithm),
+where $n$ is the length of input,
+$m$ it the size of the regular expression
+and $t$ is the number of submatch groups plus enclosing subexpressions.
+
+\subparagraph{Okui and Suzuki, 2013.}
+
+Okui and Suzuki view the disambiguation problem from the point of comparison of parse trees \cite{OS13}.
+Ambiguous trees have the same frontier of leaf symbols, but their branching structure is different.
+Each subtree corresponds to a subexpression.
+The \emph{norm} of a subtree is the number of alphabet symbols in it (a.k.a. submatch length).
+Longest match corresponds to a tree in which the norm of each subtree in leftmost in-order traversal is maximized.
+The clever idea of Okui and Suzuki is to relate the norm of subtrees to their \emph{height} (distance from the root).
+Namely, if we walk through the leaves of two ambiguous trees, tracking the height of each complete subtree,
+then at some step heights will diverge:
+subtree with a smaller norm will already be complete, but the one with a greater norm will not.
+Height of subtrees is easy to track by attributing it to parentheses and encoding in automaton transitions.
+Okui and Suzuki use PAT --- $\epsilon$-free position automaton with transitions labeled by sequences of parentheses.
+Disambiguation is based on comparing parentheses along ambiguous PAT paths.
+Similar to Kuklewicz, Okui and Suzuki avoid recording full-length paths
+by pre-comparing them at each step and storing comparison results in a pair of matrices indexed by PAT states.
+The authors report complexity $O(n(m^2 + c))$, where
+$n$ is the input length,
+$m$ is the number of occurrences of the most frequent symbol in the regular expression
+and $c$ is the number of submatch groups and repetition operators.
+However, this estimate leaves out the construction of PAT and precomputation of the precedence relation.
+Memory requirement is $O(m^2)$.
+Okui-Suzuki disambiguation is combined with Berry-Sethi construction in \cite{Bor15} in construction of parsing DFA.
+
+\subparagraph{Sulzmann and Lu, 2013.}
+
+Sulzmann and Lu based their algorithm on Brzozowski derivatives \cite{SL14}
+(correctness proof is given in \cite{ADU16}).
+The algorithm unfolds a regular expression into a sequence of derivatives
+and then folds it back into a parse tree.
+Each derivative is obtained from the previous one by consuming input symbols in left-to-right order,
+and each tree is built from the next tree by injecting symbols in reversed right-to-left order.
+In practice, Sulzmann and Lu fuse backward and forward passes,
+which allows to avoid potentially unbounded memory usage on keeping all intermediate derivatives.
+The algorithm is elegant in that it does not require explicit disambiguation:
+parse trees are naturally ordered by the longest criterion.
+Time and space complexity is not entirely clear.
+In \cite{SL14} Sulzmann and Lu consider the size of the regular expression as a constant.
+In \cite{SL13} they give more precise estimates: $O(2^m \, t)$ space and $O(n \, log(2^m) \, 2^m \, t^2)$ time,
+where $m$ is the size of the regular expression,
+$n$ is the length of input
+and $t$ the number of submatch groups (the authors do not differentiate between $m$ and $t$).
+However, this estimate assumes worst-case $O(2^m)$ derivative size and on-the-fly DFA construction.
+The authors also mention a better $O(m^2)$ theoretical bound for derivative size.
+If we adopt this bound and exclude DFA construction, we get $O(m^2 \, t)$ memory requirement and $O(n \, m^2 \, t^2)$ time,
+which seems reasonably close to (but worse than) NFA-based approaches.
+\\
+
+Undoubtedly, other approaches exist,
+but many of them produce incorrect results or require memory proportional to the length of input
+(e.g. Glibc implementation \cite{Glibc}).
+%
+Our contributions are the following:
+\begin{itemize}[itemsep=0.5em, topsep=0.5em]
+
+ \item We extend Okui-Suzuki algorithm on the case of partially ordered parse trees
+ and introduce the notion of \emph{explicit} and \emph{implicit} submatch groups.
+ This greatly reduces the overhead on disambiguation
+ for regular expressions with only a few submatch groups,
+ which is a common case in practice.
+
+ \item We extend Okui-Suzuki algorithm on the case of bounded repetition.
+
+ \item We combine Okui-Suzuki algorithm with Laurikari TNFA.
+ It allows us to omit the preprocessing step
+ at the cost of $\epsilon$-closure construction,
+ which may be preferable in cases when preprocessing time is included in match time.
+
+ \item We introduce \emph{negative tags} that allow us to handle
+ no-match situation in the same way as match.
+ Negative tags provide a simple way to reset obsolete offsets from earlier iterations,
+ in cases like \texttt{(a(b)?)*} and string \texttt{aba}.
+
+ \item We consider $\epsilon$-closure construction as a shortest-path problem
+ and show that path concatenation is right-distributive over path comparison
+ for the subset of paths considered by closure algorithm.
+ This justifies the use of well-known Goldberg-Radzik algorithm based on the idea of topological order,
+ which has worst-case optimal quadratic complexity in the size of closure
+ and guaranteed linear complexity if the closure has no $\epsilon$-loops.
+ This is an improvement over naive exhaustive depth-first search with backtracking,
+ and also an improvement over Laurikari algorithm \cite{Tro17}.
+
+ \item We give a faster algorithm for updating precedence matrices.
+ The straightforward algorithm described by Okui and Suzuki involves pairwise comparison of all states in closure
+ and takes $O(m^2 \, t)$ time, assuming $m$ states and $O(t)$ comparison function.
+ We show a pathological example \texttt{((a?)\{0,1000\})*} where $t \approx m$.
+ Our algorithm takes $O(m^2)$ time.
+
+ \item We show how to use our algorithm in order to build either parse trees or POSIX-style offsets.
+
+ \item We present a lazy version of our algorithm
+ that reduces the overhead on disambiguation
+ at the cost of memory usage that grows with the length of input.
+ The lazy algorithm is well-suited for small inputs.
+
+ \item We provide a C++ implementation of different NFA-based algorithms \cite{RE2C}
+ and benchmark them against each other and against leftmost greedy implementation
+ that has no overhead on disambiguation and serves as a baseline.
+ We also provide a completely independent Java implementation
+ and a web-page for interactive experiments with our algorithms.
+\end{itemize}
+
+The rest of this paper is arranged as follows.
+In section \ref{section_main} we present the main idea and the skeleton of our algorithm.
+In section \ref{section_formalization} we provide theoretical foundations for the rest of the paper.
+After that, we go into specific details:
+section \ref{section_closure} is concerned with $\epsilon$-closure construction,
+section \ref{section_pathtree} discusses data structures used to represent TNFA paths,
+section \ref{section_results} discusses possible output formats (parse trees or POSIX-style offsets),
+section \ref{section_comparison} gives the core disambiguation algorithms,
+section \ref{section_lazy} presents lazy variation of our algorithm,
+and section \ref{section_tnfa} gives specific TNFA construction.
+The remaining sections \ref{section_complexity}, \ref{section_benchmarks} and \ref{section_conclusions}
+contain complexity analysis, benchmarks, conclusions and directions for future work.
+
+
+\section{Skeleton of the algorithm}\label{section_main}
+
+Our algorithm is based on four cornerstone concepts:
+regular expressions, parse trees, parenthesized expressions and tagged NFA.
+%
+As usual, we formalize matching problem
+by giving the interpretation of regular expressions as sets of parse trees.
+%
+Then we define POSIX disambiguation semantics in terms of order on parse trees.
+This definition reflects the POSIX standard,
+but it is too high-level to be used in a practical matching algorithm.
+%
+Therefore we go from parse trees to their linearized representation --- parenthesized expressions.
+We define an order on parenthesized expressions and show its equivalence to the order on parse trees.
+The latter definition of order is more low-level and can be easily converted to an efficient comparison procedure.
+%
+Finally, we construct TNFA and map parenthesized expressions to its paths,
+which allows us to compare ambiguous paths using the definition of order on parenthesized expressions.
+%
+In this section we give the four basic definitions and the skeleton of the algorithm.
+In the following sections we formalize the relation between different representations and fill in all the details.
+
+ \begin{definition}
+ \emph{Regular expressions (RE)} over finite alphabet $\Sigma$, denoted $\XR_\Sigma$:
+ \begin{enumerate}
+ \item
+ Empty RE $\epsilon$ and
+ unit RE $\alpha$ (where $\alpha \in \Sigma$) are in $\XR_\Sigma$.
+ \item If $e_1, e_2 \in \XR_\Sigma$, then
+ union $e_1 | e_2$,
+ product $e_1 e_2$,
+ repetition $e_1^{n, m}$ (where $0 \leq n \leq m \leq \infty$), and
+ submatch group $(e_1)$
+ are in $\XR_\Sigma$.
+ \end{enumerate}
+ \end{definition}
+
+
+ \begin{definition}
+ \emph{Parse trees (PT)} over finite alphabet $\Sigma$, denoted $\XT_\Sigma$:
+ \begin{enumerate}
+ \item
+ Nil tree ${\varnothing}^i$,
+ empty tree ${\epsilon}^i$ and
+ unit tree ${\alpha}^i$ (where $\alpha \in \Sigma$ and $i \in \YZ$)
+ are in $\XT_\Sigma$.
+ \item If $t_1, \dots, t_n \in \XT_\Sigma$ (where $n \geq 1$, and $i \in \YZ$), then
+ ${T}^i(t_1, \dots, t_n)$
+ is in $\XT_\Sigma$.
+ \end{enumerate}
+ \end{definition}
+
+
+ \begin{definition}
+ \emph{Parenthesized expressions (PE)} over finite alphabet $\Sigma$, denoted $\XP_\Sigma$:
+ \begin{enumerate}
+ \item
+ Nil expression $\Xm$,
+ empty expression $\epsilon$ and
+ unit expression $\alpha$ (where $\alpha \in \Sigma$)
+ are in $\XP_\Sigma$.
+ \item If $e_1, e_2 \in \XP_\Sigma$, then
+ $e_1 e_2$ and
+ $\Xl e_1 \Xr$
+ are in $\XP_\Sigma$.
+ \end{enumerate}
+ \end{definition}
+
+
+ \begin{definition}
+ \emph{Tagged Nondeterministic Finite Automaton (TNFA)}
+ is a structure $(\Sigma, Q, T, \Delta, q_0, q_f)$, where:
+ \begin{itemize}
+ \item[] $\Sigma$ is a finite set of symbols (\emph{alphabet})
+ \item[] $Q$ is a finite set of \emph{states}
+ \item[] $T \subset \YN \times \YZ \times \YN \times \YN$ is a mapping of \emph{tags} to their submatch group, lower nested tag and upper nested tag
+ \item[] $\Delta = \Delta^\Sigma \sqcup \Delta^\epsilon$ is the \emph{transition} relation,
+ consisting of two parts:
+ \begin{itemize}
+ \item[] $\Delta^\Sigma \subseteq Q \times \Sigma \times \{\epsilon\} \times Q$ (transitions on symbols)
+ \item[] $\Delta^\epsilon \subseteq Q \times \YN \times \big( \YZ \cup \{\epsilon\} \big) \times Q$
+ ($\epsilon$-transitions, where $\forall (q, n, \Xund, \Xund), (q, m, \Xund, \Xund) \in \Delta^\epsilon: n \neq m$)
+ \end{itemize}
+ \item[] $q_0 \in Q$ is the \emph{initial} state
+ \item[] $q_f \in Q$ is the \emph{final} state
+ \end{itemize}
+ \end{definition}
+
+As the reader might notice, our definitions are subtly different from the usual ones in literature.
+Regular expressions are extended with submatch operator
+and generalized repetition (note that it is not just syntactic sugar: in POSIX \texttt{(a)(a)} is semantically different from \texttt{(a)\{2\}},
+and \texttt{(a)} in not the same as \texttt{a}).
+Parse trees have a special \emph{nil-tree} constructor
+and an upper index, which allows us to distinguish between submatch and non-submatch subtrees.
+Mirroring parse trees, parenthesized expressions also have a special \emph{nil-parenthesis}.
+TNFA is in essence a nondeterministic finite-state transducer
+in which some of the $\epsilon$-transitions are marked with \emph{tags} ---
+integer numbers that denote opening and closing parentheses of submatch groups.
+For $i$-th group, the opening tag is $2i - 1$ and the closing tag is $2i$ (where $i \in \YN$).
+Tags can be negative, which represents the absence of match and corresponds to nil-parenthesis $\Xm$ and nil-tree $\varnothing$.
+Additionally, all $\epsilon$-transitions are marked with \emph{priority}
+which allows us to impose specific order of TNFA traversal
+(all $\epsilon$-transitions from the same state have different priority).
+\\
+
+\begin{algorithm}[H] \DontPrintSemicolon \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
+\setstretch{0.8}
+\Fn {$\underline{match \big( N \!\!=\! (\Sigma, Q, T, \Delta, q_0, q_f), \; \alpha_1 \!\hdots\! \alpha_n \big)} \smallskip$} {
+
+ $B, D : \text{uninitialized matrices in } \YZ^{|Q| \times |Q|}, \; U: \text{path context}$ \;
+ $r_0 = initial \Xund result(T)$ \;
+ $u_0 = empty \Xund path(\,)$ \;
+ $X = \big\{ (q_0, \varnothing, u_0, r_0) \big\}, \; i = 1$ \;
+
+ \BlankLine
+ \While {$i \leq n \wedge X \neq \emptyset$} {
+ $X = closure(N, X, U, B, D)$ \;
+ $X = update \Xund result(T, X, U, i, \alpha_i)$ \;
+ $(B, D) = update \Xund ptables(N, X, U, B, D)$ \;
+ $X = \big\{ (q, o, u_0, r) \mid (o, \Xund, \Xund, r) \in X \wedge (o, \alpha_i, \epsilon, q) \in \Delta^\Sigma \big\}$ \;
+ $i = i + 1$ \;
+ }
+
+ \BlankLine
+ $X = closure(N, X, U, B, D)$ \;
+ \If {$(q_f, \Xund, u, r) \in X$} {
+ \Return $f\!inal \Xund result (T, U, u, r, n)$
+ } \lElse {
+ \Return $\varnothing$
+ }
+
+ \BlankLine
+}
+\caption{TNFA simulation on a string.}\label{alg_match}
+\end{algorithm}
+\medskip
+
+The algorithm takes an automaton $N$ and string $\alpha_1 \!\hdots\! \alpha_n$ as input,
+and outputs the match result is some form: it can be a parse tree or a POSIX array of offsets,
+but for now we leave it unspecified and hide behind functions
+$initial \Xund result ()$, $update \Xund result ()$ and $f\!inal \Xund result ()$.
+The algorithm works by consuming input symbols,
+tracking a set of active \emph{configurations}
+and updating \emph{precedence tables} $B$ and $D$.
+Configuration is a tuple $(q, o, u, r)$.
+The first component $q$ is a TNFA state that is unique for each configuration in the current set.
+Components $o$ and $u$ keep information about the path by which $q$ was reached:
+$o$ is the \emph{origin} state used as index in precedence tables,
+and $u$ is a path fragment constructed by $closure()$.
+Specific representation of path fragments is hidden behind path context $U$ and function stub $empty \Xund path ()$.
+Finally, $r$-component is a partial match result associated with state $q$.
+Most of the real work happens inside of $closure()$ and $update \Xund ptables ()$, both of which remain undefined for now.
+The $closure()$ function builds $\epsilon$-closure of the current configuration set:
+it explores all states reachable by $\epsilon$-transitions from the $q$-components
+and tracks the best path to each reachable state.
+The $update \Xund ptables ()$ function
+performs pairwise comparison of all configurations in the new set,
+recording results in $B$ and $D$ matrices.
+On the next step $q$-components become $o$-components.
+If paths originating from current configurations join on some future step,
+$closure ()$ will use origin states to lookup comparison results in $B$ and $D$ matrices.
+If the paths do not join, then comparison performed by $update \Xund ptables ()$ is redundant ---
+unfortunately we do not know in advance which configurations will spawn ambiguous paths.
+\\
+
+
+\section{Formalization}\label{section_formalization}
+
+In this section we establish the relation between all intermediate representations.
+For brevity all proofs are moved to the appendix.
+%
+First of all, we rewrite REs in a form that makes submatch information explicit:
+to each subexpression we assign an \emph{implicit} and \emph{explicit} submatch index.
+Explicit indices enumerate submatch groups (for all other subexpressions they are zero).
+Implicit indices enumerate submatch groups and subexpressions that are not submatch groups,
+but contain nested or sibling groups and need to be considered by disambiguation.
+This form reflects the POSIX standard, which states that
+submatch extraction applies only to parenthesized subexpressions,
+but the longest-match rule applies to all subexpressions regardless of parentheses.
+
+ \begin{definition}
+ \emph{Indexed regular expressions (IRE)} over finite alphabet $\Sigma$, denoted $\XIR_\Sigma$:
+ \begin{enumerate}
+ \item
+ Empty IRE $(i, j, \epsilon)$ and
+ unit IRE $(i, j, \alpha)$, where $\alpha \in \Sigma$ and $i, j \in \YZ$,
+ are in $\XIR_\Sigma$.
+
+ \item If $r_1, r_2 \in \XIR_\Sigma$ and $i, j \in \YZ$, then
+ union $(i, j, r_1 \mid r_2)$,
+ product $(i, j, r_1 \cdot r_2)$ and
+ repetition $(i, j, r_1^{n, m})$, where $0 \leq n \leq m \leq \infty$,
+ are in $\XIR_\Sigma$.
+ \end{enumerate}
+ \end{definition}
+
+Function $\IRE$ transforms RE into IRE.
+It is defined via a composition of two functions,
+$mark()$ that transforms RE into IRE with submatch indices in the boolean range $\{0, 1\}$,
+and $enum()$ that substitutes boolean indices with consecutive numbers.
+An example of constructing an IRE from a RE is given on figure \ref{fig:mark_and_enum}.
+%
+ \begin{align*}
+ &\begin{aligned}
+ mark &: \XR_\Sigma \longrightarrow \XIR_\Sigma \\
+ mark &(x) \mid_{x \in \{\epsilon, \alpha\}} = (0, 0, x) \\[-0.2em]
+ %
+ mark &(e_1 \circ e_2) \mid_{\circ \in \{|,\cdot\}} = (i, 0,
+ (i, j_1, r_1) \circ
+ (i, j_2, r_2)
+ ) \\[-0.2em]
+ &\text{where } (i_1, j_1, r_1) = mark(e_1) \\[-0.2em]
+ &\space{\hphantom{where }}(i_2, j_2, r_2) = mark(e_2) \\[-0.2em]
+ &\space{\hphantom{where }}i = i_1 \vee i_2 \\[-0.2em]
+ %
+ mark &(e^{n, m}) \mid_{e = (e_1)} = (1, 0, (1, 1, r)) \\[-0.2em]
+ &\text{where } (\Xund, \Xund, r) = mark(e_1) \\[-0.2em]
+ %
+ mark &(e^{n, m}) \mid_{e \neq (e_1)} = (i, 0, (i, j, r)) \\[-0.2em]
+ &\text{where } (i, j, r) = mark(e) \\[-0.2em]
+ %
+ mark &((e)) = mark((e)^{1, 1})
+ \end{aligned}
+ %
+ &&\begin{aligned}
+ enum &: \YZ \times \YZ \times \XIR_\Sigma \longrightarrow \YZ \times \YZ \times \XIR_\Sigma \\
+ enum &(\bar{i}, \bar{j}, (i, j, x)) \mid_{x \in \{\epsilon, \alpha\}}
+ = (\bar{i} + i, \bar{j} + j, (\bar{i} \times i, \bar{j} \times j, x))
+ \\[-0.2em]
+ enum &(\bar{i}, \bar{j}, (i, j, r_1 \circ r_2)) \mid_{\circ \in \{|,\cdot\}}
+ = (i_2, j_2, (\bar{i} \times i, \bar{j} \times j, \bar{r}_1 \circ \bar{r}_2)) \\[-0.2em]
+ &\text{where } (i_1, j_1, \bar{r}_1) = enum(\bar{i} + i, \bar{j} + j, r_1) \\[-0.2em]
+ &\space{\hphantom{where }}(i_2, j_2, \bar{r}_2) = enum(i_1, j_1, r_2)
+ \\[-0.2em]
+ enum &(\bar{i}, \bar{j}, (i, j, r^{n,m})) = (i_1, j_1, (\bar{i} \times i, \bar{j} \times j, \bar{r}^{n,m})) \\[-0.2em]
+ &\text{where }
+ (i_1, j_1, \bar{r}) = enum(\bar{i} + i, \bar{j} + j, r)
+ \\[-0.2em]
+ \\[-0.2em]
+ \IRE &: \XR_\Sigma \rightarrow \XIR_\Sigma \\[-0.2em]
+ \IRE&(e) = r \\[-0.2em]
+ &\text{where }(\Xund, \Xund, r) = enum(1, 1, mark(e))
+ \\[-0.2em]
+ \end{aligned}
+ \end{align*}
+
+The relation between regular expressions and parse trees is given by the operator $\PT$.
+Each IRE denotes a set of PTs.
+%
+We write $str(t)$ to denote the string formed by concatenation of all alphabet symbols in the left-to-right traversal of $t$,
+and $\PT(r, w)$ denotes the set $\big\{ t \in \PT(r) \mid str(t) = w \big\}$ of all PTs for IRE $r$ and a string $w$.
+%
+ \begin{align*}
+ \PT &: \XIR_\Sigma \rightarrow 2^{\XT_\Sigma}
+ \\
+ \PT\big((i, \Xund, \epsilon)\big) &= \{ {\epsilon}^{i} \}
+ \\[-0.2em]
+ \PT\big((i, \Xund, \alpha)\big) &= \{ {\alpha}^{i} \}
+ \\[-0.2em]
+ \PT\big((i, \Xund, (i_1, j_1, r_1) \mid (i_2, j_2, r_2))\big) &=
+ \big\{ {T}^{i}(t, \varnothing^{i_2}) \mid t \in \PT\big((i_1, j_1, r_1)\big) \big\} \cup
+ \big\{ {T}^{i}(\varnothing^{i_1}, t) \mid t \in \PT\big((i_2, j_2, r_2)\big) \big\}
+ \\[-0.2em]
+ \PT\big((i, \Xund, (i_1, j_1, r_1) \cdot (i_2, j_2, r_2))\big) &=
+ \big\{ {T}^{i}(t_1, t_2) \mid
+ t_1 \in \PT\big((i_1, j_1, r_1)\big),
+ t_2 \in \PT\big((i_2, j_2, r_2)\big)
+ \big\} \\[-0.2em]
+ \PT\big((i, \Xund, (i_1, j_1, r_1)^{n, m})\big) &=
+ \begin{cases}
+ \big\{ {T}^{i}(t_1, \dots, t_m) \mid t_k \in \PT\big((i_1, j_1, r_1)\big) \;
+ \forall k = \overline{1, m} \big\} \cup \{ {T}^{i}(\varnothing^{i_1}) \} &\text{if } n = 0 \\[-0.2em]
+ \big\{ {T}^{i}(t_n, \dots, t_m) \mid t_k \in \PT\big((i_1, j_1, r_1)\big) \;
+ \forall k = \overline{n, m} \big\} &\text{if } n > 0
+ \end{cases}
+ \end{align*}
+ \medskip
+
+Following Okui and Suzuki, we assign \emph{positions} to the nodes of IRE and PT.
+The root position is $\Lambda$, and position of the $i$-th subtree of a tree with position $p$ is $p.i$
+(we shorten $\|t\|_\Lambda$ as $\|t\|$).
+The \emph{length} of position $p$, denoted $|p|$, is defined as $0$ for $\Lambda$ and $|p| + 1$ for $p.i$.
+%The set of all positions is denoted $\XP$.
+The subtree of a tree $t$ at position $p$ is denoted $t|_p$.
+Position $p$ is a \emph{prefix} of position $q$ iff $q = p.p'$ for some $p'$,
+and a \emph{proper prefix} if additionally $p \neq q$.
+Position $p$ is a \emph{sibling} of position $q$ iff $q = q'.i, p = q'.j$ for some $q'$ and $i,j \in \YN$.
+Positions are ordered lexicographically.
+The set of all positions of a tree $t$ is denoted $Pos(t)$.
+Additionally, we define a set of \emph{submatch positions} as
+$Sub(t) = \big\{ p \mid \exists t|_p = s^i : i \neq 0 \big\}$ ---
+a subset of $Pos(t)$ that contains positions of subtrees with nonzero implicit submatch index.
+Intuitively, this is the set of positions important from disambiguation perspective:
+in the case of ambiguity we do not need to consider the full trees,
+just the relevant parts of them.
+%
+PTs have two definitions of norm, one for $Pos$ and one for $Sub$,
+which we call \emph{p-norm} and \emph{s-norm} respectively:
+
+\begin{figure}
+\includegraphics[width=\linewidth]{img/mark_and_enum.pdf}
+\vspace{-2em}
+\caption{
+IRE for RE $(\epsilon|a^{0,\infty})(a|\epsilon)^{0,3}$
+and examples of PTs for string $a$.
+S-norm is marked with $\#$.
+}\label{fig:mark_and_enum}
+\end{figure}
+
+ \begin{definition}\label{tnorm_of_PTs}
+ The \emph{p-norm} and \emph{s-norm} of a PT $t$ at position $p$ are:
+ \begin{align*}
+ \pnorm{t}{p} =
+ \begin{cases}
+ -1 &\text{if } p \in Pos(t) \text{ and } t|_p = \varnothing^i \\[-0.2em]
+ |str(t|_p)| &\text{if } p \in Pos(t) \text{ and } t|_p \neq \varnothing^i \\[-0.2em]
+ \infty &\text{if } p \not\in Pos(t)
+ \end{cases}
+ \quad\quad\quad
+ \snorm{t}{p} =
+ \begin{cases}
+ -1 &\text{if } p \in Sub(t) \text{ and } t|_p = \varnothing^i \\[-0.2em]
+ |str(t|_p)| &\text{if } p \in Sub(t) \text{ and } t|_p \neq \varnothing^i \\[-0.2em]
+ \infty &\text{if } p \not\in Sub(t)
+ \end{cases}
+ \end{align*}
+ \end{definition}
+
+Generally, the norm of a subtree means the number of alphabet symbols in its leaves, with two exceptions.
+First, for nil subtrees the norm is $-1$: intuitively, they have the lowest ``ranking'' among all possible subtrees.
+Second, for nonexistent subtrees (those with positions not in $Pos(t)$) the norm is infinite.
+This may seem counter-intuitive at first, but it makes sense in the presence of REs with empty repetitions.
+According to POSIX, optional empty repetitions are not allowed, and our definition reflects this:
+if a tree $s$ has a subtree $s|_p$ corresponding to an empty repetition,
+and another tree $t$ has no subtree at position $p$,
+then the infinite norm $\|t\|_p$ ``outranks'' $\|s\|_p$.
+We define two orders on PTs:
+
+ \begin{definition}[P-order on PTs]
+ \label{total_order_on_PTs}
+ Given parse trees $t, s \in PT(r, w)$ for some IRE $r$ and string $w$, we say that $t <_p s$ w.r.t. \emph{decision position} $p$
+ iff $\pnorm{t}{p} > \pnorm{s}{p}$ and $\pnorm{t}{q} = \pnorm{s}{q} \; \forall q < p$.
+ We say that $t < s$ iff $t <_p s$ for some $p$.
+ \end{definition}
+
+ \begin{definition}[S-order on PTs]
+ \label{partial_order_on_PTs}
+ Given parse trees $t, s \in PT(r, w)$ for some IRE $r$ and string $w$, we say that $t \prec_p s$ w.r.t. \emph{decision position} $p$ % $p \in Sub(t) \cup Sub(s)$
+ iff $\snorm{t}{p} > \snorm{s}{p}$ and $\snorm{t}{q} = \snorm{s}{q} \; \forall q < p$.
+ We say that $t \prec s$ iff $t \prec_p s$ for some $p$.
+ \end{definition}
+
+ \begin{definition}\label{incomparable_PTs}
+ PTs $t$ and $s$ are \emph{incomparable}, denoted $t \sim s$,
+ iff neither $t \prec s$, nor $s \prec t$.
+ \end{definition}
+
+\begin{theoremEnd}[restate, no link to proof, no link to theorem, category=theorem_porder_on_PTs]{theorem}
+ \label{theorem_porder_on_PTs}
+ P-order $<$ is a strict total order on $\PT(e, w)$ for any IRE $e$ and string $w$.
+\end{theoremEnd}
+\begin{proofEnd}
+ We need to show that $<$ is transitive and trichotomous.
+ \begin{itemize}[itemsep=0.5em, topsep=0.5em]
+ \item[(1)]
+ Transitivity: we need to show that $\forall t, s, u \in \PT(e,w): (t < s \wedge s < u) \implies t < u$.
+ \\[0.5em]
+ Let $t <_p s$ and $s <_q u$ for some positions $p$, $q$, and let $r = min (p, q)$.
+ \\[0.5em]
+ First, we show that $\pnorm{t}{r} > \pnorm{u}{r}$.
+ If $p \leq q$, we have $\pnorm{t}{p} > \pnorm{s}{p}$ (implied by $t <_p s$)
+ and $\pnorm{s}{p} \geq \pnorm{u}{p}$ (implied by $s <_q u \wedge p \leq q$),
+ therefore $\pnorm{t}{p} > \pnorm{u}{p}$.
+ Otherwise $p > q$, we have $\pnorm{t}{q} > \pnorm{u}{q}$ (implied by $s <_q u$)
+ and $\pnorm{t}{q} = \pnorm{s}{q}$ (implied by $t <_p s \wedge q < p$),
+ therefore $\pnorm{t}{q} > \pnorm{u}{q}$.
+ \\[0.5em]
+ Second, we show that $\forall r' < r : \pnorm{t}{r'} = \pnorm{u}{r'}$.
+ We have $\pnorm{t}{r'} = \pnorm{s}{r'}$ (implied by $t <_p s \wedge r' < p$)
+ and $\pnorm{s}{r'} = \pnorm{u}{r'}$ (implied by $s <_q u \wedge r' < q$),
+ therefore $\pnorm{t}{r'} = \pnorm{u}{r'}$.
+
+ \item[(2)]
+ Trichotomy: we need to show that $\forall t, s \in \PT(e,w)$
+ exactly one of $t < s$, $s < t$ or $t = s$ holds.
+ Consider the set of positions where norms of $t$ and $s$ disagree
+ $P = \{p \in Pos(t) \cup Pos(s) : \pnorm{t}{p} \neq \pnorm{s}{p}\}$.
+ %
+ \begin{itemize}[itemsep=0.5em]
+ \item[(2.1)] First case: $P \neq \emptyset$.
+ We show that in this case exactly one of $t < s$ or $s < t$ is true
+ ($t \neq s$ is obvious).
+ \\[0.5em]
+ First, we show that at least one of $t < s$ or $s < t$ is true.
+ %
+ Let $p = min(P)$; it is well-defined since $P$ is non-empty, finite and lexicographically ordered.
+ %
+ For all $q < p$ we have $\pnorm{t}{q} = \pnorm{s}{q}$ (by definition of $p$
+ and because $\pnorm{t}{q} = \infty = \pnorm{s}{q}$ if $q \not\in Pos(t) \cup Pos(s)$).
+ %
+ Since $\pnorm{t}{p} \neq \pnorm{s}{p}$, we have either $t <_p s$ or $t <_p s$.
+ \\[0.5em]
+ Second, we show that at most one of $t < s$ or $s < t$ is true,
+ i.e. $<$ is asymmetric: $\forall t, s \in \PT(e,w) : t < s \implies s \not< t$.
+ %
+ Suppose, on the contrary, that $t <_p s$ and $s <_q t$ for some $p$, $q$.
+ Without loss of generality let $p \leq q$.
+ On one hand $t <_p s$ implies $\pnorm{t}{p} > \pnorm{s}{p}$.
+ But on the other hand $s <_q t \wedge p \leq q$ implies $\pnorm{t}{p} \leq \pnorm{s}{p}$.
+ Contradiction.
+
+ \item[(2.2)] Second case: $P = \emptyset$.
+ We show that in this case $t = s$.
+ \\[0.5em]
+ We have $Pos(t) = Pos(s)$ --- otherwise there is a position with norm $\infty$ in only one of the trees.
+ Therefore $t$ and $s$ have identical node structure.
+ %
+ By lemma \ref{lemma_positions} any position in $t$ and $s$ corresponds to the same position in $e$.
+ %
+ Since any position in $e$ corresponds to a unique explicit submatch index,
+ it must be that submatch indices of all nodes in $t$ and $s$ coincide.
+ %
+ Consider some position $p \in Pos(t)$.
+ If $p$ corresponds to an inner node, then both $t|_p$ and $s|_p$ are of the form $T^i(\hdots)$.
+ Otherwise, $p$ corresponds to a leaf node, which can be either $\varnothing$ or $\epsilon$ or $\alpha$.
+ Since all three have different norms ($-1$, $0$ and $1$ respectively),
+ and since $\pnorm{t}{p} = \pnorm{s}{p}$, it must be that $t|_p$ and $s|_p$ are identical.
+ \end{itemize}
+ \end{itemize}
+\end{proofEnd}
+\vspace{-0.5em}
+
+\begin{theoremEnd}[restate, no link to proof, no link to theorem, category=theorem_sorder_on_PTs]{theorem}
+ \label{theorem_sorder_on_PTs}
+ S-order $\prec$ is a strict weak order on $\PT(e, w)$ for any IRE $e$ and string $w$.
+\end{theoremEnd}
+\begin{proofEnd}
+ We need to show that $\prec$ is asymmetric and transitive, and incomparability relation $\sim$ is transitive.
+ \begin{itemize}[itemsep=0.5em, topsep=0.5em]
+ \item[(1)]
+ Asymmetry: we need to show that $\forall t, s \in \PT(e,w): t \prec s \implies s \not\prec t$.
+ \\[0.5em]
+ Suppose, on the contrary, that $t \prec_p s$ and $s \prec_q t$ for some $p$, $q$.
+ Without loss of generality let $p \leq q$.
+ On one hand $t \prec_p s$ implies $\snorm{t}{p} > \snorm{s}{p}$.
+ But on the other hand $s \prec_q t \wedge p \leq q$ implies $\snorm{t}{p} \leq \snorm{s}{p}$.
+ Contradiction.
+
+ \item[(2)]
+ Transitivity: we need to show that $\forall t, s, u \in \PT(e,w): (t \prec s \wedge s \prec u) \implies t \prec u$.
+ \\[0.5em]
+ Let $t \prec_p s$ and $s \prec_q u$ for some positions $p$, $q$, and let $r = min (p, q)$.
+ \\[0.5em]
+ First, we show that $\snorm{t}{r} > \snorm{u}{r}$.
+ If $p \leq q$, we have $\snorm{t}{p} > \snorm{s}{p}$ (implied by $t \prec_p s$)
+ and $\snorm{s}{p} \geq \snorm{u}{p}$ (implied by $s \prec_q u \wedge p \leq q$),
+ therefore $\snorm{t}{p} > \snorm{u}{p}$.
+ Otherwise $p > q$, we have $\snorm{t}{q} > \snorm{u}{q}$ (implied by $s \prec_q u$)
+ and $\snorm{t}{q} = \snorm{s}{q}$ (implied by $t \prec_p s \wedge q < p$),
+ therefore $\snorm{t}{q} > \snorm{u}{q}$.
+ \\[0.5em]
+ Second, we show that $\forall r' < r : \snorm{t}{r'} = \snorm{u}{r'}$.
+ We have $\snorm{t}{r'} = \snorm{s}{r'}$ (implied by $t \prec_p s \wedge r' < p$)
+ and $\snorm{s}{r'} = \snorm{u}{r'}$ (implied by $s \prec_q u \wedge r' < q$),
+ therefore $\snorm{t}{r'} = \snorm{u}{r'}$.
+
+ \item[(3)]
+ Transitivity of incomparability: we need to show that $\forall t, s \in \PT(e,w): (t \sim s \wedge s \sim u) \implies t \sim u$.
+ \\[0.5em]
+ By forward implication of lemma \ref{lemma_incomparability_equivdef}
+ $t \sim s \Rightarrow \forall p : \snorm{t}{p} = \snorm{s}{p}$ and
+ $s \sim u \Rightarrow \forall p : \snorm{s}{p} = \snorm{u}{p}$, therefore
+ $(t \sim s \wedge s \sim u) \Rightarrow \forall p : \snorm{t}{p} = \snorm{u}{p} \Rightarrow t \sim u$
+ by backward implication of lemma \ref{lemma_incomparability_equivdef}.
+ \end{itemize}
+\end{proofEnd}
+
+The following theorem \ref{theorem_order_compat} establishes an important relation between P-order and S-order.
+P-order is total, and there is a unique $<$-minimal tree $t_{min}$.
+S-order is partial, it partitions all trees into equivalence classes
+and there is a whole class of $\prec$-minimal trees $T_{min}$
+(such trees coincide in submatch positions, but differ in some non-submatch positions).
+Theorem \ref{theorem_order_compat} shows that $t_{min} \in T_{min}$.
+This means that P-order and S-order ``agree'' on the notion of minimal tree:
+we can continuously narrow down $T_{min}$ until we are left with $t_{min}$.
+In practice, this means that adding more parentheses in RE does not drastically change submatch results.
+%
+Note that this doesn't mean that P-order is an extension of S-order:
+the two orders may disagree.
+For example, consider trees $t$ and $u$ on figure \ref{fig:mark_and_enum}:
+on one hand $t \prec_{2.2} u$, because $\snorm{t}{2.2} = \infty > 0 = \snorm{u}{2.2}$ and s-norms at all preceding submatch positions agree;
+on the other hand $u <_{1.1} t$, because $\pnorm{t}{1.1} = -1 < 0 = \pnorm{u}{1.1}$
+and p-norms at all preceding positions agree.
+
+\begin{theoremEnd}[restate, no link to proof, no link to theorem, category=theorem_order_compat]{theorem}
+ \label{theorem_order_compat}
+ Let $t_{min}$ be the $<$-minimal tree in $\PT(e,w)$ for some IRE $e$ and string $w$,
+ and let $T_{min}$ be the class of the $\prec$-minimal trees in $\PT(e,w)$.
+ Then $t_{min} \in T_{min}$.
+\end{theoremEnd}
+\begin{proofEnd}
+ Consider any $t \in T_{min}$.
+ From $t$ we can construct another tree $t'$ in the following way.
+ Consider all positions $p \in Sub(t)$ which are not proper prefixes of another position in $Sub(t)$.
+ For each such position, $t|_p$ is itself a PT for some sub-IRE $r'$ and substring $w'$: $t|_p \in \PT(r', w')$.
+ Let $t'_{min}$ be the $<$-minimal tree in $\PT(r', w')$ and substitute $t|_p$ with $t'_{min}$.
+ Let $t'$ be the tree resulting from all such substitutions
+ (note that they are independent of the order in which we consider positions $p$).
+ Since substitutions preserve s-norm at submatch positions, we have $t' \in T_{min}$.
+ We will show that $t' = t_{min}$.
+ \\[0.5em]
+ Suppose, on the contrary, that $t' \neq t_{min}$.
+ %
+ Then $t_{min} <_p t'$ for some decision position $p$.
+ %
+ It must be that $p \not\in Sub(t') \cup Sub(t_{min})$, because
+ otherwise $\snorm{t_{min}}{p} = \pnorm{t_{min}}{p} > \pnorm{t'}{p} = \snorm{t'}{p}$
+ and $\pnorm{t_{min}}{p} = \pnorm{t'}{p} \; \forall q < p$ implies $\snorm{t_{min}}{p} = \snorm{t'}{p} \; \forall q < p$,
+ which means that $t_{min} \prec_p t'$, which contradicts to $t' \in T_{min}$.
+ Thus $p$ is a non-submatch position.
+ %
+ Let $p = p'.p''$, where $p'$ is the longest proper prefix of $p$ in $Sub(u) \cup Sub(t_{min})$.
+ %
+ For all $q \leq p'$ it must be that $\snorm{u}{q} = \snorm{t_{min}}{q}$,
+ otherwise $\snorm{u}{q} \neq \snorm{t_{min}}{q}$ implies $\pnorm{u}{q} \neq \pnorm{t_{min}}{q}$,
+ which contradicts to $t_{min} <_p t'$ because $q \leq p' < p$.
+ %
+ By lemma \ref{lemma_subtrees}, subtrees $t'_{p'}$ and $t_{min}|_{p'}$ are comparable:
+ $\exists r', w' : t'|_{p'}, t_{min}|_{p'} \in \PT(r', w')$.
+ By construction of $t'$, subtree $t'_{p'}$ is $<$-minimal in $\PT(r', w')$,
+ but at the same time $t_{min} <_{p'.p''} u$ implies $t_{min}|_{p'} <_{p''} u|_{p'}$.
+ Contradiction.
+\end{proofEnd}
+
+Following the idea of Okui and Suzuki,
+we go from comparison of parse trees to comparison of their linearized representation --- parenthesized expressions.
+Parenthesis $\Xl$ is opening, and
+parenthesis $\Xr$ is closing;
+the \emph{nil}-parenthesis $\Xm$ is both opening and closing.
+For convenience we sometimes annotate parentheses with \emph{height},
+which we define as the number of preceding opening parentheses (including this one)
+minus the number of preceding closing parentheses (including this one).
+Explicit height annotations allow us to consider PE fragments in isolation
+without losing the context of the whole expression.
+However, height is not a part of parenthesis itself,
+and it is not taken into account when comparing the elements of PEs.
+Function $\Phi$ transforms PT at the given height into PE:
+%
+ \begin{align*}
+ \Phi &: \YZ \times \XT_\Sigma \rightarrow \XP_\Sigma
+ \\
+ \Phi_{h}(t^{i}) &= \begin{cases}
+ str(t^{i}) &\text{if } i = 0 \\[-0.2em]
+ \Xm_h &\text{if } i \neq 0 \wedge t = \varnothing \\[-0.2em]
+ \Xl_{h+1} \Xr_h &\text{if } i \neq 0 \wedge t = \epsilon \\[-0.2em]
+ \Xl_{h+1} a \Xr_h &\text{if } i \neq 0 \wedge t = a \in \Sigma \\[-0.2em]
+ \Xl_{h+1} \Phi_{h+1}(t_1) \dots \Phi_{h+1}(t_n) \Xr_h &\text{if } i \neq 0 \wedge t = T(t_1, \dots, t_n)
+ \end{cases}
+ \end{align*}
+
+For a given IRE $r$ and string $w$ the set of all PEs $\big\{ \Phi_{0}(t) \mid t \in \PT(r, w) \big\}$ is denoted $\PE(r, w)$,
+and the set of all prefixes in $\PE(r, w)$ is denoted $\PR(r, w)$.
+Each PE $\alpha$ can be represented as $\alpha_0 a_1 \alpha_1 \dots a_n \alpha_n$,
+where $\alpha_i$ is the $i$-th \emph{frame} --- a possibly empty sequence of parentheses between
+subsequent alphabet symbols $a_i$ and $a_{i+1}$ (or the beginning and end of $\alpha$).
+PE fragments $\alpha$ and $\beta$ are \emph{comparable}
+if they have the same number of frames and $\alpha, \beta \in \PR(r, w)$ for some $r$ and $w$.
+%
+For fragments $\alpha$ and $\beta$,
+$\alpha \sqcap \beta$ denotes their longest common prefix,
+$\alpha \backslash \beta$ denotes the suffix of $\alpha$ after removing $\alpha \sqcap \beta$,
+$lasth(\alpha)$ denotes the height of the last parenthesis in $\alpha$ (or $\infty$ if $\alpha$ is empty or begins with an alphabet symbol),
+$minh(\alpha)$ denotes the minimal height of parenthesis in $\alpha$ (or $\infty$ if $\alpha$ is empty or begins with an alphabet symbol),
+$f\!irst(\alpha)$ denotes the first parenthesis in $\alpha$ (or $\bot$ if $\alpha$ is empty or begins with an alphabet symbol).
+For comparable PE fragments $\alpha$ and $\beta$ the index of the first distinct pair of frames is called \emph{fork}.
+
+\begin{figure}
+\includegraphics[width=\linewidth]{img/parenthesized_expressions.pdf}
+\vspace{-2em}
+\caption{
+Examples: (a) -- (d): four main rules of POSIX comparison,
+(e) -- pairwise comparison of PEs.
+}\label{fig_pe}
+\end{figure}
+
+ \begin{definition}
+ \label{def_traces}
+ Let $\alpha$, $\beta$ be comparable PE prefixes, such that
+ $\alpha = \alpha_0 a_1 \alpha_1 \dots a_n \alpha_n$,
+ $\beta = \beta_0 a_1 \beta_1 \dots a_n \beta_n$ and $k$ is the fork.
+ We define $trace (\alpha, \beta)$ as the sequence $(\rho_0, \dots, \rho_n)$, where:
+ %
+ \begin{align*}
+ \rho_i = \begin{cases}
+ -1 &\text{if } i < k \\[-0.2em]
+ min (lasth (\alpha_i \sqcap \beta_i), minh(\alpha_i \backslash \beta_i)) &\text{if } i = k \\[-0.2em]
+ min (\rho_{i-1}, minh(\alpha_i)) &\text{if } i > k
+ \end{cases}
+ \end{align*}
+
+ We write $traces(\alpha, \beta)$ to denote $\big( trace (\alpha, \beta), trace (\beta, \alpha) \big)$.
+ \end{definition}
+
+ \begin{definition}\label{prec1}
+ (Longest precedence.)
+ Let $\alpha$, $\beta$ be comparable PE prefixes and
+ $traces(\alpha, \beta) = \big( (\rho_0, \dots, \rho_n), (\rho'_0, \dots, \rho'_n) \big)$.
+ Then $\alpha \sqsubset \beta \Leftrightarrow \exists i \leq n:
+ \big( \rho_i > \rho'_i \big) \wedge
+ \big( \rho_j = \rho'_j \; \forall j > i \big)$.
+ If neither $\alpha \sqsubset \beta$, nor $\beta \sqsubset \alpha$,
+ then $\alpha$, $\beta$ are \emph{longest-equivalent}: $\alpha \sim \beta$
+ (note that in this case $\rho_i = \rho'_i \; \forall i = \overline {1, n}$).
+ \end{definition}
+
+ \begin{definition}\label{prec2}
+ (Leftmost precedence.)
+ Let $\alpha$, $\beta$ be comparable PE prefixes, and let
+ $x = first (\alpha \backslash \beta)$,
+ $y = first (\beta \backslash \alpha)$.
+ Then $\alpha \subset \beta \Leftrightarrow x < y$, where
+ the set of possible values of $x$ and $y$ is ordered as follows:
+ $\bot < \Xr < \Xl < \Xm$.
+ \end{definition}
+
+ \begin{definition}\label{pe_order}
+ (Longest-leftmost precedence.)
+ Let $\alpha$, $\beta$ be comparable PE prefixes, then
+ $\alpha < \beta \Leftrightarrow
+ \big( \alpha \sqsubset \beta \big) \vee
+ \big( \alpha \sim \beta \wedge \alpha \subset \beta \big)$.
+ \end{definition}
+
+\begin{theoremEnd}[restate, no link to proof, no link to theorem, category=theorem_order_on_pe_same_as_on_pt]{theorem}
+ \label{theorem_order_on_pe_same_as_on_pt}
+ If $s, t \in \PT(e, w)$ for some IRE $e$ and string $w$, then
+ $s \prec t \Leftrightarrow \Phi_{h}(s) < \Phi_{h}(t) \; \forall h$.
+\end{theoremEnd}
+\begin{proofEnd}
+ Forward implication is given by lemma \ref{lemma_pe_less}.
+ Backward implication:
+ suppose, on the contrary, that $\Phi_{h}(s) < \Phi_{h}(t) \; \forall h$, but $s \not\prec t$.
+ Since $\prec$ is a strict weak order (by theorem \ref{theorem_sorder_on_PTs}),
+ it must be that either $s \sim t$
+ (then $\Phi_{h}(s) = \Phi_{h}(t) \; \forall h$ by lemma \ref{lemma_pe_equiv}),
+ or $t \prec s$
+ (then $\Phi_{h}(t) < \Phi_{h}(s) \; \forall h$ by lemma \ref{lemma_pe_less}).
+ Both cases contradict $\Phi_{h}(s) < \Phi_{h}(t) \; \forall h$,
+ therefore assumption $s \not\prec t$ is incorrect.
+\end{proofEnd}
+
+Next, we go from comparison of PEs to comparison of TNFA paths.
+%
+A \emph{path} in TNFA $(\Sigma, Q, T, \Delta, q_0, q_f)$
+is a sequence of transitions $\{(q_i, a_i, b_i, q_{i + 1})\}_{i=1}^{n-1} \subseteq \Delta$, where $n \in \YN$.
+%
+Every path induces a string of alphabet symbols
+and a mixed string of symbols and tags which corresponds to a fragment of PE:
+positive opening tags map to $\Xl$,
+positive closing tags map to $\Xr$,
+and negative tags map to $\Xm$.
+We write $q_1 \overset {s|\alpha} {\rightsquigarrow} q_2$
+to denote the fact that a path from $q_1$ to $q_2$ induces alphabet string $s$ and PE fragment $\alpha$.
+%
+We extend the notion of order from PEs to paths: given paths
+$\pi_1 = q_1 \overset {s|\alpha} {\rightsquigarrow} q_2$ and
+$\pi_2 = q_1 \overset {s|\beta} {\rightsquigarrow} q_3$
+we say that $\pi_1 < \pi_2$ if $\alpha < \beta$.
+%
+For a given IRE $e$ we say that a path in TNFA for $e$ is \emph{minimal} if it induces
+$\alpha = \PE(t)$ for some minimal tree $t \in \PT(e)$.
+%
+Two paths are \emph{ambiguous} if their start and end states coincide and they induce the same alphabet string.
+Two paths have a \emph{join point} if they have ambiguous prefixes.
+%
+In order to justify our TNFA simulation algorithm,
+we need to show that PEs induced by TNFA paths can be compared incrementally
+(otherwise we would have to keep full-length PEs, which requires the amount of memory proportional to the length of input).
+Justification of incremental comparison consists of two parts:
+the following lemma \ref{lemma_incr_cmp_frames} justifies comparison between frames,
+and lemmas \ref{lemma_closure_minpaths}, \ref{lemma_closure_noloop}, \ref{lemma_closure_rightdist}
+in section \ref{section_closure} justify comparison at join points inside of one frame
+(this is necessary as the number of paths in closure may be exponential in the number of states).
+
+\begin{theoremEnd}[restate, no link to proof, no link to theorem, category=lemma_frames]{lemma}
+[Frame-by-frame comparison of PEs]
+ \label{lemma_incr_cmp_frames}
+ If $\alpha$, $\beta$ are comparable PE prefixes,
+ $c$ is an alphabet symbol and
+ $\gamma$ is a single-frame PE fragment,
+ then $\alpha < \beta$ implies $\alpha c \gamma < \beta c \gamma$.
+\end{theoremEnd}
+\begin{proofEnd}
+ Let $\big((\rho_1, \dots, \rho_n), (\rho'_1, \dots, \rho'_n)\big) = traces(\alpha, \beta)$ where $n \geq 1$.
+ Since $\alpha c \gamma$, $\beta c \gamma$ have one more frame than $\alpha$, $\beta$
+ and the first $n$ frames are identical to frames of $\alpha$, $\beta$,
+ we can represent $traces(\alpha c \gamma, \beta c \gamma)$
+ as $\big((\rho_1, \dots, \rho_n, \rho_{n+1}), (\rho'_1, \dots, \rho'_n, \rho'_{n+1})\big)$.
+ %
+ \begin{itemize}[itemsep=0.5em, topsep=0.5em]
+ \item[(1)]
+ Case $\alpha \sim \beta \wedge \alpha \subset \beta$.
+ In this case $\rho_i = \rho'_i \;\forall i \leq n$,
+ therefore $\rho_{n+1} = min(\rho_n, minh(\gamma)) = min(\rho'_n, minh(\gamma)) = \rho'_{n+1}$
+ and $\alpha c \gamma \sim \beta c \gamma$.
+ Furthermore,
+ $first (\alpha c \gamma \backslash \beta c \gamma) = first (\alpha \backslash \beta)$ and
+ $first (\beta c \gamma \backslash \alpha c \gamma) = first (\beta \backslash \alpha)$,
+ therefore $\alpha \subset \beta \implies \alpha c \gamma \subset \beta c \gamma$.
+ \item[(2)]
+ Case $\alpha \sqsubset \beta$.
+ In this case $\exists j \leq n$ such that $\rho_j > \rho'_j$ and $\rho_i = \rho'_i \;\forall j < i \leq n$.
+ We show that $\exists l \leq n + 1$ such that $\rho_l > \rho'_l$ and $\rho_i = \rho'_i \;\forall l < i \leq n + 1$,
+ which by definition means that $\alpha c \gamma \sqsubset \beta c \gamma$.
+ \begin{itemize}
+ \item[(2a)]
+ Case $j < n$.
+ In this case $\rho_n = \rho'_n$ and
+ $\rho_{n+1} = min(\rho_n, minh(\gamma)) = min(\rho'_n, minh(\gamma)) = \rho'_{n+1}$,
+ therefore $l = j$.
+ \item[(2b)]
+ Case $j = n$ and $minh(\gamma) > \rho'_n$.
+ In this case $\rho_n > \rho'_n$ and we have
+ $\rho_{n+1} = min(\rho_n, minh(\gamma)) > \rho'_n$ and
+ $\rho'_{n+1} = min(\rho'_n, minh(\gamma)) = \rho'_n$,
+ therefore $\rho_{n+1} > \rho'_{n+1}$
+ and $l = n + 1$.
+ \item[(2c)]
+ Case $j = n$ and $minh(\gamma) \leq \rho'_n$.
+ In this case $\rho_n > \rho'_n$ and we have
+ $\rho_{n+1} = min(\rho_n, minh(\gamma)) = minh(\gamma)$ and
+ $\rho'_{n+1} = min(\rho'_n, minh(\gamma)) = minh(\gamma)$,
+ therefore $\rho_{n+1} = \rho'_{n+1}$
+ and $l = n$.
+ \end{itemize}
+ \end{itemize}
+ In both cases $\alpha c \gamma < \beta c \gamma$.
+\end{proofEnd}
+
+
+\section{closure construction}\label{section_closure}
+
+The problem of constructing $\epsilon$-closure with POSIX disambiguation
+can be formulated as a shortest path problem on directed graph with weighted arcs.
+In our case weight is not a number --- it is the PE fragment induced by the path.
+%
+We give two algorithms for closure construction: GOR1, named after the well-known Goldberg-Radzik algorithm \cite{GR93},
+and GTOP, named after ``global topological order''.
+%
+Both have the usual structure of shortest-path finding algorithms.
+The algorithm starts with a set of initial configurations, empty queue and empty set of resulting configurations.
+Initial configurations are enqueued and the algorithm loops until the queue becomes empty.
+At each iteration it dequeues configuration $(q, o, u, r)$ and scans $\epsilon$-transitions from state $q$.
+For transition $(q, \Xund, \gamma, p)$ it constructs a new configuration $(p, o, v, r)$
+that combines $u$ and $\gamma$ in an extended path $v$.
+If the resulting set contains another configuration for state $p$,
+then the algorithm chooses the configuration which has a better path from POSIX perspective.
+Otherwise it adds the new configuration to the resulting set.
+If the resulting set was changed, the new configuration is enqueued for further scanning.
+Eventually all states in $\epsilon$-closure are explored, no improvements can be made, and the algorithm terminates.
+%
+%Lemma \ref{lemma_closure_rightdist} allows us to skip comparison in non-join states (with in-degree 1), because
+%any path to such state is formed by concatenation of the unique transition and the shortest known path to the previous state.
+\\
+
+The difference between GOR1 and GTOP is in the order they inspect configurations.
+%
+Both algorithms are based on the idea of topological ordering.
+Unlike other shortest-path algorithms, their queuing discipline is based on graph structure, not on the distance estimates.
+This is crucial, because we do not have any distance estimates:
+paths can be compared, but there is no absolute ``POSIX-ness'' value that we can attribute to each path.
+%
+GOR1 is described in \cite{GR93}.
+It uses two stacks and makes a number of passes;
+each pass consists of a depth-first search on the admissible subgraph
+followed by a linear scan of states that are topologically ordered by depth-first search.
+The algorithm is one of the most efficient shortest-path algorithms \cite{CGR96}.
+$n$-Pass structure guarantees worst-case complexity $O(n \, m)$ of the Bellman-Ford algorithm,
+where $n$ is the number of states and $m$ is the number of transitions in $\epsilon$-closure
+(both can be approximated by TNFA size) \cite{CGGTW09}.
+%
+GTOP is a simple algorithm that maintains one global priority queue (e.g. a binary heap)
+ordered by the topological index of states (for graphs with cycles, we assume reverse depth-first post-order).
+Since GTOP does not have the $n$-pass structure, its worst-case complexity is not clear.
+However, it is much simpler to implement
+and in practice it performs almost identically to GOR1 on graphs induced by TNFA $\epsilon$-closures.
+%
+On acyclic graphs, both GOR1 and GTOP have linear $O(n + m)$ complexity.
+\\
+
+\begin{algorithm}[] \DontPrintSemicolon \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
+\begin{multicols}{2}
+
+ \newcommand \NOPASS {O\!F\!F}
+ \newcommand \TOPSORT {T\!O\!P}
+ \newcommand \LINEAR {L\!I\!N}
+ \newcommand \INQUEUE {I\!N}
+ \newcommand \OFFQUEUE {OUT}
+ \newcommand \Xfalse {f\!al\!se}
+
+ \setstretch{0.85}
+
+ \Fn {$\underline{closure \Xund gor1(N\!=\!(\Sigma, Q, T, \Delta, q_0, q_f), X, U, B, D)} \smallskip$} {
+
+ \Indm
+ context: $C = (N, U, B, D$ \;
+ \Indp
+ $,\, topsort, linear : \text{stacks of states } q \in Q$ \;
+ $,\, result : Q \rightarrow \YC \cup \{ \varnothing \}$ \;
+ $,\, status : Q \rightarrow \{ \NOPASS, \TOPSORT, \LINEAR \}$ \;
+ $,\, indeg : Q \rightarrow \YZ$ \tcp{in-degree of state}
+ $,\, active : Q \rightarrow \YB$ \tcp{true if state needs rescan}
+ $,\, etrans : Q \rightarrow 2^{\Delta^\epsilon}$ \tcp{$\epsilon$-transitions ordered by priority}
+ $,\, next : Q \rightarrow \YZ)$ \tcp{index of current transition}
+ \Indm
+ \Indp
+
+ \BlankLine
+ $result(q) \equiv \varnothing$ \;
+ $status(q) \equiv \NOPASS$ \;
+ $active(q) \equiv \Xfalse$ \;
+ $next(q) \equiv 1$ \;
+
+ \BlankLine
+ \For {$x = (\Xund, q, \Xund, \Xund) \in X$ sorted by inverted $prec(\,)$} {
+ $result(q) = x$ \;
+ $push(topsort, q)$
+ }
+
+ \BlankLine
+ \While {$topsort$ is not empty} {
+
+ \BlankLine
+ \While {$topsort$ is not empty} {
+ $q = pop(topsort)$ \;
+
+ \If {$status(q) \neq \LINEAR$} {
+
+ $status(q) = \TOPSORT$ \;
+ $push(topsort, q)$ \;
+
+ \BlankLine
+ \If {$\neg scan(q, C, \Xfalse)$} {
+ $status(q) = \LINEAR$ \;
+ $pop(topsort)$ \;
+ $push(linear, q)$
+ }
+ }
+ }
+
+ \BlankLine
+ \While {$linear$ is not empty} {
+ $q = pop(linear)$ \;
+
+ \If {$active(q)$} {
+ $next(q) = 1$ \;
+ $active(q) = \Xfalse$ \;
+ $scan(q, C, true)$ \;
+ }
+
+ $status(q) = \NOPASS$ \;
+ }
+ }
+
+ \BlankLine
+ \Return $prune(result, N)$
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{scan (q, C, all)} \smallskip$} {
+ $any = \Xfalse$ \;
+
+ \While {$next(q) < n$} {
+ $(q, \epsilon, \tau, p) = etrans (q)_{next(q)}$ \;
+ $next(q) = next(q) + 1$ \;
+ $x = result(p), \; (o, q, u, r) = result(q)$ \;
+ $y = (o, p, extend \Xund path (H, u, \tau), r)$ \;
+
+ \BlankLine
+ \If {$x \!=\! \varnothing \vee indeg(p) \!<\! 2 \vee less(y, x, C)$} {
+ $result(p) = y$ \;
+ \If {$status(q) = \NOPASS$} {
+ $any = true$ \;
+ $next(p) = 1$ \;
+ $push(topsort, p)$ \;
+ \lIf {$\neg all$} {$break$}
+ }
+ \lElse {
+ $active(p) = 1$
+ }
+ }
+ }
+
+ \Return $any$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+\columnbreak
+
+ \Fn {$\underline{closure \Xund gtop(N\!=\!(\Sigma, Q, T, \Delta, q_0, q_f), X, U, B, D)} \smallskip$} {
+
+ \Indm
+ context: $C = (N, U, B, D$ \;
+ \Indp
+ $,\, queue : \text{priority queue of states } q \in Q$ \;
+ $,\, result : Q \rightarrow \YC \cup \{ \varnothing \}$ \;
+ $,\, status : Q \rightarrow \{ \INQUEUE, \OFFQUEUE\}$ \;
+ $,\, indeg : Q \rightarrow \YZ$ \tcp{in-degree of state}
+ $,\, topord : Q \rightarrow \YZ$ \tcp{topological index of state}
+ $,\, etrans : Q \rightarrow 2^{\Delta^\epsilon}$ \tcp{$\epsilon$-transitions}
+ \Indm
+ \Indp
+
+ \BlankLine
+ $result(q) \equiv \varnothing$ \;
+ $status(q) \equiv \OFFQUEUE$ \;
+
+ \BlankLine
+ \For {$x = (\Xund, q, \Xund, \Xund) \in X$} {
+ $y = result(q)$ \;
+ \If {$y \!=\! \bot \vee less(x, y, C)$} {
+ $result(q) = x$ \;
+ \If {$status(q) \neq \INQUEUE$} {
+ $insert \Xund with \Xund priority(queue, q, topord(q))$ \;
+ $status(q) = \INQUEUE$ \;
+ }
+ }
+ }
+
+ \BlankLine
+ \While {$queue$ is not empty} {
+
+ $q = extract \Xund min(queue)$ \;
+ $status(q) = \OFFQUEUE$ \;
+
+ \BlankLine
+ \For {$(q, \epsilon, \tau, p) \in etrans (q)$} {
+ $x = result(p), \; (o, q, u, r) = result(q)$ \;
+ $y = (o, p, extend \Xund path (H, u, \tau), r)$ \;
+
+ \BlankLine
+ \If {$x \!=\! \varnothing \vee indeg(p) \!<\! 2 \vee less(y, x, C)$} {
+ $result(p) = y$ \;
+ \If {$status(p) \neq \INQUEUE$} {
+ $insert \Xund with \Xund priority(queue, p, topord(p))$ \;
+ $status(p) = \INQUEUE$ \;
+ }
+ }
+ }
+ }
+
+ \BlankLine
+ \Return $prune(result, N)$
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{prune (X, N)} \smallskip$} {
+ \Return $\big\{ (\Xund, q, \Xund, \Xund) \in X \mid
+ q \in F \vee \exists (q, \alpha, \Xund, \Xund) \in \Delta^\Sigma \}$
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{less (x, y, C)} \smallskip$} {
+ $(\Xund, \Xund, l) = compare (x, y, U, B, D)$ \;
+ \Return $l < 0$
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{prec (x, y, D)} \smallskip$} {
+ $(q, \Xund, \Xund, \Xund) = x, \; (p, \Xund, \Xund, \Xund) = y$ \;
+ \Return $D[q][p] < 0$
+ }
+ \BlankLine
+ \BlankLine
+
+\end{multicols}
+\vspace{1em}
+\caption{
+Closure algorithms GOR1 (on the left) and GTOP (on the right).
+Definition of functions of $push()$, $pop()$, $insert \Xund with \Xund priority()$, $extract \Xund min()$,
+$indeg()$ and $topord()$ is omitted for brevity.
+Definitions of $compare ()$ and $extend \Xund path ()$ are given in sections \ref{section_comparison} and \ref{section_pathtree}.
+$\YC$ is the set of all configurations.}
+\end{algorithm}
+
+The general proof of correctness of shortest-path algorithms is out of the scope of this paper.
+However, we need to justify the application of these algorithms to our setting.
+%
+In order to do that, we recall the framework for solving shortest-path algorithms based on \emph{closed semirings}
+described in \cite{CLR} (section 26.4)
+and show that our problem fits into this framework.
+%
+A \emph{semiring} is a structure $(\YK, \oplus, \otimes, \Xbar{0}, \Xbar{1})$, where
+$\YK$ is a set,
+$\oplus \!\!:\!\! \YK \times \YK \rightarrow \YK$ is an associative and commutative operation with identity element $\Xbar{0}$,
+$\otimes \!\!:\!\! \YK \times \YK \rightarrow \YK$ is an associative operation with identity element $\Xbar{1}$,
+$\otimes$ distributes over $\oplus$
+and $\Xbar{0}$ is annihilator for $\otimes$.
+%
+Additionally, \emph{closed} semiring requires that
+$\oplus$ is idempotent,
+any countable $\oplus$-sum of $\YK$ elements is in $\YK$,
+and associativity, commutativity, distributivity and idempotence apply to countable $\oplus$-sums.
+Mohri generalizes this definition and notes that either left or right distributivity is sufficient \cite{Moh02}.
+%
+In our case $\YK$ is the set of closure paths without tagged $\epsilon$-loops:
+the following lemma \ref{lemma_closure_minpaths} and \ref{lemma_closure_noloop}
+show that, on one hand, paths with tagged $\epsilon$-loops are not minimal,
+and on the other hand such paths are discarded by the algorithm,
+so they can be removed from consideration.
+%
+Consequently $\YK$ is finite.
+We have semiring $(\YK, min, \cdot, \varnothing, \epsilon)$, where
+$min$ is POSIX comparison of ambiguous paths,
+$\cdot$ is concatenation of paths at the join points
+(subject to restriction that paths do not contain tagged $\epsilon$-loops
+and remain within TNFA bounds --- concatenation of arbitrary paths is not in $\YK$),
+$\varnothing$ corresponds to artificial infinitely long path,
+and $\epsilon$ is the empty path.
+%
+It is easy to show that
+$min$ is commutative and associative,
+$\varnothing$ is identity for $min$ ($min(\pi, \varnothing) = min(\varnothing, \pi) = \pi$),
+$\cdot$ is associative,
+$\epsilon$ is identity for $\cdot$ ($\pi \cdot \epsilon = \epsilon \cdot \pi = \pi$),
+$\varnothing$ is annihilator for $\cdot$ ($\pi \cdot \varnothing = \varnothing \cdot \pi = \varnothing$),
+and right distributivity of $\cdot$ over $min$ for paths with at most one $\epsilon$-loop is given by lemma \ref{lemma_closure_rightdist}.
+%
+Idempotence holds because $min(\pi, \pi) = \pi$.
+%
+Since $\YK$ is finite, the properties for $\oplus$-sums over countable subsets are satisfied.
+
+\begin{theoremEnd}[restate, no link to proof, no link to theorem, category=lemmata_closure]{lemma}
+ \label{lemma_closure_minpaths}
+ Minimal paths do not contain tagged $\epsilon$-loops.
+\end{theoremEnd}
+\begin{proofEnd}
+ % Proof in terms of REs and correspondence between subexpression and loop
+ % is a bit hard because of unrolling of repetition in TNFA construction
+ % (there is no direct correspondence between sub-RE and sub-TNFA).
+ %
+ Suppose, on the contrary, that $\pi$ is a minimal path in some TNFA
+ and that $\pi$ contains at least one tagged $\epsilon$-loop.
+ We show that it is possible to construct another path $\pi'$ such that $\pi' < \pi$.
+ %
+ Path $\pi$ can be represented as
+ $\pi = \pi_1 \pi_2 \pi_3$, where
+ $\pi_1 = q_0 \overset {u | \alpha} {\rightsquigarrow} q$,
+ $\pi_2 = q \overset {\epsilon | \beta} {\rightsquigarrow} q$ is the last tagged $\epsilon$-loop on $\pi$ and
+ $\pi_3 = q \overset {v | \gamma} {\rightsquigarrow} q_f$.
+ Let $\pi' = \pi_1 \pi_3$ be the path that is obtained from $\pi$ by removing the loop $\pi_2$.
+ Paths $\pi$ and $\pi'$ consume the same input string $uv$
+ and induce comparable PEs $\alpha \beta \gamma$ and $\alpha \gamma$.
+ Let $\big( (\rho_1, \hdots, \rho_n), (\rho'_1, \hdots, \rho'_n) \big) = traces (\alpha \beta \gamma, \alpha \gamma)$
+ and let $k$ be the index of the fork frame.
+ %
+ By construction of TNFA the loop $\pi_2$ must be contained in a sub-TNFA $f$
+ for sub-IRE of the form $e = (\Xund, \Xund, e_1^{1,\infty})$,
+ as this is the only looping TNFA construct --- see algorithm \ref{alg_tnfa}.
+ Let $f_1$ be the sub-TNFA for $e_1$.
+ Path $\pi$ enters $f$ and iterates through $f_1$ at least twice before leaving $f$
+ (single iteration is not enough to create a loop by TNFA construction).
+ Let $j$ be the total number of iterations through $f_1$,
+ and let $i$ be the index of the last $\epsilon$-loop iteration
+ (note that not all iterations are necessarily $\epsilon$-loops).
+ Consider two possible cases:
+ %
+ \begin{enumerate}[itemsep=0.5em, topsep=0.5em]
+ \item[(1)]
+ Case $i = j$.
+ In this case fork of $\alpha \beta \gamma$ and $\alpha \gamma$ happens immediately after $(i-1)$-th iteration:
+ %
+ \begin{alignat*}{10}
+ \alpha \beta \gamma &= x_0 \Xl_{h-1} \;&&\; \Xl_h x_1 \Xr_h \hdots \Xl_h x_{i-1} \Xr_h \;&&\big|\; \Xl_h x_{i} \Xr_h \;&&\; \Xr_{h-1} x_{j+1} \\[-0.5em]
+ \alpha \gamma &= x_0 \Xl_{h-1} \;&&\; \Xl_h x_1 \Xr_h \hdots \Xl_h x_{i-1} \Xr_h \;&&\big|\; \;&&\; \Xr_{h-1} x_{j+1}
+ \end{alignat*}
+ %
+ Since $x_i$ is an $\epsilon$-loop, it is contained in the fork frame of $\alpha \beta \gamma$.
+ We have $minh (\beta) = h$ and $minh (\gamma) \leq h - 1$, therefore $\rho_k = \rho'_k \leq h - 1$.
+ Subsequent frames $l > k$ (if any) are identical and thus $\rho_l = \rho'_l$.
+ Furthermore, $first (\gamma) = \Xr < \Xl = first (\beta)$.
+ Therefore $\alpha \beta \gamma \sim \alpha \gamma$ and $\alpha \gamma \subset \alpha \beta \gamma$.
+
+ \item[(2)]
+ Case $i < j$.
+ In this case $(i + 1)$-th iteration cannot be an $\epsilon$-loop
+ (because we assumed that $i$-th iteration is the last $\epsilon$-loop),
+ therefore the fork of $\alpha \beta \gamma$ and $\alpha \gamma$ happens
+ inside of $i$-th iteration of $\alpha \beta \gamma$
+ and $(i + 1)$-th iteration of $\alpha \gamma$:
+ %
+ \begin{alignat*}{10}
+ \alpha \beta \gamma &= x_0 \Xl_{h-1} \;&&\; \Xl_h x_1 \Xr_h \hdots \Xl_h x_{i-1} \Xr_h \Xl_h y_1 \;&&\big|\; y_2 \Xr_h \Xl_h x_{i+1} && \Xr_h \Xl_h x_{i+2} \Xr_h \hdots \Xl_h x_j \Xr_h \;&&\; \Xr_{h-1} x_{j+1} \\[-0.5em]
+ \alpha \gamma &= x_0 \Xl_{h-1} \;&&\; \Xl_h x_1 \Xr_h \hdots \Xl_h x_{i-1} \Xr_h \Xl_h y_1 \;&&\big|\; y_3 && \Xr_h \Xl_h x_{i+2} \Xr_h \hdots \Xl_h x_j \Xr_h \;&&\; \Xr_{h-1} x_{j+1}
+ \end{alignat*}
+ %
+ Here $y_1 y_2 = x_i$ and $y_1 y_3 = x_{i+1}$ ($i$-th iteration is missing from $\alpha \gamma$ by construction of $\pi'$).
+ Fragment $y_2$ is part of the $\epsilon$-loop,
+ therefore fork frame of $\alpha \beta \gamma$ contains a parenthesis $\Xr_h$ and we have $\rho_k = h$.
+ On the other hand, $y_3$ contains alphabet symbols,
+ because $x_{i+1}$ is not an $\epsilon$-loop and $y_1$ is a part of the $\epsilon$-loop.
+ Therefore fork frame of $\alpha \gamma$ ends in $y_3$ and we have $\rho'_k > h$.
+ %
+ %In this case
+ %fork frame of $\alpha \beta \gamma$ contains $y_2 \Xr_h \Xl_h$ fragment, because $y_2$ is part of the $\epsilon$-loop.
+ %But the fork frame of $\alpha \gamma$ ends inside of $y_3$, because $(i+1)$-th repetiton is not an $\epsilon$-loop and must contain alphabet symbols.
+ %Therefore at the fork frame $k$ we have $\rho_k = h$ and $\rho'_k > h$.
+ %
+ All subsequent frames $l > k$ are identical:
+ if they contain parentheses of height less than $h$, then $\rho_l = \rho'_l < h$;
+ otherwise $\rho_l \leq h$ and $\rho'_l > h$.
+ Therefore $\alpha \gamma \sqsubset \alpha \beta \gamma$.
+ \end{enumerate}
+ %
+ In both cases $\alpha \gamma < \alpha \beta \gamma$,
+ which contradicts the fact that $\pi$ is a minimal path.
+\end{proofEnd}
+\vspace{-0.5em}
+
+\begin{theoremEnd}[restate, no link to proof, no link to theorem, category=lemmata_closure]{lemma}
+ \label{lemma_closure_noloop}
+ GOR1 and GTOP discard paths with tagged $\epsilon$-loops.
+\end{theoremEnd}
+\begin{proofEnd}
+ Suppose that GOR1/GTOP finds path $\pi_1 \pi_2$
+ where $\pi_1 = q_0 \overset {s | \alpha} {\rightsquigarrow} q_1$
+ and $\pi_2 = q_1 \overset {\epsilon | \gamma} {\rightsquigarrow} q_1$ is a tagged $\epsilon$-loop.
+ Both algorithms construct new paths by exploring transitions from the end state of existing paths,
+ so they can only find $\pi_1 \pi_2$ after they find $\pi_1$.
+ Therefore when GOR1/GTOP finds $\pi_1 \pi_2$,
+ it already has some shortest-path candidate $\pi'_1 = q_0 \overset {s | \alpha'} {\rightsquigarrow} q_1$
+ and must compare ambiguous paths $\pi_1 \pi_2$ and $\pi'_1$.
+ There are two possibilities: either $\alpha' = \alpha$
+ or $\alpha' < \alpha$ (the latter means that the algorithm has found
+ a shorter path to $q_1$ in between finding $\pi_1$ and $\pi_1 \pi_2$).
+ Let $\big( (\rho_1, \hdots, \rho_k), (\rho'_1, \hdots, \rho'_k) \big) = traces (\alpha', \alpha \gamma)$.
+ %
+ \begin{itemize}[itemsep=0.5em, topsep=0.5em]
+ \item[(1)]
+ Case $\alpha' = \alpha$.
+ Because $\alpha$ is a proper prefix of $\alpha \gamma$,
+ fork happens at the last frame and we have
+ $\rho_k = lasth(\alpha)$ and
+ $\rho'_k = min (lasth(\alpha), minh(\gamma))$.
+ If $lasth(\alpha) > minh(\gamma)$, then $\rho_k > \rho'_k$ and $\alpha \sqsubset \alpha \gamma$.
+ Otherwise $\rho_k = \rho'_k$ and $\alpha \sim \alpha \gamma$,
+ and we have $first(\alpha \backslash \alpha \gamma) = \bot$ and $first(\alpha \gamma \backslash \alpha) \neq \bot$,
+ therefore $\alpha \subset \alpha \gamma$.
+ In both cases $\alpha < \alpha \gamma$.
+
+ \item[(2)]
+ Case $\alpha' < \alpha$.
+ Let $\big( (\sigma_1, \hdots, \sigma_k), (\sigma'_1, \hdots, \sigma'_k) \big) = traces (\alpha', \alpha)$.
+ We have $\rho_k = \sigma_k$ and $\rho'_k = min (\sigma'_k, minh(\gamma)) \leq \sigma_k$.
+ If $minh(\gamma) < \sigma'_k$ then $\rho_k > \rho'_k$ and $\alpha' \sqsubset \alpha \gamma$.
+ Otherwise $\rho'_k = \sigma'_k$.
+ If $\alpha' \sqsubset \alpha$ then $\alpha' \sqsubset \alpha \gamma$.
+ Otherwise $\alpha' \sim \alpha$ and $\alpha' \subset \alpha$.
+ None of $\alpha$ and $\alpha'$ is a proper prefix of the other
+ because otherwise the longer path has an $\epsilon$-loop through $q_1$, which contradicts our assumption about $\pi_1$ and $\pi'_1$.
+ Therefore $first (\alpha' \backslash \alpha) = first (\alpha' \backslash \alpha \gamma)$
+ and $first (\alpha \backslash \alpha') = first (\alpha \gamma \backslash \alpha')$.
+ Consequently $\alpha' \subset \alpha \implies \alpha' \subset \alpha \gamma$.
+ Thus $\alpha' < \alpha \gamma$.
+ \end{itemize}
+ %
+ In both cases $\alpha' < \alpha \gamma$, therefore path $\pi_1 \pi_2$ is discarded.
+\end{proofEnd}
+\vspace{-0.5em}
+
+\begin{theoremEnd}[restate, no link to proof, no link to theorem, category=lemmata_closure]{lemma}
+[Right distributivity of comparison over concatenation for paths without tagged $\epsilon$-loops]
+ \label{lemma_closure_rightdist}
+ Let
+ $\pi_\alpha = q_0 \overset {u | \alpha} {\rightsquigarrow} q_1$ and
+ $\pi_\beta = q_0 \overset {u | \beta} {\rightsquigarrow} q_1$
+ be ambiguous paths in TNFA $f$ for IRE $e$,
+ and let $\pi_\gamma = q_1 \overset {\epsilon | \gamma} {\rightsquigarrow} q_2$
+ be their common $\epsilon$-suffix,
+ such that $\pi_\alpha \pi_\gamma$ and $\pi_\beta \pi_\gamma$ do not contain tagged $\epsilon$-loops.
+ If $\alpha < \beta$ then $\alpha \gamma < \beta \gamma$.
+\end{theoremEnd}
+\begin{proofEnd}
+ Let
+ $\big( (\rho_1, \hdots, \rho_k),$ $(\rho'_1, \hdots, \rho'_k) \big) = traces (\alpha, \beta)$ and
+ $\big( (\sigma_1, \hdots, \sigma_k),$ $(\sigma'_1, \hdots, \sigma'_k) \big) = traces (\alpha \gamma, \beta \gamma)$.
+ Appending $\gamma$ to $\alpha$ and $\beta$ changes only the last frame, therefore
+ for frames $i < k$ we have $\rho_i = \sigma_i$ and $\rho'_i = \sigma'_i$.
+ Consider two possible cases.
+ %
+ \begin{itemize}[itemsep=0.5em, topsep=0.5em]
+ \item[(1)]
+ Case $\alpha \sim \beta \wedge \alpha \subset \beta$.
+ %
+ We show that $\alpha \gamma \sim \beta \gamma \wedge \alpha \gamma \subset \beta \gamma$.
+ %
+ We have $\rho_i = \rho'_i \; \forall i$ (implied by $\alpha \sim \beta$), therefore
+ $\sigma_i = \sigma'_i \; \forall i$ and consequently $\alpha \gamma \sim \beta \gamma$.
+ Let
+ $x = first (\alpha \backslash \beta)$,
+ $y = first (\beta \backslash \alpha)$,
+ $x' = first (\alpha \gamma \backslash \beta \gamma)$ and
+ $y' = first (\beta \gamma \backslash \alpha \gamma)$.
+ If one of $\pi_\alpha$ and $\pi_\beta$ is a proper prefix of another,
+ then the longer path contains tagged $\epsilon$-loop through $q_1$,
+ which contradicts lemma conditions
+ (the suffix of the longer path must be an $\epsilon$-path,
+ because $\alpha$ and $\beta$ have the same number of frames
+ and the suffix is contained in the last frame).
+ Therefore none of $\pi_\alpha$ and $\pi_\beta$ is a proper prefix of another.
+ Consequently $x = x'$ and $y = y'$, and we have
+ $\alpha \subset \beta$
+ $\implies$
+ $x < y$
+ $\implies$
+ $x' < y'$
+ $\implies$
+ $\alpha \gamma \subset \beta \gamma$.
+
+ \item[(2)]
+ Case $\alpha \sqsubset \beta$:
+ by definition this means that $\exists j \leq k$ such that $\rho_j > \rho'_j$ and $\rho_i = \rho'_i \;\forall i > j$.
+ We show that $\alpha \gamma \sqsubset \beta \gamma$.
+ %
+ \begin{itemize}
+ \item[(2a)]
+ Case $j < k$. In this case $\rho_k = \rho'_k$
+ and appending $\gamma$ does not change relation on the last frame:
+ $\sigma_k = min (\rho_k, minh (\gamma)) = min (\rho'_k, minh (\gamma)) = \sigma'_k$.
+ Since $\sigma_i = \rho_i$ and $\sigma'_i = \rho'_i$ for all preceding frames $i < k$,
+ we have $\alpha \gamma \sqsubset \beta \gamma$.
+
+ \item[(2b)]
+ Case $j = k$ and $minh (\gamma) > \rho'_k$.
+ In this case $\rho_k > \rho'_k$
+ and again appending $\gamma$ does not change relation on the last frame:
+ $\sigma_k = min (\rho_k, minh (\gamma)) > \rho'_k$ and
+ $\sigma'_k = min (\rho'_k, minh (\gamma)) = \rho'_k$, therefore
+ $\sigma_k > \sigma'_k$.
+ Therefore $\alpha \gamma \sqsubset \beta \gamma$.
+
+ \item[(2c)]
+ Case $j = k$ and $minh (\gamma) \leq \rho'_k$
+ and $\exists l < k$ such that $\rho_l > \rho'_l$ and $\rho_i = \rho'_i$ for $l < i < k$.
+ In this case $\gamma$ contains parentheses of low height
+ and appending it makes height on the last frame equal:
+ $\sigma_k = \sigma'_k = minh (\gamma)$.
+ However, the relation on the last preceding differing frame is the same:
+ $\sigma_l = \rho_l > \rho'_l = \sigma'_l$.
+ Therefore $\alpha \gamma \sqsubset \beta \gamma$.
+
+ \item[(2d)]
+ Case $j = k$ and $minh (\gamma) \leq \rho'_k$
+ and $\nexists l < k$ such that $\rho_l > \rho'_l$ and $\rho_i = \rho'_i$ for $l < i < k$.
+ In this case $\gamma$ contains parentheses of low height,
+ appending it makes height on the last frame equal:
+ $\sigma_k = \sigma'_k = minh (\gamma)$,
+ and this may change comparison result
+ as the relation on the last preceding differing frame may be different.
+ %
+ We show that in this case the extended path $\pi_\beta \pi_\gamma$ contains a tagged $\epsilon$-loop.
+ %
+ Consider the fragments of paths $\pi_\alpha$ and $\pi_\beta$ from fork to join,
+ including (if it exists) the common $\epsilon$-transition to the fork state:
+ $\pi_\alpha'$ and $\pi_\beta'$.
+ %
+ Minimal parenthesis height on $\pi_\alpha'$ is $\rho_k$.
+ By TNFA construction this means that $\pi_\alpha'$ is contained
+ in a sub-TNFA $f'$ for $e|_p$ at some position $p$ with length $|p| = \rho_k$.
+ %
+ As for $\pi_\beta'$, its start state coincides with $\pi_\alpha'$ and thus is in $f'$.
+ The minimal height of all but the last frames of $\pi_\beta'$ is at least $\rho_k$:
+ by conditions of (2d) either $k = 1$ and there are no such frames,
+ or $\rho'_{k-1} \geq \rho_{k-1}$ which implies $\rho'_{k-1} \geq \rho_k$
+ (because by definition $\rho_k = min(\rho_{k-1}, minh(\alpha_k)) \leq \rho_{k-1}$).
+ On the last frame of $\pi_\beta'$ minimal height is $\rho'_k < \rho_k$.
+ Therefore all but the last frames of $\pi_\beta'$ are contained in $f'$,
+ but the the last frame is not.
+ %
+ Now consider $\pi_\gamma$: by conditions of (2d) its minimal height is less than $\rho_k$,
+ therefore it is not contained in $f'$,
+ %
+ but its start state is the join point of $\pi_\alpha'$ and $\pi_\beta'$ and thus in $f'$.
+ %
+ Taken together, above facts imply that the last frame of $\pi_\beta \pi_\gamma$
+ starts in $f'$, then leaves $f'$, then returns to $f'$ and joins with $\pi_\alpha \pi_\gamma$,
+ and then leaves $f'$ second time.
+ Since the end state of $f'$ is unique (by TNFA construction),
+ $\pi_\beta \pi_\gamma$ must contain a tagged $\epsilon$-loop through it,
+ which contradicts lemma conditions.
+ \end{itemize}
+ \end{itemize}
+ %
+ (Note that in the presence of tagged $\epsilon$-loops right distributivity may not hold:
+ we may have paths $\pi_1$, $\pi_2$ and $\pi_3$
+ such that $\pi_2$ and $\pi_3$ are two different $\epsilon$-loops through the same subautomaton
+ and $\pi_1 \pi_2 < \pi_1 \pi_3$,
+ in which case $\pi_1 \pi_2 \pi_3 < \pi_1 \pi_3$,
+ but $\pi_1 < \pi_1 \pi_2$ because the first is a proper prefix of the second.)
+ %
+\end{proofEnd}
+
+
+\section{Tree representation of paths}\label{section_pathtree}
+
+In this section we specify the representation of path fragments in configurations
+and define path context $U$ and functions $empty \Xund path ()$ and $extend \Xund path ()$
+used in previous sections.
+%
+An obvious way to represent tagged path is to use a sequence of tags, such as a list or an array:
+in that case $empty \Xund path ()$ can be implemented as an empty sequence,
+and $extend \Xund path ()$ is just an append operation.
+%
+However, a more efficient representation is possible
+if we consider the structure formed by paths in $\epsilon$-closure.
+This structure is a \emph{prefix tree} of tags.
+Some care is necessary with TNFA construction in order to ensure prefixness,
+but that is easy to accommodate and we give the details in section \ref{section_tnfa}.
+Storing paths in a prefix tree achieves two purposes:
+first, we save on the duplicated prefixes,
+and second, copying paths becomes as simple as copying a pointer to a tree leaf --- no need to copy the full sequence.
+This technique was used by many researches, e.g. Laurikari mentions a \emph{functional data structure} \cite{Lau01}
+and Karper describes it as the \emph{flyweight pattern} \cite{Kar14}.
+\\
+
+\begin{algorithm}[H] \DontPrintSemicolon \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
+\begin{multicols}{2}
+ \setstretch{0.8}
+
+ \Fn {$\underline {empty \Xund path (\,)} \smallskip$} {
+ \Return $0$ \;
+ }
+ \BlankLine
+
+ \Fn {$\underline {extend \Xund path (U, n, \tau)} \smallskip$} {
+ \If {$\tau \neq \epsilon$} {
+ $m = |U| + 1$ \;
+ append $m$ to $succ(U, n)$ \;
+ append $(n, \emptyset, \tau)$ to $U$ \;
+ \Return $m$ \;
+ }
+ \lElse {
+ \Return $n$
+ }
+ }
+ \BlankLine
+
+\columnbreak
+
+ \Fn {$\underline {unroll \Xund path (U, n)} \smallskip$} {
+ $u = \epsilon$ \;
+ \While { $n \neq 0$ } {
+ $u = u \cdot tag(U, n)$ \;
+ $n = pred(U, n)$ \;
+ }
+ \Return $reverse(u)$ \;
+ }
+ \BlankLine
+
+ \vfill
+
+\end{multicols}
+\caption{Operations on tag tree.}
+\end{algorithm}
+\medskip
+
+A convenient representation of tag tree is an indexed sequence of nodes.
+Each node is a triple $(p, s, t)$ where
+$p$ is the index of predecessor node,
+$s$ is a set of indices of successor nodes
+and $t$ is a tag (positive or negative).
+%
+Forward links are only necessary if the advanced algorithm for $update \Xund ptables ()$ is used
+(section \ref{section_comparison}), otherwise successor component can be omitted.
+%
+Now we can represent $u$-components of configurations with indices in the $U$-tree:
+root index is $0$ (which corresponds to the empty path),
+and each $u$-component is a tree index from which we can trace predecessors to the root
+(function $unroll \Xund path ()$ demonstrates this).
+%
+In the implementation, it is important to use numeric indices rather than pointers
+because it allows to use the ``two-fingers'' algorithm to find fork of two paths (section \ref{section_comparison}).
+%
+We assume the existence of functions
+$pred(U, n)$ that returns $p$-component of $n$-th node,
+$succ(U, n)$ that returns $s$-component of $n$-th node and
+$tag(U, n)$ that returns $t$-component of $n$-th node.
+
+
+\section{Representation of match results}\label{section_results}
+
+In this section we show two ways to construct match results: POSIX offsets and a parse tree.
+%
+In the first case, $r$-component of configurations is an array of offset pairs $pmatch$.
+Offsets are updated incrementally at each step by scanning the corresponding path fragment
+and setting negative tags to $-1$ and positive tags to the current step number.
+We need the most recent value of each tag, therefore we take care to update tags at most once.
+Negative tags are updated using helper functions $low()$ and $upp()$ that map each tag to the range of tags covered by it
+(which includes itself, its pair tag and all nested tags).
+Helper function $sub()$ maps each tag to the corresponding submatch group.
+For a given tag $t$, functions $sub()$, $low()$ and $upp()$ are defined as the 2nd, 3rd and 4th components of $(t, s, l, u) \in T$.
+Section \ref{section_tnfa} shows how this mapping is constructed.
+\\
+
+In the second case, $r$-component of configurations is a tagged string that is accumulated at each step,
+and eventually converted to a parse tree at the end of match.
+The resulting parse tree is only partially structured:
+leaves that correspond to subexpressions with zero implicit submatch index contain ``flattened'' substring of alphabet symbols.
+It is possible to construct parse trees incrementally as well,
+but this is more complex and the partial trees may require even more space than tagged strings.
+\\
+
+\begin{algorithm}[H] \DontPrintSemicolon \SetKwProg{Fn}{}{}{}
+\begin{multicols}{2}
+ \setstretch{0.8}
+
+ \Fn {$\underline{initial \Xund result (T)} \smallskip$} {
+ \Return uninitialized array of pairs $(rm \Xund so, rm \Xund eo)$\;
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{update \Xund result (T, X, U, k, \Xund)} \smallskip$} {
+ \Return $\big\{ (q, o, u, apply (T, U, u, r, k)) \mid (q, o, u, r) \in X \big\}$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{f\!inal \Xund result (T, U, u, r, k)} \smallskip$} {
+ $pmatch = apply (T, U, u, r, k)$ \;
+ $pmatch[0].rm \Xund so = 0, \; pmatch[0].rm \Xund eo = k$ \;
+ \Return $pmatch$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{apply (T, U, n, pmatch, k)} \smallskip$} {
+ $done(\Xund) \equiv f\!alse$ \;
+ \While {$n \neq 0$} {
+ $t = tag(U, n) \; s = sub(T, |t|)$ \;
+ \If {$t < 0 \wedge \big( s = 0 \vee \neg done(s) \big)$} {
+ \For {$t' = \overline{low(T, |t|), upp(T, |t|)}$} {
+ $s' = sub(T, t')$ \;
+ \If {$s' \neq 0 \wedge \neg done(s')$} {
+ $done(s') = true$ \;
+ $set \Xund tag (pmatch, t', s', -1)$ \;
+ }
+ }
+ }
+ \ElseIf {$s \neq 0 \wedge \neg done(s)$} {
+ $done(s) = true$ \;
+ $set \Xund tag (pmatch, t, s, k)$ \;
+ }
+ $n = pred(U, n)$ \;
+ }
+ \Return $pmatch$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{set \Xund tag (pmatch, t, s, pos)} \smallskip$} {
+ \lIf {$t \, mod \, 2 \equiv 1$} {$pmatch[s].rm \Xund so = pos$}
+ \lElse {$pmatch[s].rm \Xund eo = pos$}
+ }
+ \BlankLine
+
+ \vfill
+
+\columnbreak
+
+ \Fn {$\underline{initial \Xund result (\Xund)} \smallskip$} {
+ \Return $\epsilon$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{update \Xund result (\Xund, X, U, \Xund, \alpha)} \smallskip$} {
+ \Return $\big\{ (q, o, u, r \cdot unroll \Xund path (U, u) \cdot \alpha)$ \;
+ \Indp\Indp\Indp\Indp\Indp\Indp\Indp\Indp $\mid (q, o, u, r) \in X \big\}$ \; \Indm\Indm\Indm\Indm\Indm\Indm\Indm\Indm
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{f\!inal \Xund result (\Xund, U, u, r, \Xund)} \smallskip$} {
+ \Return $parse \Xund tree (r \cdot unroll \Xund path (U, u), 1)$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{parse \Xund tree (u, i)} \smallskip$} {
+ \If {$u = (2i \!-\! 1) \cdot (2i)$} {
+ \Return $T^i(\epsilon)$
+ }
+ \If {$u = (1 \!-\! 2i) \cdot \hdots $} {
+ \Return $T^i(\varnothing)$
+ }
+ \If {$u = (2i \!-\! 1) \cdot \alpha_1 \hdots \alpha_n \cdot (2i) \wedge \alpha_1, \hdots, \alpha_n \in \Sigma $} {
+ \Return $T^i(a_1, \hdots, a_n)$
+ }
+ \If {$u = (2i \!-\! 1) \cdot \beta_1 \hdots \beta_m \cdot (2i) \wedge \beta_1 = 2j \!-\! 1 \in T$} {
+ $n = 0, k = 1$ \;
+ \While {$k \leq m$} {
+ $l = k$ \;
+ \lWhile {$|\beta_{k+1}| > 2j$} {
+ $k = k + 1$
+ }
+ $n = n + 1$ \;
+ $t_n = parse \Xund tree (\beta_l \dots \beta_k, j)$
+ }
+ \Return $T^i(t_1, \dots, t_n)$
+ }
+ \Return $\varnothing$ \tcp{ill-formed PE}
+ }
+ \BlankLine
+
+ \vfill
+
+\end{multicols}
+\vspace{1.5em}
+\caption{Construction of match results: POSIX offsets (on the left) and parse tree (on the right).}
+\end{algorithm}
+\medskip
+
+
+\section{Disambiguation procedures}\label{section_comparison}
+
+In this section we define disambiguation procedures $compare ()$ and $update \Xund ptables ()$.
+The pseudocode follows definition \ref{pe_order} closely
+and relies on the prefix tree representation of paths given in section \ref{section_results}.
+%
+In order to find fork of two paths in $compare ()$ we use so-called ``two-fingers'' algorithm,
+which is based on the observation that parent index is always less than child index.
+Given two indices $n_1$ and $n_2$, we continuously set the greater index to its parent until the indices become equal,
+at which point we have either found fork or the root of $U$-tree.
+We track minimal height of each path along the way
+and memorize the pair of indices right after the fork --- they are used to determine the leftmost path in case of equal heights.
+%
+We assume the existence of helper function $height(T, t)$ that maps each tag to its height.
+\\
+
+\begin{algorithm}[H] \DontPrintSemicolon \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
+\begin{multicols}{2}
+ \setstretch{0.8}
+
+ \Fn {$\underline {compare (c_1, c_2, U, B, D)} \smallskip$} {
+ $(\Xund, o_1, n_1, \Xund) = c_1, \; (\Xund, o_2, n_2, \Xund) = c_2$ \;
+
+ \lIf { $o_1 = o_2 \wedge n_1 = n_2$ } {
+ \Return $(\infty, \infty, 0)$
+ }
+
+ \BlankLine
+ $f\!ork = o_1 = o_2$ \;
+ \lIf {$f\!ork$ } {
+ $h_1 = h_2 = \infty$
+ }
+ \lElse {
+ $h_1 = B[o_1][o_2], \; h_2 = B[o_2][o_1]$
+ }
+
+ \BlankLine
+ $m_1 = m_2 = \bot$ \;
+ \While {$n_1 \neq n_2$} {
+ \If {$n_1 > n_2$} {
+ $h_1 = min(h_1, height(T, tag(U, n_1)))$ \;
+ $m_1 = n_1, \; n_1 = pred(U, n_1)$ \;
+ }
+ \Else {
+ $h_2 = min(h_2, height(T, tag(U, n_2)))$ \;
+ $m_2 = n_2, \; n_2 = pred(U, n_2)$ \;
+ }
+ }
+ \If {$n_1 \neq \bot$} {
+ $h = height(T, tag(U, n_1))$ \;
+ $h_1 = min(h_1, h), \; h_2 = min(h_2, h)$ \;
+ }
+
+ \BlankLine
+ \lIf {$h_1 > h_2$} {$l = -1$}
+ \lElseIf {$h_1 < h_2$} {$l = 1$ }
+ \lElseIf {$\neg f\!ork$} {$l = D[o_1][o_2]$}
+ \lElse {$l = le\!f\!tprec(m_1, m_2, U)$}
+
+ \BlankLine
+ \Return $(h_1, h_2, l)$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline {le\!f\!tprec (n_1, n_2, U)} \smallskip$} {
+
+ \lIf {$n_1 = n_2$} { \Return $0$ }
+ \lIf {$n_1 = \bot$} { \Return $-1$ }
+ \lIf {$n_2 = \bot$} { \Return $1$ }
+
+ \BlankLine
+ $t_1 = tag(U, n_1), \; t_2 = tag(U, n_2)$ \;
+
+ \BlankLine
+ \lIf {$t_1 < 0$} { \Return $1$ }
+ \lIf {$t_2 < 0$} { \Return $-1$ }
+
+ \BlankLine
+ \lIf {$t_1 mod \, 2 \equiv 0$} { \Return $-1$ }
+ \lIf {$t_2 mod \, 2 \equiv 0$} { \Return $1$ }
+
+ \BlankLine
+ \Return $0$
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline {update \Xund ptables (N, X, U, B, D)} \smallskip$} {
+ \For {$x_1 = (q_1, \Xund, \Xund, \Xund) \in X$} {
+ \For {$x_2 = (q_2, \Xund, \Xund, \Xund) \in X$} {
+ $(h_1, h_2, l) = compare (x_1, x_2, U, B, D)$ \;
+ $B' [q_1] [q_2] = h_1, \; D' [q_1] [q_2] = l$ \;
+ $B' [q_2] [q_1] = h_2, \; D' [q_2] [q_1] = -l$
+ }
+ }
+ \BlankLine
+ \Return $(B', D')$ \;
+ }
+
+ \vfill
+ \columnbreak
+
+ \Fn {$\underline {update \Xund ptables (N, X, U, B, D)} \smallskip$} {
+ $i = 0, \; next(n) \equiv 1, \; \text{empty stack } S, \; \text{empty array } L$ \;
+ $push(S, 0)$ \;
+
+ \BlankLine
+ \While {$S$ is not empty} {
+ $n = pop(S)$ \;
+
+ \BlankLine
+ \If {$next(n) < k$} {
+ $push(S, n)$ \;
+ $push(S, succ(U, n)_{next(n)})$ \;
+ $next(n) = next(n) + 1$ \;
+ $continue$ \;
+ }
+
+ \BlankLine
+ $h = height(T, tag(U, n)), \; i_1 = i$ \;
+
+ \BlankLine
+ \For {$(q, o, n_1, \Xund) \in X \mid n_1 = n$} {
+ $i = i + 1, \; L[i] = (q, o, \bot, h)$ \;
+ }
+ \For {$j_1 = \overline{i_1 + 1, i}$} {
+ \For {$j_2 = \overline{j_1, i}$} {
+ $(q_1, o_1, \Xund, \Xund) = L[j_1]$ \;
+ $(q_2, o_2, \Xund, \Xund) = L[j_2]$ \;
+
+ \BlankLine
+ \If {$n = 0 \wedge o_1 \neq o_2$} {
+ $h_1 = B[o_1][o_2], \; h_2 = B[o_2][o_1]$ \;
+ $l = D[o_1][o_2]$ \;
+ }
+ \lElse {
+ $h_1 = h_2 = h, \; l = 0$
+ }
+
+ \BlankLine
+ $B'[q_1][q_2] = h_1, \; D'[q_1][q_2] = l$ \;
+ $B'[q_2][q_1] = h_2, \; D'[q_2][q_1] = -l$ \;
+ }
+ }
+
+ \BlankLine
+ \For {$m \in succ(U, n)$ in reverse} {
+ $i_2 = i_1$ \;
+ \lWhile {$i_2 > 0 \wedge L[i_2].n = m$} {
+ $i_2 = i_2 - 1$
+ }
+
+ \BlankLine
+ \For {$j_1 = \overline{i_2, i_1}$} {
+ $L[j_1].h = min(L[j_1].h, h)$; \;
+
+ \BlankLine
+ \For {$j_2 = \overline{i_1, i}$} {
+ $(q_1, o_1, n_1, h_1) = L[j_1]$ \;
+ $(q_2, o_2, n_2, h_2) = L[j_2]$ \;
+
+ \BlankLine
+ \If {$n = 0 \wedge o_1 \neq o_2$} {
+ $h_1 = min(h_1, B[o_1][o_2])$ \;
+ $h_2 = min(h_2, B[o_2][o_1])$ \;
+ }
+
+ \BlankLine
+ \lIf {$h_1 > h_2$} {$l = -1$}
+ \lElseIf {$h_1 < h_2$} {$l = 1$ }
+ \lElseIf {$o_1 \neq o_2$} {$l = D[o_1][o_2]$}
+ \lElse {$l = le\!f\!tprec(n_1, n_2, U)$}
+ }
+
+ \BlankLine
+ $B'[q_1][q_2] = h_1, \; D'[q_1][q_2] = l$ \;
+ $B'[q_2][q_1] = h_2, \; D'[q_2][q_1] = -l$ \;
+ }
+
+ $i_1 = i_2$ \;
+ }
+
+ \BlankLine
+ \lFor {$j = \overline{i_1, i}$} {
+ $L[j].n = n$
+ }
+ }
+
+ \BlankLine
+ \Return $(B', D')$ \;
+ }
+
+\end{multicols}
+\caption{Disambiguation procedures.}
+\end{algorithm}
+\medskip
+
+We give two alternative algorithms for $update \Xund ptables ()$:
+a simple one with $O(m^2 \, t)$ complexity (on the left) and a complex one with $O(m^2)$ complexity (on the right).
+Worst case is demonstrated by RE $((a|\epsilon)^{0,k})^{0,\infty}$ where $n \in \YN$,
+for which the simple algorithm takes $O(k^3)$ time and the complex algorithm takes $O(k^2)$ time.
+%
+The idea of complex algorithm is to avoid repeated re-scanning of path prefixes in the $U$-tree.
+It makes one pass over the tree,
+constructing an array $L$ of \emph{level items} $(q, o, u, h)$, where
+$q$ and $o$ are state and origin as in configurations,
+$u$ is the current tree index and $h$ is the current minimal height.
+One item is added per each closure configuration $(q, o, u, r)$ when traversal reaches the tree node with index $u$.
+After a subtree has been traversed,
+the algorithm scans level items added during traversal of this subtree (such items are distinguished by their $u$-component),
+sets their $h$-component to the minimum of $h$ and the height of tag at the current node,
+and computes the new value of $B$ and $D$ matrices for each pair of $q$-states in items from different branches.
+After that, $u$-component of all scanned items is downgraded to the tree index of the current node
+(erasing the difference between items from different branches).
+
+
+\section{Lazy disambiguation}\label{section_lazy}
+
+Most of the overhead in our algorithm comes from updating $B$ and $D$ matrices at each step.
+It is all the more unfortunate since many comparisons performed by $update \Xund ptables ()$ are useless ---
+the compared paths may never meet.
+In fact, if the input is unambiguous, all comparisons are useless.
+%
+A natural idea, therefore, is to compare paths only in case of real ambiguity (when they meet in closure)
+and avoid computation of precedence matrices altogether.
+%
+We can do it with a few modifications to our original algorithm.
+%
+First, we no longer need $B$ and $D$ matrices and $update \Xund ptables ()$ function.
+Instead, we introduce cache $C$ that maps a pair of tree indices $(n_1, n_2)$ to a triple of precedence values $(h_1, h_2, l)$.
+Cache stores the ``useful'' part of $B$ and $D$ matrices on multiple preceding steps.
+It is populated lazily during disambiguation
+and allows us to avoid re-computing the same values multiple times.
+%
+Second, we need to modify the tree representation of paths in the following way:
+forward links are no longer needed (parent links are sufficient),
+and tree nodes must be augmented with information about current step and origin state (we assume the existence of helper functions $step()$ and $origin()$).
+%
+Third, instead of using $empty \Xund path ()$ to initialize path fragments in configurations
+we need to set them to path fragments of their parent configurations,
+so that paths are accumulated rather than reset at each step.
+%
+Fourth, we no longer need to call $update \Xund result ()$ at each step --- this can be done once at the end of match.
+%
+Below is the modified lazy version of $compare()$, the only part of the algorithm that requires non-trivial change.
+\\
+
+\begin{algorithm}[H] \DontPrintSemicolon \SetKwProg{Fn}{}{}{} \SetAlgoInsideSkip{medskip}
+\begin{multicols}{2}
+ \setstretch{0.8}
+
+ \Fn {$\underline {compare (c_1, c_2, U, C)} \smallskip$} {
+ $(\Xund, \Xund, n_1, \Xund) = c_1, \; (\Xund, \Xund, n_2, \Xund) = c_2$ \;
+
+ \BlankLine
+ \Return $compare1 (n_1, n_2, U, C)$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline {compare1 (n_1, n_2, U, C)} \smallskip$} {
+ \If {$C(n_1, n_2) = \varnothing $} {
+ $C(n_1, n_2) = compare2 (n_1, n_2, U, C)$ \;
+ }
+
+ \BlankLine
+ \Return $C(n_1, n_2)$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+ \vfill
+ \columnbreak
+
+ \Fn {$\underline {compare2 (n_1, n_2, U, C)} \smallskip$} {
+ \lIf { $n_1 = n_2$ } {
+ \Return $(\infty, \infty, 0)$
+ }
+
+ \BlankLine
+ $h_1 = h_2 = \infty$ \;
+ $o_1 = origin(U, n_1), \; o_2 = origin(U, n_2)$ \;
+ $s_1 = step(U, n_1), \; s_2 = step(U, n_2), \; s = max (s_1, s_2)$ \;
+ $f\!ork = o_1 = o_2 \wedge s_1 = s_2$ \;
+
+ \BlankLine
+ $m_1 = m_2 = \bot$ \;
+ \While {$n_1 \neq n_2 \wedge (s_1 \geq s \vee s_2 \geq s)$} {
+ \If {$s_1 \geq s \wedge (n_1 > n_2 \vee s_2 < s)$} {
+ $h_1 = min(h_1, height(T, tag(U, n_1)))$ \;
+ $m_1 = n_1, \; n_1 = pred(U, n_1), \; s_1 = step(U, n_1)$ \;
+ }
+ \Else {
+ $h_2 = min(h_2, height(T, tag(U, n_2)))$ \;
+ $m_2 = n_2, \; n_2 = pred(U, n_2), \; s_2 = step(U, n_2)$ \;
+ }
+ }
+
+ \BlankLine
+ \If {$\neg f\!ork$ } {
+ $(h'_1, h'_2, l) = compare1(n_1, n_2, U, C)$ \;
+ $h_1 = min(h_1, h'_1), \; h_2 = min(h_2, h'_2)$ \;
+ }
+ \ElseIf {$n_1 \neq \bot$} {
+ $h = height(T, tag(U, n_1))$ \;
+ $h_1 = min(h_1, h), \; h_2 = min(h_2, h)$ \;
+ }
+
+ \BlankLine
+ \lIf {$h_1 > h_2$} {$l = -1$}
+ \lElseIf {$h_1 < h_2$} {$l = 1$ }
+ \lElseIf {$f\!ork$} {$l = le\!f\!tprec(m_1, m_2, U)$}
+
+ \BlankLine
+ \Return $(h_1, h_2, l)$ \;
+ }
+ \BlankLine
+ \BlankLine
+
+\end{multicols}
+\vspace{1em}
+\caption{Lazy disambiguation procedures (we assume that cache $C$ is modified in-place).}
+\end{algorithm}
+\medskip
+
+The problem with this approach is that we need to keep full-length history of each active path:
+at the point of ambiguity we may need to look an arbitrary number of steps back
+in order to find the fork of ambiguous paths.
+%
+This may be acceptable for small inputs (and memory footprint may even be smaller due to reduction of precedence matrices),
+but it is definitely infeasible for very long or streaming inputs.
+%
+A possible solution may be a hybrid approach that uses lazy disambiguation,
+but every $k$ steps fully calculates precedence matrices and ``forgets'' path prefixes.
+Another possible solution is to keep both algorithms and choose between them depending on the length of input.
+
+
+\section{TNFA construction}\label{section_tnfa}
+
+TNFA construction is given by the function $tn\!f\!a()$
+that accepts IRE $r$ and state $y$ and returns TNFA for $r$ with final state $y$
+(algorithm \ref{alg_tnfa}).
+%
+This precise construction is not necessary for the algorithms to work,
+but it has a number of important properties.
+\begin{itemize}[itemsep=0.5em, topsep=0.5em]
+ \item Non-essential $\epsilon$-transitions are removed, as they make closure algorithms slower.
+
+ \item Bounded repetition $r^{n,m}$ is unrolled in a way
+ that duplicates $r$ exactly $m$ times
+ and factors out common path prefixes:
+ subautomaton for $(k+1)$-th iteration is only reachable from subautomaton for $k$-th iteration.
+ For example, $a^{2,5}$ is unrolled as $aa(\epsilon | a (\epsilon | a (\epsilon | a)))$, not as $aa(\epsilon|a|aa|aaa)$.
+ This ensures that the tag tree build by $\epsilon$-closure is a prefix tree.
+
+ \item Priorities are assigned so as to make it more likely
+ that depth-first traversal of the $\epsilon$-closure finds short paths before long paths.
+ %
+ This is an optimization that makes GOR1 much faster in specific cases
+ with many ambiguous paths that are longest-equivalent and must be compared by the leftmost criterion.
+ An example of such case is $(((\epsilon)^{0,k})^{0,k})^{0,k})$ for some large $k$.
+ %
+ Because GOR1 has a depth-first component, it is sensitive to the order of transitions in TNFA.
+ If it finds the shortest path early, then all other paths are just canceled at the first join point with the shortest path
+ (because there is no improvement and further scanning is pointless).
+ In the opposite case GOR1 finds long paths before short ones,
+ and whenever it finds an improved (shorter) path, it has to schedule configurations for re-scan on the next pass.
+ This causes GOR1 to make more passes and scan more configurations on each pass,
+ which makes it significantly slower.
+ Arguably this bias is a weakness of GOR1 --- GTOP is more robust in this respect.
+
+ \item When adding negative tags, we add a single transition for the topmost closing tag
+ (it corresponds to the nil-parenthesis, which has the height of a closing parenthesis).
+ Then we map this tag to the full range of its nested tags, including itself and the pair opening tag.
+ An alternative approach is to add all nested negative tags as TNFA transitions and get rid of the mapping,
+ but this may result in significant increase of TNFA size and major slowdown
+ (we observed 2x slowdown on large tests with hundreds of submatch groups).
+
+ \item Compact representation of nested tags as ranges in $T$
+ is possible because nested tags occupy consecutive numbers.
+
+ \item Passing the final state $y$ in $tn\!f\!a()$ function allows to link subautomata in a simple and efficient way.
+ It allows to avoid tracking and patching of subautomaton transitions that go to the final state
+ (when this final state needs to be changed).
+\end{itemize}
+
+
+\section{Complexity analysis}\label{section_complexity}
+
+Our algorithm consists of three steps: conversion of RE to IRE,
+construction of TNFA from IRE
+and simulation of TNFA on the input string.
+We discuss time and space complexity of each step
+in term of the following parameters:
+$n$ --- the length of input,
+$m$ --- the size of RE with counted repetition subexpressions expanded
+(each subexpression duplicated the number of times equal to the repetition counter),
+and $t$ --- the number of capturing groups and subexpressions that contain them.
+\\
+
+\begin{algorithm}[] \DontPrintSemicolon \SetKwProg{Fn}{}{}{}
+\begin{multicols}{2}
+\setstretch{0.85}
+
+ \newcommand \retonfa {tn\!f\!a}
+ \newcommand \ntag {ntags}
+
+ \Fn {$\underline{\retonfa(r, y)} \smallskip$} {
+ \If {$r = (0, 0, \epsilon)$} {
+ \Return $(\Sigma, \{y\}, \emptyset, \emptyset, y, y)$
+ }
+ \BlankLine
+ \ElseIf {$r = (0, 0, \alpha) \mid_{\alpha \in \Sigma}$} {
+ \Return $(\Sigma, \{x,y\}, \emptyset, \{(x, \alpha, \epsilon, y)\}, x, y)$
+ }
+ \BlankLine
+ \ElseIf {$r = (0, 0, r_1 \cdot r_2)$} {
+ $(\Sigma, Q_2, T_2, \Delta_2, x, y) = \retonfa (r_2, y)$ \;
+ $(\Sigma, Q_u, T_u, \Delta_2, z, x) = \retonfa (r_1, x)$ \;
+ \Return $(\Sigma, Q_1 \cup Q_2, T_1 \cup T_2, \Delta_1 \cup \Delta_2, z, y)$
+ }
+ \BlankLine
+ \ElseIf {$r = (0, 0, r_1 \mid r_2)$} {
+ $(\Sigma, Q_2, T_2, \Delta_2, x_2, y) = \retonfa (r_2, y)$ \;
+ $(\Sigma, Q'_2, T_2, \Delta'_2, x'_2, y) = \ntag (T_2, y)$ \;
+ $(\Sigma, Q_1, T_1, \Delta_1, x_1, x'_2) = \retonfa (r_2, x'_2)$ \;
+ $(\Sigma, Q'_1, T_1, \Delta'_1, x'_1, x_2) = \ntag (T_1, x_2)$ \;
+ $Q = Q_1 \cup Q'_1 \cup Q_2 \cup Q'_2 \cup \{x\}$ \;
+ $\Delta = \Delta_1 \cup \Delta'_1 \cup \Delta_2 \cup \Delta'_2 \cup \big\{ (x,1,\epsilon,x_1), (x,2,\epsilon,x'_1) \big\}$ \;
+ \Return $(\Sigma, Q, T_1 \cup T_2, \Delta, x, y)$
+ }
+ \BlankLine
+ \ElseIf {$r = (0, 0, r_1^{n,m}) \mid_{1 < n \leq m \leq \infty}$} {
+ $(\Sigma, Q_1, T_1, \Delta_1, x, y) = \retonfa ((0, 0, r_1^{n-1,m-1}), y)$ \;
+ $(\Sigma, Q_2, T_2, \Delta_2, z, x) = \retonfa (r_1, x)$ \;
+ \Return $(\Sigma, Q_1 \cup Q_2, T_1 \cup T_2, \Delta_1 \cup \Delta_2, z, y)$
+ }
+ \BlankLine
+ \ElseIf {$r = (0, 0, r_1^{0,m})$} {
+ $(\Sigma, Q_1, T_1, \Delta_1, x_1, y) = \retonfa ((0, 0, r_1^{1,m}), y)$ \;
+ $(\Sigma, Q'_1, T_1, \Delta'_1, x'_1, y) = \ntag (T_1, y)$ \;
+ $Q = Q_1 \cup Q'_1 \cup \{x\}$ \;
+ $\Delta = \Delta_1 \cup \Delta'_1 \cup \big\{ (x, 1, \epsilon, x_1), (x, 2, \epsilon, x'_1) \big\}$ \;
+ \Return $(\Sigma, Q, T_1, \Delta, x, y)$
+ }
+ \BlankLine
+ \ElseIf {$r = (0, 0, r_1^{1,\infty})$} {
+ $(\Sigma, Q_1, T_1, \Delta_1, z, x) = \retonfa (r_1, \Xund)$ \;
+ $Q = Q_1 \cup \{y\}$ \;
+ $\Delta = \Delta_1 \cup \big\{ (x, 1, \epsilon, z), (x, 2, \epsilon, y) \big\}$ \;
+ \Return $(\Sigma, Q, T_1, \Delta, z, y)$
+ }
+ \BlankLine
+ \ElseIf {$r = (0, 0, r_1^{1,1})$} {
+ \Return $\retonfa (r_1, y)$
+ }
+ \BlankLine
+ \ElseIf {$r = (0, 0, r_1^{1,m}) \mid_{1 < m < \infty}$} {
+ $(\Sigma, Q_1, T_1, \Delta_1, x, y) = \retonfa ((0, 0, r_1^{1,m-1}), y)$ \;
+ $(\Sigma, Q_2, T_2, \Delta_2, w, z) = \retonfa (r_1, z)$ \;
+ $\Delta = \Delta_1 \cup \Delta_2 \cup \big\{ (z, 1, \epsilon, y), (z, 2, \epsilon, x) \big\}$ \;
+ \Return $(\Sigma, Q_1 \cup Q_2, T_1 \cup T_2, \Delta, w, y)$
+ }
+ \BlankLine
+ \ElseIf {$r = (i, j, r_1) \mid_{i \neq 0}$} {
+ $(\Sigma, Q_1, T_1, \Delta_1, z, x) = \retonfa ((0, 0, r_1), x)$ \;
+ $Q = Q_1 \cup \{w, y\}$ \;
+ $T = T_1 \cup \big\{ (2i\!-\!1, j, 0, -1), (2i, j, 0, -1) \big\}$ \;
+ $\Delta = \Delta_1 \cup \big\{ (w, 1, 2i\!-\!1, z), (x, 1, 2i, y) \big\}$ \;
+ \Return $(\Sigma, Q, T, \Delta, w, y)$
+ }
+ }
+ \BlankLine
+ \BlankLine
+
+ \Fn {$\underline{\ntag(T, y)} \smallskip$} {
+ $(t_{open}, t_{last}) = min \Xund max \big\{ t \mid (t, \Xund, \Xund, \Xund) \in T \big\}$ \;
+ $(t_{clos}, s, \Xund, \Xund) = (t, \Xund, \Xund, \Xund) \in T \mid t = t_{open} + 1$ \;
+ $T' = \big\{ (t, \Xund, \Xund, \Xund) \in T \mid t \neq t_{clos} \big\} \cup \big\{ (t_{clos}, s, t_{open}, t_{last}) \big\}$ \;
+ $\Delta = \big\{ (x, 1, -t_{clos}, y) \big\}$ \;
+ \Return $(\Sigma, \{x, y\}, T', \Delta, x, y)$ \;
+ }
+
+ \vfill
+
+\columnbreak
+
+ \nonl \includegraphics[width=\linewidth]{img/tnfa_construction.pdf}
+
+\end{multicols}
+\vspace{0.5em}
+\caption{TNFA construction.}\label{alg_tnfa}
+\end{algorithm}
+
+The first step, conversion of RE to IRE, is given by the functions $mark()$ and $enum()$ from section \ref{section_formalization}.
+%
+For each sub-RE, $mark()$ constructs a corresponding sub-IRE,
+and $enum()$ performs a linear visit of the IRE (which doesn't change its structure),
+therefore IRE size is $O(m)$.
+%
+Each subexpression is processed twice (once by $mark()$ and once by $enum()$)
+and processing takes $O(1)$ time, therefore total time is $O(m)$.
+\\
+
+The second step, TNFA construction, is given by the $tn\!f\!a()$ function (algorithm \ref{alg_tnfa}).
+At this step counted repetition is unrolled, so TNFA may be much larger than IRE.
+For each subexpressions of the form $(i, j, r^{n,m})$ automaton for $r$ is duplicated exactly $m$ times if $m \neq \infty$, or $max(1, n)$ times otherwise
+(at each step of recursion the counter is decremented and one copy of automaton is constructed).
+Other $tn\!f\!a()$ clauses are in one-to-one correspondence with sub-IRE.
+Each clause adds only a constant number of states and transitions (including calls to $ntags()$ and excluding recursive calls).
+Therefore TNFA contains $O(m)$ states and transitions.
+The size of mapping $T$ is $O(t)$, which is $O(m)$.
+Therefore total TNFA size is $O(m)$.
+Time complexity is $O(m)$, because each clause takes $O(1)$ time (excluding recursive calls), and total $O(m)$ clauses are executed.
+\\
+
+The third step, TNFA simulation, is given by algorithm \ref{alg_match}.
+Initialization at lines 2-5 takes $O(1)$ time.
+Main loop at lines 6-11 is executed at most $n$ times.
+The size of closure is bounded by TNFA size, which is $O(m)$ (typically closure is much smaller than that).
+Each iteration of the loop includes the following steps.
+%
+At line 7 the call to $closure()$ takes $O(m^2 \, t)$ time if GOR1 from section \ref{section_closure} is used,
+because GOR1 makes $O(m^2)$ scans (closure contains $O(m)$ states and $O(m)$ transitions),
+and at each scan we may need to compare the tag sequences using $compare()$ from section \ref{section_comparison},
+which takes $O(t)$ time
+(there is $O(t)$ unique tags and we consider paths with at most one $\epsilon$-loop,
+so the number of occurrences of each tag is bounded by the repetition counters,
+which amounts to a constant factor).
+%
+At line 8 the call to $update \Xund result()$ takes $O(m \, t)$ time,
+because closure size is $O(m)$,
+and the length of the tag sequence is $O(t)$ as argued above.
+%
+At line 9 the call to $update \Xund ptables ()$ takes $O(m^2)$ time
+if the advanced algorithm from section \ref{section_comparison} is used.
+%
+At line 10 scanning the closure for reachable states takes $O(m)$ time,
+because closure size is $O(m)$.
+%
+The sum of the above steps is $O(m^2 \, t)$, so the total time of loop at lines 6-11 is $O(n \, m^2 \, t)$.
+The final call to $closure()$ at line 12 takes $O(m^2 \, t)$,
+and $f\!inal \Xund result ()$ at line 14 takes $O(m \, t)$.
+The total time taken by $match()$ is therefore $O(n \, m^2 \, t)$.
+\\
+
+Space complexity of $match()$ is as follows.
+%
+The size of the closure is $O(m)$.
+%
+Precedence matrices $B$ and $D$ take $O(m^2)$ space.
+%
+Match results take $O(m \, t)$ space in case of POSIX-style offsets,
+because the number of parallel results is bounded by the closure size,
+and each result takes $O(t)$ space.
+In case of parse trees, match results take $O(m \, n)$ space, because each result accumulates all loop iterations.
+%
+The size of the path context $U$ is $O(m^2)$
+because GOR1 makes $O(m^2)$ scans and thus adds no more than $O(m^2)$ tags in the tree.
+The total space taken by $match()$ is therefore $O(m^2)$
+for POSIX-style offsets and $O(m (m + n))$ for parse trees.
+
+
+\section{Benchmarks}\label{section_benchmarks}
+
+In order to present benchmark results in a meaningful way,
+we show the time of each algorithm relative to the ``baseline'' leftmost greedy algorithm,
+which has no overhead on disambiguation and thus represents best-case matching time.
+%
+We measure the speed of each algorithm in characters per second
+and divide it by the speed of leftmost greedy algorithm.
+%
+This allows us to show the net overhead on POSIX disambiguation.
+%
+To relate our implementations to the real world,
+we include Google RE2 library (it uses leftmost greedy disambiguation and serves as a reference, not as a competing implementation).
+%
+All implementations can be found in RE2C source code \cite{RE2C}.
+%
+Our set of benchmarks consists of three subsets:
+\begin{enumerate}[itemsep=0.5em, topsep=0.5em]
+ \item Real-world benchmarks.
+ These include very large REs containing thousands of characters and hundreds of capturing groups
+ (parser for HTTP message headers conforming to RFC-7230,
+ URI parser conforming to RFC-3986,
+ IPv6 address parser);
+ medium-sized REs containing hundreds of characters and dozens of capturing groups
+ (simplified parsers for HTTP headers and URI, IPv4 address parser, simple date parser);
+ and small REs with less than a hundred characters and about five capturing groups
+ (simplified parsers for IPv4 and date).
+
+ \item Artificial benchmarks with high level of ambiguity.
+ All these REs are restricted to a single alphabet symbol
+ used with various combinations of RE operators (union, product, iteration and bounded repetition).
+
+ \item A series of pathological examples that demonstrates worst-case behavior of the naive $update \Xund ptables ()$ algorithm.
+\end{enumerate}
+
+We benchmark four variations of our algorithm:
+``Okui-Suzuki'' is the main variation (it uses advanced $update \Xund ptables ()$ algorithm and GOR1),
+``GTOP Okui-Suzuki'' uses GTOP,
+``naive Okui-Suzuki'' uses naive $update \Xund ptables ()$ algorithm,
+and ``lazy Okui-Suzuki'' differs from the main variation as described in section \ref{section_lazy}.
+%
+Besides our algorithm, we also benchmark Kuklewicz and Cox algorithms.
+Kuklewicz algorithm is described in detail in \cite{Tro17}.
+As for the Cox algorithm, the only description we are aware of is the prototype implementation \cite{Cox09}.
+We found a number of flaws in it, as described in the introduction.
+Our implementation, therefore, differs from the original:
+we add support for bounded repetition,
+we use GOR1 for closure construction,
+and we use a fast forward pre-processing phase to find the matching string prefix before running the backward phase
+(forward phase ignores submatch and merely performs recognition).
+%
+Benchmark results show the following:
+\\[-0.5em]
+
+\begin{figure}
+\pgfplotstableread[col sep = semicolon, trim cells]{bench/data_realworld} \datatable
+\begin{tikzpicture}
+ \begin{axis}[
+ width=330,
+ height=250,
+ ylabel=slowdown vs leftmost greedy (times),
+ xmin=1, xmax=11, ymin=0, ymax=30,
+ xticklabels from table={\datatable}{Alg},
+ xtick=data,
+ xticklabel style={xshift=10pt, yshift=-5pt, font=\footnotesize},
+ ylabel style={yshift=-10pt},
+ legend cell align={left},
+ legend style={fill=none},
+ grid=major,
+ grid style={dashed, gray!20},
+ x tick label style={rotate=30, anchor=east}
+ ]
+ \addplot[color=black, mark=] table[y = LG] from \datatable ;
+ \addlegendentry{leftmost greedy} ;
+ \addplot[color=black, mark=, dash pattern=on 1pt off 1pt] table[y = RE2] from \datatable ;
+ \addlegendentry{RE2} ;
+ \addplot[color=black, mark=, dash pattern=on 8pt off 1.5pt] table[y = OS] from \datatable ;
+ \addlegendentry{Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 5pt off 1.5pt] table[y = OS_GTOP] from \datatable ;
+ \addlegendentry{GTOP Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 3pt off 1pt] table[y = OS_naive] from \datatable ;
+ \addlegendentry{naive Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 2.5pt off 2.5pt] table[y = OS_lazy] from \datatable ;
+ \addlegendentry{lazy Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 1pt off 1pt on 1pt off 1pt on 1pt off 2pt on 4pt off 2pt] table[y = Kuklewicz] from \datatable ;
+ \addlegendentry{Kuklewicz} ;
+ \addplot[color=black, mark=, dash pattern=on 1pt off 2pt on 4pt off 2pt] table[y = Cox] from \datatable ;
+ \addlegendentry{Cox} ;
+ \end{axis}
+\end{tikzpicture}
+\pgfplotstableread[col sep = semicolon, trim cells]{bench/data_pathological} \datatable
+\begin{tikzpicture}
+ \begin{axis}[
+ height=250,
+ width=170,
+ ylabel=slowdown vs leftmost greedy (times),
+ xmin=33, xmax=37, ymin=-50,
+ xticklabels from table={\datatable}{Alg},
+ xtick=data,
+ xticklabel style={xshift=10pt, yshift=-5pt, font=\footnotesize},
+ ylabel style={yshift=-5pt},
+ legend cell align={left},
+ legend style={fill=none},
+ grid=major,
+ grid style={dashed, gray!20},
+ x tick label style={rotate=30, anchor=east}
+ ]
+ \addplot[color=black, mark=] table[y = LG] from \datatable ;
+ \addlegendentry{leftmost greedy} ;
+ \addplot[color=black, mark=, dash pattern=on 1pt off 1pt] table[y = RE2] from \datatable ;
+ \addlegendentry{RE2} ;
+ \addplot[color=black, mark=, dash pattern=on 8pt off 1.5pt] table[y = OS] from \datatable ;
+ \addlegendentry{Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 5pt off 1.5pt] table[y = OS_GTOP] from \datatable ;
+ \addlegendentry{GTOP Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 3pt off 1pt] table[y = OS_naive] from \datatable ;
+ \addlegendentry{naive Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 2.5pt off 2.5pt] table[y = OS_lazy] from \datatable ;
+ \addlegendentry{lazy Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 1pt off 1pt on 1pt off 1pt on 1pt off 2pt on 4pt off 2pt] table[y = Kuklewicz] from \datatable ;
+ \addlegendentry{Kuklewicz} ;
+ \addplot[color=black, mark=, dash pattern=on 1pt off 2pt on 4pt off 2pt] table[y = Cox] from \datatable ;
+ \addlegendentry{Cox} ;
+ \end{axis}
+\end{tikzpicture}
+\pgfplotstableread[col sep = semicolon, trim cells]{bench/data_artificial} \datatable
+\begin{tikzpicture}
+ \begin{axis}[
+ height=250,
+ width=500,
+ ylabel=slowdown vs leftmost greedy (times),
+ xmin=12, xmax=32, ymin=0, ymax=30,
+ xticklabels from table={\datatable}{Alg},
+ xtick=data,
+ xticklabel style={xshift=10pt, yshift=-5pt, font=\footnotesize},
+ ylabel style={yshift=-10pt},
+ legend cell align={left},
+ legend style={fill=none},
+ grid=major,
+ grid style={dashed, gray!20},
+ x tick label style={rotate=30, anchor=east}
+ ]
+ \addplot[color=black, mark=] table[y = LG] from \datatable ;
+ \addlegendentry{leftmost greedy} ;
+ \addplot[color=black, mark=, dash pattern=on 1pt off 1pt] table[y = RE2] from \datatable ;
+ \addlegendentry{RE2} ;
+ \addplot[color=black, mark=, dash pattern=on 8pt off 1.5pt] table[y = OS] from \datatable ;
+ \addlegendentry{Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 5pt off 1.5pt] table[y = OS_GTOP] from \datatable ;
+ \addlegendentry{GTOP Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 3pt off 1pt] table[y = OS_naive] from \datatable ;
+ \addlegendentry{naive Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 2.5pt off 2.5pt] table[y = OS_lazy] from \datatable ;
+ \addlegendentry{lazy Okui-Suzuki} ;
+ \addplot[color=black, mark=, dash pattern=on 1pt off 1pt on 1pt off 1pt on 1pt off 2pt on 4pt off 2pt] table[y = Kuklewicz] from \datatable ;
+ \addlegendentry{Kuklewicz} ;
+ \addplot[color=black, mark=, dash pattern=on 1pt off 2pt on 4pt off 2pt] table[y = Cox] from \datatable ;
+ \addlegendentry{Cox} ;
+ \end{axis}
+\end{tikzpicture}
+\caption{
+Benchmarks.\\
+Real-world tests have labels of the form ``title $m$,$k$'', where $m$ is RE size and $k$ is the number of capturing groups.
+}\label{fig:bench}
+\end{figure}
+
+\begin{itemize}[itemsep=0.5em]
+ \item Okui-Suzuki algorithm degrades with increased closure size.
+ This is understandable, as the algorithm performs pairwise comparison of closure states to compute precedence matrices.
+ Naive $update \Xund ptables ()$ algorithm degrades extremely fast,
+ and the advanced algorithm behaves much better (though it may incur slight overhead in simple cases).
+
+ \item Kuklewicz algorithms degrades with increased closure size and increased number of tags.
+ This is not surprising, as the algorithm has per-state and per-tag loop used to compute precedence matrix.
+ On real-world tests with many capturing groups Kuklewicz algorithm is much slower than Okui-Suzuki algorithm.
+
+ \item Cox algorithm degrades with increased number of tags.
+ The bottleneck of the algorithm is copying of offset arrays
+ (each array contains a pair of offsets per tag).
+ Using GOR1 instead of naive depth-first search increases the amount of copying (though asymptotically faster),
+ because depth-first scan order allows to use a single buffer array that is updated and restored in-place.
+ However, copying is required elsewhere in the algorithm,
+ and in general it is not suited for RE with many submatch groups.
+ On real-world tests the Cox algorithm is so slow that it did not fit into the plot space.
+
+ \item Lazy variation of Okui-Suzuki degrades with increased cache size and the size of path context.
+ This may happen because of long input strings and because of high level of ambiguity in RE
+ (in such cases lazy algorithm does all the work of non-lazy algorithm,
+ but with the additional overhead on cache lookups/insertions and accumulation of data from the previous steps).
+ On real-world tests lazy variation of Okui-Suzuki is fast.
+
+ \item GOR1 and GTOP performance is similar.
+
+ \item RE2 performance is close to our leftmost greedy implementation.
+ \\[-0.5em]
+\end{itemize}
+
+One particularly interesting group of tests that show the above points
+are RE of the form $(a^{k_1}|\hdots|a^{k_n})^{0,\infty}$
+(artificial tests 1-4)
+and their variations with more capturing groups
+(artificial tests 5-8).
+For example, consider \texttt{(a\{2\}|a\{3\}|a\{5\})*} and \texttt{(((a)\{2\})|((a)\{3\})|((a)\{5\}))*}.
+Given input string \texttt{a...a},
+submatch on the last iteration varies with the length of input:
+it equals \texttt{aaaaa} for $5n$-character string,
+\texttt{aa} for strings of length $5n - 3$ and $5n - 1$,
+and \texttt{aaa} for strings of length $5n - 2$ and $5n + 1$ ($n \in \YN$).
+Variation continues infinitely with a period of five characters.
+%
+We can increase variation period and the range of possible submatch results by choosing larger counter values.
+%
+This causes increased closure size ---
+hence the slowdown of Okui-Suzuki algorithm on tests 1 to 4 and 5 to 8 (especially pronounced for the ``naive Okui-Suzuki'' variation),
+and the more gentle slowdown of Kuklewicz algorithm on the same ranges.
+%
+Adding more capturing groups increases the number of tags ---
+hence the slowdown of Kuklewicz and Cox algorithms on 5-8 group compared to 1-4 group.
+\\
+
+In closing, we would like to point out that correctness
+of all benchmarked implementations has been tested on a subset of Glenn Fowler test suite \cite{Fow03}
+(we removed tests for backreferences and start/end anchors),
+extended by Kuklewicz and further extended by ourselves to some 500 tests.
+All algorithms except Cox algorithm have passed the tests
+(Cox algorithm fails in about 10 cases for the reasons discussed in the introduction).
+
+\FloatBarrier
+
+
+\section{Conclusions and future work}\label{section_conclusions}
+
+The main result of our work is a practical POSIX matching algorithm
+that can be used on real-world regular expressions,
+does not require complex preprocessing
+and incurs relatively modest disambiguation overhead compared to other algorithms.
+%
+We tried to present the algorithm in full, with a few useful variations,
+in order to make implementation easy for the reader.
+\\
+
+We see a certain tradeoff between speed and memory usage:
+bounded-memory version of the algorithm performs a lot of redundant work,
+and the lazy version avoids redundant work at the expense of potentially unbounded memory usage.
+Both approaches seem not ideal;
+perhaps in practice a hybrid approach can be used.
+\\
+
+It is still an open question to us
+whether it is possible to combine the elegance of the derivative-based approach to POSIX disambiguation
+with the practical efficiency of NFA-based methods.
+%
+The derivative-based approach constructs match results in such order that longest-leftmost result is always first.
+%
+We experimented with recursive descent parsers that embrace the same ordering idea
+and construsted a prototype implementation.
+\\
+
+It would be interesting to apply our approach to automata with counters
+instead of unrolling bounded repetition.
+
+
+\section*{Acknowledgements}
+
+I want to thank my parents Vladimir and Elina,
+my teachers Tatyana Leonidovna and Demian Vladimirovich
+and the Belarusian State University
+for the love of mathematics.
+This work would not be possible without the help of my husband and dearest friend Sergei Trofimovich.
+Finally, many thanks to the RE2C users!
+\null\hfill\textit{Ulya Trofimovich}
+
+
+\begin{thebibliography}{99}
+
+\bibitem{OS13}
+ Satoshi Okui and Taro Suzuki,
+ \textit{Disambiguation in Regular Expression Matching via Position Automata with Augmented Transitions},
+ International Conference on Implementation and Application of Automata, pp. 231-240, Springer, Berlin, Heidelberg,
+ 2013.
+
+\bibitem{Lau01}
+ Ville Laurikari,
+ \textit{Efficient submatch addressing for regular expressions},
+ Helsinki University of Technology,
+ 2001.
+
+\bibitem{Kuk07}
+ Chris Kuklewicz,
+ \textit{Regular expressions/bounded space proposal},
+ \url{http://wiki.haskell.org/index.php?title=Regular_expressions/Bounded_space_proposal&oldid=11475}
+ 2007.
+
+\bibitem{Cox09}
+ Russ Cox,
+ backward POSIX matching algorithm (source code),
+ \url{https://swtch.com/~rsc/regexp/nfa-posix.y.txt}
+ 2009.
+
+\bibitem{SL14}
+ Martin Sulzmann, Kenny Zhuo Ming Lu,
+ \textit{POSIX Regular Expression Parsing with Derivatives},
+ International Symposium on Functional and Logic Programming, pp. 203-220, Springer, Cham,
+ 2014.
+
+\bibitem{SL13}
+ Martin Sulzmann, Kenny Zhuo Ming Lu,
+ \textit{Correct and Efficient POSIX Submatch Extraction with Regular Expression Derivatives},
+ \url{https://www.home.hs-karlsruhe.de/~suma0002/publications/posix-derivatives.pdf},
+ 2013.
+
+\bibitem{Bor15}
+ Angelo Borsotti1, Luca Breveglieri, Stefano Crespi Reghizzi, Angelo Morzenti,
+ \textit{From Ambiguous Regular Expressions to Deterministic Parsing Automata},
+ International Conference on Implementation and Application of Automata. Springer, Cham, pp.35-48,
+ 2015.
+
+\bibitem{ADU16}
+ Fahad Ausaf, Roy Dyckhoff, Christian Urban,
+ \textit{POSIX Lexing with Derivatives of Regular Expressions},
+ International Conference on Interactive Theorem Proving. Springer, Cham, pp. 69-86,
+ 2016.
+
+\bibitem{Tro17}
+ Ulya Trofimovich,
+ \textit{Tagged Deterministic Finite Automata with Lookahead},
+ \url{http://re2c.org/2017_trofimovich_tagged_deterministic_finite_automata_with_lookahead.pdf},
+ 2017.
+
+\bibitem{CLR}
+ Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest,
+ \textit{Introduction to algorithms},
+ 1st edition,
+ MIT Press and McGraw-Hill,
+ ISBN 0-262-03141-8.
+
+\bibitem{Moh02}
+ Mehryar Mohri,
+ \textit{Semiring frameworks and algorithms for shortest-distance problems},
+ Journal of Automata, Languages and Combinatorics 7 (2002) 3, 321–350, Otto-von-Guericke-Universitat, Magdeburg,
+ 2002.
+
+\bibitem{Kar14}
+ Aaron Karper,
+ \textit{Efficient regular expressions that produce parse trees},
+ Master's thesis,
+ University of Bern,
+ 2014.
+
+\bibitem{GR93}
+ Andrew V. Goldberg, Tomasz Radzik,
+ \textit{A heuristic improvement of the Bellman-Ford algorithm},
+ Elsevier, Applied Mathematics Letters, vol. 6, no. 3, pp. 3-6,
+ 1993.
+
+\bibitem{CGR96}
+ Boris V. Cherkassky, Andrew V. Goldberg, Tomasz Radzik,
+ \textit{Shortest paths algorithms: Theory and experimental evaluation},
+ Springer, Mathematical programming, vol. 73, no. 2, pp. 129-174,
+ 1996.
+
+\bibitem{CGGTW09}
+ Boris V. Cherkassky, Loukas Georgiadis, Andrew V. Goldberg, Robert E. Tarjan, and Renato F. Werneck.
+ \textit{Shortest Path Feasibility Algorithms: An Experimental Evaluation},
+ Journal of Experimental Algorithmics (JEA), 14, 7,
+ 2009.
+
+\bibitem{Cox09}
+ Aaron Karper,
+ \textit{Efficient regular expressions that produce parse trees},
+ epubli GmbH,
+ 2014
+
+\bibitem{POSIX}
+ POSIX standard: \textit{POSIX-1.2008}
+ a.k.a. \textit{IEEE Std 1003.1-2008}
+ The IEEE and The Open Group,
+ 2008.
+
+\bibitem{Fow03}
+ Glenn Fowler,
+ \textit{An Interpretation of the POSIX Regex Standard},
+ \url{https://web.archive.org/web/20050408073627/http://www.research.att.com/~gsf/testregex/re-interpretation.html},
+ 2003.
+
+\bibitem{RE2C}
+ \textit{RE2C}, lexer generator for C/C++.
+ Website: \url{http://re2c.org},
+ source code: \url{http://github.com/skvadrik/re2c}.
+
+\bibitem{RE2}
+ \textit{RE2}, regular expression library.
+ Source code: \url{http://github.com/google/re2}.
+
+\bibitem{Glibc}
+ \textit{The GNU C library},
+ \url{https://www.gnu.org/software/libc/}.
+
+\end{thebibliography}
+
+
+\vfill\null
+\clearpage
+
+
+\section*{Appendix}
+
+\subsection*{Proof of theorem \ref{theorem_porder_on_PTs}}
+
+\begin{theoremEnd}[normal, no link to proof, no link to theorem]{lemma}
+[Unique position mapping from all PTs to IRE]
+ \label{lemma_positions}
+ If $t, s \in PT(r)$ for some IRE $r$
+ and there is a common position $p \in Pos(t) \cap Pos(s)$,
+ then $p$ corresponds to the same position $p' \in Pos(r)$ for both $t$ and $s$.
+\end{theoremEnd}
+\begin{proofEnd}
+ The proof is by induction on the length of $p$.
+ Induction basis: $p = p' = \Lambda$ (the roots of $t$ and $s$ correspond to the root of $e$).
+ Induction step: suppose that for any position $p$ of length $|p| < h$ the lemma is true.
+ We will show that if exists a $k \in \YN$ such that $p.k \in Pos(t) \cap Pos(s)$,
+ then $p.k$ corresponds to the same position $p'.k'$ in $r$ for both $t$ and $s$ (for some $k' \in \YN$).
+ If $r|_{p'}$ is an elementary IRE of the form $(i, j, \epsilon)$ or $(i, j, \alpha)$,
+ or if at least one of $t|_p$ and $s|_p$ is $\varnothing$,
+ then $k$ doesn't exist.
+ Otherwise $r|_{p'}$ is a compound IRE and both $t|_p$ and $s|_p$ are not $\varnothing$.
+ If $r|_{p'}$ is a union $(i, j, (i_1, j_1, r_1)|(i_2, r_2, j_2))$
+ or a product $(i, j, (i_1, j_1, r_1)\cdot(i_2, r_2, j_2))$,
+ then both $t|_p$ and $s|_p$ have exactly two subtrees,
+ and positions $p.1$ and $p.2$ in $t$ and $s$ correspond to positions $p'.1$ and $p'.2$ in $r$.
+ Otherwise, $r|_{p'}$ is a repetition $(i, j, r_1^{n,m})$
+ and for any $k \geq 1$ position $p.k$ in $t$ and $s$ corresponds to position $p'.1$ in $r$.
+\end{proofEnd}
+
+\printProofs[theorem_porder_on_PTs]
+
+
+\subsection*{Proof of theorem \ref{theorem_sorder_on_PTs}}
+
+\begin{theoremEnd}[normal, no link to proof, no link to theorem]{lemma}
+ \label{lemma_incomparability_equivdef}
+ If $t, s \in \PT(e, w)$ for some IRE $e$ and string $w$,
+ then $t \sim s \Leftrightarrow \; \forall p : \snorm{t}{p} = \snorm{s}{p}$.
+\end{theoremEnd}
+\begin{proofEnd}
+ Forward implication: let $t \sim s$ and suppose, on the contrary, that $\exists p = min \{ q \mid \snorm{t}{q} \neq \snorm{s}{q} \}$,
+ then either $t \prec_p s$ (if $\snorm{t}{p} > \snorm{s}{p}$) or $s \prec_p t$ (if $\snorm{t}{p} < \snorm{s}{p}$),
+ both cases contradict $t \sim s$.
+ %
+ Backward implication: $\forall p : \snorm{t}{p} = \snorm{s}{p}$
+ implies $\nexists p : t \prec_p s$ and $\nexists q : s \prec_q t$,
+ which implies $t \sim s$.
+\end{proofEnd}
+
+\printProofs[theorem_sorder_on_PTs]
+
+
+\subsection*{Proof of Theorem \ref{theorem_order_compat}}
+
+\begin{theoremEnd}[normal, no link to proof, no link to theorem]{lemma}
+[Comparability of subtrees]
+ \label{lemma_subtrees}
+ For a given IRE $e$, string $w$ and position $p$,
+ if $t, s \in \PT(e, w)$, $p \in Sub(t) \cup Sub(s)$ and $\snorm{t}{q} = \snorm{s}{q} \; \forall q \leq p$,
+ then $\exists e', w' : t|_p, s|_p \in \PT(e', w')$.
+\end{theoremEnd}
+\begin{proofEnd}
+ By induction on the length of $p$.
+ Induction basis: $p = \Lambda$, let $e' = e$ and $w' = w$.
+ %
+ Induction step: suppose that the lemma is true for any position $p$ of length
+ $|p| < h$, we will show that it is true for any position $p.k$ of length $h$
+ ($k \in \YN$).
+ %
+ Assume that $p.k \in Sub(t) \cap Sub(s)$
+ (otherwise either $p.k \not\in Sub(t) \cup Sub(s)$,
+ or exactly one of $\snorm{t}{p.k}$, $\snorm{s}{p.k}$ is $\infty$ --- in both
+ cases lemma conditions are not satisfied).
+ Then both $t|_p$ and $s|_p$ have at least one subtree: let
+ $t|_{p} = T(t_1, \dots, t_n)$ and
+ $s|_{p} = T(s_1, \dots, s_m)$, where $n, m \geq k$.
+ %
+ By induction hypothesis $\exists e', w' : t|_p, s|_p \in \PT(e', w')$.
+ We have $w' = str(t_1) \dots str(t_n) = str(s_1) \dots str(s_m)$.
+ %
+ We show that $str(t_k) = str(s_k)$.
+ Consider positions $p.j$ for $j \leq k$.
+ By definition the set of submatch positions contains siblings,
+ therefore $p.j \in Sub(t) \cap Sub(s)$.
+ By lemma conditions $\snorm{t}{p.j} = \snorm{s}{p.j}$ (because $p.j \leq p.k$),
+ therefore $|str(t_1) \dots str(t_{k-1})|$
+ $= \sum\nolimits_{j=1}^{k-1}\snorm{t}{j}$
+ $= \sum\nolimits_{j=1}^{k-1}\snorm{s}{j}$
+ $= |str(s_1) \dots str(s_{k-1})|$ and
+ $|str(t_k)| = |str(s_k)|$.
+ Consequently, $str(t_k)$ and $str(s_k)$ start and end at the same character in $w'$ and therefore are equal.
+ %
+ Finally, have $t|_{p.k}, s|_{p.k} \in \PT(r|_{p.k}, str(t_k))$ and induction step is complete.
+\end{proofEnd}
+
+\printProofs[theorem_order_compat]
+
+
+\subsection*{Proof of Theorem \ref{theorem_order_on_pe_same_as_on_pt}}
+
+\begin{theoremEnd}[normal, no link to proof, no link to theorem]{lemma}
+ \label{lemma_pe_equiv}
+ Let $s, t \in \PT(e, w)$ for some IRE $e$ and string $w$.
+ If $s \sim t$, then $\Phi_{h}(s) = \Phi_{h}(t) \; \forall h$.
+\end{theoremEnd}
+\begin{proofEnd}
+ By induction on the height of $e$.
+ %
+ Induction basis: for height $1$ we have
+ $| \PT(e, w) | \leq 1 \; \forall w$,
+ therefore $s = t$ and $\Phi_{h}(s) = \Phi_{h}(t)$.
+ %
+ Induction step:
+ height is greater than 1, therefore
+ $s = T^{d} (s_1, \dots, s_n)$ and
+ $t = T^{d} (t_1, \dots, t_m)$.
+ If $d = 0$, then $\Phi_{h}(s) = str(s) = w = str(t) = \Phi_{h}(t)$.
+ Otherwise $d \neq 0$.
+ By lemma \ref{lemma_incomparability_equivdef} we have $s \sim t \Rightarrow \snorm{s}{p} = \snorm{t}{p} \;\forall p$.
+ This implies $n = m$ (otherwise the norm of subtree at position $min(n,m)+1$ is $\infty$ for only one of $s$, $t$).
+ Therefore
+ $\Phi_{h}(s) = \Xl_{h+1} \Phi_{h+1}(s_1), \dots, \Phi_{h+1}(s_n) \Xr_h$ and
+ $\Phi_{h}(t) = \Xl_{h+1} \Phi_{h+1}(t_1), \dots, \Phi_{h+1}(t_n) \Xr_h$.
+ It suffices to show that $\forall i \leq n: \Phi_{h+1}(s_i) = \Phi_{h+1}(t_i)$.
+ We have $\snorm{s_i}{p} = \snorm{t_i}{p} \;\forall p$ (implied by $\snorm{s}{p} = \snorm{t}{p} \;\forall p$),
+ therefore by lemma \ref{lemma_incomparability_equivdef} $s_i \sim t_i$,
+ and by lemma \ref{lemma_subtrees} $\exists e', w': s_i, t_i \in \PT(e', w')$,
+ where the height of $e'$ is less than the height of $e$.
+ By induction hypothesis $\Phi_{h+1}(s_i) = \Phi_{h+1}(t_i)$.
+\end{proofEnd}
+
+\begin{theoremEnd}[normal, no link to proof, no link to theorem]{lemma}
+ \label{lemma_pe_less_1}
+ Let $s, t \in \PT(e, w)$ for some IRE $e$ and string $w$.
+ If $s \prec_p t$ and $|p| = 1$, then $\Phi_{h}(s) < \Phi_{h}(t) \; \forall h$.
+\end{theoremEnd}
+\begin{proofEnd}
+ By lemma conditions $|p| = 1$, therefore $p \in \YN$.
+ At least one of $s|_p$ and $t|_p$ must exist (otherwise $\snorm{s}{p} = \infty = \snorm{t}{p}$ which contradicts $s \prec_p t$),
+ therefore $e$ is a compound IRE and $s$, $t$ can be represented as
+ $s = T^{d} (s_1, \dots, s_n)$ and
+ $t = T^{d} (t_1, \dots, t_m)$
+ where $d \neq 0$ because $\Lambda$ is a prefix of decision position $p$.
+ Let $k$ be the number of frames and let $j$ be the fork, then:
+ \begin{alignat*}{7}
+ \Phi_{h}(s) &\;=\; \Xl_{h+1} &&\Phi_{h+1}(s_1) &&\dots &&\Phi_{h+1}(s_n) \Xr_h
+ &&\;=\; \beta_0 a_1 \dots a_j \beta_j &&\;\big|\; && \gamma_j a_{j + 1} \dots a_k \gamma_k \\[-0.5em]
+ \Phi_{h}(t) &\;=\; \Xl_{h+1} &&\Phi_{h+1}(t_1) &&\dots &&\Phi_{h+1}(t_m) \Xr_h
+ &&\;=\; \beta_0 a_1 \dots a_j \beta_j &&\;\big|\; && \delta_j a_{j + 1} \dots a_k \delta_k
+ \end{alignat*}
+%
+ Consider any $i < p$ ($i \in \YN$).
+ By lemma conditions $s \prec_p t$, therefore $\snorm{s}{q} = \snorm{t}{q} \;\forall q < p$, and
+ in particular $\snorm{s_i}{q} = \snorm{t_i}{q} \;\forall q$, therefore
+ by lemma \ref{lemma_incomparability_equivdef} $s_i \sim t_i$,
+ therefore by lemma \ref{lemma_pe_equiv} $\Phi_{h+1}(s_i) = \Phi_{h+1}(t_i)$.
+ Let $traces (\Phi_{h}(s), \Phi_{h}(t)) = \big( (\rho_0, \dots, \rho_k), (\rho'_0, \dots, \rho'_k) \big)$.
+
+ \begin{itemize}[itemsep=0.5em, topsep=0.5em]
+ \item[(1)]
+ Case $\infty = \snorm{s}{p} > \snorm{t}{p}$.
+ In this case $s_p$ does not exist
+ and fork happens immediately after $\Phi_{h+1}(s_{p-1})$, $\Phi_{h+1}(t_{p-1})$:
+ \begin{alignat*}{7}
+ \Phi_{h}(s) &\;=\; \Xl_{h+1} &&\Phi_{h+1}(s_1) &&\dots &&\Phi_{h+1}(s_{p-1})
+ &&\;\big|\; \Xr_{h} && && \\[-0.5em]
+ \Phi_{h}(t) &\;=\; \Xl_{h+1} &&\Phi_{h+1}(t_1) &&\dots &&\Phi_{h+1}(t_{p-1})
+ &&\;\big|\; \Phi_{h+1}(t_p) &&\dots &&\Phi_{h+1}(t_m) \Xr_{h}
+ \end{alignat*}
+ %
+ Fork frame is the last one,
+ therefore both $\gamma_j$ and $\delta_j$ contain the closing parenthesis $\Xr_{h}$
+ and we have $\rho_j = \rho'_j = h$.
+ For all $i < j$ we have $\rho_i = \rho'_i = -1$.
+ Therefore $\rho_i = \rho'_i \;\forall i$ and $\Phi_{h}(s) \sim \Phi_{h}(t)$.
+ Since $first(\gamma_j)$ is $\Xr$ and $first(\delta_j)$ is one of $\Xl$ and $\Xm$,
+ we have $\Phi_{h}(s) \subset \Phi_{h}(t)$.
+ Therefore $\Phi_{h}(s) < \Phi_{h}(t)$.
+
+ \item[(2)]
+ Case $\infty > \snorm{s}{p} > \snorm{t}{p} = -1$.
+ In this case both $s_p$ and $t_p$ exist,
+ $s_p$ is not $\varnothing$ and $t_p$ is $\varnothing$,
+ and fork happens immediately after $\Phi_{h+1}(s_{p-1})$, $\Phi_{h+1}(t_{p-1})$:
+ \begin{alignat*}{8}
+ \Phi_{h}(s) &\;=\; \Xl_{h+1} &&\Phi_{h+1}(s_1) &&\dots &&\Phi_{h+1}(s_{p-1})
+ &&\;\big|\; \Xl_{h+2} \; x \; \Xr_{h+1} \; &&\Phi_{h+1}(s_{p+1}) &&\dots &&\Phi_{h+1}(s_n) \Xr_{h} \\[-0.5em]
+ \Phi_{h}(t) &\;=\; \Xl_{h+1} &&\Phi_{h+1}(t_1) &&\dots &&\Phi_{h+1}(t_{p-1})
+ &&\;\big|\; \Xm_{h+1} \;\;\;\;\;\; &&\Phi_{h+1}(t_{p+1}) &&\dots &&\Phi_{h+1}(t_m) \Xr_{h}
+ \end{alignat*}
+ %
+ \begin{itemize}
+ \item[(2.1)]
+ If the fork frame is the last one,
+ then both $\gamma_j$ and $\delta_j$ contain the closing parenthesis $\Xr_{h}$
+ and we have $\rho_j = \rho'_j = h$.
+
+ \item[(2.2)]
+ Otherwise the fork frame is not the last one.
+ We have $minh(\gamma_j)$, $minh(\delta_j) \geq h + 1$
+ and $lasth (\beta_j) = h + 1$
+ (the last parenthesis in $\beta_j$ is either $\Xl_{h+1}$ if $p = 1$ and $s_{p-1}$ does not exist,
+ or else one of $\Xr_{h+1}$ and $\Xm_{h+1}$),
+ therefore $\rho_j = \rho'_j = h + 1$.
+ %
+ For subsequent frames $i$ such that $j < i < k$ we have $\rho_i = \rho'_i = h + 1$
+ (on one hand $\rho_i, \rho'_i \leq h + 1$ because $\rho_j = \rho'_j = h + 1$,
+ but on the other hand $minh(\gamma_i)$, $minh(\delta_i) \geq h + 1$).
+ %
+ For the last pair of frames we have $\rho_k = \rho'_k = h$ (they both contain the closing parenthesis $\Xr_{h}$).
+ \end{itemize}
+
+ In both cases $\rho_i = \rho'_i \;\forall i \geq j$.
+ Since $\rho_i = \rho'_i = -1 \;\forall i < j$,
+ we have $\rho_i = \rho'_i \;\forall i$ and therefore $\Phi_{h}(s) \sim \Phi_{h}(t)$.
+ %
+ Since $first (\gamma_j) = \Xl < \Xm = first (\delta_j)$ we have $\Phi_{h}(s) \subset \Phi_{h}(t)$.
+ Therefore $\Phi_{h}(s) < \Phi_{h}(t)$.
+
+ \item[(3)]
+ Case $\infty > \snorm{s}{p} > \snorm{t}{p} \geq 0$.
+ In this case both $s_p$ and $t_p$ exist and none of them is $\varnothing$,
+ and fork happens somewhere after the opening parenthesis $\Xl_{h+2}$
+ and before the closing parenthesis $\Xr_{h+1}$ in $\Phi_{h}(s_p)$, $\Phi_{h}(t_p)$:
+ \begin{alignat*}{9}
+ \Phi_{h}(s) &\;=\; \Xl_{h+1} &&\Phi_{h+1}(s_1) &&\dots &&\Phi_{h+1}(s_{p-1}) &&\; \Xl_{h+2} \; x
+ &&\;\big|\; y \; \Xr_{h+1} \; &&\Phi_{h+1}(s_{p+1}) &&\dots &&\Phi_{h+1}(s_n) \Xr_{h} \\[-0.5em]
+ \Phi_{h}(t) &\;=\; \Xl_{h+1} &&\Phi_{h+1}(t_1) &&\dots &&\Phi_{h+1}(t_{p-1}) &&\; \Xl_{h+2} \; x
+ &&\;\big|\; z \; \Xr_{h+1} \; &&\Phi_{h+1}(t_{p+1}) &&\dots &&\Phi_{h+1}(t_m) \Xr_{h}
+ \end{alignat*}
+ %
+ From $\snorm{s}{p} > \snorm{t}{p} \geq 0$ it follows that
+ $s_p$ contains more alphabet symbols than $t_p$.
+ Consequently $\Phi_{h+1}(s_p)$ contains more alphabet symbols, and thus spans more frames than $\Phi_{h+1}(t_p)$.
+ %
+ Let $l$ be the index of the frame $\delta_l$ that contains the closing parenthesis $\Xr_{h+1}$ of $\Phi_{h+1}(t_p)$.
+ By the above reasoning $\Phi_{h+1}(s_p)$ does not end in frame $\gamma_l$,
+ therefore $\gamma_l$ does not contain the closing parenthesis $\Xr_{h+1}$
+ and we have $minh (\gamma_l) \geq h+2$ and $minh (\delta_l) = h+1$.
+ %
+ Furthermore, note that $minh(x)$, $minh(y)$, $minh(z) \geq h + 2$,
+ therefore $lasth(\beta_j) \geq h+2$ (including the case when $x$ is empty),
+ and for all frames $i$ such that $j \leq i < l$ (if any) we have $\rho_i, \rho'_i \geq h+2$.
+ %
+ Consequently, for $l$-th frame we have $\rho_l \geq h+2$ and $\rho'_l = h + 1$, thus $\rho_l > \rho'_l$.
+ %
+ For subsequent frames $i$ such that $l < i < k$ we have $minh(\gamma_i)$, $minh(\delta_i) \geq h + 1$,
+ therefore $\rho_i \geq h+1$ and $\rho'_i = h + 1$, thus $\rho_i \geq \rho'_i$.
+ %
+ For the last pair of frames we have $\rho_k = \rho'_k = h$, as they both contain the closing parenthesis $\Xr_{h}$.
+ %
+ Therefore $\Phi_{h}(s) \sqsubset \Phi_{h}(t)$,
+ which implies $\Phi_{h}(s) < \Phi_{h}(t)$.
+ \end{itemize}
+\end{proofEnd}
+
+\begin{theoremEnd}[normal, no link to proof, no link to theorem]{lemma}
+ \label{lemma_pe_less}
+ Let $s, t \in \PT(r, w)$ for some IRE $r$ and string $w$.
+ If $s \prec_p t$, then $\Phi_{h}(s) < \Phi_{h}(t) \; \forall h$.
+\end{theoremEnd}
+\begin{proofEnd}
+ The proof is by induction on the length of $p$.
+ %
+ Induction basis for $|p| = 1$ is given by lemma \ref{lemma_pe_less_1}.
+ %
+ Induction step: suppose that the lemma is correct for all $p$ of length $|p| < h$ and let $|p| = h$ ($h \geq 2$).
+ %
+ Let $p = p'.p''$ where $p' \in \YN$.
+ %
+ At least one of $s|_p$ and $t|_p$ must exist (otherwise $\snorm{s}{p} = \infty = \snorm{t}{p}$ which contradicts $s \prec_p t$),
+ therefore both $e$ and $e|_{p'}$ are compound IREs and $s$, $t$ can be represented as
+ $s = T^{d} (s_1, \dots, s_n)$ and
+ $t = T^{d} (t_1, \dots, t_m)$ where
+ $s' = s_{p'} = T^{d'} (s'_1, \dots, s'_{n'})$ and
+ $t' = t_{p'} = T^{d'} (t'_1, \dots, t'_{m'})$
+ and both $d, d' \neq 0$ (because $\Lambda$ and $p'$ are prefixes of decision position $p$).
+ %
+ Therefore $\Phi_{h}(s)$, $\Phi_{h}(t)$ can be represented as follows:
+ \begin{alignat*}{9}
+ \Phi_{h}(s)
+ \;&=
+ \;&& \Xl_{h+1} \Phi_{h+1}(s_1) \dots \Phi_{h+1}(s_{p'-1})
+ \;&& \overbrace {\Xl_{h+2} \Phi_{h+2}(s'_1) \dots \Phi_{h+2}(s'_{n'}) \Xr_{h+1}}^{\Phi_{h+1}(s')}
+ \;&& \Phi_{h+1}(s_{p'+1}) \Phi_{h+1}(s_n) \Xr_{h}
+ \\
+ \Phi_{h}(t)
+ \;&=
+ \;&& \Xl_{h+1} \Phi_{h+1}(t_1) \dots \Phi_{h+1}(t_{p'-1})
+ \;&& \underbrace {\Xl_{h+2} \Phi_{h+2}(t'_1) \dots \Phi_{h+2}(t'_{m'}) \Xr_{h+1}}_{\Phi_{h+1}(t')}
+ \;&& \Phi_{h+1}(t_{p'+1}) \Phi_{h+1}(t_m) \Xr_{h}
+ \end{alignat*}
+ %
+ Consider any $i < p'$.
+ By lemma conditions $s \prec_p t$, therefore $\snorm{s}{q} = \snorm{t}{q} \;\forall q < p$, and
+ in particular $\snorm{s_i}{q} = \snorm{t_i}{q} \;\forall q$, therefore
+ by lemma \ref{lemma_incomparability_equivdef} $s_i \sim t_i$,
+ therefore by lemma \ref{lemma_pe_equiv} $\Phi_{h+1}(s_i) = \Phi_{h+1}(t_i)$.
+ %
+ Since $p' < p$ we have $\snorm{s}{q} = \snorm{t}{q} \;\forall q \leq p'$ and
+ by lemma \ref{lemma_subtrees} $\exists e', w' : s', t' \in \PT(e', w')$.
+ Since $\snorm{s'}{q} = \snorm{s}{p'.q} \;\forall q$
+ and $\snorm{t'}{q} = \snorm{t}{p'.q} \;\forall q$,
+ we have $s' \prec_{p''} t'$.
+ Since $|p''| < |p|$ by induction hypothesis we have $\Phi_{h+1}(s') < \Phi_{h+1}(t')$.
+ %
+ If $j$ is the fork and $f \leq j \leq k$, then
+ $\Phi_{h}(s)$, $\Phi_{h}(t)$ can be represented as:
+ \begin{alignat*}{9}
+ \Phi_{h}(s)
+ \;&=
+ \;&& \beta_0 a_1 \dots a_f \beta_f^1
+ \;&& \overbrace {\beta_f^2 a_{f+1} \dots a_j \beta_j \;\big|\; \gamma_j a_{j+1} \dots a_k \gamma_k^1}^{\Phi_{h+1}(s')}
+ \;&& \gamma_k^2 a_{k+1} \dots a_l \gamma_l
+ \\[-0.5em]
+ \Phi_{h}(t)
+ \;&=
+ \;&& \beta_0 a_1 \dots a_f \beta_f^1
+ \;&& \underbrace {\beta_f^2 a_{f+1} \dots a_j \beta_j \;\big|\; \delta_j a_{j+1} \dots a_k \delta_k^1}_{\Phi_{h+1}(t')}
+ \;&& \delta_k^2 a_{k+1} \dots a_l \delta_l
+ \end{alignat*}
+ %
+ Let $traces (\Phi_{h}(s), \Phi_{h}(t)) = \big( (\rho_0, \dots, \rho_l), (\rho'_0, \dots, \rho'_l) \big)$
+ and $traces (\Phi_{h+1}(s'), \Phi_{h+1}(t')) = \big( (\sigma_h, \dots, \sigma_k), (\sigma'_h, \dots, \sigma'_k) \big)$.
+ %
+ We show that for frames $i$ such that $j \leq i < k$ we have
+ $\rho_i = \sigma_i \wedge \rho'_i = \sigma'_i$
+ and for subsequent frames $k \leq i \leq l$ we have $\rho_i = \rho'_i$.
+ %
+ \begin{itemize}[itemsep=0.5em, topsep=0.5em]
+ \item[(1)]
+ Case $i = j < k \leq l$ (the fork frame).
+ Since we have shown that $\Phi_{h+1}(s_i) = \Phi_{h+1}(t_i) \;\forall i < p'$,
+ and since $\Phi_{h+1}(s')$ and $\Phi_{h+1}(t')$ have nonempty common prefix $\Xl_{h+2}$,
+ it follows that $lasht (\Phi_{h}(s) \sqcap \Phi_{h}(t)) = lasth (\Phi_{h+1}(s') \sqcap \Phi_{h+1}(t'))$.
+ %
+ From $j < k$ it follows that $\gamma_j$ and $\delta_j$ end before $a_k$
+ and are not changed by appending $\gamma^2_k$ and $\delta^2_k$.
+ %
+ Therefore $\rho_j = \sigma_j \wedge \rho'_j = \sigma'_j$.
+
+ \item[(2)]
+ Case $j < i < k \leq l$.
+ The computation of $\rho_i$, $\rho'_i$ depends only on
+ $\rho_j$, $\rho'_j$,
+ or which we have shown $\rho_j = \sigma_j \wedge \rho'_j = \sigma'_j$ in case (1),
+ and on $\Phi_{h+1}(s')$, $\Phi_{h+1}(t')$,
+ which are not changed by appending $\gamma^2_k$ and $\delta^2_k$ since $i < k$.
+ Therefore $\rho_i = \sigma_i \wedge \rho'_i = \sigma'_i$.
+
+ \item[(3)]
+ Case $j \leq i = k < l$. We have
+ $minh (\gamma^1_k) = minh (\delta^1_k) = h + 1$ and
+ $minh (\gamma^2_k) = minh (\delta^2_k) \geq h + 1$.
+ None of the preceding frames after the fork contain parentheses with height less than $h + 1$,
+ therefore $\rho_k = \rho'_k = h + 1$.
+
+ \item[(4)]
+ Case $j \leq k < i < l$.
+ We have $\rho_i = \rho'_i = h + 1$,
+ because $\rho_k = \rho'_k = h + 1$ and $minh(\gamma_i)$, $minh(\delta_i) \geq h + 1$.
+
+ \item[(5)]
+ Case $j \leq k \leq i = l$.
+ We have $\rho_l = \rho'_l = h$,
+ because both $\gamma_l$ and $\delta_l$ contain the closing parenthesis $\Xr_{h}$.
+ \end{itemize}
+ %
+ We have shown that $\rho_i = \sigma_i \wedge \rho'_i = \sigma'_i \;\forall i: j \leq i < k$
+ and $\rho_i = \rho'_i \;\forall i: k \leq i \leq l$.
+ It trivially follows that $\Phi_{h+1}(s') \sqsubset \Phi_{h+1}(t')$ $\Rightarrow \Phi_{h}(s) \sqsubset \Phi_{h}(t)$
+ and $\Phi_{h+1}(s') \sim \Phi_{h+1}(t')$ $\Rightarrow \Phi_{h}(s) \sim \Phi_{h}(t)$.
+ Because none of $\Phi_{h+1}(s')$, $\Phi_{h+1}(t')$ is a proper prefix of another,
+ $\Phi_{h+1}(s') \subset \Phi_{h+1}(t')$ $\Rightarrow \Phi_{h}(s) \subset \Phi_{h}(t)$.
+ Therefore $\Phi_{h+1}(s') < \Phi_{h+1}(t') \Rightarrow \Phi_{h}(s) < \Phi_{h}(t)$
+ (the premise has been shown).
+\end{proofEnd}
+
+\printProofs[theorem_order_on_pe_same_as_on_pt]
+
+
+\subsection*{Correctness of incremental path comparison}
+
+\printProofs[lemma_frames]
+\printProofs[lemmata_closure]
+
+
+\end{document}
+
--- /dev/null
+%.pdf : %.tex
+ pdflatex -shell-escape $< </dev/null > $<.log
+
+all : 2019_borsotti_trofimovich_efficient_posix_submatch_extraction_on_nfa.pdf
+
+clean:
+ rm *.log *.aux *.pdf *.pag pratend*.tex
--- /dev/null
+
+r: (([-!#$%&'*+.^_`|~0-9a-zA-Z]+)..., s: HTTP/5.9 430 1wSXfgruktPZfhxm
+..., n: 100, 6204 chars, 198 groups
+ re2c-tnfa-leftmost: 1.00 0.426s
+ re2: 3.93 1.674s
+ re2c-tnfa-posix-gor1: 3.65 1.557s
+ re2c-tnfa-posix-gtop: 3.27 1.393s
+ re2c-tnfa-posix-kukl-gor1: 75.03 31.999s
+ re2c-tnfa-posix-gor1-slow: 2.80 1.195s
+ re2c-tnfa-posix-gor1-trie: 2.45 1.045s
+ re2c-tnfa-posix-back-gor1: - -
+
+r: ((([-._~%!$&'*+#^`|a-zA-Z0-9]+..., s: HTTP/5.9 430 1wSXfgruktPZfhxm
+..., n: 100, 573 chars, 40 groups
+ re2c-tnfa-leftmost: 1.00 0.149s
+ re2: 0.43 0.064s
+ re2c-tnfa-posix-gor1: 2.92 0.436s
+ re2c-tnfa-posix-gtop: 2.63 0.393s
+ re2c-tnfa-posix-kukl-gor1: 19.84 2.962s
+ re2c-tnfa-posix-gor1-slow: 2.36 0.353s
+ re2c-tnfa-posix-gor1-trie: 1.72 0.257s
+ re2c-tnfa-posix-back-gor1: - -
+
+r: ([a-zA-Z][a-zA-Z0-9+.-]*):(//(..., s: http://240.147.163.34:2124/z/d..., n: 100, 3149 chars, 102 groups
+ re2c-tnfa-leftmost: 1.00 0.795s
+ re2: 2.55 2.026s
+ re2c-tnfa-posix-gor1: 3.13 2.488s
+ re2c-tnfa-posix-gtop: 2.76 2.195s
+ re2c-tnfa-posix-kukl-gor1: 13.57 10.787s
+ re2c-tnfa-posix-gor1-slow: 2.90 2.304s
+ re2c-tnfa-posix-gor1-trie: 1.95 1.553s
+ re2c-tnfa-posix-back-gor1: - -
+
+r: ([-+.a-zA-Z0-9]+):(//(([-._~%!..., s: http://240.147.163.34:2124/z/d..., n: 100, 234 chars, 18 groups
+ re2c-tnfa-leftmost: 1.00 0.484s
+ re2: 0.45 0.219s
+ re2c-tnfa-posix-gor1: 3.55 1.716s
+ re2c-tnfa-posix-gtop: 3.21 1.553s
+ re2c-tnfa-posix-kukl-gor1: 6.51 3.150s
+ re2c-tnfa-posix-gor1-slow: 3.09 1.495s
+ re2c-tnfa-posix-gor1-trie: 2.72 1.317s
+ re2c-tnfa-posix-back-gor1: 42.93 20.773s
+
+r: (([0-9a-fA-F]{1,4}:){6}([0-9a-..., s: fee2:586:10aa:fd03:37f:76ee:be..., n: 100, 2343 chars, 61 groups
+ re2c-tnfa-leftmost: 1.00 0.116s
+ re2: 1.34 0.155s
+ re2c-tnfa-posix-gor1: 3.16 0.366s
+ re2c-tnfa-posix-gtop: 3.53 0.409s
+ re2c-tnfa-posix-kukl-gor1: 45.37 5.255s
+ re2c-tnfa-posix-gor1-slow: 3.37 0.391s
+ re2c-tnfa-posix-gor1-trie: 1.25 0.145s
+ re2c-tnfa-posix-back-gor1: - -
+
+r: (([0-9]|[1-9][0-9]|[1][0-9]{2}..., s: 127.0.0.1..., n: 10000, 235 chars, 5 groups
+ re2c-tnfa-leftmost: 1.00 0.099s
+ re2: 0.83 0.082s
+ re2c-tnfa-posix-gor1: 3.53 0.350s
+ re2c-tnfa-posix-gtop: 3.14 0.311s
+ re2c-tnfa-posix-kukl-gor1: 5.55 0.550s
+ re2c-tnfa-posix-gor1-slow: 2.71 0.269s
+ re2c-tnfa-posix-gor1-trie: 1.86 0.185s
+ re2c-tnfa-posix-back-gor1: 30.04 2.980s
+
+r: ([0-9]{1,3})[.]([0-9]{1,3})[.]..., s: 127.0.0.1..., n: 10000, 57 chars, 4 groups
+ re2c-tnfa-leftmost: 1.00 0.052s
+ re2: 0.50 0.026s
+ re2c-tnfa-posix-gor1: 4.89 0.256s
+ re2c-tnfa-posix-gtop: 4.11 0.215s
+ re2c-tnfa-posix-kukl-gor1: 6.10 0.319s
+ re2c-tnfa-posix-gor1-slow: 3.41 0.179s
+ re2c-tnfa-posix-gor1-trie: 2.49 0.130s
+ re2c-tnfa-posix-back-gor1: 27.15 1.422s
+
+r: ([^.]+)[.]([^.]+)[.]([^.]+)[.]..., s: 127.0.0.1..., n: 10000, 37 chars, 4 groups
+ re2c-tnfa-leftmost: 1.00 0.054s
+ re2: 0.50 0.027s
+ re2c-tnfa-posix-gor1: 4.57 0.245s
+ re2c-tnfa-posix-gtop: 4.08 0.219s
+ re2c-tnfa-posix-kukl-gor1: 5.98 0.320s
+ re2c-tnfa-posix-gor1-slow: 3.33 0.178s
+ re2c-tnfa-posix-gor1-trie: 2.46 0.132s
+ re2c-tnfa-posix-back-gor1: 17.55 0.940s
+
+r: (Mon|Tue|Wed|Thu|Fri|Sat|Sun) ..., s: Mon Jan 01 00:24:00 GMT 2019..., n: 10000, 154 chars, 7 groups
+ re2c-tnfa-leftmost: 1.00 0.183s
+ re2: 0.74 0.136s
+ re2c-tnfa-posix-gor1: 3.91 0.717s
+ re2c-tnfa-posix-gtop: 3.21 0.588s
+ re2c-tnfa-posix-kukl-gor1: 8.49 1.555s
+ re2c-tnfa-posix-gor1-slow: 2.80 0.512s
+ re2c-tnfa-posix-gor1-trie: 1.97 0.361s
+ re2c-tnfa-posix-back-gor1: 110.86 20.311s
+
+r: ([a-zA-Z]+) ([a-zA-Z]+) ([0-9]..., s: Mon Jan 01 00:24:00 GMT 2019..., n: 10000, 65 chars, 6 groups
+ re2c-tnfa-leftmost: 1.00 0.183s
+ re2: 0.95 0.173s
+ re2c-tnfa-posix-gor1: 5.00 0.914s
+ re2c-tnfa-posix-gtop: 4.32 0.790s
+ re2c-tnfa-posix-kukl-gor1: 8.01 1.465s
+ re2c-tnfa-posix-gor1-slow: 3.90 0.713s
+ re2c-tnfa-posix-gor1-trie: 2.64 0.482s
+ re2c-tnfa-posix-back-gor1: 43.09 7.881s
+
+r: ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+..., s: Mon Jan 01 00:24:00 GMT 2019..., n: 10000, 47 chars, 6 groups
+ re2c-tnfa-leftmost: 1.00 0.176s
+ re2: 1.32 0.231s
+ re2c-tnfa-posix-gor1: 5.10 0.896s
+ re2c-tnfa-posix-gtop: 4.41 0.775s
+ re2c-tnfa-posix-kukl-gor1: 8.28 1.455s
+ re2c-tnfa-posix-gor1-slow: 3.98 0.699s
+ re2c-tnfa-posix-gor1-trie: 2.65 0.466s
+ re2c-tnfa-posix-back-gor1: 44.92 7.892s
+
+r: (a{2}|a{3}|a{5})*..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 17 chars, 1 groups
+ re2c-tnfa-leftmost: 1.00 0.082s
+ re2: 1.27 0.104s
+ re2c-tnfa-posix-gor1: 3.72 0.303s
+ re2c-tnfa-posix-gtop: 3.49 0.285s
+ re2c-tnfa-posix-kukl-gor1: 2.60 0.213s
+ re2c-tnfa-posix-gor1-slow: 4.56 0.372s
+ re2c-tnfa-posix-gor1-trie: 2.98 0.244s
+ re2c-tnfa-posix-back-gor1: 3.21 0.262s
+
+r: (a{7}|a{11}|a{13})*..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 19 chars, 1 groups
+ re2c-tnfa-leftmost: 1.00 0.174s
+ re2: 1.33 0.230s
+ re2c-tnfa-posix-gor1: 6.34 1.102s
+ re2c-tnfa-posix-gtop: 6.80 1.181s
+ re2c-tnfa-posix-kukl-gor1: 3.44 0.597s
+ re2c-tnfa-posix-gor1-slow: 11.92 2.070s
+ re2c-tnfa-posix-gor1-trie: 2.78 0.483s
+ re2c-tnfa-posix-back-gor1: 3.07 0.533s
+
+r: (a{17}|a{19}|a{23})*..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 20 chars, 1 groups
+ re2c-tnfa-leftmost: 1.00 0.288s
+ re2: 1.44 0.415s
+ re2c-tnfa-posix-gor1: 10.19 2.940s
+ re2c-tnfa-posix-gtop: 10.94 3.154s
+ re2c-tnfa-posix-kukl-gor1: 3.87 1.115s
+ re2c-tnfa-posix-gor1-slow: 22.45 6.474s
+ re2c-tnfa-posix-gor1-trie: 2.31 0.665s
+ re2c-tnfa-posix-back-gor1: 3.01 0.868s
+
+r: (a{29}|a{31}|a{37})*..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 20 chars, 1 groups
+ re2c-tnfa-leftmost: 1.00 0.444s
+ re2: 1.44 0.639s
+ re2c-tnfa-posix-gor1: 15.15 6.731s
+ re2c-tnfa-posix-gtop: 16.01 7.116s
+ re2c-tnfa-posix-kukl-gor1: 4.17 1.854s
+ re2c-tnfa-posix-gor1-slow: 36.72 16.318s
+ re2c-tnfa-posix-gor1-trie: 2.28 1.015s
+ re2c-tnfa-posix-back-gor1: 2.97 1.321s
+
+r: (((a){2})|((a){3})|((a){5}))*..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 29 chars, 7 groups
+ re2c-tnfa-leftmost: 1.00 0.293s
+ re2: 1.12 0.329s
+ re2c-tnfa-posix-gor1: 2.96 0.867s
+ re2c-tnfa-posix-gtop: 3.28 0.960s
+ re2c-tnfa-posix-kukl-gor1: 5.68 1.664s
+ re2c-tnfa-posix-gor1-slow: 3.22 0.943s
+ re2c-tnfa-posix-gor1-trie: 4.94 1.446s
+ re2c-tnfa-posix-back-gor1: 4.36 1.277s
+
+r: (((a){7})|((a){11})|((a){13}))..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 31 chars, 7 groups
+ re2c-tnfa-leftmost: 1.00 0.607s
+ re2: 1.38 0.839s
+ re2c-tnfa-posix-gor1: 4.47 2.714s
+ re2c-tnfa-posix-gtop: 5.36 3.252s
+ re2c-tnfa-posix-kukl-gor1: 7.86 4.771s
+ re2c-tnfa-posix-gor1-slow: 7.33 4.451s
+ re2c-tnfa-posix-gor1-trie: 10.65 6.462s
+ re2c-tnfa-posix-back-gor1: 4.11 2.495s
+
+r: (((a){17})|((a){19})|((a){23})..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 32 chars, 7 groups
+ re2c-tnfa-leftmost: 1.00 1.049s
+ re2: 1.46 1.534s
+ re2c-tnfa-posix-gor1: 6.39 6.703s
+ re2c-tnfa-posix-gtop: 7.43 7.793s
+ re2c-tnfa-posix-kukl-gor1: 8.61 9.032s
+ re2c-tnfa-posix-gor1-slow: 13.06 13.693s
+ re2c-tnfa-posix-gor1-trie: 14.67 15.388s
+ re2c-tnfa-posix-back-gor1: 3.99 4.185s
+
+r: (((a){29})|((a){31})|((a){37})..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 32 chars, 7 groups
+ re2c-tnfa-leftmost: 1.00 1.699s
+ re2: 1.44 2.450s
+ re2c-tnfa-posix-gor1: 8.66 14.703s
+ re2c-tnfa-posix-gtop: 9.80 16.649s
+ re2c-tnfa-posix-kukl-gor1: 8.82 14.986s
+ re2c-tnfa-posix-gor1-slow: 19.78 33.600s
+ re2c-tnfa-posix-gor1-trie: 18.85 32.022s
+ re2c-tnfa-posix-back-gor1: 3.92 6.651s
+
+r: ((((((((((a*)*)*)*)*)*)*)*)*)*..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 32 chars, 10 groups
+ re2c-tnfa-leftmost: 1.00 0.208s
+ re2: 0.78 0.162s
+ re2c-tnfa-posix-gor1: 1.91 0.397s
+ re2c-tnfa-posix-gtop: 1.98 0.410s
+ re2c-tnfa-posix-kukl-gor1: 3.50 0.726s
+ re2c-tnfa-posix-gor1-slow: 1.86 0.386s
+ re2c-tnfa-posix-gor1-trie: 5.96 1.238s
+ re2c-tnfa-posix-back-gor1: 7.22 1.498s
+
+r: (a*)(a*)(a*)(a*)(a*)(a*)(a*)(a..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 32 chars, 8 groups
+ re2c-tnfa-leftmost: 1.00 0.272s
+ re2: 0.76 0.208s
+ re2c-tnfa-posix-gor1: 3.53 0.961s
+ re2c-tnfa-posix-gtop: 3.95 1.077s
+ re2c-tnfa-posix-kukl-gor1: 13.80 3.759s
+ re2c-tnfa-posix-gor1-slow: 3.85 1.049s
+ re2c-tnfa-posix-gor1-trie: 11.95 3.256s
+ re2c-tnfa-posix-back-gor1: 7.53 2.051s
+
+r: (((a*)(a*)(a*))*((a*)(a*)(a*))..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 33 chars, 9 groups
+ re2c-tnfa-leftmost: 1.00 0.265s
+ re2: 0.89 0.235s
+ re2c-tnfa-posix-gor1: 3.16 0.837s
+ re2c-tnfa-posix-gtop: 3.76 0.994s
+ re2c-tnfa-posix-kukl-gor1: 15.35 4.061s
+ re2c-tnfa-posix-gor1-slow: 3.16 0.837s
+ re2c-tnfa-posix-gor1-trie: 20.59 5.450s
+ re2c-tnfa-posix-back-gor1: 9.86 2.610s
+
+r: (((((a*)*)*((a*)*)*((a*)*)*)*)..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 33 chars, 9 groups
+ re2c-tnfa-leftmost: 1.00 0.246s
+ re2: 0.86 0.211s
+ re2c-tnfa-posix-gor1: 2.92 0.718s
+ re2c-tnfa-posix-gtop: 3.49 0.860s
+ re2c-tnfa-posix-kukl-gor1: 17.82 4.390s
+ re2c-tnfa-posix-gor1-slow: 2.57 0.634s
+ re2c-tnfa-posix-gor1-trie: 21.64 5.330s
+ re2c-tnfa-posix-back-gor1: 13.05 3.214s
+
+r: (((((a*)*(a*))*(a*))*(a*))*(a*..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 33 chars, 9 groups
+ re2c-tnfa-leftmost: 1.00 0.255s
+ re2: 0.79 0.203s
+ re2c-tnfa-posix-gor1: 2.87 0.732s
+ re2c-tnfa-posix-gtop: 3.45 0.881s
+ re2c-tnfa-posix-kukl-gor1: 12.61 3.221s
+ re2c-tnfa-posix-gor1-slow: 2.72 0.694s
+ re2c-tnfa-posix-gor1-trie: 24.53 6.267s
+ re2c-tnfa-posix-back-gor1: 11.54 2.949s
+
+r: ((a*)((a*)((a*)((a*)(a*)*)*)*)..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 33 chars, 9 groups
+ re2c-tnfa-leftmost: 1.00 0.270s
+ re2: 0.81 0.218s
+ re2c-tnfa-posix-gor1: 3.07 0.828s
+ re2c-tnfa-posix-gtop: 3.62 0.977s
+ re2c-tnfa-posix-kukl-gor1: 14.90 4.021s
+ re2c-tnfa-posix-gor1-slow: 2.94 0.793s
+ re2c-tnfa-posix-gor1-trie: 16.27 4.392s
+ re2c-tnfa-posix-back-gor1: 9.92 2.678s
+
+r: (a*)|(a*)|(a*)|(a*)|(a*)|(a*)|..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 34 chars, 7 groups
+ re2c-tnfa-leftmost: 1.00 0.121s
+ re2: 0.78 0.094s
+ re2c-tnfa-posix-gor1: 3.18 0.383s
+ re2c-tnfa-posix-gtop: 3.92 0.473s
+ re2c-tnfa-posix-kukl-gor1: 5.99 0.722s
+ re2c-tnfa-posix-gor1-slow: 3.33 0.401s
+ re2c-tnfa-posix-gor1-trie: 8.01 0.966s
+ re2c-tnfa-posix-back-gor1: 8.81 1.063s
+
+r: ((a*)|(a*)|(a*))((a*)|(a*)|(a*..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 32 chars, 8 groups
+ re2c-tnfa-leftmost: 1.00 0.202s
+ re2: 0.89 0.179s
+ re2c-tnfa-posix-gor1: 2.99 0.605s
+ re2c-tnfa-posix-gtop: 3.41 0.689s
+ re2c-tnfa-posix-kukl-gor1: 7.17 1.448s
+ re2c-tnfa-posix-gor1-slow: 2.89 0.584s
+ re2c-tnfa-posix-gor1-trie: 11.49 2.319s
+ re2c-tnfa-posix-back-gor1: 6.29 1.269s
+
+r: ((a*)|(a*))((a*)|(a*))((a*)|(a..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 33 chars, 9 groups
+ re2c-tnfa-leftmost: 1.00 0.252s
+ re2: 0.76 0.190s
+ re2c-tnfa-posix-gor1: 2.75 0.691s
+ re2c-tnfa-posix-gtop: 3.02 0.760s
+ re2c-tnfa-posix-kukl-gor1: 7.95 2.002s
+ re2c-tnfa-posix-gor1-slow: 2.70 0.681s
+ re2c-tnfa-posix-gor1-trie: 9.96 2.507s
+ re2c-tnfa-posix-back-gor1: 5.83 1.468s
+
+r: ((a*)|(a*)|(a*))*|((a*)|(a*)|(..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 35 chars, 8 groups
+ re2c-tnfa-leftmost: 1.00 0.250s
+ re2: 0.93 0.233s
+ re2c-tnfa-posix-gor1: 2.42 0.605s
+ re2c-tnfa-posix-gtop: 3.00 0.748s
+ re2c-tnfa-posix-kukl-gor1: 8.00 1.996s
+ re2c-tnfa-posix-gor1-slow: 2.44 0.608s
+ re2c-tnfa-posix-gor1-trie: 19.99 4.989s
+ re2c-tnfa-posix-back-gor1: 7.73 1.929s
+
+r: (((((a*)*)*|((a*)*)*|((a*)*)*)..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 35 chars, 9 groups
+ re2c-tnfa-leftmost: 1.00 0.280s
+ re2: 0.87 0.243s
+ re2c-tnfa-posix-gor1: 3.27 0.913s
+ re2c-tnfa-posix-gtop: 2.57 0.719s
+ re2c-tnfa-posix-kukl-gor1: 11.24 3.142s
+ re2c-tnfa-posix-gor1-slow: 3.22 0.901s
+ re2c-tnfa-posix-gor1-trie: 24.15 6.754s
+ re2c-tnfa-posix-back-gor1: 10.08 2.818s
+
+r: ((a*)|((a*)(a*))|((a*)(a*)(a*)..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 33 chars, 9 groups
+ re2c-tnfa-leftmost: 1.00 0.311s
+ re2: 0.71 0.222s
+ re2c-tnfa-posix-gor1: 2.50 0.779s
+ re2c-tnfa-posix-gtop: 2.19 0.682s
+ re2c-tnfa-posix-kukl-gor1: 6.02 1.874s
+ re2c-tnfa-posix-gor1-slow: 2.46 0.765s
+ re2c-tnfa-posix-gor1-trie: 14.57 4.533s
+ re2c-tnfa-posix-back-gor1: 5.55 1.726s
+
+r: (((a*)(a*)(a*))|((a*)(a*))|(a*..., s: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..., n: 10, 33 chars, 9 groups
+ re2c-tnfa-leftmost: 1.00 0.286s
+ re2: 0.79 0.225s
+ re2c-tnfa-posix-gor1: 2.51 0.716s
+ re2c-tnfa-posix-gtop: 2.52 0.720s
+ re2c-tnfa-posix-kukl-gor1: 6.20 1.771s
+ re2c-tnfa-posix-gor1-slow: 2.47 0.704s
+ re2c-tnfa-posix-gor1-trie: 16.15 4.614s
+ re2c-tnfa-posix-back-gor1: 7.50 2.142s
+
+r: ((a?){0,125})*..., s: aaaaaaaaaa..., n: 256, 14 chars, 2 groups
+ re2c-tnfa-leftmost: 1.00 0.197s
+ re2: 0.46 0.091s
+ re2c-tnfa-posix-gor1: 5.11 1.007s
+ re2c-tnfa-posix-gtop: 5.42 1.068s
+ re2c-tnfa-posix-kukl-gor1: 24.85 4.897s
+ re2c-tnfa-posix-gor1-slow: 46.84 9.229s
+ re2c-tnfa-posix-gor1-trie: 5.66 1.116s
+ re2c-tnfa-posix-back-gor1: 1.13 0.222s
+
+r: ((a?){0,250})*..., s: aaaaaaaaaa..., n: 16, 14 chars, 2 groups
+ re2c-tnfa-leftmost: 1.00 0.042s
+ re2: 0.27 0.012s
+ re2c-tnfa-posix-gor1: 5.67 0.240s
+ re2c-tnfa-posix-gtop: 5.85 0.248s
+ re2c-tnfa-posix-kukl-gor1: 31.69 1.341s
+ re2c-tnfa-posix-gor1-slow: 101.25 4.285s
+ re2c-tnfa-posix-gor1-trie: 5.25 0.222s
+ re2c-tnfa-posix-back-gor1: 0.67 0.028s
+
+r: ((a?){0,500})*..., s: aaaaaaaaaa..., n: 4, 14 chars, 2 groups
+ re2c-tnfa-leftmost: 1.00 0.039s
+ re2: 0.15 0.006s
+ re2c-tnfa-posix-gor1: 6.02 0.234s
+ re2c-tnfa-posix-gtop: 6.15 0.240s
+ re2c-tnfa-posix-kukl-gor1: 40.83 1.590s
+ re2c-tnfa-posix-gor1-slow: 211.30 8.228s
+ re2c-tnfa-posix-gor1-trie: 5.08 0.198s
+ re2c-tnfa-posix-back-gor1: 0.37 0.015s
+
+r: ((a?){0,1000})*..., s: aaaaaaaaaa..., n: 2, 15 chars, 2 groups
+ re2c-tnfa-leftmost: 1.00 0.075s
+ re2: 0.08 0.006s
+ re2c-tnfa-posix-gor1: 6.48 0.483s
+ re2c-tnfa-posix-gtop: 6.47 0.482s
+ re2c-tnfa-posix-kukl-gor1: 45.31 3.377s
+ re2c-tnfa-posix-gor1-slow: 431.51 32.162s
+ re2c-tnfa-posix-gor1-trie: 4.92 0.367s
+ re2c-tnfa-posix-back-gor1: 0.19 0.014s
+
+r: ((a?){0,2000})*..., s: aaaaaaaaaa..., n: 1, 15 chars, 2 groups
+ re2c-tnfa-leftmost: 1.00 0.146s
+ re2: - -
+ re2c-tnfa-posix-gor1: 6.68 0.976s
+ re2c-tnfa-posix-gtop: 6.64 0.971s
+ re2c-tnfa-posix-kukl-gor1: 53.49 7.818s
+ re2c-tnfa-posix-gor1-slow: 880.72 128.736s
+ re2c-tnfa-posix-gor1-trie: 4.83 0.705s
+ re2c-tnfa-posix-back-gor1: 0.11 0.015s
--- /dev/null
+#!/bin/bash
+
+log="log"
+
+grep ': ' "$log" | grep -E ' [0-9]+\.[0-9]{2} | - ' -o > "${log}1"
+
+while read l; do
+ for i in $(seq 7); do
+ read l1
+ l="$l;$l1"
+ done
+ echo $l | sed 's/-/nan/' >> "${log}2"
+done < "${log}1"
+
+heading="test;Alg;LG;RE2;OS;OS_GTOP;Kuklewicz;OS_naive;OS_lazy;Cox"
+
+column -t "${log}2" > "${log}3"
+
+realworld=(
+ "HTTP 6204,198"
+ "HTTP-small 574,40"
+ "URI 3149,102"
+ "URI-small 234,18"
+ "IPv6 2343,61"
+ "IPv4 235,5"
+ "IPv4-small 57,4"
+ "IPv4-tiny 37,4"
+ "date 154,7"
+ "date-small 65,6"
+ "date-tiny 47,6"
+)
+
+artificial=(
+ '\texttt{(a\{2\}|a\{3\}|a\{5\})*}'
+ '\texttt{(a\{7\}|a\{11\}|a\{13\})*}'
+ '\texttt{(a\{17\}|a\{19\}|a\{23\})*}'
+ '\texttt{(a\{29\}|a\{31\}|a\{37\})*}'
+ '\texttt{(((a)\{2\})|((a)\{3\})|((a)\{5\}))*}'
+ '\texttt{(((a)\{7\})|((a)\{11\})|((a)\{13\}))*}'
+ '\texttt{(((a)\{17\})|((a)\{19\})|((a)\{23\}))*}'
+ '\texttt{(((a)\{29\})|((a)\{31\})|((a)\{37\}))*}'
+ '\texttt{((((((((((a*)*)*)*)*)*)*)*)*)*)*}'
+ '\texttt{(a*)(a*)(a*)(a*)(a*)(a*)(a*)(a*)}'
+ '\texttt{(((a*)(a*)(a*))*((a*)(a*)(a*))*)*}'
+ '\texttt{(((((a*)*)*((a*)*)*((a*)*)*)*)*)*}'
+ '\texttt{(((((a*)*(a*))*(a*))*(a*))*(a*))*}'
+ '\texttt{((a*)((a*)((a*)((a*)(a*)*)*)*)*)*}'
+ '\texttt{(a*)|(a*)|(a*)|(a*)|(a*)|(a*)|(a*)}'
+ '\texttt{((a*)|(a*)|(a*))((a*)|(a*)|(a*))}'
+ '\texttt{((a*)|(a*))((a*)|(a*))((a*)|(a*))}'
+ '\texttt{((a*)|(a*)|(a*))*|((a*)|(a*)|(a*))*}'
+ '\texttt{(((((a*)*)*|((a*)*)*|((a*)*)*)*)*)*}'
+ '\texttt{((a*)|((a*)(a*))|((a*)(a*)(a*)))*}'
+ '\texttt{(((a*)(a*)(a*))|((a*)(a*))|(a*))*}'
+)
+
+pathological=(
+ '\texttt{((a?)\{0,125\})*}'
+ '\texttt{((a?)\{0,250\})*}'
+ '\texttt{((a?)\{0,500\})*}'
+ '\texttt{((a?)\{0,1000\})*}'
+ '\texttt{((a?)\{0,2000\})*}'
+)
+
+process() {
+ local -n tests=$3
+ result="$4"
+ echo $heading > "$result"
+ for i in $(seq $1 $2); do
+ echo -n "$i;${tests[$((i-$1))]};" >> "$result"
+ sed "${i}q;d" "${log}3" >> "$result"
+ done
+}
+
+process 1 11 realworld data_realworld
+process 12 32 artificial data_artificial
+process 33 37 pathological data_pathological
+
+rm "${log}1" "${log}2" "${log}3"
%.pdf : %.tex
lualatex -shell-escape $< </dev/null > $<.build_log
-all : mark_enum.pdf pe.pdf trees.pdf tnfa_construction.pdf gor1.pdf tnfa_example.pdf
+all : mark_and_enum.pdf parenthesized_expressions.pdf tnfa_construction.pdf
clean:
rm *.log *.build_log *.aux *.pdf *.pag
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amssymb, amsfonts, accents}
\usetikzlibrary{graphdrawing, graphs, arrows, shapes, automata, calc}
-\usegdlibrary{trees, layered}
\usepackage{stix}
+% workaround for https://github.com/u-fischer/luaotfload/issues/6
+\usepackage{luacode}
+\begin{luacode}
+ function pgf_lookup_and_require(name)
+ local sep = '/'
+ if string.find(os.getenv('PATH'),';') then
+ sep = '\string\\'
+ end
+ local function lookup(name)
+ local sub = name:gsub('%.',sep)
+ local find_func = function (name, suffix)
+ if resolvers then
+ local n = resolvers.findfile (name.."."..suffix, suffix) -- changed
+ return (not (n == '')) and n or nil
+ else
+ return kpse.find_file(name,suffix)
+ end
+ end
+ if find_func(sub, 'lua') then
+ require(name)
+ elseif find_func(sub, 'clua') then
+ collectgarbage('stop')
+ require(name)
+ collectgarbage('restart')
+ else
+ return false
+ end
+ return true
+ end
+ return
+ lookup('pgf.gd.' .. name .. '.library') or
+ lookup('pgf.gd.' .. name) or
+ lookup(name .. '.library') or
+ lookup(name)
+ end
+\end{luacode}
+\usegdlibrary{trees, layered}
+
\newcommand{\Xund}{\rule{.4em}{.4pt}}
\newcommand{\IRE}{I\!RE}
--- /dev/null
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{proof-at-the-end}[2019/05/21 A package to move proofs in appendix]
+
+\RequirePackage{etoolbox}
+\RequirePackage{hyperref}
+\RequirePackage{thmtools}
+\RequirePackage{thm-restate}
+\RequirePackage{catchfile}
+\RequirePackage{pgfkeys}
+\RequirePackage{xparse}
+
+\RequirePackage{kvoptions}
+
+%% https://tex.stackexchange.com/questions/109747/put-all-package-options-into-one-command
+%% Forward the options list to the command \pratendOptdefconf
+%% in order to use:
+%% \usepackage[conf={normal}]{proof-at-the-end}
+\SetupKeyvalOptions{
+ family=pratendOpt,
+ prefix=pratendOpt,
+}
+\DeclareStringOption{conf}
+\DeclareLocalOptions{conf}% \pratendOptdefconf contains the proof
+\ProcessKeyvalOptions*
+
+% \DeclareOption*{\PackageWarning{proof-at-the-end}{Unknown}}
+% \ProcessOptions\relax
+
+\newwrite\appendwrite
+
+% The first argument is the file name
+% The second argument is the text to write
+\NewDocumentCommand\appendtofile{m+m}{%
+ \begingroup
+ \IfFileExists{#1}%
+ {\CatchFileDef{\filecontent}{#1}{\catcode`\\=12 \endlinechar=`^^J\catcode\endlinechar=12\relax}}% keep existing end-of-lines
+ {\let\filecontent\empty}%
+ \immediate\openout\appendwrite=#1\relax
+ \immediate\write\appendwrite{\detokenize\expandafter{\filecontent}#2}%
+ \immediate\closeout\appendwrite
+ \endgroup
+}
+
+%% This functions takes one input: the category (without .tex),
+%% If it's the first time we write in this
+%% category file, it "blanks" it.
+\def\prefixPrAtEndFiles{pratend}
+\newcommand*\eraseIfNeeded[1]{%
+ % A macro 'pratendmacrocat{category}' is created to check
+ % if it's the first time we write in this category file.
+ \protected@edef\macroname{pratendmacrocat#1}%
+ \ifcsdef{\macroname}{% The macro exists, nothing to do
+ }{ % The macro does not exists, create it, and empty the file
+ \global\expandafter\def\csname \macroname\endcsname{true}%
+ \immediate\openout\appendwrite=\prefixPrAtEndFiles#1.tex%
+ \immediate\write\appendwrite{}%
+ \immediate\closeout\appendwrite%
+ }%
+}
+
+\newif\ifproofhere
+\newif\ifproofend
+\newif\ifrestatethm
+\newif\iflinktoproof
+\newif\ifboth
+\newif\ifallattheend
+\newif\ifrestatedbefore
+\pgfkeys{
+ /prAtEnd/.cd, %% Proof at end will be the main path
+ %% Category of the proof (if you want to put proofs
+ %% at several places), can be anything
+ category/.initial=defaultcategory,
+ category/.store in=\category,
+ category/.get=\category,
+ %% Display the proof in the main part
+ proof here/.is if=proofhere,
+ no proof here/.style={proof here=false}, % alias
+ %% Display the proof when using \printProofs
+ proof end/.is if=proofend,
+ no proof end/.style={proof end=false},
+ %% Restate the theorem when using \printProofs
+ restate/.is if=restatethm,
+ no restate/.style={restate=false},
+ %% Put a link to the proof after the theorem
+ link to proof/.is if=linktoproof,
+ no link to proof/.style={link to proof=false},
+ %% Put the theorem and proof only in appendix
+ opt all end/.is if=allattheend,
+ no opt all end/.style={opt all end=false},
+ %% Text of link
+ text link/.code={\def\pratendtextlink{#1}},
+ %% Text of proof. Make sure also to "\renewcommand*{\proofname}{Name of the proof}"
+ %% to make sure the proof for normal theorems are changed
+ text proof/.code={\def\pratendtextproof{#1}},
+ %% Custom restate command
+ restate command/.code={\protected@edef\pratendcustomrestate{#1}},
+ %% (Re)stated before
+ %% If the theorems has been stated before, then we just need to put the restate command in
+ %% place of the argument, and we set this value to true:
+ restated before/.is if=restatedbefore,
+ no restated before/.style={restated before=false},
+ %% In star version, we don't want
+ %% Put the text (defined only for \textInAppendix) in both the
+ %% current location and in appendix
+ both/.is if=both,
+ no both/.style={both=false},
+ %%%% Alias and styles
+ normal/.style={
+ proof here,
+ no opt all end,
+ no proof end,
+ no link to proof,
+ no restate,
+ no both,
+ },
+ proof at the end/.style={
+ no proof here,
+ no opt all end,
+ proof end,
+ no both,
+ },
+ end/.style={
+ proof at the end,
+ link to proof,
+ },
+ all end/.style={
+ end,
+ opt all end,
+ },
+ debug/.style={
+ no opt all end,
+ proof here
+ },
+ no link to theorem/.style={ % Remove the link to the theorem
+ text proof={\proofname},
+ },
+ stared/.style={ % Remove
+ text proof={\string\mbox{\string\hyperref[thm:prAtEnd\pratendcountercurrent]{\proofname}}},
+ },
+ no number/.style={
+ stared
+ },
+ see full proof/.style={
+ text link={See \hyperref[proof:prAtEnd\pratendcountercurrent]{full proof} on page~\pageref{proof:prAtEnd\pratendcountercurrent}.}
+ },
+ one big link/.style={
+ text link={\hyperref[proof:prAtEnd\pratendcountercurrent] {#1}}
+ },
+ one big link/.default={%
+ See proof on page~\pageref*{proof:prAtEnd\pratendcountercurrent}.
+ },
+ one big link translated/.style={
+ one big link={#1~\pageref*{proof:prAtEnd\pratendcountercurrent}.}
+ },
+ text link section/.style={%
+ text link={See \hyperref[proof:prAtEnd\pratendcountercurrent]{proof} in \autoref{proofsection:prAtEnd\pratendcountercurrent}.}
+ },
+ text link section full proof/.style={%
+ text link={See \hyperref[proof:prAtEnd\pratendcountercurrent]{full proof} in \autoref{proofsection:prAtEnd\pratendcountercurrent}.}
+ },
+ default text link/.style={
+ text link={See \hyperref[proof:prAtEnd\pratendcountercurrent]{proof} on page~\pageref{proof:prAtEnd\pratendcountercurrent}.},
+ },
+ text proof translated/.style={
+ text proof={#1 \string\autoref{thm:prAtEnd\pratendcountercurrent}},
+ },
+ default text proof/.style={
+ text proof={Proof of \string\autoref{thm:prAtEnd\pratendcountercurrent}},
+ },
+ %%%% Defaults
+ bare defaults/.style={
+ end,
+ link to proof,
+ no restate,
+ category=defaultcategory,
+ default text link,
+ default text proof,
+ restate command=pratenddummymacro,
+ },
+ configuration options/.style/.expand once={
+ % This styles will contain the configuration
+ % given as options of the package like:
+ % \usepackage[conf={normal, no link to proof}]{proof-at-the-end}
+ % The package options does not accept macros and valued keys
+ % due to some fundamental issues:
+ % https://tex.stackexchange.com/questions/489564/use-unexpanded-macro-in-package-options/489570#489570
+ % so if you need to write macro/valued key, edit instead the
+ % style "/prAtEnd/global custom defaults" or
+ % "local /prAtEnd/custom defaults" for local changes instead.
+ \pratendOptconf%
+ },
+ global custom defaults/.style={
+ %% you can put in this style any global defaults
+ %% that should overwrite the usual defaults.
+ },
+ local custom defaults/.style={
+ %% you can put in this style any overwrite of the defaults
+ %% that should be "local" and changed over the file, like
+ % the category for a given section.
+ },
+ all defaults/.style={
+ %% Load all the style that sets the default values
+ bare defaults,
+ configuration options,
+ global custom defaults,
+ local custom defaults,
+ },
+}
+
+\newcounter{counterAllProofEnd}
+\stepcounter{counterAllProofEnd}
+
+\NewDocumentEnvironment{theoremEndRestateBefore}{mO{}m+b}{
+ \stepcounter{counterAllProofEnd}%
+ \protected@edef\currcounterval{\roman{counterAllProofEnd}}
+ \protected@edef\temprest{\noexpand\begin{restatable*}[#2]{#1}{prAtEndRestate\currcounterval}\noexpand\label{thm:prAtEnd\currcounterval}}%
+ \expandafter\protected@xdef\csname #3\endcsname{\currcounterval}%
+ \temprest%
+ #4%
+ \end{restatable*}%
+}{}
+
+\NewDocumentEnvironment{theoremEnd}{O{}mO{}+b}{
+ % The first facultative argument will be the options: type of proof you want, the file to which you want to write...
+ % The first mandatory option is the type of the theorem (thm,lemma,...)
+ % The second facultative argument will be the title
+ % the second mandatory option is the theorem (will \label inside eventually)
+ % the last mandatory option is the proof
+ \global\def\pratendlastoptions{#1}%
+ \pgfkeys{%
+ /prAtEnd/.cd,
+ all defaults,
+ #1
+ }%
+ \stepcounter{counterAllProofEnd}%
+ %% Pre-expand the restatable environment. Need protected
+ %% otherwise can't have $\mathtt{G}$ in the title
+ \protected@edef\temprest{\noexpand\begin{restatable}[#3]{#2}{prAtEndRestate\roman{counterAllProofEnd}}}%
+ %% Create the file if it's the first time
+ \eraseIfNeeded{\category}%
+ %% If the theorem must be written here:
+ \unless\ifallattheend%
+ %% Restate the theorem if it was stated before:
+ \ifrestatedbefore%
+ \protected@xdef\pratendcountercurrent{\csname #4\endcsname} % Store the current (alpha value of the) counter
+ \csname prAtEndRestate\pratendcountercurrent\endcsname % Restate the theorem
+ \fi%
+ %% Otherwise just state the theorem in a restatable environment
+ \unless\ifrestatedbefore%
+ \temprest%
+ \label{thm:prAtEnd\roman{counterAllProofEnd}}%
+ #4%
+ \end{restatable}%
+ %% Store the current (alpha value of the) counter
+ %% in \pratendcountercurrent
+ \protected@xdef\pratendcountercurrent{\roman{counterAllProofEnd}} %
+ \fi%
+ %% Create a custom alias to restate the theorem
+ \expandafter\protected@xdef\csname \pratendcustomrestate\endcsname{\noexpand\csname prAtEndRestate\pratendcountercurrent\endcsname}%
+ %% Restate the theorem if needed in appendix
+ \ifrestatethm
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\prAtEndRestate\pratendcountercurrent*}
+ \fi%
+ \fi%
+ %% If the theorem is not stated in the main text,
+ %% write it at the end
+ \ifallattheend%
+ %% Store the current (alpha value of the) counter
+ %% in \pratendcountercurrent
+ \protected@xdef\pratendcountercurrent{\roman{counterAllProofEnd}}
+ %% Create a custom alias to restate the theorem
+ \expandafter\protected@xdef\csname \pratendcustomrestate\endcsname{\noexpand\csname prAtEndRestate\pratendcountercurrent\endcsname}%
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\begin{restatable}[#3]{#2}{prAtEndRestate\pratendcountercurrent}\string\label{thm:prAtEnd\pratendcountercurrent}\detokenize{#4}\string\end{restatable}}%
+ \fi%
+}{}
+
+\NewDocumentEnvironment{proofEnd}{O{}+b}{
+ \pgfkeys{%
+ /prAtEnd/.cd,
+ all defaults,
+ prAtEndTmpStyle/.style/.expand once={\pratendlastoptions},
+ prAtEndTmpStyle,
+ #1
+ }%
+ \unless\ifallattheend
+ %% Write eventually a link to the proof
+ \iflinktoproof%
+ \pratendtextlink{}%
+ \fi%
+ %% And eventually the proof
+ \ifproofhere%
+ \begin{proof}%
+ #2%
+ \end{proof}%
+ \fi%
+ \fi%
+ %% Write the proof at the end
+ \ifproofend%
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\label{proofsection:prAtEnd\pratendcountercurrent}\string\begin{proof}[\pratendtextproof]\string\phantomsection\string\label{proof:prAtEnd\pratendcountercurrent}\detokenize{#2}\string\end{proof}}%
+ \fi%
+}{}
+
+
+%%%%% Text in appendix
+
+\NewDocumentEnvironment{textAtEnd}{O{}+b}{
+ % Use it to put normal text in Appendix.
+ \pgfkeys{
+ /prAtEnd/.cd,
+ all defaults,
+ #1
+ }%
+ \ifboth%
+ #2%
+ \fi%
+ \eraseIfNeeded{\category}%
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{\detokenize{#2}}%
+}{}
+
+\NewDocumentCommand\textEnd{O{}+m}{%
+ \begin{textAtEnd}[#1]%
+ #2%
+ \end{textAtEnd}%
+}
+
+\NewDocumentCommand\printProofs{O{defaultcategory}}{
+ \input{\prefixPrAtEndFiles#1.tex}
+}
+
+
+%%% You can easily modify the defaults:
+% \pgfkeys{/prAtEnd/custom defaults/.style={
+% category=greattheorem
+% }
+% }
+%%% Or create new styles to apply:
+% \pgfkeys{/prAtEnd/great category/.style={
+% category=greattheorem
+% }
+% }
+
+
+\endinput
--- /dev/null
+%%
+%% This is file `xparse.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xparse.dtx (with options: `package')
+%%
+%% Copyright (C) 2009-2019 The LaTeX3 Project
+%%
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version. The latest
+%% version of this license is in the file:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "l3packages bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% File: xparse.dtx
+\RequirePackage{expl3}[2018-04-12]
+\@ifpackagelater{expl3}{2018-04-12}
+ {}
+ {%
+ \PackageError{xparse}{Support package l3kernel too old}
+ {%
+ Please install an up to date version of l3kernel\MessageBreak
+ using your TeX package manager or from CTAN.\MessageBreak
+ \MessageBreak
+ Loading xparse will abort!%
+ }%
+ \endinput
+ }
+\ProvidesExplPackage{xparse}{2019-03-05}{}
+ {L3 Experimental document command parser}
+\tl_new:N \l__xparse_arg_spec_tl
+\tl_new:N \l__xparse_args_tl
+\tl_new:N \l__xparse_args_i_tl
+\tl_new:N \l__xparse_args_ii_tl
+\int_new:N \l__xparse_current_arg_int
+\bool_new:N \l__xparse_defaults_bool
+\tl_new:N \l__xparse_defaults_tl
+\bool_new:N \l__xparse_environment_bool
+\str_new:N \l__xparse_environment_str
+\bool_new:N \l__xparse_expandable_bool
+\tl_new:N \l__xparse_expandable_aux_name_tl
+\tl_set:Nn \l__xparse_expandable_aux_name_tl
+ {
+ \l__xparse_function_tl \c_space_tl
+ ( arg~ \int_use:N \l__xparse_current_arg_int )
+ }
+\int_new:N \g__xparse_grabber_int
+\tl_new:N \l__xparse_fn_tl
+\tl_new:N \l__xparse_fn_code_tl
+\tl_new:N \l__xparse_function_tl
+\bool_new:N \l__xparse_grab_expandably_bool
+\bool_new:N \l__xparse_obey_spaces_bool
+\tl_new:N \l__xparse_last_delimiters_tl
+\bool_new:N \l__xparse_long_bool
+\int_new:N \l__xparse_m_args_int
+\bool_new:N \l__xparse_prefixed_bool
+\tl_new:N \l__xparse_process_all_tl
+\tl_new:N \l__xparse_process_one_tl
+\bool_new:N \l__xparse_process_some_bool
+\tl_new:N \l__xparse_saved_args_tl
+\tl_new:N \l__xparse_signature_tl
+\bool_new:N \l__xparse_some_obey_spaces_bool
+\bool_new:N \l__xparse_some_long_bool
+\bool_new:N \l__xparse_some_short_bool
+\prop_new:N \l__xparse_tmp_prop
+\tl_new:N \l__xparse_tmpa_tl
+\tl_new:N \l__xparse_tmpb_tl
+\cs_new_eq:NN \__xparse_tmp:w ?
+\cs_new_protected:Npn \__xparse_declare_cmd:Nnn
+ {
+ \bool_set_false:N \l__xparse_expandable_bool
+ \__xparse_declare_cmd_aux:Nnn
+ }
+\cs_new_protected:Npn \__xparse_declare_expandable_cmd:Nnn
+ {
+ \bool_set_true:N \l__xparse_expandable_bool
+ \__xparse_declare_cmd_aux:Nnn
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_aux:Nnn #1#2#3
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_info:nnxx { xparse } { redefine-command }
+ { \token_to_str:N #1 } { \tl_to_str:n {#2} }
+ }
+ {
+ \bool_lazy_or:nnT
+ { \cs_if_exist_p:c { \cs_to_str:N #1 ~ code } }
+ { \cs_if_exist_p:c { \cs_to_str:N #1 ~ defaults } }
+ {
+ \__kernel_msg_warning:nnx { xparse } { unsupported-let }
+ { \token_to_str:N #1 }
+ }
+ \__kernel_msg_info:nnxx { xparse } { define-command }
+ { \token_to_str:N #1 } { \tl_to_str:n {#2} }
+ }
+ \bool_set_false:N \l__xparse_environment_bool
+ \__xparse_declare_cmd_internal:Nnnn #1 {#2} {#3} { }
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_internal:Nnnn #1#2#3#4
+ {
+ \tl_set:Nx \l__xparse_function_tl { \cs_to_str:N #1 }
+ \tl_set:Nx \l__xparse_fn_tl
+ { \exp_not:c { \l__xparse_function_tl \c_space_tl } }
+ \__xparse_normalize_arg_spec:n {#2}
+ \exp_args:No \__xparse_prepare_signature:n \l__xparse_arg_spec_tl
+ \__xparse_declare_cmd_code:Nnn #1 {#2} {#3}
+ #4
+ \__xparse_break_point:n {#2}
+ }
+\cs_generate_variant:Nn \__xparse_declare_cmd_internal:Nnnn { cnx }
+\cs_new_eq:NN \__xparse_break_point:n \use_none:n
+\cs_new_protected:Npn \__xparse_declare_cmd_code:Nnn
+ {
+ \bool_if:NTF \l__xparse_grab_expandably_bool
+ { \__xparse_declare_cmd_code_expandable:Nnn }
+ { \__xparse_declare_cmd_code_aux:Nnn }
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_code_aux:Nnn #1#2#3
+ {
+ \cs_generate_from_arg_count:cNnn
+ { \l__xparse_function_tl \c_space_tl code }
+ \cs_set_protected:Npn \l__xparse_current_arg_int {#3}
+ \cs_set_protected_nopar:Npx #1
+ {
+ \bool_if:NTF \l__xparse_environment_bool
+ {
+ \__xparse_start_env:nnnnn { \exp_not:n {#2} }
+ { \l__xparse_environment_str }
+ }
+ {
+ \__xparse_start:nNNnnn { \exp_not:n {#2} }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl code }
+ }
+ { \exp_not:o \l__xparse_signature_tl }
+ {
+ \bool_if:NT \l__xparse_defaults_bool
+ { \exp_not:o \l__xparse_defaults_tl }
+ }
+ {
+ \bool_if:NT \l__xparse_process_some_bool
+ { \exp_not:o \l__xparse_process_all_tl }
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_code_expandable:Nnn #1#2#3
+ {
+ \exp_args:Ncc \cs_generate_from_arg_count:NNnn
+ { \l__xparse_function_tl \c_space_tl code }
+ { cs_set \bool_if:NF \l__xparse_expandable_bool { _protected } :Npn }
+ \l__xparse_current_arg_int {#3}
+ \bool_if:NT \l__xparse_defaults_bool
+ {
+ \use:x
+ {
+ \cs_generate_from_arg_count:cNnn
+ { \l__xparse_function_tl \c_space_tl defaults }
+ \cs_set:Npn \l__xparse_current_arg_int
+ { \exp_not:o \l__xparse_defaults_tl }
+ }
+ }
+ \bool_if:NTF \l__xparse_expandable_bool
+ { \cs_set_nopar:Npx } { \cs_set_protected_nopar:Npx } #1
+ {
+ \exp_not:N \__xparse_start_expandable:nNNNNn
+ { \exp_not:n {#2} }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl }
+ \exp_not:c
+ {
+ \l__xparse_function_tl \c_space_tl
+ \bool_if:NT \l__xparse_some_short_bool
+ { \bool_if:NT \l__xparse_some_long_bool { \c_space_tl } }
+ }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl code }
+ \bool_if:NTF \l__xparse_defaults_bool
+ { \exp_not:c { \l__xparse_function_tl \c_space_tl defaults } }
+ { ? }
+ { \exp_not:o \l__xparse_signature_tl }
+ }
+ \bool_if:NTF \l__xparse_some_long_bool
+ {
+ \bool_if:NT \l__xparse_some_short_bool
+ {
+ \cs_set_nopar:cpx { \l__xparse_function_tl \c_space_tl \c_space_tl }
+ ##1##2 { ##1 {##2} }
+ }
+ \cs_set:cpx
+ }
+ { \cs_set_nopar:cpx }
+ { \l__xparse_function_tl \c_space_tl } ##1##2 { ##1 {##2} }
+ }
+\cs_new_protected:Npn \__xparse_declare_env:nnnn #1#2
+ {
+ \str_set:Nx \l__xparse_environment_str {#1}
+ \str_set:Nx \l__xparse_environment_str
+ { \tl_trim_spaces:o { \l__xparse_environment_str } }
+ \cs_if_exist:cTF { \l__xparse_environment_str }
+ {
+ \__kernel_msg_info:nnxx { xparse } { redefine-environment }
+ { \l__xparse_environment_str } { \tl_to_str:n {#2} }
+ }
+ {
+ \__kernel_msg_info:nnxx { xparse } { define-environment }
+ { \l__xparse_environment_str } { \tl_to_str:n {#2} }
+ }
+ \bool_set_false:N \l__xparse_expandable_bool
+ \bool_set_true:N \l__xparse_environment_bool
+ \exp_args:NV \__xparse_declare_env_internal:nnnn
+ \l__xparse_environment_str {#2}
+ }
+\cs_new_protected:Npn \__xparse_declare_env_internal:nnnn #1#2#3#4
+ {
+ \__xparse_declare_cmd_internal:cnxn { environment~ #1 } {#2}
+ {
+ \cs_set_nopar:Npx \exp_not:c { environment~ #1 ~end~aux }
+ {
+ \exp_not:N \exp_not:N \exp_not:c { environment~ #1~end~aux~ }
+ \exp_not:n { \exp_not:o \l__xparse_args_tl }
+ }
+ \exp_not:n {#3}
+ }
+ {
+ \cs_set_nopar:cpx { environment~ #1 ~end }
+ { \exp_not:c { environment~ #1 ~end~aux } }
+ \cs_generate_from_arg_count:cNnn
+ { environment~ #1 ~end~aux~ } \cs_set:Npn
+ \l__xparse_current_arg_int {#4}
+ \cs_set_eq:cc {#1} { environment~ #1 }
+ \cs_set_eq:cc { end #1 } { environment~ #1 ~end }
+ }
+ }
+\cs_new_protected:Npn \__xparse_start_env:nnnnn #1#2
+ {
+ \str_set:Nn \l__xparse_environment_str {#2}
+ \bool_set_true:N \l__xparse_environment_bool
+ \__xparse_start_aux:ccnnnn
+ { environment~ \l__xparse_environment_str \c_space_tl }
+ { environment~ \l__xparse_environment_str \c_space_tl code }
+ {#1}
+ }
+\cs_new_protected:Npx \__xparse_start:nNNnnn #1#2#3
+ {
+ \exp_not:c { xparse~function~is~not~expandable }
+ \exp_not:n { \bool_set_false:N \l__xparse_environment_bool }
+ \exp_not:N \__xparse_start_aux:NNnnnn
+ #2 #3 {#1}
+ }
+\cs_new_protected:Npn \__xparse_start_aux:NNnnnn #1#2#3#4#5#6
+ {
+ \tl_clear:N \l__xparse_args_tl
+ \tl_set:Nn \l__xparse_fn_tl {#1}
+ \tl_set:Nn \l__xparse_fn_code_tl {#2}
+ \tl_set:Nn \l__xparse_defaults_tl {#5}
+ \tl_set:Nn \l__xparse_process_all_tl {#6}
+ #4 \__xparse_run_code:
+ }
+\cs_generate_variant:Nn \__xparse_start_aux:NNnnnn { cc }
+\cs_new_protected:Npn \__xparse_run_code:
+ {
+ \tl_if_empty:NF \l__xparse_defaults_tl { \__xparse_defaults: }
+ \tl_if_empty:NF \l__xparse_process_all_tl { \__xparse_args_process: }
+ \exp_after:wN \l__xparse_fn_code_tl \l__xparse_args_tl
+ }
+\cs_new_protected:Npn \__xparse_defaults:
+ {
+ \__xparse_defaults_def:
+ \tl_set_eq:NN \l__xparse_args_i_tl \l__xparse_args_tl
+ \__xparse_defaults_aux: \__xparse_defaults_aux: \__xparse_defaults_aux:
+ \__xparse_defaults_aux: \__xparse_defaults_aux: \__xparse_defaults_aux:
+ \__xparse_defaults_aux: \__xparse_defaults_aux: \__xparse_defaults_aux:
+ \__xparse_defaults_error:w
+ \q_recursion_stop
+ \tl_set_eq:NN \l__xparse_args_tl \l__xparse_args_i_tl
+ }
+\cs_new_protected:Npn \__xparse_defaults_aux:
+ {
+ \tl_set:Nx \l__xparse_args_ii_tl
+ { \exp_after:wN \__xparse_tmp:w \l__xparse_args_i_tl }
+ \tl_if_eq:NNT \l__xparse_args_ii_tl \l__xparse_args_i_tl
+ { \use_none_delimit_by_q_recursion_stop:w }
+ \tl_set_eq:NN \l__xparse_args_i_tl \l__xparse_args_ii_tl
+ }
+\cs_new_protected:Npn \__xparse_defaults_error:w \q_recursion_stop
+ {
+ \__kernel_msg_error:nnx { xparse } { loop-in-defaults }
+ { \__xparse_environment_or_command: }
+ }
+\cs_new_protected:Npn \__xparse_defaults_def:
+ {
+ \tl_clear:N \l__xparse_tmpa_tl
+ \int_zero:N \l__xparse_current_arg_int
+ \__xparse_tl_mapthread_function:NNN \l__xparse_args_tl \l__xparse_defaults_tl
+ \__xparse_defaults_def:nn
+ \cs_generate_from_arg_count:NNVo \__xparse_tmp:w \cs_set:Npn
+ \l__xparse_current_arg_int \l__xparse_tmpa_tl
+ }
+\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNVo }
+\cs_new_protected:Npn \__xparse_defaults_def:nn
+ {
+ \int_incr:N \l__xparse_current_arg_int
+ \exp_args:NV \__xparse_defaults_def:nnn \l__xparse_current_arg_int
+ }
+\cs_new_protected:Npn \__xparse_defaults_def:nnn #1#2#3
+ {
+ \tl_put_right:Nx \l__xparse_tmpa_tl
+ {
+ {
+ \exp_not:N \exp_not:n
+ {
+ \tl_if_novalue:nTF {#2}
+ { \exp_not:o {#3} }
+ { \exp_not:n { ## #1 } }
+ }
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_args_process:
+ {
+ \tl_clear:N \l__xparse_args_ii_tl
+ \__xparse_tl_mapthread_function:NNN
+ \l__xparse_args_tl
+ \l__xparse_process_all_tl
+ \__xparse_args_process_loop:nn
+ \tl_set_eq:NN \l__xparse_args_tl \l__xparse_args_ii_tl
+ }
+\cs_new_protected:Npn \__xparse_args_process_loop:nn #1#2
+ {
+ \tl_set:Nn \ProcessedArgument {#1}
+ \tl_if_novalue:nF {#1}
+ { \tl_map_function:nN {#2} \__xparse_args_process_aux:n }
+ \tl_put_right:No \l__xparse_args_ii_tl
+ { \exp_after:wN { \ProcessedArgument } }
+ }
+\cs_new_protected:Npn \__xparse_args_process_aux:n
+ { \exp_args:No \__xparse_args_process_aux:nn { \ProcessedArgument } }
+\cs_new_protected:Npn \__xparse_args_process_aux:nn #1#2 { #2 {#1} }
+\cs_new:Npn \__xparse_start_expandable:nNNNNn #1#2#3#4#5#6
+ { #6 \__xparse_end_expandable:NNw #5 #4 \q__xparse #2#3 }
+\cs_new:Npn \__xparse_end_expandable:NNw #1#2
+ { \__xparse_end_expandable_aux:w #1#2 \prg_do_nothing: }
+\cs_new:Npn \__xparse_end_expandable_aux:w #1#2#3 \q__xparse
+ { \exp_args:No \__xparse_end_expandable_aux:nNNNN {#3} #1 #2 }
+\cs_new:Npn \__xparse_end_expandable_aux:nNNNN #1#2#3#4#5
+ {
+ \token_if_eq_charcode:NNT ? #2 { \exp_after:wN \use_iv:nnnn }
+ \__xparse_end_expandable_defaults:nnnNNn {#1} { } {#1} #2#3
+ { } { } { } { } { } { } { } { } { } { }
+ {
+ \__kernel_msg_expandable_error:nnf
+ { xparse } { loop-in-defaults }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N #4 } }
+ \use_iv:nnnn
+ }
+ \q_stop
+ }
+\cs_new:Npn \__xparse_end_expandable_defaults:nnnNNn #1#2#3#4#5#6
+ {
+ #6
+ \str_if_eq:nnTF {#1} {#2}
+ { \use_i_delimit_by_q_stop:nw { #5 #1 } }
+ {
+ \exp_args:No \__xparse_tl_mapthread_function:nnN
+ { #4 #1 } {#3}
+ \__xparse_end_expandable_defaults:nnw
+ \__xparse_end_expandable_defaults:nnnNNn { } {#1} {#3} #4 #5
+ }
+ }
+\cs_new:Npn \__xparse_end_expandable_defaults:nnw #1#2
+ {
+ \tl_if_novalue:nTF {#2}
+ { \exp_args:No \__xparse_end_expandable_defaults:nw {#1} }
+ { \__xparse_end_expandable_defaults:nw {#2} }
+ }
+\cs_new:Npn \__xparse_end_expandable_defaults:nw
+ #1#2 \__xparse_end_expandable_defaults:nnnNNn #3
+ { #2 \__xparse_end_expandable_defaults:nnnNNn { #3 {#1} } }
+\cs_new_protected:Npn \__xparse_normalize_arg_spec:n #1
+ {
+ \int_zero:N \l__xparse_current_arg_int
+ \tl_clear:N \l__xparse_last_delimiters_tl
+ \tl_clear:N \l__xparse_arg_spec_tl
+ \bool_set_true:N \l__xparse_grab_expandably_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_some_obey_spaces_bool
+ \bool_set_false:N \l__xparse_some_long_bool
+ \bool_set_false:N \l__xparse_some_short_bool
+ \__xparse_normalize_arg_spec_loop:n #1
+ \q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop
+ \int_compare:nNnT \l__xparse_current_arg_int > 9
+ {
+ \__kernel_msg_error:nnxx { xparse } { too-many-arguments }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \tl_if_empty:NF \l__xparse_last_delimiters_tl
+ {
+ \__kernel_msg_error:nnxx { xparse } { expandable-ending-optional }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+ \bool_if:NT \l__xparse_expandable_bool
+ { \bool_set_true:N \l__xparse_grab_expandably_bool }
+ \bool_if:NT \l__xparse_environment_bool
+ { \bool_set_false:N \l__xparse_grab_expandably_bool }
+ }
+\cs_new_protected:Npn \__xparse_normalize_arg_spec_loop:n #1
+ {
+ \quark_if_recursion_tail_stop:n {#1}
+ \int_incr:N \l__xparse_current_arg_int
+ \cs_if_exist_use:cF { __xparse_normalize_type_ \tl_to_str:n {#1} :w }
+ {
+ \__kernel_msg_error:nnxx { xparse } { unknown-argument-type }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new_protected:Npn \__xparse_normalize_type_d:w ##1##2
+ {
+ \quark_if_recursion_tail_stop_do:nn {##2} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_type_D:w {##1} {##2} {#1}
+ }
+ \cs_new_protected:Npn \__xparse_normalize_type_e:w ##1
+ {
+ \quark_if_recursion_tail_stop_do:nn {##1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_type_E:w {##1} { }
+ }
+ \cs_new_protected:Npn \__xparse_normalize_type_g:w
+ { \__xparse_normalize_type_G:w {#1} }
+ \cs_new_protected:Npn \__xparse_normalize_type_o:w
+ { \__xparse_normalize_type_D:w [ ] {#1} }
+ \cs_new_protected:Npn \__xparse_normalize_type_O:w
+ { \__xparse_normalize_type_D:w [ ] }
+ \cs_new_protected:Npn \__xparse_normalize_type_r:w ##1##2
+ {
+ \quark_if_recursion_tail_stop_do:nn {##2} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_type_R:w {##1} {##2} {#1}
+ }
+ \cs_new_protected:Npn \__xparse_normalize_type_s:w
+ { \__xparse_normalize_type_t:w * }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new_protected:cpn { __xparse_normalize_type_>:w } #1#2
+ {
+ \quark_if_recursion_tail_stop_do:nn {#2} { \__xparse_bad_arg_spec:wn }
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { processor-in-expandable }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \tl_put_right:Nn \l__xparse_arg_spec_tl { > {#1} }
+ \int_decr:N \l__xparse_current_arg_int
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \__xparse_normalize_arg_spec_loop:n {#2}
+ }
+\cs_new_protected:cpn { __xparse_normalize_type_+:w } #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \bool_if:NT \l__xparse_long_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { two-markers }
+ { \__xparse_environment_or_command: } { + }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_true:N \l__xparse_long_bool
+ \int_decr:N \l__xparse_current_arg_int
+ \__xparse_normalize_arg_spec_loop:n {#1}
+ }
+\cs_new_protected:cpn { __xparse_normalize_type_!:w } #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \bool_if:NT \l__xparse_obey_spaces_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { two-markers }
+ { \__xparse_environment_or_command: } { ! }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_true:N \l__xparse_obey_spaces_bool
+ \bool_set_true:N \l__xparse_some_obey_spaces_bool
+ \int_decr:N \l__xparse_current_arg_int
+ \__xparse_normalize_arg_spec_loop:n {#1}
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_D:w #1#2#3
+ {
+ \quark_if_recursion_tail_stop_do:nn {#3} { \__xparse_bad_arg_spec:wn }
+ \__xparse_single_char_check:n {#1}
+ \__xparse_single_char_check:n {#2}
+ \__xparse_add_arg_spec:n { D #1 #2 {#3} }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1}
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_E:w #1#2
+ {
+ \quark_if_recursion_tail_stop_do:nn {#2} { \__xparse_bad_arg_spec:wn }
+ \tl_if_blank:nT {#1} { \__xparse_bad_arg_spec:wn }
+ \tl_map_function:nN {#1} \__xparse_single_char_check:n
+ \__xparse_normalize_E_unique_check:w #1 \q_nil \q_stop
+ \int_compare:nNnT { \tl_count:n {#2} } > { \tl_count:n {#1} }
+ { \__xparse_bad_arg_spec:wn }
+ \__xparse_add_arg_spec:n { E {#1} {#2} }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1}
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \int_add:Nn \l__xparse_current_arg_int { \tl_count:n {#1} - 1 }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_E_unique_check:w #1#2 \q_stop
+ {
+ \quark_if_nil:NF #1
+ {
+ \tl_if_in:nnT {#2} {#1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_E_unique_check:w #2 \q_stop
+ }
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_G:w #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_check_gv:N G
+ \__xparse_add_arg_spec:n { G {#1} }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl { { } }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_t:w #1
+ {
+ \quark_if_recursion_tail_stop_do:Nn #1 { \__xparse_bad_arg_spec:wn }
+ \__xparse_single_char_check:n {#1}
+ \tl_put_right:Nx \l__xparse_arg_spec_tl
+ {
+ \bool_if:NT \l__xparse_obey_spaces_bool { ! }
+ t \exp_not:n {#1}
+ }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1}
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \bool_set_false:N \l__xparse_long_bool
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_l:w
+ {
+ \__xparse_normalize_check_lu:N l
+ \__xparse_add_arg_spec_mandatory:n { l }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_m:w
+ {
+ \__xparse_delimiter_check:nnn { } { m } { \iow_char:N \{ }
+ \__xparse_add_arg_spec_mandatory:n { m }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_R:w #1#2#3
+ {
+ \quark_if_recursion_tail_stop_do:nn {#3} { \__xparse_bad_arg_spec:wn }
+ \__xparse_single_char_check:n {#1}
+ \__xparse_single_char_check:n {#2}
+ \__xparse_delimiter_check:nnn {#1} { R/r } { \tl_to_str:n {#1} }
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \__xparse_add_arg_spec_mandatory:n { R #1 #2 {#3} }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_u:w #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_check_lu:N u
+ \__xparse_add_arg_spec_mandatory:n { u {#1} }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_v:w
+ {
+ \__xparse_normalize_check_gv:N v
+ \__xparse_add_arg_spec_mandatory:n { v }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_b:w #1
+ {
+ \bool_if:NF \l__xparse_environment_bool
+ {
+ \__kernel_msg_error:nnxx
+ { xparse } { invalid-command-arg }
+ { \__xparse_environment_or_command: } { b }
+ \__xparse_bad_def:wn
+ }
+ \tl_clear:N \l__xparse_last_delimiters_tl
+ \__xparse_add_arg_spec:n { b }
+ \quark_if_recursion_tail_stop:n {#1}
+ \__kernel_msg_error:nnxx { xparse } { arg-after-body }
+ { \__xparse_environment_or_command: }
+ { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+\cs_new_protected:Npn \__xparse_single_char_check:n #1
+ {
+ \tl_trim_spaces_apply:nN {#1} \tl_if_single_token:nTF
+ {
+ \group_begin:
+ \tex_escapechar:D = 92 \scan_stop:
+ \exp_args:Nx \tl_if_single_token:nF
+ { \exp_args:No \tl_to_str:n { \use:nn #1 { } } }
+ {
+ \__kernel_msg_warning:nnxx { xparse } { not-single-char }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ }
+ \group_end:
+ }
+ {
+ \__kernel_msg_error:nnxx { xparse } { not-single-char }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+\cs_new_protected:Npn \__xparse_normalize_check_gv:N #1
+ {
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \__kernel_msg_error:nnxx
+ { xparse } { invalid-expandable-argument-type }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ }
+\cs_new_protected:Npn \__xparse_normalize_check_lu:N #1
+ {
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \tl_if_empty:NF \l__xparse_last_delimiters_tl
+ {
+ \__kernel_msg_error:nnxx
+ { xparse } { invalid-after-optional-expandably }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_delimiter_check:nnn #1#2#3
+ {
+ \tl_map_inline:Nn \l__xparse_last_delimiters_tl
+ {
+ \tl_if_eq:nnT {##1} {#1}
+ {
+ \__kernel_msg_warning:nnxx { xparse } { optional-mandatory }
+ {#2} {#3}
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_bad_arg_spec:wn #1 \__xparse_break_point:n #2
+ {
+ \__kernel_msg_error:nnxx { xparse } { bad-arg-spec }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#2} }
+ }
+\cs_new_protected:Npn \__xparse_bad_def:wn #1 \__xparse_break_point:n #2 { }
+\cs_new_protected:Npn \__xparse_add_arg_spec:n #1
+ {
+ \bool_lazy_and:nnT
+ { ! \l__xparse_long_bool }
+ { \l__xparse_some_long_bool }
+ {
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \__kernel_msg_error:nnx { xparse } { inconsistent-long }
+ { \iow_char:N \\ \l__xparse_function_tl }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ }
+ \bool_if:NTF \l__xparse_long_bool
+ { \bool_set_true:N \l__xparse_some_long_bool }
+ { \bool_set_true:N \l__xparse_some_short_bool }
+ \tl_put_right:Nx \l__xparse_arg_spec_tl
+ {
+ \bool_if:NT \l__xparse_long_bool { + }
+ \bool_if:NT \l__xparse_obey_spaces_bool { ! }
+ \exp_not:n {#1}
+ }
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ }
+\cs_new_protected:Npn \__xparse_add_arg_spec_mandatory:n #1
+ {
+ \bool_if:NT \l__xparse_some_obey_spaces_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { non-trailing-obey-spaces }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \tl_clear:N \l__xparse_last_delimiters_tl
+ \__xparse_add_arg_spec:n {#1}
+ }
+\cs_new_protected:Npn \__xparse_prepare_signature:n #1
+ {
+ \int_zero:N \l__xparse_current_arg_int
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \int_zero:N \l__xparse_m_args_int
+ \bool_set_false:N \l__xparse_defaults_bool
+ \tl_clear:N \l__xparse_defaults_tl
+ \tl_clear:N \l__xparse_process_all_tl
+ \tl_clear:N \l__xparse_process_one_tl
+ \bool_set_false:N \l__xparse_process_some_bool
+ \tl_clear:N \l__xparse_signature_tl
+ \__xparse_prepare_signature:N #1 \q_recursion_tail \q_recursion_stop
+ \bool_if:NF \l__xparse_expandable_bool { \__xparse_flush_m_args: }
+ }
+\cs_new_protected:Npn \__xparse_prepare_signature:N
+ {
+ \bool_set_false:N \l__xparse_prefixed_bool
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:Npn \__xparse_prepare_signature_bypass:N #1
+ {
+ \quark_if_recursion_tail_stop:N #1
+ \use:c
+ {
+ __xparse_add
+ \bool_if:NT \l__xparse_grab_expandably_bool { _expandable }
+ _type_ \token_to_str:N #1 :w
+ }
+ }
+\cs_new_protected:cpn { __xparse_add_type_+:w }
+ {
+ \__xparse_flush_m_args:
+ \bool_set_true:N \l__xparse_long_bool
+ \bool_set_true:N \l__xparse_prefixed_bool
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:cpn { __xparse_add_type_!:w }
+ {
+ \__xparse_flush_m_args:
+ \bool_set_true:N \l__xparse_obey_spaces_bool
+ \bool_set_true:N \l__xparse_prefixed_bool
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:cpn { __xparse_add_type_>:w } #1
+ {
+ \__xparse_flush_m_args:
+ \bool_set_true:N \l__xparse_prefixed_bool
+ \bool_set_true:N \l__xparse_process_some_bool
+ \tl_put_left:Nn \l__xparse_process_one_tl { {#1} }
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_b:w
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N b
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_D:w #1#2#3
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:n {#3}
+ \__xparse_add_grabber:N D
+ \tl_put_right:Nn \l__xparse_signature_tl { #1 #2 }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_E:w #1#2
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default_E:nn {#1} {#2}
+ \__xparse_add_grabber:N E
+ \tl_put_right:Nn \l__xparse_signature_tl { {#1} }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_G:w #1
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:n {#1}
+ \__xparse_add_grabber:N G
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_l:w
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N l
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_m:w
+ {
+ \__xparse_add_default:
+ \bool_if:NTF \l__xparse_prefixed_bool
+ { \__xparse_add_grabber:N m }
+ { \int_incr:N \l__xparse_m_args_int }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_R:w #1#2#3
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:n {#3}
+ \__xparse_add_grabber:N R
+ \tl_put_right:Nn \l__xparse_signature_tl { #1 #2 }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_t:w #1
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N t
+ \tl_put_right:Nn \l__xparse_signature_tl {#1}
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_u:w #1
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N u
+ \tl_put_right:Nn \l__xparse_signature_tl { {#1} }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_v:w
+ {
+ \__xparse_flush_m_args:
+ \exp_args:No \__xparse_add_default:n \c_novalue_tl
+ \__xparse_add_grabber:N v
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_flush_m_args:
+ {
+ \int_compare:nNnT \l__xparse_m_args_int > 0
+ {
+ \tl_put_right:Nx \l__xparse_signature_tl
+ { \exp_not:c { __xparse_grab_m_ \int_use:N \l__xparse_m_args_int :w } }
+ \tl_put_right:Nx \l__xparse_process_all_tl
+ { \prg_replicate:nn { \l__xparse_m_args_int } { { } } }
+ }
+ \int_zero:N \l__xparse_m_args_int
+ }
+\cs_new_protected:Npn \__xparse_add_grabber:N #1
+ {
+ \tl_put_right:Nx \l__xparse_signature_tl
+ {
+ \exp_not:c
+ {
+ __xparse_grab_ #1
+ \bool_if:NT \l__xparse_long_bool { _long }
+ \bool_if:NT \l__xparse_obey_spaces_bool { _obey_spaces }
+ :w
+ }
+ }
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \tl_put_right:Nx \l__xparse_process_all_tl
+ { { \exp_not:o \l__xparse_process_one_tl } }
+ \tl_clear:N \l__xparse_process_one_tl
+ }
+\cs_new_protected:Npn \__xparse_add_default:n #1
+ {
+ \tl_if_novalue:nTF {#1}
+ { \__xparse_add_default: }
+ {
+ \int_incr:N \l__xparse_current_arg_int
+ \bool_set_true:N \l__xparse_defaults_bool
+ \tl_put_right:Nn \l__xparse_defaults_tl { { \prg_do_nothing: #1 } }
+ }
+ }
+\cs_new_protected:Npn \__xparse_add_default:
+ {
+ \int_incr:N \l__xparse_current_arg_int
+ \tl_put_right:Nn \l__xparse_defaults_tl { \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__xparse_add_default_E:nn #1#2
+ {
+ \tl_map_function:nN {#2} \__xparse_add_default:n
+ \prg_replicate:nn
+ { \tl_count:n {#1} - \tl_count:n {#2} }
+ { \__xparse_add_default: }
+ }
+\cs_new_protected:cpn { __xparse_add_expandable_type_+:w }
+ {
+ \bool_set_true:N \l__xparse_long_bool
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D:w
+ { \__xparse_add_expandable_type_D_aux:NNNn D }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D_aux:NNNn #1#2#3#4
+ {
+ \__xparse_add_default:n {#4}
+ \tl_if_eq:nnTF {#2} {#3}
+ { \__xparse_add_expandable_type_D_aux:NN #1 #2 }
+ { \__xparse_add_expandable_type_D_aux:NNN #1 #2 #3 }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D_aux:NNN #1#2#3
+ {
+ \bool_if:NTF \l__xparse_long_bool
+ { \cs_set:cpx }
+ { \cs_set_nopar:cpx }
+ { \l__xparse_expandable_aux_name_tl } ##1 ##2 #2 ##3 \q__xparse ##4 #3
+ { ##1 {##2} {##3} {##4} }
+ \__xparse_add_expandable_grabber:nn {#1}
+ {
+ \exp_not:c { \l__xparse_expandable_aux_name_tl }
+ \exp_not:n { #2 #3 }
+ }
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D_aux:NN #1#2
+ {
+ \bool_if:NTF \l__xparse_long_bool
+ { \cs_set:cpx }
+ { \cs_set_nopar:cpx }
+ { \l__xparse_expandable_aux_name_tl } ##1 #2 ##2 #2
+ { ##1 {##2} }
+ \__xparse_add_expandable_grabber:nn { #1_alt }
+ {
+ \exp_not:c { \l__xparse_expandable_aux_name_tl }
+ \exp_not:n {#2}
+ }
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_E:w #1#2
+ {
+ \__xparse_add_default_E:nn {#1} {#2}
+ \tl_clear:N \l__xparse_tmpb_tl
+ \tl_map_function:nN {#1} \__xparse_add_expandable_type_E_aux:n
+ \__xparse_add_expandable_grabber:nn
+ { E \bool_if:NT \l__xparse_long_bool { _long } }
+ {
+ { \exp_not:o \l__xparse_tmpb_tl }
+ {
+ \prg_replicate:nn { \tl_count:n {#1} }
+ { { \c_novalue_tl } }
+ }
+ }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_E_aux:n #1
+ {
+ \__xparse_get_grabber:NN #1 \l__xparse_tmpa_tl
+ \tl_put_right:Nx \l__xparse_tmpb_tl
+ { \exp_not:o \l__xparse_tmpa_tl \exp_not:N #1 }
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_l:w
+ { \__xparse_add_expandable_type_u:w ## }
+\cs_new_protected:Npn \__xparse_add_expandable_type_m:w
+ {
+ \__xparse_add_default:
+ \__xparse_add_expandable_grabber:nn
+ { m \bool_if:NT \l__xparse_long_bool { _long } } { }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_R:w
+ { \__xparse_add_expandable_type_D_aux:NNNn R }
+\cs_new_protected:Npn \__xparse_add_expandable_type_t:w #1
+ {
+ \__xparse_add_default:
+ \__xparse_get_grabber:NN #1 \l__xparse_tmpa_tl
+ \__xparse_add_expandable_grabber:nn { t }
+ {
+ \exp_not:o \l__xparse_tmpa_tl
+ \exp_not:N #1
+ }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_u:w #1
+ {
+ \__xparse_add_default:
+ \bool_if:NTF \l__xparse_long_bool
+ { \cs_set:cpn }
+ { \cs_set_nopar:cpn }
+ { \l__xparse_expandable_aux_name_tl } ##1 \q__xparse ##2 ##3 ##4 #1
+ { ##1 {##4} \q__xparse ##2 ##3 }
+ \__xparse_add_expandable_grabber:nn { u }
+ { \exp_not:c { \l__xparse_expandable_aux_name_tl } }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_grabber:nn #1#2
+ {
+ \tl_put_right:Nx \l__xparse_signature_tl
+ { \exp_not:c { __xparse_expandable_grab_ #1 :w } #2 }
+ }
+\cs_new_protected:Npn \__xparse_get_grabber:NN #1#2
+ {
+ \cs_set:Npn \__xparse_tmp:w ##1 #1 {##1}
+ \exp_args:Nc \__xparse_get_grabber_auxi:NN
+ { __xparse_grabber_ \token_to_str:N #1 :w } #2
+ }
+\cs_new_protected:Npn \__xparse_get_grabber_auxi:NN #1#2
+ {
+ \cs_if_eq:NNTF \__xparse_tmp:w #1
+ { \tl_set:Nn #2 {#1} }
+ {
+ \cs_if_exist:NTF #1
+ {
+ \int_gincr:N \g__xparse_grabber_int
+ \exp_args:Nc \__xparse_get_grabber_auxi:NN
+ {
+ __xparse_grabber_
+ - \int_use:N \g__xparse_grabber_int :w
+ }
+ #2
+ }
+ { \__xparse_get_grabber_auxii:NN #1 #2 }
+ }
+ }
+\cs_new_protected:Npn \__xparse_get_grabber_auxii:NN #1#2
+ {
+ \cs_set_eq:NN #1 \__xparse_tmp:w
+ \tl_set:Nn #2 {#1}
+ }
+\cs_new_protected:Npn \__xparse_grab_b:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected_nopar:Npn \tl_trim_spaces:n }
+\cs_new_protected:Npn \__xparse_grab_b_long:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected:Npn \tl_trim_spaces:n }
+\cs_new_protected:Npn \__xparse_grab_b_obey_spaces:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected_nopar:Npn \exp_not:n }
+\cs_new_protected:Npn \__xparse_grab_b_long_obey_spaces:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected:Npn \exp_not:n }
+\cs_new_protected:Npn \__xparse_grab_b_aux:NNw #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnN \begin \end {#3} #1
+ \tl_put_left:Nn \l__xparse_signature_tl { \__xparse_grab_b_end:Nw #2 }
+ \tl_set_eq:NN \l__xparse_saved_args_tl \l__xparse_args_tl
+ \tl_clear:N \l__xparse_args_tl
+ \exp_args:Nc \l__xparse_fn_tl { begin ~ }
+ }
+\cs_new_protected:Npn \__xparse_grab_b_end:Nw #1#2 \__xparse_run_code:
+ {
+ \tl_set:Nx \l__xparse_args_tl
+ {
+ \exp_not:V \l__xparse_saved_args_tl
+ { \exp_after:wN #1 \l__xparse_args_tl }
+ }
+ #2
+ \__xparse_run_code:
+ \end
+ }
+\cs_new_protected:Npn \__xparse_grab_D:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_long:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_obey_spaces:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn
+ \peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_long_obey_spaces:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn
+ \peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_aux:NNnNN #1#2#3#4#5
+ {
+ \__xparse_grab_D_aux:NNnN #1#2 {#3} #4
+ #5 #1
+ { \__xparse_grab_D_call:Nw #1 }
+ { \__xparse_add_arg:o \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__xparse_grab_D_aux:NNnN #1#2#3#4
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#3}
+ \exp_after:wN #4 \l__xparse_fn_tl ##1 #2
+ {
+ \tl_if_in:nnTF {##1} {#1}
+ { \__xparse_grab_D_nested:NNnN #1 #2 {##1} #4 }
+ {
+ \tl_if_blank:oTF { \use_none:n ##1 }
+ { \__xparse_add_arg:o { \use_none:n ##1 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:n ##1 } }
+ { { \exp_not:o { \use_ii:nnn ##1 \q_nil } } }
+ { \__xparse_add_arg:o { \use_ii:nn ##1 } }
+ { \__xparse_add_arg:o { \use_none:n ##1 } }
+ }
+ }
+ }
+ }
+\tl_new:N \l__xparse_nesting_a_tl
+\tl_new:N \l__xparse_nesting_b_tl
+\quark_new:N \q__xparse
+\cs_new_protected:Npn \__xparse_grab_D_nested:NNnN #1#2#3#4
+ {
+ \tl_clear:N \l__xparse_nesting_a_tl
+ \tl_clear:N \l__xparse_nesting_b_tl
+ \exp_after:wN #4 \l__xparse_fn_tl ##1 #1 ##2 \q__xparse ##3 #2
+ {
+ \tl_put_right:No \l__xparse_nesting_a_tl { \use_none:n ##1 #1 }
+ \tl_put_right:No \l__xparse_nesting_b_tl { \use_i:nn #2 ##3 }
+ \tl_if_in:nnTF {##2} {#1}
+ {
+ \l__xparse_fn_tl
+ \q_nil ##2 \q__xparse \ERROR
+ }
+ {
+ \tl_put_right:Nx \l__xparse_nesting_a_tl
+ { \__xparse_grab_D_nested:w \q_nil ##2 \q_stop }
+ \tl_if_in:NnTF \l__xparse_nesting_b_tl {#1}
+ {
+ \tl_set_eq:NN \l__xparse_tmpa_tl \l__xparse_nesting_b_tl
+ \tl_clear:N \l__xparse_nesting_b_tl
+ \exp_after:wN \l__xparse_fn_tl \exp_after:wN
+ \q_nil \l__xparse_tmpa_tl \q_nil \q__xparse \ERROR
+ }
+ {
+ \tl_put_right:No \l__xparse_nesting_a_tl
+ \l__xparse_nesting_b_tl
+ \__xparse_add_arg:V \l__xparse_nesting_a_tl
+ }
+ }
+ }
+ \l__xparse_fn_tl #3 \q_nil \q__xparse \ERROR
+ }
+\cs_new:Npn \__xparse_grab_D_nested:w #1 \q_nil \q_stop
+ { \exp_not:o { \use_none:n #1 } }
+\cs_set_protected_nopar:Npn \__xparse_grab_D_call:Nw #1
+ {
+ \token_if_eq_catcode:NNTF + #1
+ {
+ \exp_after:wN \exp_after:wN \exp_after:wN
+ \l__xparse_fn_tl \char_generate:nn { `#1 } { 11 }
+ }
+ {
+ \exp_after:wN \l__xparse_fn_tl
+ \token_to_str:N #1
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_E:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected_nopar:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E_long:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E_obey_spaces:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected_nopar:Npn
+ \peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E_long_obey_spaces:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected:Npn
+ \peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E:nnNN #1#2#3#4
+ {
+ \exp_after:wN #3 \l__xparse_fn_tl ##1##2##3
+ {
+ \prop_put:Nnn \l__xparse_tmp_prop {##1} {##3}
+ \__xparse_grab_E_loop:NnN #4 { } ##2 \q_recursion_stop
+ }
+ \prop_clear:N \l__xparse_tmp_prop
+ \tl_set:Nn \l__xparse_signature_tl {#2}
+ \cs_set_protected:Npn \__xparse_grab_E_finalise:
+ {
+ \tl_map_inline:nn {#1}
+ {
+ \prop_get:NnNF \l__xparse_tmp_prop {####1} \l__xparse_tmpb_tl
+ { \tl_set_eq:NN \l__xparse_tmpb_tl \c_novalue_tl }
+ \tl_put_right:Nx \l__xparse_args_tl
+ { { \exp_not:V \l__xparse_tmpb_tl } }
+ }
+ \l__xparse_signature_tl \__xparse_run_code:
+ }
+ \__xparse_grab_E_loop:NnN #4 { } #1 \q_recursion_tail \q_recursion_stop
+ }
+\cs_new_protected:Npn \__xparse_grab_E_loop:NnN #1#2#3#4 \q_recursion_stop
+ {
+ \cs_if_eq:NNTF #3 \q_recursion_tail
+ { \__xparse_grab_E_finalise: }
+ {
+ #1 #3
+ { \l__xparse_fn_tl #3 {#2#4} }
+ { \__xparse_grab_E_loop:NnN #1 {#2#3} #4 \q_recursion_stop }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_E_finalise: { }
+\cs_new_protected:Npn \__xparse_grab_G:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn
+ \__xparse_peek_nonspace:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_long:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected:Npn
+ \__xparse_peek_nonspace:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_obey_spaces:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn
+ \peek_meaning:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_long_obey_spaces:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected:Npn
+ \peek_meaning:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_aux:nNN #1#2#3
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN #2 \l__xparse_fn_tl ##1
+ { \__xparse_add_arg:n {##1} }
+ #3 \c_group_begin_token
+ { \l__xparse_fn_tl }
+ { \__xparse_add_arg:o \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__xparse_grab_l:w #1 \__xparse_run_code:
+ { \__xparse_grab_l_aux:nN {#1} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__xparse_grab_l_long:w #1 \__xparse_run_code:
+ { \__xparse_grab_l_aux:nN {#1} \cs_set_protected:Npn }
+\cs_new_protected:Npn \__xparse_grab_l_aux:nN #1#2
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN #2 \l__xparse_fn_tl ##1##
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected:Npn \__xparse_grab_m:w #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_protected_nopar:Npn \l__xparse_fn_tl ##1
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected:Npn \__xparse_grab_m_long:w #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_protected:Npn \l__xparse_fn_tl ##1
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected_nopar:Npn \__xparse_grab_m_aux:Nnnnnnnnn #1#2#3#4#5#6#7#8#9
+ {
+ \tl_put_right:No \l__xparse_args_tl
+ { #1 {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} }
+ \l__xparse_signature_tl \__xparse_run_code:
+ }
+\cs_new_protected:cpn { __xparse_grab_m_1:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnnnnn { } { } { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_2:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnnnn { } { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_3:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnnn { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_4:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnn { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_5:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnn { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_6:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nn { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_7:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:n { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_8:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \prg_do_nothing:
+ }
+\cs_new_protected:cpx { __xparse_grab_m_9:w }
+ {
+ \exp_not:c { __xparse_grab_m_5:w }
+ \exp_not:c { __xparse_grab_m_4:w }
+ }
+\cs_new_protected:Npn \__xparse_grab_R:w #1#2#3 \__xparse_run_code:
+ { \__xparse_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__xparse_grab_R_long:w #1#2#3 \__xparse_run_code:
+ { \__xparse_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected:Npn }
+\cs_new_protected:Npn \__xparse_grab_R_aux:NNnN #1#2#3#4
+ {
+ \__xparse_grab_D_aux:NNnN #1 #2 {#3} #4
+ \__xparse_peek_nonspace_remove:NTF #1
+ { \__xparse_grab_D_call:Nw #1 }
+ {
+ \__kernel_msg_error:nnxx { xparse } { missing-required }
+ { \__xparse_environment_or_command: }
+ { \token_to_str:N #1 }
+ \__xparse_add_arg:o \c_novalue_tl
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_t:w
+ { \__xparse_grab_t_aux:NNw \__xparse_peek_nonspace_remove:NTF }
+\cs_new_protected:Npn \__xparse_grab_t_obey_spaces:w
+ { \__xparse_grab_t_aux:NNw \peek_meaning_remove:NTF }
+\cs_new_protected:Npn \__xparse_grab_t_aux:NNw #1#2#3 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#3}
+ \exp_after:wN \cs_set_protected:Npn \l__xparse_fn_tl
+ {
+ #1 #2
+ { \__xparse_add_arg:n { \BooleanTrue } }
+ { \__xparse_add_arg:n { \BooleanFalse } }
+ }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected:Npn \__xparse_grab_u:w #1#2 \__xparse_run_code:
+ { \__xparse_grab_u_aux:nnN {#1} {#2} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__xparse_grab_u_long:w #1#2 \__xparse_run_code:
+ { \__xparse_grab_u_aux:nnN {#1} {#2} \cs_set_protected:Npn }
+\cs_new_protected:Npn \__xparse_grab_u_aux:nnN #1#2#3
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#2}
+ \exp_after:wN #3 \l__xparse_fn_tl ##1 #1
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\tl_new:N \l__xparse_v_arg_tl
+\cs_new_protected:Npn \__xparse_grab_v:w
+ {
+ \bool_set_false:N \l__xparse_long_bool
+ \__xparse_grab_v_aux:w
+ }
+\cs_new_protected:Npn \__xparse_grab_v_long:w
+ {
+ \bool_set_true:N \l__xparse_long_bool
+ \__xparse_grab_v_aux:w
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux:w #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \group_begin:
+ \group_align_safe_begin:
+ \tex_escapechar:D = 92 \scan_stop:
+ \tl_clear:N \l__xparse_v_arg_tl
+ \peek_remove_spaces:n
+ {
+ \peek_meaning_remove:NTF \c_group_begin_token
+ {
+ \group_align_safe_end:
+ \__xparse_grab_v_bgroup:
+ }
+ {
+ \peek_N_type:TF
+ { \__xparse_grab_v_aux_test:N }
+ { \__xparse_grab_v_aux_abort:n { } }
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_group_end:
+ {
+ \group_align_safe_end:
+ \exp_args:NNNo
+ \group_end:
+ \tl_set:Nn \l__xparse_v_arg_tl { \l__xparse_v_arg_tl }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_test:N #1
+ {
+ \__xparse_grab_v_token_if_char:NTF #1
+ {
+ \__xparse_grab_v_aux_put:N #1
+ \__xparse_grab_v_aux_catcodes:
+ \__xparse_grab_v_aux_loop:N #1
+ }
+ { \__xparse_grab_v_aux_abort:n {#1} #1 }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_loop:N #1
+ {
+ \peek_N_type:TF
+ { \__xparse_grab_v_aux_loop:NN #1 }
+ { \__xparse_grab_v_aux_abort:n { } }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_loop:NN #1#2
+ {
+ \__xparse_grab_v_token_if_char:NTF #2
+ {
+ \token_if_eq_charcode:NNTF #1 #2
+ { \__xparse_grab_v_aux_loop_end: }
+ {
+ \__xparse_grab_v_aux_put:N #2
+ \__xparse_grab_v_aux_loop:N #1
+ }
+ }
+ { \__xparse_grab_v_aux_abort:n {#2} #2 }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_loop_end:
+ {
+ \__xparse_grab_v_group_end:
+ \__xparse_add_arg:x { \tl_tail:N \l__xparse_v_arg_tl }
+ }
+\int_new:N \l__xparse_v_nesting_int
+\cs_new_protected:Npx \__xparse_grab_v_bgroup:
+ {
+ \exp_not:N \__xparse_grab_v_aux_catcodes:
+ \exp_not:n { \int_set:Nn \l__xparse_v_nesting_int { 1 } }
+ \exp_not:N \__xparse_grab_v_aux_put:N \iow_char:N \{
+ \exp_not:N \__xparse_grab_v_bgroup_loop:
+ }
+\cs_new_protected:Npn \__xparse_grab_v_bgroup_loop:
+ {
+ \peek_N_type:TF
+ { \__xparse_grab_v_bgroup_loop:N }
+ { \__xparse_grab_v_aux_abort:n { } }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_bgroup_loop:N #1
+ {
+ \__xparse_grab_v_token_if_char:NTF #1
+ {
+ \token_if_eq_charcode:NNTF \c_group_end_token #1
+ {
+ \int_decr:N \l__xparse_v_nesting_int
+ \int_compare:nNnTF \l__xparse_v_nesting_int > 0
+ {
+ \__xparse_grab_v_aux_put:N #1
+ \__xparse_grab_v_bgroup_loop:
+ }
+ { \__xparse_grab_v_aux_loop_end: }
+ }
+ {
+ \token_if_eq_charcode:NNT \c_group_begin_token #1
+ { \int_incr:N \l__xparse_v_nesting_int }
+ \__xparse_grab_v_aux_put:N #1
+ \__xparse_grab_v_bgroup_loop:
+ }
+ }
+ { \__xparse_grab_v_aux_abort:n {#1} #1 }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_catcodes:
+ {
+ \cs_set_eq:NN \do \char_set_catcode_other:N
+ \dospecials
+ \tex_endlinechar:D = `\^^M \scan_stop:
+ \bool_if:NTF \l__xparse_long_bool
+ { \char_set_catcode_other:n { \tex_endlinechar:D } }
+ { \char_set_catcode_parameter:n { \tex_endlinechar:D } }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_abort:n #1
+ {
+ \__xparse_grab_v_group_end:
+ \exp_after:wN \exp_after:wN \exp_after:wN
+ \peek_meaning_remove:NTF \char_generate:nn { \tex_endlinechar:D } { 6 }
+ {
+ \__kernel_msg_error:nnxxx { xparse } { verbatim-newline }
+ { \__xparse_environment_or_command: }
+ { \tl_to_str:N \l__xparse_v_arg_tl }
+ { \tl_to_str:n {#1} }
+ \__xparse_add_arg:o \c_novalue_tl
+ }
+ {
+ \__kernel_msg_error:nnxxx { xparse } { verbatim-tokenized }
+ { \__xparse_environment_or_command: }
+ { \tl_to_str:N \l__xparse_v_arg_tl }
+ { \tl_to_str:n {#1} }
+ \__xparse_add_arg:o \c_novalue_tl
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_put:N #1
+ {
+ \tl_put_right:Nx \l__xparse_v_arg_tl
+ {
+ \token_if_active:NTF #1
+ { \exp_not:N #1 } { \token_to_str:N #1 }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_token_if_char:NTF #1
+ { \str_if_eq:eeTF { } { \str_tail:n {#1} } }
+\cs_new_protected:Npn \__xparse_add_arg:n #1
+ {
+ \tl_put_right:Nn \l__xparse_args_tl { {#1} }
+ \l__xparse_signature_tl \__xparse_run_code:
+ }
+\cs_generate_variant:Nn \__xparse_add_arg:n { V , o , x }
+\cs_new:Npn \__xparse_expandable_grab_D:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_D:NNNwNNn #1 \q__xparse #2 #3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_D:NNNwNNn ##1##2##3##4 \q__xparse ##5##6##7
+ {
+ \str_if_eq:nnTF {##2} {##7}
+ {
+ \str_if_eq:onTF
+ { ##1 { } { } ##7 ##2 \q__xparse ##3 }
+ { { } {##2} { } }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__xparse ##5##6 }
+ \q_nil { } ##2 \ERROR \q__xparse \ERROR
+ }
+ { ##4 {#1} \q__xparse ##5 ##6 {##7} }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_D:NNNwNNnnn #1#2#3#4 \q__xparse #5#6#7#8#9
+ {
+ \exp_args:Nof \__xparse_expandable_grab_D:nnNNNwNN
+ { \use_ii:nn #7 #2 }
+ { \__xparse_expandable_grab_D:Nw #3 \exp_stop_f: #8 #9 }
+ #1#2#3 #4 \q__xparse #5 #6
+ }
+\cs_new:Npn \__xparse_expandable_grab_D:Nw #1#2 \ERROR \ERROR { #2 #1 }
+\cs_new:Npn \__xparse_expandable_grab_D:nnNNNwNN #1#2#3#4#5#6 \q__xparse #7#8
+ {
+ \exp_args:No \tl_if_empty:oTF
+ { #3 { \use_none:nnn } #2 \q__xparse #5 #4 \q__xparse #5 }
+ {
+ \tl_if_blank:oTF { \use_none:nn #1#2 }
+ { \__xparse_put_arg_expandable:ow { \use_none:nn #1#2 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:nn #1#2 } }
+ { { \exp_not:o { \use_iii:nnnn #1#2 \q_nil } } }
+ { \__xparse_put_arg_expandable:ow { \use_iii:nnn #1#2 } }
+ { \__xparse_put_arg_expandable:ow { \use_none:nn #1#2 } }
+ }
+ #6 \q__xparse #7 #8
+ }
+ {
+ #3
+ { \__xparse_expandable_grab_D:NNNwNNnnn #3#4#5#6 \q__xparse #7 #8 }
+ \q_nil {#1} #2 \ERROR \q__xparse \ERROR
+ }
+ }
+\cs_new:Npn \__xparse_expandable_grab_D_alt:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_D_alt:NNwNNn #1 \q__xparse #2 #3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_D_alt:NNwNNn ##1##2##3 \q__xparse ##4##5##6
+ {
+ \str_if_eq:nnTF {##6} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } ##6 ##2 ##2 }
+ { { } ##2 }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__xparse }
+ ##6 \ERROR
+ }
+ { ##3 {#1} \q__xparse ##4 ##5 {##6} }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_D_alt:NNwn #1#2#3 \q__xparse #4
+ {
+ \tl_if_blank:oTF { \use_none:n #4 }
+ { \__xparse_put_arg_expandable:ow { \use_none:n #4 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:n #4 } }
+ { { \exp_not:o { \use_ii:nnn #4 \q_nil } } }
+ { \__xparse_put_arg_expandable:ow { \use_ii:nn #4 } }
+ { \__xparse_put_arg_expandable:ow { \use_none:n #4 } }
+ }
+ #3 \q__xparse #1 #2
+ }
+\cs_new:Npn \__xparse_expandable_grab_E:w #1 \q__xparse #2#3
+ { \__xparse_expandable_grab_E_aux:w #1 \q__xparse #2 #3 #3 }
+\cs_new:Npn \__xparse_expandable_grab_E_long:w #1 \q__xparse #2#3
+ { \__xparse_expandable_grab_E_aux:w #1 \q__xparse #2 #3 #2 }
+\cs_new:Npn \__xparse_expandable_grab_E_aux:w #1 \q__xparse #2#3#4
+ { #2 { \__xparse_expandable_grab_E_test:nnw #1 \q__xparse #2 #3 #4 } }
+\cs_new:Npn \__xparse_expandable_grab_E_test:nnw #1#2#3 \q__xparse #4#5#6#7
+ {
+ \__xparse_expandable_grab_E_loop:nnnNNw {#7} { } { }
+ #1 \q_nil \q_nil \q_nil \q_mark #2 \q_nil
+ #3 \q__xparse #4 #5 #6
+ }
+\cs_new:Npn \__xparse_expandable_grab_E_loop:nnnNNw
+ #1#2#3#4#5#6 \q_nil #7 \q_mark #8
+ {
+ \quark_if_nil:NTF #4
+ { \__xparse_expandable_grab_E_end:nnw {#1} {#3} }
+ {
+ \tl_if_novalue:nTF {#8}
+ { \str_if_eq:onTF { #4 { } #1 #5 } {#5} }
+ { \use_ii:nn }
+ { \__xparse_expandable_grab_E_find:w { #2 #4 #5 #6 } {#3} ~ }
+ {
+ \__xparse_expandable_grab_E_loop:nnnNNw
+ {#1} { #2 #4 #5 } { #3 {#8} }
+ #6 \q_nil #7 \q_mark
+ }
+ }
+ }
+\cs_new:Npn \__xparse_expandable_grab_E_find:w #1 \q__xparse #2#3#4
+ { #4 { \__xparse_expandable_grab_E_find:nnw #1 \q__xparse #2 #3 #4 } }
+\cs_new:Npn \__xparse_expandable_grab_E_find:nnw #1#2#3 \q_nil #4 \q__xparse #5#6#7#8
+ { \__xparse_expandable_grab_E_aux:w {#1} { #2 {#8} #3 } #4 \q__xparse #5 #6 #7 }
+\cs_new:Npn \__xparse_expandable_grab_E_end:nnw #1#2#3 \q__xparse #4#5#6
+ { #3 #2 \q__xparse #4 #5 {#1} }
+\cs_new:Npn \__xparse_expandable_grab_m:w #1 \q__xparse #2#3
+ { #3 { \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2 #3 } }
+\cs_new:Npn \__xparse_expandable_grab_m_long:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2 #3 } }
+\cs_new:Npn \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2#3#4
+ { #1 {#4} \q__xparse #2 #3 }
+\cs_new:Npn \__xparse_expandable_grab_R:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_R_aux:NNNwNNn #1 \q__xparse #2#3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_R_aux:NNNwNNn ##1##2##3##4 \q__xparse ##5##6##7
+ {
+ \str_if_eq:nnTF {##7} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } { } ##7 ##2 \q__xparse ##3 }
+ { { } {##2} { } }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__xparse ##5##6 }
+ \q_nil { } ##2 \ERROR \q__xparse \ERROR
+ }
+ {
+ \__kernel_msg_expandable_error:nnff
+ { xparse } { missing-required }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##5 } }
+ { \tl_to_str:n {##2} }
+ ##4 {#1} \q__xparse ##5 ##6 {##7}
+ }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_R_alt:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_R_alt_aux:NNnwNn #1 \q__xparse #2#3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_R_alt_aux:NNwNn ##1##2##3 \q__xparse ##4##5##6
+ {
+ \str_if_eq:nnTF {##6} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } ##6 ##2 ##2 }
+ { { } ##2 }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__xparse }
+ ##6 \ERROR
+ }
+ {
+ \__kernel_msg_expandable_error:nnff
+ { xparse } { missing-required }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##4 } }
+ { \tl_to_str:n {##2} }
+ ##3 {#1} \q__xparse ##4 ##5 {##6}
+ }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_t:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_t_aux:NNwn #1 \q__xparse #2 #3 } }
+\cs_new:Npn \__xparse_expandable_grab_t_aux:NNwn #1#2#3 \q__xparse #4#5#6
+ {
+ \str_if_eq:onTF { #1 { } #6 #2 } {#2}
+ { #3 { \BooleanTrue } \q__xparse #4 #5 }
+ { #3 { \BooleanFalse } \q__xparse #4 #5 {#6} }
+ }
+\cs_new_eq:NN \__xparse_expandable_grab_u:w \prg_do_nothing:
+\cs_new:Npn \__xparse_put_arg_expandable:nw #1#2 \q__xparse { #2 {#1} \q__xparse }
+\cs_generate_variant:Nn \__xparse_put_arg_expandable:nw { o }
+\cs_new_protected:Npn \__xparse_bool_reverse:N #1
+ {
+ \bool_if:NTF #1
+ { \tl_set:Nn \ProcessedArgument { \c_false_bool } }
+ { \tl_set:Nn \ProcessedArgument { \c_true_bool } }
+ }
+\seq_new:N \l__xparse_split_list_seq
+\tl_new:N \l__xparse_split_list_tl
+\cs_new_protected:Npn \__xparse_split_list:nn #1#2
+ {
+ \tl_if_single:nTF {#1}
+ {
+ \token_if_cs:NTF #1
+ { \__xparse_split_list_multi:nn {#1} {#2} }
+ { \__xparse_split_list_single:Nn #1 {#2} }
+ }
+ { \__xparse_split_list_multi:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__xparse_split_list_multi:nn #1#2
+ {
+ \seq_set_split:Nnn \l__xparse_split_list_seq {#1} {#2}
+ \tl_clear:N \ProcessedArgument
+ \seq_map_inline:Nn \l__xparse_split_list_seq
+ { \tl_put_right:Nn \ProcessedArgument { {##1} } }
+ }
+\cs_generate_variant:Nn \__xparse_split_list_multi:nn { nV }
+\group_begin:
+\char_set_catcode_active:N \^^@
+\cs_new_protected:Npn \__xparse_split_list_single:Nn #1#2
+ {
+ \tl_set:Nn \l__xparse_split_list_tl {#2}
+ \group_begin:
+ \char_set_lccode:nn { `\^^@ } { `#1 }
+ \tex_lowercase:D
+ {
+ \group_end:
+ \tl_replace_all:Nnn \l__xparse_split_list_tl { ^^@ }
+ } {#1}
+ \__xparse_split_list_multi:nV {#1} \l__xparse_split_list_tl
+ }
+\group_end:
+\cs_new_protected:Npn \__xparse_split_argument:nnn #1#2#3
+ {
+ \__xparse_split_list:nn {#2} {#3}
+ \exp_args:Nf \__xparse_split_argument_aux:nnnn
+ { \tl_count:N \ProcessedArgument }
+ {#1} {#2} {#3}
+ }
+\cs_new_protected:Npn \__xparse_split_argument_aux:nnnn #1#2#3#4
+ {
+ \int_compare:nNnF {#1} = { #2 + 1 }
+ {
+ \int_compare:nNnTF {#1} > { #2 + 1 }
+ {
+ \tl_set:Nx \ProcessedArgument
+ {
+ \exp_last_unbraced:NnNo
+ \__xparse_split_argument_aux:n
+ { #2 + 1 }
+ \use_none_delimit_by_q_stop:w
+ \ProcessedArgument
+ \q_stop
+ }
+ \__kernel_msg_error:nnxxx { xparse } { split-excess-tokens }
+ { \tl_to_str:n {#3} } { \int_eval:n { #2 + 1 } }
+ { \tl_to_str:n {#4} }
+ }
+ {
+ \tl_put_right:Nx \ProcessedArgument
+ {
+ \prg_replicate:nn { #2 + 1 - (#1) }
+ { { \exp_not:V \c_novalue_tl } }
+ }
+ }
+ }
+ }
+\cs_new:Npn \__xparse_split_argument_aux:n #1
+ { \prg_replicate:nn {#1} { \__xparse_split_argument_aux:wn } }
+\cs_new:Npn \__xparse_split_argument_aux:wn #1 \use_none_delimit_by_q_stop:w #2
+ {
+ \exp_not:n { {#2} }
+ #1
+ \use_none_delimit_by_q_stop:w
+ }
+\cs_new_protected:Npn \__xparse_trim_spaces:n #1
+ { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } }
+\cs_new_protected:Npn \__xparse_get_arg_spec_error:N #1
+ {
+ \bool_set_false:N \l__xparse_environment_bool
+ \tl_set:Nn \l__xparse_fn_tl {#1}
+ \__xparse_get_arg_spec_error_aux:n { \cs_if_exist:NTF #1 }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec_error:n #1
+ {
+ \bool_set_true:N \l__xparse_environment_bool
+ \str_set:Nx \l__xparse_environment_str {#1}
+ \__xparse_get_arg_spec_error_aux:n
+ { \cs_if_exist:cTF { \l__xparse_environment_str } }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec_error_aux:n #1
+ {
+ #1
+ {
+ \__kernel_msg_error:nnx { xparse } { non-xparse }
+ { \__xparse_environment_or_command: }
+ }
+ {
+ \__kernel_msg_error:nnx { xparse } { unknown }
+ { \__xparse_environment_or_command: }
+ }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec:NTF #1#2#3
+ {
+ \__xparse_cmd_if_xparse:NTF #1
+ {
+ \tl_set:Nx \ArgumentSpecification { \tl_item:Nn #1 { 2 } }
+ #2
+ }
+ {#3}
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec:N #1
+ {
+ \__xparse_get_arg_spec:NTF #1 { }
+ { \__xparse_get_arg_spec_error:N #1 }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec:n #1
+ {
+ \exp_args:Nc \__xparse_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { }
+ { \__xparse_get_arg_spec_error:n {#1} }
+ }
+\tl_new:N \ArgumentSpecification
+\cs_new_protected:Npn \__xparse_show_arg_spec:N #1
+ {
+ \__xparse_get_arg_spec:NTF #1
+ { \tl_show:N \ArgumentSpecification }
+ { \__xparse_get_arg_spec_error:N #1 }
+ }
+\cs_new_protected:Npn \__xparse_show_arg_spec:n #1
+ {
+ \exp_args:Nc \__xparse_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { \tl_show:N \ArgumentSpecification }
+ { \__xparse_get_arg_spec_error:n {#1} }
+ }
+\cs_new_protected:Npn \__xparse_check_definable:nNT #1
+ { \tl_trim_spaces_apply:nN {#1} \__xparse_check_definable_aux:nN }
+\group_begin:
+ \char_set_catcode_active:n { `? }
+ \cs_new_protected:Npn \__xparse_check_definable_aux:nN #1#2
+ {
+ \group_begin:
+ \tl_if_single_token:nTF {#1}
+ {
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:Nx \tl_if_empty:nTF
+ { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
+ {
+ \exp_args:Nx \char_set_lccode:nn
+ { ` \str_head:n {#1} } { `? }
+ \tex_lowercase:D { \tl_if_eq:nnTF {#1} } { ? }
+ { \group_end: \use_iii:nnn }
+ { \group_end: \use_i:nnn }
+ }
+ { \group_end: \use_iii:nnn }
+ }
+ { \group_end: \use_ii:nnn }
+ {
+ \__kernel_msg_error:nnxx { xparse } { not-definable }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ {
+ \__kernel_msg_error:nnxx { xparse } { not-one-token }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ }
+\group_end:
+\cs_new:Npn \__xparse_tl_mapthread_function:NNN #1#2#3
+ {
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN \__xparse_tl_mapthread_loop:w
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN #3
+ \exp_after:wN #1
+ \exp_after:wN \q_recursion_tail
+ \exp_after:wN \q_mark
+ #2
+ \q_recursion_tail
+ \q_recursion_stop
+ }
+\cs_new:Npn \__xparse_tl_mapthread_function:nnN #1#2#3
+ {
+ \__xparse_tl_mapthread_loop:w #3
+ #1 \q_recursion_tail \q_mark
+ #2 \q_recursion_tail \q_recursion_stop
+ }
+\cs_new:Npn \__xparse_tl_mapthread_loop:w #1#2#3 \q_mark #4
+ {
+ \quark_if_recursion_tail_stop:n {#2}
+ \quark_if_recursion_tail_stop:n {#4}
+ #1 {#2} {#4}
+ \__xparse_tl_mapthread_loop:w #1#3 \q_mark
+ }
+\cs_new_protected:Npn \__xparse_cmd_if_xparse:NTF #1
+ {
+ \exp_args:Nf \str_case_e:nnTF
+ {
+ \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
+ {
+ \exp_last_unbraced:Nf \__xparse_cmd_if_xparse_aux:w
+ { \cs_replacement_spec:N #1 } ~ \q_stop
+ }
+ }
+ {
+ { \token_to_str:N \__xparse_start:nNNnnn } { }
+ { \token_to_str:N \__xparse_start_expandable:nNNNNn } { }
+ { \token_to_str:N \__xparse_start_env:nnnnn } { }
+ }
+ }
+\cs_new:Npn \__xparse_cmd_if_xparse_aux:w #1 ~ #2 \q_stop {#1}
+\cs_new_protected:Npn \__xparse_peek_nonspace:NTF
+ { \__xparse_peek_nonspace_aux:nNNTF { } \peek_meaning:NTF }
+\cs_new_protected:Npn \__xparse_peek_nonspace_remove:NTF
+ { \__xparse_peek_nonspace_aux:nNNTF { } \peek_meaning_remove:NTF }
+\cs_new_protected:Npn \__xparse_peek_nonspace_aux:nNNTF #1#2#3#4#5
+ {
+ \peek_meaning_remove:NTF \c_space_token
+ { \__xparse_peek_nonspace_aux:nNNTF { #1 ~ } #2 #3 {#4} {#5} }
+ { #2 #3 { #4 } { #5 #1 } }
+ }
+\cs_new:Npn \__xparse_environment_or_command:
+ {
+ \bool_if:NTF \l__xparse_environment_bool
+ { environment ~ ' \l__xparse_environment_str ' }
+ {
+ command ~ '
+ \exp_args:Nf \tl_trim_spaces:n
+ { \exp_after:wN \token_to_str:N \l__xparse_fn_tl }
+ '
+ }
+ }
+\tl_const:Nn \c__xparse_ignore_def_tl
+ { \\ \\ LaTeX~will~ignore~this~entire~definition. }
+\__kernel_msg_new:nnnn { xparse } { arg-after-body }
+ { In~the~definition~of~#1,~b~(body)~argument~must~be~last. }
+ {
+ The~'body'~argument~type~is~followed~by~'#2'~in~the~argument~
+ specification~of~the~#1.~This~is~not~allowed.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { bad-arg-spec }
+ { Bad~argument~specification~'#2'~for~#1. }
+ {
+ The~argument~specification~provided~was~not~valid:~
+ one~or~more~mandatory~pieces~of~information~were~missing.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { command-already-defined }
+ { Command~'#1'~already~defined! }
+ {
+ You~have~used~#2~
+ with~a~command~that~already~has~a~definition. \\ \\
+ The~existing~definition~of~'#1'~will~not~be~altered.
+ }
+\__kernel_msg_new:nnnn { xparse } { command-not-yet-defined }
+ { Command ~'#1'~not~yet~defined! }
+ {
+ You~have~used~#2~
+ with~a~command~that~was~never~defined.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { environment-already-defined }
+ { Environment~'#1'~already~defined! }
+ {
+ You~have~used~\NewDocumentEnvironment
+ with~an~environment~that~already~has~a~definition. \\ \\
+ The~existing~definition~of~'#1'~will~not~be~altered.
+ }
+\__kernel_msg_new:nnnn { xparse } { environment-not-yet-defined }
+ { Environment~'#1'~not~yet~defined! }
+ {
+ You~have~used~\RenewDocumentEnvironment
+ with~an~environment~that~was~never~defined.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { expandable-ending-optional }
+ {
+ Argument~specification~'#2'~for~expandable~command~'#1'~
+ ends~with~optional~argument.
+ }
+ {
+ Expandable~commands~must~have~a~final~mandatory~argument~
+ (or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~
+ argument~with~expandable~commands.
+ }
+\__kernel_msg_new:nnnn { xparse } { inconsistent-long }
+ { Inconsistent~long~arguments~for~expandable~command~'#1'. }
+ {
+ The~arguments~for~an~expandable~command~must~not~involve~short~
+ arguments~after~long~arguments.~You~have~tried~to~mix~the~two~types.
+ }
+\__kernel_msg_new:nnnn { xparse } { invalid-command-arg }
+ { Argument~type~'#2'~not~available~for~#1. }
+ {
+ The~letter~'#2'~can~only~be~used~in~environment~argument~
+ specifications,~not~for~commands.
+ \\ \\
+ LaTeX~will~ignore~this~entire~definition.
+ }
+\__kernel_msg_new:nnnn { xparse } { invalid-expandable-argument-type }
+ { Argument~type~'#2'~not~available~for~expandable~command~'#1'. }
+ {
+ The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
+ in~an~expandable~command.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { invalid-after-optional-expandably }
+ {
+ Argument~type~'#2'~not~available~after~optional~argument~
+ for~expandable~command~'#1'.
+ }
+ {
+ The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
+ in~an~expandable~command~after~an~optional~argument.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { non-trailing-obey-spaces }
+ { Prefix~'!'~used~before~mandatory~argument~'#2'~of~#1. }
+ {
+ The~prefix~'!'~can~only~apply~to~trailing~optional~arguments.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { not-definable }
+ { First~argument~of~'#2'~must~be~a~command. }
+ {
+ The~first~argument~of~'#2'~should~be~the~document~command~that~will~
+ be~defined.~The~provided~argument~'#1'~is~a~character.~Perhaps~a~
+ backslash~is~missing?
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { not-one-token }
+ { First~argument~of~'#2'~must~be~a~command. }
+ {
+ The~first~argument~of~'#2'~should~be~the~document~command~that~will~
+ be~defined.~The~provided~argument~'#1'~contains~more~than~one~
+ token.~Perhaps~a~backslash~is~missing?
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { not-single-char }
+ {
+ Argument~delimiter~'#2'~for~the~#1~should~be~
+ a~single~character.
+ }
+ {
+ The~argument~specification~provided~was~not~valid:~in~a~place~
+ where~a~single~character~is~required,~LaTeX~found~'#2'.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { processor-in-expandable }
+ { Argument~processor~'>{#2}'~cannot~be~used~for~the~expandable~command~'#1'. }
+ {
+ The~argument~specification~for~#1~contains~a~processor~function:~
+ this~is~only~supported~for~standard~robust~commands.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { too-many-arguments }
+ { Too~many~arguments~in~argument~specification~'#2'~of~#1. }
+ {
+ The~argument~specification~provided~has~more~than~9~arguments.~
+ This~cannot~be~implemented.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { two-markers }
+ { Two~'#2'~apply~to~the~same~argument~in~argument~specification~of~#1. }
+ {
+ The~argument~specification~provided~has~two~markers~'#2'~applying~
+ to~the~same~argument;~these~are~redundant.
+ }
+\__kernel_msg_new:nnnn { xparse } { unknown-argument-type }
+ { Unknown~argument~type~'#2'~for~the~#1. }
+ {
+ The~letter~'#2'~does~not~specify~a~known~argument~type.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnn { xparse } { if-boolean }
+ { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} }
+\__kernel_msg_new:nnnn { xparse } { loop-in-defaults }
+ { Defaults~of~#1~have~circular~dependency. }
+ {
+ The~default~values~of~two~or~more~arguments~of~the~#1~
+ depend~on~each~other~in~a~way~that~cannot~be~resolved.
+ }
+\__kernel_msg_new:nnnn { xparse } { missing-required }
+ { Missing~required~argument~for~#1. }
+ {
+ The~current~#1~expects~an~argument~starting~with~'#2'.~
+ LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed.
+ }
+\__kernel_msg_new:nnnn { xparse } { non-xparse }
+ { \str_upper_case:n #1~not~defined~using~xparse. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~this~was~not~defined~using~xparse.
+ }
+\__kernel_msg_new:nnnn { xparse } { split-excess-tokens }
+ { Too~many~'#1'~tokens~when~trying~to~split~argument. }
+ {
+ LaTeX~was~asked~to~split~the~input~'#3'~
+ at~each~occurrence~of~the~token~'#1',~up~to~a~maximum~of~#2~parts.~
+ There~were~too~many~'#1'~tokens.
+ }
+\__kernel_msg_new:nnnn { xparse } { unknown }
+ { Unknown~document~#1. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~it~is~not~defined.
+ }
+\__kernel_msg_new:nnnn { xparse } { verbatim-newline }
+ { Verbatim~argument~of~#1~ended~by~end~of~line. }
+ {
+ The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~
+ but~the~end~
+ of~the~current~line~has~been~reached.~You~may~have~forgotten~the~
+ closing~delimiter.
+ \\ \\
+ LaTeX~will~ignore~'#2'.
+ }
+\__kernel_msg_new:nnnn { xparse } { verbatim-tokenized }
+ { The~verbatim~#1~cannot~be~used~inside~an~argument. }
+ {
+ The~#1~takes~a~verbatim~argument.~
+ It~may~not~appear~within~the~argument~of~another~function.~
+ It~received~an~illegal~token \tl_if_empty:nF {#3} { ~'#3' } .
+ \\ \\
+ LaTeX~will~ignore~'#2'.
+ }
+\__kernel_msg_new:nnn { xparse } { define-command }
+ {
+ Defining~command~#1~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { define-environment }
+ {
+ Defining~environment~'#1'~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { redefine-command }
+ {
+ Redefining~command~#1~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { redefine-environment }
+ {
+ Redefining~environment~'#1'~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { optional-mandatory }
+ {
+ Since~the~mandatory~argument~'#1'~has~the~same~delimiter~'#2'~
+ as~a~previous~optional~argument,~it~will~not~be~possible~to~
+ omit~all~optional~arguments~when~calling~this~command.
+ }
+\__kernel_msg_new:nnn { xparse } { unsupported-let }
+ {
+ The~command~'#1'~was~undefined~but~not~the~associated~commands~
+ '#1~code'~and/or~'#1~defaults'.~Maybe~you~tried~using~
+ \iow_char:N\\let.~This~may~lead~to~an~infinite~loop.
+ }
+\cs_new_eq:NN \BooleanFalse \c_false_bool
+\cs_new_eq:NN \BooleanTrue \c_true_bool
+\cs_new_protected:Npn \NewDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \NewDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-already-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \NewDocumentCommand }
+ }
+ { \__xparse_declare_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \RenewDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \RenewDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ { \__xparse_declare_cmd:Nnn #1 {#2} {#3} }
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \RenewDocumentCommand }
+ }
+ }
+ }
+\cs_new_protected:Npn \ProvideDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \ProvideDocumentCommand
+ { \cs_if_exist:NF #1 { \__xparse_declare_cmd:Nnn #1 {#2} {#3} } }
+ }
+\cs_new_protected:Npn \DeclareDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \DeclareDocumentCommand
+ { \__xparse_declare_cmd:Nnn #1 {#2} {#3} }
+ }
+\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
+ {
+ \cs_if_exist:cTF {#1}
+ { \__kernel_msg_error:nnx { xparse } { environment-already-defined } {#1} }
+ { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ }
+\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+ {
+ \cs_if_exist:cTF {#1}
+ { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ { \__kernel_msg_error:nnx { xparse } { environment-not-yet-defined } {#1} }
+ }
+\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+ { \cs_if_exist:cF {#1} { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} } }
+\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+ { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} }
+\cs_new_protected:Npn \NewExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \NewExpandableDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-already-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \NewExpandableDocumentCommand }
+ }
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \RenewExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \RenewExpandableDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \RenewExpandableDocumentCommand }
+ }
+ }
+ }
+\cs_new_protected:Npn \ProvideExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \ProvideExpandableDocumentCommand
+ {
+ \cs_if_exist:NF #1
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \DeclareExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \DeclareExpandableDocumentCommand
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+\cs_new:Npn \IfBooleanTF #1
+ {
+ \tl_if_single:nF {#1}
+ { \prg_break:n { \use:n } }
+ \tl_if_single_token:nF #1
+ { \prg_break:n { \use:n } }
+ \token_if_eq_meaning:NNT #1 \c_true_bool
+ { \prg_break:n { \use_ii:nnn } }
+ \token_if_eq_meaning:NNT #1 \c_false_bool
+ { \prg_break:n { \use_iii:nnn } }
+ \prg_break:n { \use:n }
+ \prg_break_point:
+ {
+ \__kernel_msg_expandable_error:nnn { xparse } { if-boolean } {#1}
+ \use_ii:nn
+ }
+ }
+\cs_new:Npn \IfBooleanT #1#2 { \IfBooleanTF {#1} {#2} { } }
+\cs_new:Npn \IfBooleanF #1 { \IfBooleanTF {#1} { } }
+\cs_new_eq:NN \IfNoValueF \tl_if_novalue:nF
+\cs_new_eq:NN \IfNoValueT \tl_if_novalue:nT
+\cs_new_eq:NN \IfNoValueTF \tl_if_novalue:nTF
+\cs_new:Npn \IfValueF { \tl_if_novalue:nT }
+\cs_new:Npn \IfValueT { \tl_if_novalue:nF }
+\cs_new:Npn \IfValueTF #1#2#3 { \tl_if_novalue:nTF {#1} {#3} {#2} }
+\tl_new:N \ProcessedArgument
+\cs_new_eq:NN \ReverseBoolean \__xparse_bool_reverse:N
+\cs_new_eq:NN \SplitArgument \__xparse_split_argument:nnn
+\cs_new_eq:NN \SplitList \__xparse_split_list:nn
+\cs_new_eq:NN \TrimSpaces \__xparse_trim_spaces:n
+\cs_new_eq:NN \ProcessList \tl_map_function:nN
+\cs_new_protected:Npn \GetDocumentCommandArgSpec #1
+ {
+ \__xparse_check_definable:nNT {#1} \GetDocumentCommandArgSpec
+ { \__xparse_get_arg_spec:N #1 }
+ }
+\cs_new_eq:NN \GetDocumentEnvironmentArgSpec \__xparse_get_arg_spec:n
+\cs_new_protected:Npn \ShowDocumentCommandArgSpec #1
+ {
+ \__xparse_check_definable:nNT {#1} \ShowDocumentCommandArgSpec
+ { \__xparse_show_arg_spec:N #1 }
+ }
+\cs_new_eq:NN \ShowDocumentEnvironmentArgSpec \__xparse_show_arg_spec:n
+\clist_new:N \l__xparse_options_clist
+\DeclareOption* { \clist_put_right:NV \l__xparse_options_clist \CurrentOption }
+\ProcessOptions \relax
+\keys_define:nn { xparse }
+ {
+ log-declarations .bool_set:N = \l__xparse_log_bool ,
+ log-declarations .initial:n = false
+ }
+\keys_set:nV { xparse } \l__xparse_options_clist
+\bool_if:NF \l__xparse_log_bool
+ {
+ \msg_redirect_module:nnn { LaTeX / xparse } { info } { none }
+ \msg_redirect_module:nnn { LaTeX / xparse } { warning } { none }
+ }
+%%
+%%
+%% End of file `xparse.sty'.
+++ /dev/null
-@Article{Bumbulis94,
- author = {Peter Bumbulis and Donald D. Cowan},
- title = {RE2C -- A More Versatile Scanner Generator},
- journal = "ACM Letters on Programming Languages and Systems",
- volume = 2,
- number = "1--4",
- year = 1994,
- abstract = {
- It is usually claimed that lexical analysis routines are still coded by
- hand, despite the widespread availability of scanner generators, for
- efficiency reasons. While efficiency is a consideration, there exist
- freely available scanner generators such as GLA \cite{Gray88} that can
- generate scanners that are faster than most hand-coded ones. However,
- most generated scanners are tailored for a particular environment, and
- retargetting these scanners to other environments, if possible, is
- usually complex enough to make a hand-coded scanner more appealing. In
- this paper we describe RE2C, a scanner generator that not only generates
- scanners which are faster (and usually smaller) than those produced by
- any other scanner generator known to the authors, including GLA, but
- also adapt easily to any environment.
- }
-}
-@Article{Gray88,
- author = {Robert W. Gray},
- title = {{$\gamma$-GLA} - {A} Generator for Lexical Analyzers That
- Programmers Can Use},
- journal = {USENIX Conference Proceedings},
- year = {1988},
- month = {June},
- pages = {147-160},
- abstract = {Writing an efficient lexical analyzer for even a simple
- language is not a trivial task, and should not be done by hand. We
- describe GLA, a tool that generates very efficient scanners. These
- scanners do not use the conventional transition matrix, but instead
- use a few 128 element vectors. Scanning time is only slightly
- greater than the absolute minimum --- the time it takes to look at
- each character in a file. The GLA language allows simple, concise
- specification of scanners. Augmenting regular expressions with
- auxiliary scanners easily handles nasty problems such as C comments
- and C literal constants. We formalize the connection between token
- scanning and token processing by associating a processor with
- appropriate patterns. A library of canned descriptions simplifies the
- specification of commonly used language pieces --- such as,
- C\_IDENTIFIERS, C\_STRINGS, PASCAL\_COMMENTS, etc. Finally, carefully
- tuned lexical analysis support modules are provided for error
- handling, input buffering, storing identifiers in hash tables and
- manipulating denotations.}
-}
+++ /dev/null
-#!/bin/bash
-
-w1=`identify -format '%[fx:w]\n' tdfa0_raw.png`
-w2=`identify -format '%[fx:w]\n' tdfa1_raw.png`
-
-w=$(( w1 > w2 ? w1 : w2 ))
-
-h=`identify -format '%[fx:h]\n' tnfa.png`
-convert -extent ${w}x${h} -gravity center tnfa.png _tnfa.png
-
-h=`identify -format '%[fx:h]\n' tdfa0.png`
-convert -extent ${w}x${h} -gravity center tdfa0.png _tdfa0.png
-
-h=`identify -format '%[fx:h]\n' tdfa0.png`
-convert -extent ${w}x${h} -gravity center tdfa1.png _tdfa1.png
-
-h=`identify -format '%[fx:h]\n' tdfa0_raw.png`
-convert -extent ${w}x${h} -gravity center tdfa0_raw.png _tdfa0_raw.png
-
-h=`identify -format '%[fx:h]\n' tdfa0_raw.png`
-convert -extent ${w}x${h} -gravity center tdfa1_raw.png _tdfa1_raw.png
-
-montage -label "(a)" -font "Courier" -pointsize 16 _tnfa.png -geometry +0+0 __tnfa.png
-montage -label "(b)" -font "Courier" -pointsize 16 _tdfa0_raw.png -geometry +0+0 __tdfa0_raw.png
-montage -label "(c)" -font "Courier" -pointsize 16 _tdfa0.png -geometry +0+0 __tdfa0.png
-montage -label "(d)" -font "Courier" -pointsize 16 _tdfa1_raw.png -geometry +0+0 __tdfa1_raw.png
-montage -label "(e)" -font "Courier" -pointsize 16 _tdfa1.png -geometry +0+0 __tdfa1.png
-
-montage __tnfa.png \
- __tdfa0_raw.png __tdfa0.png \
- __tdfa1_raw.png __tdfa1.png \
- -tile 1x5 -geometry +0+5 all.png
-
-rm _*.png
-
+++ /dev/null
-#!/bin/bash
-
-
-w1=`identify -format '%[fx:w]\n' tdfa0_raw.png`
-w2=`identify -format '%[fx:w]\n' tdfa1_raw.png`
-
-h1=`identify -format '%[fx:h]\n' tdfa0_raw.png`
-h2=`identify -format '%[fx:h]\n' tdfa1_raw.png`
-h=$(( h1 > h2 ? h1 : h2 ))
-
-convert -extent ${w1}x${h} -gravity center tdfa0_raw.png _tdfa0_raw.png
-convert -extent ${w2}x${h} -gravity center tdfa1_raw.png _tdfa1_raw.png
-
-h1=`identify -format '%[fx:h]\n' tdfa0.png`
-h2=`identify -format '%[fx:h]\n' tdfa1.png`
-h=$(( h1 > h2 ? h1 : h2 ))
-
-convert -extent ${w1}x${h} -gravity center tdfa0.png _tdfa0.png
-convert -extent ${w2}x${h} -gravity center tdfa1.png _tdfa1.png
-
-montage -label "(a)" -font "Courier" -pointsize 16 tnfa.png -geometry +0+0 _tnfa.png
-montage -label "(b)" -font "Courier" -pointsize 16 _tdfa0_raw.png -geometry +0+0 __tdfa0_raw.png
-montage -label "(c)" -font "Courier" -pointsize 16 _tdfa0.png -geometry +0+0 __tdfa0.png
-montage -label "(d)" -font "Courier" -pointsize 16 _tdfa1_raw.png -geometry +0+0 __tdfa1_raw.png
-montage -label "(e)" -font "Courier" -pointsize 16 _tdfa1.png -geometry +0+0 __tdfa1.png
-
-montage __tdfa0_raw.png __tdfa0.png -tile 1x2 -geometry +0+5 ___tdfa0.png
-montage __tdfa1_raw.png __tdfa1.png -tile 1x2 -geometry +0+5 ___tdfa1.png
-montage ___tdfa0.png ___tdfa1.png -tile 2x1 -geometry +0+0 _tdfa.png
-
-w=`identify -format '%[fx:w]\n' _tdfa.png`
-h=`identify -format '%[fx:h]\n' _tnfa.png`
-convert -extent ${w}x${h} -gravity center _tnfa.png __tnfa.png
-
-montage __tnfa.png _tdfa.png -tile 1x2 -geometry +0+5 all.png
-
-rm _*.png
-
+++ /dev/null
-#!/bin/sh -e
-
-pdflatex -shell-escape tdfa.tex </dev/null > tdfa.build_log
-bibtex tdfa
-pdflatex -shell-escape tdfa.tex </dev/null > tdfa.build_log
-pdflatex -shell-escape tdfa.tex </dev/null > tdfa.build_log
+++ /dev/null
-%.pdf : %.tex
- pdflatex -shell-escape $< </dev/null > $<.log
-
-all : part_1_tnfa.pdf
-
-clean:
- rm *.log *.aux *.pdf *.pag
+++ /dev/null
-%%\r
-%% This is file `NJDnatbib.sty',\r
-%% generated with the docstrip utility.\r
-%%\r
-%% The original source files were:\r
-%%\r
-%% natbib.dtx (with options: `package,all')\r
-%% =============================================\r
-%% IMPORTANT NOTICE:\r
-%% \r
-%% This program can be redistributed and/or modified under the terms\r
-%% of the LaTeX Project Public License Distributed from CTAN\r
-%% archives in directory macros/latex/base/lppl.txt; either\r
-%% version 1 of the License, or any later version.\r
-%% \r
-%% This is a generated file.\r
-%% It may not be distributed without the original source file natbib.dtx.\r
-%% \r
-%% Full documentation can be obtained by LaTeXing that original file.\r
-%% Only a few abbreviated comments remain here to describe the usage.\r
-%% =============================================\r
-%% Copyright 1993-2010 Patrick W Daly\r
-%% Max-Planck-Institut f\"ur Sonnensystemforschung\r
-%% Max-Planck-Str. 2\r
-%% D-37191 Katlenburg-Lindau\r
-%% Germany\r
-%% E-mail: daly@mps.mpg.de\r
-\NeedsTeXFormat{LaTeX2e}[1995/06/01]\r
-\ProvidesPackage{NJDnatbib}\r
- [2010/09/13 8.31b (PWD, AO)]\r
-\r
- % This package reimplements the LaTeX \cite command to be used for various\r
- % citation styles, both author-year and numerical. It accepts BibTeX\r
- % output intended for many other packages, and therefore acts as a\r
- % general, all-purpose citation-style interface.\r
- %\r
- % With standard numerical .bst files, only numerical citations are\r
- % possible. With an author-year .bst file, both numerical and\r
- % author-year citations are possible.\r
- %\r
- % If author-year citations are selected, \bibitem must have one of the\r
- % following forms:\r
- % \bibitem[Jones et al.(1990)]{key}...\r
- % \bibitem[Jones et al.(1990)Jones, Baker, and Williams]{key}...\r
- % \bibitem[Jones et al., 1990]{key}...\r
- % \bibitem[\protect\citeauthoryear{Jones, Baker, and Williams}{Jones\r
- % et al.}{1990}]{key}...\r
- % \bibitem[\protect\citeauthoryear{Jones et al.}{1990}]{key}...\r
- % \bibitem[\protect\astroncite{Jones et al.}{1990}]{key}...\r
- % \bibitem[\protect\citename{Jones et al., }1990]{key}...\r
- % \harvarditem[Jones et al.]{Jones, Baker, and Williams}{1990}{key}...\r
- %\r
- % This is either to be made up manually, or to be generated by an\r
- % appropriate .bst file with BibTeX.\r
- % Author-year mode || Numerical mode\r
- % Then, \citet{key} ==>> Jones et al. (1990) || Jones et al. [21]\r
- % \citep{key} ==>> (Jones et al., 1990) || [21]\r
- % Multiple citations as normal:\r
- % \citep{key1,key2} ==>> (Jones et al., 1990; Smith, 1989) || [21,24]\r
- % or (Jones et al., 1990, 1991) || [21,24]\r
- % or (Jones et al., 1990a,b) || [21,24]\r
- % \cite{key} is the equivalent of \citet{key} in author-year mode\r
- % and of \citep{key} in numerical mode\r
- % Full author lists may be forced with \citet* or \citep*, e.g.\r
- % \citep*{key} ==>> (Jones, Baker, and Williams, 1990)\r
- % Optional notes as:\r
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)\r
- % \citep[e.g.,][]{key} ==>> (e.g., Jones et al., 1990)\r
- % \citep[see][pg. 34]{key}==>> (see Jones et al., 1990, pg. 34)\r
- % (Note: in standard LaTeX, only one note is allowed, after the ref.\r
- % Here, one note is like the standard, two make pre- and post-notes.)\r
- % \citealt{key} ==>> Jones et al. 1990\r
- % \citealt*{key} ==>> Jones, Baker, and Williams 1990\r
- % \citealp{key} ==>> Jones et al., 1990\r
- % \citealp*{key} ==>> Jones, Baker, and Williams, 1990\r
- % Additional citation possibilities (both author-year and numerical modes)\r
- % \citeauthor{key} ==>> Jones et al.\r
- % \citeauthor*{key} ==>> Jones, Baker, and Williams\r
- % \citeyear{key} ==>> 1990\r
- % \citeyearpar{key} ==>> (1990)\r
- % \citetext{priv. comm.} ==>> (priv. comm.)\r
- % \citenum{key} ==>> 11 [non-superscripted]\r
- % Note: full author lists depends on whether the bib style supports them;\r
- % if not, the abbreviated list is printed even when full requested.\r
- %\r
- % For names like della Robbia at the start of a sentence, use\r
- % \Citet{dRob98} ==>> Della Robbia (1998)\r
- % \Citep{dRob98} ==>> (Della Robbia, 1998)\r
- % \Citeauthor{dRob98} ==>> Della Robbia\r
- %\r
- %\r
- % Citation aliasing is achieved with\r
- % \defcitealias{key}{text}\r
- % \citetalias{key} ==>> text\r
- % \citepalias{key} ==>> (text)\r
- %\r
- % Defining the citation mode and punctual (citation style)\r
- % \setcitestyle{<comma-separated list of keywords, same\r
- % as the package options>}\r
- % Example: \setcitestyle{square,semicolon}\r
- % Alternatively:\r
- % Use \bibpunct with 6 mandatory arguments:\r
- % 1. opening bracket for citation\r
- % 2. closing bracket\r
- % 3. citation separator (for multiple citations in one \cite)\r
- % 4. the letter n for numerical styles, s for superscripts\r
- % else anything for author-year\r
- % 5. punctuation between authors and date\r
- % 6. punctuation between years (or numbers) when common authors missing\r
- % One optional argument is the character coming before post-notes. It\r
- % appears in square braces before all other arguments. May be left off.\r
- % Example (and default) \bibpunct[, ]{(}{)}{;}{a}{,}{,}\r
- %\r
- % To make this automatic for a given bib style, named newbib, say, make\r
- % a local configuration file, natbib.cfg, with the definition\r
- % \newcommand{\bibstyle@newbib}{\bibpunct...}\r
- % Then the \bibliographystyle{newbib} will cause \bibstyle@newbib to\r
- % be called on THE NEXT LATEX RUN (via the aux file).\r
- %\r
- % Such preprogrammed definitions may be invoked anywhere in the text\r
- % by calling \citestyle{newbib}. This is only useful if the style specified\r
- % differs from that in \bibliographystyle.\r
- %\r
- % With \citeindextrue and \citeindexfalse, one can control whether the\r
- % \cite commands make an automatic entry of the citation in the .idx\r
- % indexing file. For this, \makeindex must also be given in the preamble.\r
- %\r
- % Package Options: (for selecting punctuation)\r
- % round - round parentheses are used (default)\r
- % square - square brackets are used [option]\r
- % curly - curly braces are used {option}\r
- % angle - angle brackets are used <option>\r
- % semicolon - multiple citations separated by semi-colon (default)\r
- % colon - same as semicolon, an earlier confusion\r
- % comma - separated by comma\r
- % authoryear - selects author-year citations (default)\r
- % numbers- selects numerical citations\r
- % super - numerical citations as superscripts\r
- % sort - sorts multiple citations according to order in ref. list\r
- % sort&compress - like sort, but also compresses numerical citations\r
- % compress - compresses without sorting\r
- % longnamesfirst - makes first citation full author list\r
- % sectionbib - puts bibliography in a \section* instead of \chapter*\r
- % merge - allows the citation key to have a * prefix,\r
- % signifying to merge its reference with that of the previous citation.\r
- % elide - if references are merged, repeated portions of later ones may be removed.\r
- % mcite - recognizes and ignores the * prefix for merging.\r
- % Punctuation so selected dominates over any predefined ones.\r
- % Package options are called as, e.g.\r
- % \usepackage[square,comma]{natbib}\r
- % LaTeX the source file natbib.dtx to obtain more details\r
- % or the file natnotes.tex for a brief reference sheet.\r
- %-----------------------------------------------------------\r
-\providecommand\@ifxundefined[1]{%\r
- \ifx#1\@undefined\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi\r
-}%\r
-\providecommand\@ifnum[1]{%\r
- \ifnum#1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi\r
-}%\r
-\providecommand\@ifx[1]{%\r
- \ifx#1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi\r
-}%\r
-\providecommand\appdef[2]{%\r
- \toks@\expandafter{#1}\@temptokena{#2}%\r
- \edef#1{\the\toks@\the\@temptokena}%\r
-}%\r
-\@ifclassloaded{agu2001}{\PackageError{natbib}\r
- {The agu2001 class already includes natbib coding,\MessageBreak\r
- so you should not add it explicitly}\r
- {Type <Return> for now, but then later remove\MessageBreak\r
- the command \protect\usepackage{natbib} from the document}\r
- \endinput}{}\r
-\@ifclassloaded{agutex}{\PackageError{natbib}\r
- {The AGUTeX class already includes natbib coding,\MessageBreak\r
- so you should not add it explicitly}\r
- {Type <Return> for now, but then later remove\MessageBreak\r
- the command \protect\usepackage{natbib} from the document}\r
- \endinput}{}\r
-\@ifclassloaded{aguplus}{\PackageError{natbib}\r
- {The aguplus class already includes natbib coding,\MessageBreak\r
- so you should not add it explicitly}\r
- {Type <Return> for now, but then later remove\MessageBreak\r
- the command \protect\usepackage{natbib} from the document}\r
- \endinput}{}\r
-\@ifclassloaded{nlinproc}{\PackageError{natbib}\r
- {The nlinproc class already includes natbib coding,\MessageBreak\r
- so you should not add it explicitly}\r
- {Type <Return> for now, but then later remove\MessageBreak\r
- the command \protect\usepackage{natbib} from the document}\r
- \endinput}{}\r
-\@ifclassloaded{egs}{\PackageError{natbib}\r
- {The egs class already includes natbib coding,\MessageBreak\r
- so you should not add it explicitly}\r
- {Type <Return> for now, but then later remove\MessageBreak\r
- the command \protect\usepackage{natbib} from the document}\r
- \endinput}{}\r
-\@ifclassloaded{egu}{\PackageError{natbib}\r
- {The egu class already includes natbib coding,\MessageBreak\r
- so you should not add it explicitly}\r
- {Type <Return> for now, but then later remove\MessageBreak\r
- the command \protect\usepackage{natbib} from the document}\r
- \endinput}{}\r
- % Define citation punctuation for some author-year styles\r
- % One may add and delete at this point\r
- % Or put additions into local configuration file natbib.cfg\r
-\newcommand\bibstyle@chicago{\bibpunct{(}{)}{;}{a}{,}{,}}\r
-\newcommand\bibstyle@named{\bibpunct{[}{]}{;}{a}{,}{,}}\r
-\newcommand\bibstyle@agu{\bibpunct{[}{]}{;}{a}{,}{,~}}%Amer. Geophys. Union\r
-\newcommand\bibstyle@copernicus{\bibpunct{(}{)}{;}{a}{,}{,}}%Copernicus Publications\r
-\let\bibstyle@egu=\bibstyle@copernicus\r
-\let\bibstyle@egs=\bibstyle@copernicus\r
-\newcommand\bibstyle@agsm{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}}\r
-\newcommand\bibstyle@kluwer{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}}\r
-\newcommand\bibstyle@dcu{\bibpunct{(}{)}{;}{a}{;}{,}\gdef\harvardand{and}}\r
-\newcommand\bibstyle@aa{\bibpunct{(}{)}{;}{a}{}{,}} %Astronomy & Astrophysics\r
-\newcommand\bibstyle@pass{\bibpunct{(}{)}{;}{a}{,}{,}}%Planet. & Space Sci\r
-\newcommand\bibstyle@anngeo{\bibpunct{(}{)}{;}{a}{,}{,}}%Annales Geophysicae\r
-\newcommand\bibstyle@nlinproc{\bibpunct{(}{)}{;}{a}{,}{,}}%Nonlin.Proc.Geophys.\r
- % Define citation punctuation for some numerical styles\r
-\newcommand\bibstyle@cospar{\bibpunct{/}{/}{,}{n}{}{}%\r
- \gdef\bibnumfmt##1{##1.}}\r
-\newcommand\bibstyle@esa{\bibpunct{(Ref.~}{)}{,}{n}{}{}%\r
- \gdef\bibnumfmt##1{##1.\hspace{1em}}}\r
-\newcommand\bibstyle@nature{\bibpunct{}{}{,}{s}{}{\textsuperscript{,}}%\r
- \gdef\bibnumfmt##1{##1.}}\r
- % The standard LaTeX styles\r
-\newcommand\bibstyle@plain{\bibpunct{[}{]}{,}{n}{}{,}}\r
-\let\bibstyle@alpha=\bibstyle@plain\r
-\let\bibstyle@abbrv=\bibstyle@plain\r
-\let\bibstyle@unsrt=\bibstyle@plain\r
- % The author-year modifications of the standard styles\r
-\newcommand\bibstyle@plainnat{\bibpunct{[}{]}{,}{a}{,}{,}}\r
-\let\bibstyle@abbrvnat=\bibstyle@plainnat\r
-\let\bibstyle@unsrtnat=\bibstyle@plainnat\r
-\newif\ifNAT@numbers \NAT@numbersfalse\r
-\newif\ifNAT@super \NAT@superfalse\r
-\let\NAT@merge\z@\r
-\DeclareOption{numbers}{\NAT@numberstrue\r
- \ExecuteOptions{square,comma,nobibstyle}}\r
-\DeclareOption{super}{\NAT@supertrue\NAT@numberstrue\r
- \renewcommand\NAT@open{}\renewcommand\NAT@close{}\r
- \ExecuteOptions{nobibstyle}}\r
-\DeclareOption{authoryear}{\NAT@numbersfalse\r
- \ExecuteOptions{round,semicolon,bibstyle}}\r
-\DeclareOption{round}{%\r
- \renewcommand\NAT@open{(} \renewcommand\NAT@close{)}\r
- \ExecuteOptions{nobibstyle}}\r
-\DeclareOption{square}{%\r
- \renewcommand\NAT@open{[} \renewcommand\NAT@close{]}\r
- \ExecuteOptions{nobibstyle}}\r
-\DeclareOption{angle}{%\r
- \renewcommand\NAT@open{$<$} \renewcommand\NAT@close{$>$}\r
- \ExecuteOptions{nobibstyle}}\r
-\DeclareOption{curly}{%\r
- \renewcommand\NAT@open{\{} \renewcommand\NAT@close{\}}\r
- \ExecuteOptions{nobibstyle}}\r
-\DeclareOption{comma}{\renewcommand\NAT@sep{,}\r
- \ExecuteOptions{nobibstyle}}\r
-\DeclareOption{semicolon}{\renewcommand\NAT@sep{;}\r
- \ExecuteOptions{nobibstyle}}\r
-\DeclareOption{colon}{\ExecuteOptions{semicolon}}\r
-\DeclareOption{nobibstyle}{\let\bibstyle=\@gobble}\r
-\DeclareOption{bibstyle}{\let\bibstyle=\@citestyle}\r
-\newif\ifNAT@openbib \NAT@openbibfalse\r
-\DeclareOption{openbib}{\NAT@openbibtrue}\r
-\DeclareOption{sectionbib}{\def\NAT@sectionbib{on}}\r
-\def\NAT@sort{\z@}\r
-\def\NAT@cmprs{\z@}\r
-\DeclareOption{sort}{\def\NAT@sort{\@ne}}\r
-\DeclareOption{compress}{\def\NAT@cmprs{\@ne}}\r
-\DeclareOption{sort&compress}{\def\NAT@sort{\@ne}\def\NAT@cmprs{\@ne}}\r
-\DeclareOption{mcite}{\let\NAT@merge\@ne}\r
-\DeclareOption{merge}{\@ifnum{\NAT@merge<\tw@}{\let\NAT@merge\tw@}{}}\r
-\DeclareOption{elide}{\@ifnum{\NAT@merge<\thr@@}{\let\NAT@merge\thr@@}{}}\r
-\@ifpackageloaded{cite}{\PackageWarningNoLine{natbib}\r
- {The `cite' package should not be used\MessageBreak\r
- with natbib. Use option `sort' instead}\ExecuteOptions{sort}}{}\r
-\@ifpackageloaded{mcite}{\PackageWarningNoLine{natbib}\r
- {The `mcite' package should not be used\MessageBreak\r
- with natbib. Use option `merge' instead}\ExecuteOptions{merge}}{}\r
-\@ifpackageloaded{citeref}{\PackageError{natbib}\r
- {The `citeref' package must be loaded after natbib}%\r
- {Move \protect\usepackage{citeref} to after \string\usepackage{natbib}}}{}\r
-\newif\ifNAT@longnames\NAT@longnamesfalse\r
-\DeclareOption{longnamesfirst}{\NAT@longnamestrue}\r
-\DeclareOption{nonamebreak}{\def\NAT@nmfmt#1{\mbox{\NAT@up#1}}}\r
-\def\NAT@nmfmt#1{{\NAT@up#1}}\r
-\renewcommand\bibstyle[1]{\csname bibstyle@#1\endcsname}\r
-\AtBeginDocument{\global\let\bibstyle=\@gobble}\r
-\let\@citestyle\bibstyle\r
-\newcommand\citestyle[1]{\@citestyle{#1}\let\bibstyle\@gobble}\r
-\newcommand\bibpunct[7][, ]%\r
- {\gdef\NAT@open{#2}\gdef\NAT@close{#3}\gdef\r
- \NAT@sep{#4}\global\NAT@numbersfalse\r
- \ifx #5n\global\NAT@numberstrue\global\NAT@superfalse\r
- \else\r
- \ifx #5s\global\NAT@numberstrue\global\NAT@supertrue\r
- \fi\fi\r
- \gdef\NAT@aysep{#6}\gdef\NAT@yrsep{#7}%\r
- \gdef\NAT@cmt{#1}%\r
- \NAT@@setcites\r
- }\r
-\newcommand\setcitestyle[1]{\r
- \@for\@tempa:=#1\do\r
- {\def\@tempb{round}\ifx\@tempa\@tempb\r
- \renewcommand\NAT@open{(}\renewcommand\NAT@close{)}\fi\r
- \def\@tempb{square}\ifx\@tempa\@tempb\r
- \renewcommand\NAT@open{[}\renewcommand\NAT@close{]}\fi\r
- \def\@tempb{angle}\ifx\@tempa\@tempb\r
- \renewcommand\NAT@open{$<$}\renewcommand\NAT@close{$>$}\fi\r
- \def\@tempb{curly}\ifx\@tempa\@tempb\r
- \renewcommand\NAT@open{\{}\renewcommand\NAT@close{\}}\fi\r
- \def\@tempb{semicolon}\ifx\@tempa\@tempb\r
- \renewcommand\NAT@sep{;}\fi\r
- \def\@tempb{colon}\ifx\@tempa\@tempb\r
- \renewcommand\NAT@sep{;}\fi\r
- \def\@tempb{comma}\ifx\@tempa\@tempb\r
- \renewcommand\NAT@sep{,}\fi\r
- \def\@tempb{authoryear}\ifx\@tempa\@tempb\r
- \NAT@numbersfalse\fi\r
- \def\@tempb{numbers}\ifx\@tempa\@tempb\r
- \NAT@numberstrue\NAT@superfalse\fi\r
- \def\@tempb{super}\ifx\@tempa\@tempb\r
- \NAT@numberstrue\NAT@supertrue\fi\r
- \expandafter\NAT@find@eq\@tempa=\relax\@nil\r
- \if\@tempc\relax\else\r
- \expandafter\NAT@rem@eq\@tempc\r
- \def\@tempb{open}\ifx\@tempa\@tempb\r
- \xdef\NAT@open{\@tempc}\fi\r
- \def\@tempb{close}\ifx\@tempa\@tempb\r
- \xdef\NAT@close{\@tempc}\fi\r
- \def\@tempb{aysep}\ifx\@tempa\@tempb\r
- \xdef\NAT@aysep{\@tempc}\fi\r
- \def\@tempb{yysep}\ifx\@tempa\@tempb\r
- \xdef\NAT@yrsep{\@tempc}\fi\r
- \def\@tempb{notesep}\ifx\@tempa\@tempb\r
- \xdef\NAT@cmt{\@tempc}\fi\r
- \def\@tempb{citesep}\ifx\@tempa\@tempb\r
- \xdef\NAT@sep{\@tempc}\fi\r
- \fi\r
- }%\r
- \NAT@@setcites\r
-}\r
- \def\NAT@find@eq#1=#2\@nil{\def\@tempa{#1}\def\@tempc{#2}}\r
- \def\NAT@rem@eq#1={\def\@tempc{#1}}\r
- \def\NAT@@setcites{\global\let\bibstyle\@gobble}\r
-\AtBeginDocument{\let\NAT@@setcites\NAT@set@cites}\r
-\newcommand\NAT@open{(} \newcommand\NAT@close{)}\r
-\newcommand\NAT@sep{;}\r
-\ProcessOptions\r
-\newcommand\NAT@aysep{,} \newcommand\NAT@yrsep{,}\r
-\newcommand\NAT@cmt{, }\r
-\newcommand\NAT@cite%\r
- [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi\r
- #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}\r
-\newcommand\NAT@citenum%\r
- [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi\r
- #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}\r
-%\newcommand\NAT@citesuper[3]{\ifNAT@swa\r
-%\if*#2*\else#2\NAT@spacechar\fi\r
-%\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}%\r
-% \if*#3*\else\NAT@spacechar#3\fi\else #1\fi\endgroup}\r
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r
-\newcommand\NAT@citesuper[3]{\ifNAT@swa\r
-\if*#2*\else#2\NAT@spacechar\fi\r
-\unskip\kern\p@\textsuperscript{\NAT@@open#1\if*#3*\else,\NAT@spacechar#3\fi\NAT@@close}%\r
- \else #1\fi\endgroup}\r
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r
-\providecommand\textsuperscript[1]{\mbox{$^{\mbox{\scriptsize#1}}$}}\r
-\begingroup \catcode`\_=8\r
-\gdef\NAT@ifcat@num#1{%\r
- \ifcat_\ifnum\z@<0#1_\else A\fi\r
- \expandafter\@firstoftwo\r
- \else\r
- \expandafter\@secondoftwo\r
- \fi\r
-}%\r
-\endgroup\r
-\providecommand\@firstofone[1]{#1}\r
-\newcommand\NAT@citexnum{}\r
-\def\NAT@citexnum[#1][#2]#3{%\r
- \NAT@reset@parser\r
- \NAT@sort@cites{#3}%\r
- \NAT@reset@citea\r
- \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty\r
- \@for\@citeb:=\NAT@cite@list\do\r
- {\@safe@activestrue\r
- \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%\r
- \@safe@activesfalse\r
- \@ifundefined{b@\@citeb\@extra@b@citeb}{%\r
- {\reset@font\bfseries?}\r
- \NAT@citeundefined\PackageWarning{natbib}%\r
- {Citation `\@citeb' on page \thepage \space undefined}}%\r
- {\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm\r
- \NAT@parse{\@citeb}%\r
- \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%\r
- \let\NAT@name=\NAT@all@names\r
- \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%\r
- \fi\r
- \ifNAT@full\let\NAT@nm\NAT@all@names\else\r
- \let\NAT@nm\NAT@name\fi\r
- \ifNAT@swa\r
- \@ifnum{\NAT@ctype>\@ne}{%\r
- \@citea\r
- \NAT@hyper@{\@ifnum{\NAT@ctype=\tw@}{\NAT@test{\NAT@ctype}}{\NAT@alias}}%\r
- }{%\r
- \@ifnum{\NAT@cmprs>\z@}{%\r
- \NAT@ifcat@num\NAT@num\r
- {\let\NAT@nm=\NAT@num}%\r
- {\def\NAT@nm{-2}}%\r
- \NAT@ifcat@num\NAT@last@num\r
- {\@tempcnta=\NAT@last@num\relax}%\r
- {\@tempcnta\m@ne}%\r
- \@ifnum{\NAT@nm=\@tempcnta}{%\r
- \@ifnum{\NAT@merge>\@ne}{}{\NAT@last@yr@mbox}%\r
- }{%\r
- \advance\@tempcnta by\@ne\r
- \@ifnum{\NAT@nm=\@tempcnta}{%\r
- \ifx\NAT@last@yr\relax\r
- \def@NAT@last@yr{\@citea}%\r
- \else\r
- \def@NAT@last@yr{--\NAT@penalty}%\r
- \fi\r
- }{%\r
- \NAT@last@yr@mbox\r
- }%\r
- }%\r
- }{%\r
- \@tempswatrue\r
- \@ifnum{\NAT@merge>\@ne}{\@ifnum{\NAT@last@num=\NAT@num\relax}{\@tempswafalse}{}}{}%\r
- \if@tempswa\NAT@citea@mbox\fi\r
- }%\r
- }%\r
- \NAT@def@citea\r
- \else\r
- \ifcase\NAT@ctype\r
- \ifx\NAT@last@nm\NAT@nm \NAT@yrsep\NAT@penalty\NAT@space\else\r
- \@citea \NAT@test{\@ne}\NAT@spacechar\NAT@mbox{\NAT@super@kern\NAT@@open}%\r
- \fi\r
- \if*#1*\else#1\NAT@spacechar\fi\r
- \NAT@mbox{\NAT@hyper@{{\citenumfont{\NAT@num}}}}%\r
- \NAT@def@citea@box\r
- \or\r
- \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%\r
- \or\r
- \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%\r
- \or\r
- \NAT@hyper@citea@space\NAT@alias\r
- \fi\r
- \fi\r
- }%\r
- }%\r
- \@ifnum{\NAT@cmprs>\z@}{\NAT@last@yr}{}%\r
- \ifNAT@swa\else\r
- \@ifnum{\NAT@ctype=\z@}{%\r
- \if*#2*\else\NAT@cmt#2\fi\r
- }{}%\r
- \NAT@mbox{\NAT@@close}%\r
- \fi\r
- }{#1}{#2}%\r
-}%\r
-\def\NAT@citea@mbox{%\r
- \@citea\mbox{\NAT@hyper@{{\citenumfont{\NAT@num}}}}%\r
-}%\r
-\def\NAT@hyper@#1{%\r
- \hyper@natlinkstart{\@citeb\@extra@b@citeb}#1\hyper@natlinkend\r
-}%\r
-\def\NAT@hyper@citea#1{%\r
- \@citea\r
- \NAT@hyper@{#1}%\r
- \NAT@def@citea\r
-}%\r
-\def\NAT@hyper@citea@space#1{%\r
- \@citea\r
- \NAT@hyper@{#1}%\r
- \NAT@def@citea@space\r
-}%\r
-\def\def@NAT@last@yr#1{%\r
- \protected@edef\NAT@last@yr{%\r
- #1%\r
- \noexpand\mbox{%\r
- \noexpand\hyper@natlinkstart{\@citeb\@extra@b@citeb}%\r
- {\noexpand\citenumfont{\NAT@num}}%\r
- \noexpand\hyper@natlinkend\r
- }%\r
- }%\r
-}%\r
-\def\NAT@last@yr@mbox{%\r
- \NAT@last@yr\let\NAT@last@yr\relax\r
- \NAT@citea@mbox\r
-}%\r
-\newcommand\NAT@test[1]{%\r
- \@ifnum{#1=\@ne}{%\r
- \ifx\NAT@nm\NAT@noname\r
- \begingroup\reset@font\bfseries(author?)\endgroup\r
- \PackageWarning{natbib}{%\r
- Author undefined for citation`\@citeb' \MessageBreak on page \thepage%\r
- }%\r
- \else \NAT@nm\r
- \fi\r
- }{%\r
- \if\relax\NAT@date\relax\r
- \begingroup\reset@font\bfseries(year?)\endgroup\r
- \PackageWarning{natbib}{%\r
- Year undefined for citation`\@citeb' \MessageBreak on page \thepage%\r
- }%\r
- \else \NAT@date\r
- \fi\r
- }%\r
-}%\r
-\let\citenumfont=\@empty\r
-\newcommand\NAT@citex{}\r
-\def\NAT@citex%\r
- [#1][#2]#3{%\r
- \NAT@reset@parser\r
- \NAT@sort@cites{#3}%\r
- \NAT@reset@citea\r
- \@cite{\let\NAT@nm\@empty\let\NAT@year\@empty\r
- \@for\@citeb:=\NAT@cite@list\do\r
- {\@safe@activestrue\r
- \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%\r
- \@safe@activesfalse\r
- \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%\r
- {\reset@font\bfseries ?}\NAT@citeundefined\r
- \PackageWarning{natbib}%\r
- {Citation `\@citeb' on page \thepage \space undefined}\def\NAT@date{}}%\r
- {\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year\r
- \NAT@parse{\@citeb}%\r
- \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%\r
- \let\NAT@name=\NAT@all@names\r
- \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%\r
- \fi\r
- \ifNAT@full\let\NAT@nm\NAT@all@names\else\r
- \let\NAT@nm\NAT@name\fi\r
- \ifNAT@swa\ifcase\NAT@ctype\r
- \if\relax\NAT@date\relax\r
- \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}\NAT@date}%\r
- \else\r
- \ifx\NAT@last@nm\NAT@nm\NAT@yrsep\r
- \ifx\NAT@last@yr\NAT@year\r
- \def\NAT@temp{{?}}%\r
- \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%\r
- {Multiple citation on page \thepage: same authors and\r
- year\MessageBreak without distinguishing extra\r
- letter,\MessageBreak appears as question mark}\fi\r
- \NAT@hyper@{\NAT@exlab}%\r
- \else\unskip\NAT@spacechar\r
- \NAT@hyper@{\NAT@date}%\r
- \fi\r
- \else\r
- \@citea\NAT@hyper@{%\r
- \NAT@nmfmt{\NAT@nm}%\r
- \hyper@natlinkbreak{%\r
- \NAT@aysep\NAT@spacechar}{\@citeb\@extra@b@citeb\r
- }%\r
- \NAT@date\r
- }%\r
- \fi\r
- \fi\r
- \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%\r
- \or\@citea\NAT@hyper@{\NAT@date}%\r
- \or\@citea\NAT@hyper@{\NAT@alias}%\r
- \fi \NAT@def@citea\r
- \else\r
- \ifcase\NAT@ctype\r
- \if\relax\NAT@date\relax\r
- \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%\r
- \else\r
- \ifx\NAT@last@nm\NAT@nm\NAT@yrsep\r
- \ifx\NAT@last@yr\NAT@year\r
- \def\NAT@temp{{?}}%\r
- \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%\r
- {Multiple citation on page \thepage: same authors and\r
- year\MessageBreak without distinguishing extra\r
- letter,\MessageBreak appears as question mark}\fi\r
- \NAT@hyper@{\NAT@exlab}%\r
- \else\r
- \unskip\NAT@spacechar\r
- \NAT@hyper@{\NAT@date}%\r
- \fi\r
- \else\r
- \@citea\NAT@hyper@{%\r
- \NAT@nmfmt{\NAT@nm}%\r
- \hyper@natlinkbreak{\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi}%\r
- {\@citeb\@extra@b@citeb}%\r
- \NAT@date\r
- }%\r
- \fi\r
- \fi\r
- \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%\r
- \or\@citea\NAT@hyper@{\NAT@date}%\r
- \or\@citea\NAT@hyper@{\NAT@alias}%\r
- \fi\r
- \if\relax\NAT@date\relax\r
- \NAT@def@citea\r
- \else\r
- \NAT@def@citea@close\r
- \fi\r
- \fi\r
- }}\ifNAT@swa\else\if*#2*\else\NAT@cmt#2\fi\r
- \if\relax\NAT@date\relax\else\NAT@@close\fi\fi}{#1}{#2}}\r
-\def\NAT@spacechar{\ }%\r
-\def\NAT@separator{\NAT@sep\NAT@penalty}%\r
-\def\NAT@reset@citea{\c@NAT@ctr\@ne\let\@citea\@empty}%\r
-\def\NAT@def@citea{\def\@citea{\NAT@separator\NAT@space}}%\r
-\def\NAT@def@citea@space{\def\@citea{\NAT@separator\NAT@spacechar}}%\r
-\def\NAT@def@citea@close{\def\@citea{\NAT@@close\NAT@separator\NAT@space}}%\r
-\def\NAT@def@citea@box{\def\@citea{\NAT@mbox{\NAT@@close}\NAT@separator\NAT@spacechar}}%\r
-\newif\ifNAT@par \NAT@partrue\r
-\newcommand\NAT@@open{\ifNAT@par\NAT@open\fi}\r
-\newcommand\NAT@@close{\ifNAT@par\NAT@close\fi}\r
-\newcommand\NAT@alias{\@ifundefined{al@\@citeb\@extra@b@citeb}{%\r
- {\reset@font\bfseries(alias?)}\PackageWarning{natbib}\r
- {Alias undefined for citation `\@citeb'\r
- \MessageBreak on page \thepage}}{\@nameuse{al@\@citeb\@extra@b@citeb}}}\r
-\let\NAT@up\relax\r
-\newcommand\NAT@Up[1]{{\let\protect\@unexpandable@protect\let~\relax\r
- \expandafter\NAT@deftemp#1}\expandafter\NAT@UP\NAT@temp}\r
-\newcommand\NAT@deftemp[1]{\xdef\NAT@temp{#1}}\r
-\newcommand\NAT@UP[1]{\let\@tempa\NAT@UP\ifcat a#1\MakeUppercase{#1}%\r
- \let\@tempa\relax\else#1\fi\@tempa}\r
-\newcommand\shortcites[1]{%\r
- \@bsphack\@for\@citeb:=#1\do\r
- {\@safe@activestrue\r
- \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%\r
- \@safe@activesfalse\r
- \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}\@esphack}\r
-\newcommand\NAT@biblabel[1]{\hfill}\r
-\newcommand\NAT@biblabelnum[1]{\bibnumfmt{#1}}\r
-\let\bibnumfmt\@empty\r
-\providecommand\@biblabel[1]{[#1]}\r
-\AtBeginDocument{\ifx\bibnumfmt\@empty\let\bibnumfmt\@biblabel\fi}\r
-\newcommand\NAT@bibsetnum[1]{\settowidth\labelwidth{\@biblabel{#1}}%\r
- \setlength{\leftmargin}{\labelwidth}\addtolength{\leftmargin}{\labelsep}%\r
- \setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}%\r
- \ifNAT@openbib\r
- \addtolength{\leftmargin}{\bibindent}%\r
- \setlength{\itemindent}{-\bibindent}%\r
- \setlength{\listparindent}{\itemindent}%\r
- \setlength{\parsep}{0pt}%\r
- \fi\r
-}\r
-\newlength{\bibhang}\r
-\setlength{\bibhang}{1em}\r
-\newlength{\bibsep}\r
- {\@listi \global\bibsep\itemsep \global\advance\bibsep by\parsep}\r
-\r
-\newcommand\NAT@bibsetup%\r
- [1]{\setlength{\leftmargin}{\bibhang}\setlength{\itemindent}{-\leftmargin}%\r
- \setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}}\r
-\newcommand\NAT@set@cites{%\r
- \ifNAT@numbers\r
- \ifNAT@super \let\@cite\NAT@citesuper\r
- \def\NAT@mbox##1{\unskip\nobreak\textsuperscript{##1}}%\r
- \let\citeyearpar=\citeyear\r
- \let\NAT@space\relax\r
- \def\NAT@super@kern{\kern\p@}%\r
- \else\r
- \let\NAT@mbox=\mbox\r
- \let\@cite\NAT@citenum\r
- \let\NAT@space\NAT@spacechar\r
- \let\NAT@super@kern\relax\r
- \fi\r
- \let\@citex\NAT@citexnum\r
- \let\@biblabel\NAT@biblabelnum\r
- \let\@bibsetup\NAT@bibsetnum\r
- \renewcommand\NAT@idxtxt{\NAT@name\NAT@spacechar\NAT@open\NAT@num\NAT@close}%\r
- \def\natexlab##1{}%\r
- \def\NAT@penalty{\penalty\@m}%\r
- \else\r
- \let\@cite\NAT@cite\r
- \let\@citex\NAT@citex\r
- \let\@biblabel\NAT@biblabel\r
- \let\@bibsetup\NAT@bibsetup\r
- \let\NAT@space\NAT@spacechar\r
- \let\NAT@penalty\@empty\r
- \renewcommand\NAT@idxtxt{\NAT@name\NAT@spacechar\NAT@open\NAT@date\NAT@close}%\r
- \def\natexlab##1{##1}%\r
- \fi}\r
-\AtBeginDocument{\NAT@set@cites}\r
-\AtBeginDocument{\ifx\SK@def\@undefined\else\r
-\ifx\SK@cite\@empty\else\r
- \SK@def\@citex[#1][#2]#3{\SK@\SK@@ref{#3}\SK@@citex[#1][#2]{#3}}\fi\r
-\ifx\SK@citeauthor\@undefined\def\HAR@checkdef{}\else\r
- \let\citeauthor\SK@citeauthor\r
- \let\citefullauthor\SK@citefullauthor\r
- \let\citeyear\SK@citeyear\fi\r
-\fi}\r
-\newif\ifNAT@full\NAT@fullfalse\r
-\newif\ifNAT@swa\r
-\DeclareRobustCommand\citet\r
- {\begingroup\NAT@swafalse\let\NAT@ctype\z@\NAT@partrue\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\newcommand\NAT@citetp{\@ifnextchar[{\NAT@@citetp}{\NAT@@citetp[]}}\r
-\newcommand\NAT@@citetp{}\r
-\def\NAT@@citetp[#1]{\@ifnextchar[{\@citex[#1]}{\@citex[][#1]}}\r
-\DeclareRobustCommand\citep\r
- {\begingroup\NAT@swatrue\let\NAT@ctype\z@\NAT@partrue\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\DeclareRobustCommand\cite\r
- {\begingroup\let\NAT@ctype\z@\NAT@partrue\NAT@swatrue\r
- \@ifstar{\NAT@fulltrue\NAT@cites}{\NAT@fullfalse\NAT@cites}}\r
-\newcommand\NAT@cites{\@ifnextchar [{\NAT@@citetp}{%\r
- \ifNAT@numbers\else\r
- \NAT@swafalse\r
- \fi\r
- \NAT@@citetp[]}}\r
-\DeclareRobustCommand\citealt\r
- {\begingroup\NAT@swafalse\let\NAT@ctype\z@\NAT@parfalse\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\DeclareRobustCommand\citealp\r
- {\begingroup\NAT@swatrue\let\NAT@ctype\z@\NAT@parfalse\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\DeclareRobustCommand\citenum\r
- {\begingroup\r
- \NAT@swatrue\let\NAT@ctype\z@\NAT@parfalse\let\textsuperscript\NAT@spacechar\r
- \NAT@citexnum[][]}\r
-\DeclareRobustCommand\citeauthor\r
- {\begingroup\NAT@swafalse\let\NAT@ctype\@ne\NAT@parfalse\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\DeclareRobustCommand\Citet\r
- {\begingroup\NAT@swafalse\let\NAT@ctype\z@\NAT@partrue\r
- \let\NAT@up\NAT@Up\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\DeclareRobustCommand\Citep\r
- {\begingroup\NAT@swatrue\let\NAT@ctype\z@\NAT@partrue\r
- \let\NAT@up\NAT@Up\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\DeclareRobustCommand\Citealt\r
- {\begingroup\NAT@swafalse\let\NAT@ctype\z@\NAT@parfalse\r
- \let\NAT@up\NAT@Up\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\DeclareRobustCommand\Citealp\r
- {\begingroup\NAT@swatrue\let\NAT@ctype\z@\NAT@parfalse\r
- \let\NAT@up\NAT@Up\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\DeclareRobustCommand\Citeauthor\r
- {\begingroup\NAT@swafalse\let\NAT@ctype\@ne\NAT@parfalse\r
- \let\NAT@up\NAT@Up\r
- \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}\r
-\DeclareRobustCommand\citeyear\r
- {\begingroup\NAT@swafalse\let\NAT@ctype\tw@\NAT@parfalse\NAT@citetp}\r
-\DeclareRobustCommand\citeyearpar\r
- {\begingroup\NAT@swatrue\let\NAT@ctype\tw@\NAT@partrue\NAT@citetp}\r
-\newcommand\citetext[1]{\NAT@open#1\NAT@close}\r
-\DeclareRobustCommand\citefullauthor\r
- {\citeauthor*}\r
-\newcommand\defcitealias[2]{%\r
- \@ifundefined{al@#1\@extra@b@citeb}{}\r
- {\PackageWarning{natbib}{Overwriting existing alias for citation #1}}\r
- \@namedef{al@#1\@extra@b@citeb}{#2}}\r
-\DeclareRobustCommand\citetalias{\begingroup\r
- \NAT@swafalse\let\NAT@ctype\thr@@\NAT@parfalse\NAT@citetp}\r
-\DeclareRobustCommand\citepalias{\begingroup\r
- \NAT@swatrue\let\NAT@ctype\thr@@\NAT@partrue\NAT@citetp}\r
-\renewcommand\nocite[1]{\@bsphack\r
- \@for\@citeb:=#1\do{%\r
- \@safe@activestrue\r
- \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%\r
- \@safe@activesfalse\r
- \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi\r
- \if*\@citeb\else\r
- \@ifundefined{b@\@citeb\@extra@b@citeb}{%\r
- \NAT@citeundefined \PackageWarning{natbib}%\r
- {Citation `\@citeb' undefined}}{}\fi}%\r
- \@esphack}\r
-\newcommand\NAT@parse[1]{%\r
- \begingroup\r
- \let\protect=\@unexpandable@protect\r
- \let~\relax\r
- \let\active@prefix=\@gobble\r
- \edef\NAT@temp{\csname b@#1\@extra@b@citeb\endcsname}%\r
- \aftergroup\NAT@split\r
- \expandafter\r
- \endgroup\r
- \NAT@temp{}{}{}{}{}@@%\r
- \expandafter\NAT@parse@date\NAT@date??????@@%\r
- \ifciteindex\NAT@index\fi\r
-}%\r
-\def\NAT@split#1#2#3#4#5@@{%\r
- \gdef\NAT@num{#1}\gdef\NAT@name{#3}\gdef\NAT@date{#2}%\r
- \gdef\NAT@all@names{#4}%\r
- \ifx\NAT@num\@empty\gdef\NAT@num{0}\fi\r
- \ifx\NAT@noname\NAT@all@names \gdef\NAT@all@names{#3}\fi\r
-}%\r
-\def\NAT@reset@parser{%\r
- \global\let\NAT@num\@empty\r
- \global\let\NAT@name\@empty\r
- \global\let\NAT@date\@empty\r
- \global\let\NAT@all@names\@empty\r
-}%\r
-\newcommand\NAT@parse@date{}\r
-\def\NAT@parse@date#1#2#3#4#5#6@@{%\r
- \ifnum\the\catcode`#1=11\def\NAT@year{}\def\NAT@exlab{#1}\else\r
- \ifnum\the\catcode`#2=11\def\NAT@year{#1}\def\NAT@exlab{#2}\else\r
- \ifnum\the\catcode`#3=11\def\NAT@year{#1#2}\def\NAT@exlab{#3}\else\r
- \ifnum\the\catcode`#4=11\def\NAT@year{#1#2#3}\def\NAT@exlab{#4}\else\r
- \def\NAT@year{#1#2#3#4}\def\NAT@exlab{{#5}}\fi\fi\fi\fi}\r
-\newcommand\NAT@index{}\r
-\let\NAT@makeindex=\makeindex\r
-\renewcommand\makeindex{\NAT@makeindex\r
- \renewcommand\NAT@index{\@bsphack\begingroup\r
- \def~{\string~}\@wrindex{\NAT@idxtxt}}}\r
-\newcommand\NAT@idxtxt{\NAT@name\NAT@spacechar\NAT@open\NAT@date\NAT@close}\r
-\@ifxundefined\@indexfile{}{\let\NAT@makeindex\relax\makeindex}\r
-\newif\ifciteindex \citeindexfalse\r
-\newcommand\citeindextype{default}\r
-\newcommand\NAT@index@alt{{\let\protect=\noexpand\let~\relax\r
- \xdef\NAT@temp{\NAT@idxtxt}}\expandafter\NAT@exp\NAT@temp\@nil}\r
-\newcommand\NAT@exp{}\r
-\def\NAT@exp#1\@nil{\index[\citeindextype]{#1}}\r
-\r
-\AtBeginDocument{%\r
-\@ifpackageloaded{index}{\let\NAT@index=\NAT@index@alt}{}}\r
-\newcommand\NAT@ifcmd{\futurelet\NAT@temp\NAT@ifxcmd}\r
-\newcommand\NAT@ifxcmd{\ifx\NAT@temp\relax\else\expandafter\NAT@bare\fi}\r
-\def\NAT@bare#1(#2)#3(@)#4\@nil#5{%\r
- \if @#2\r
- \expandafter\NAT@apalk#1, , \@nil{#5}%\r
- \else\r
- \NAT@wrout{\the\c@NAT@ctr}{#2}{#1}{#3}{#5}%\r
-\fi\r
-}\r
-\newcommand\NAT@wrout[5]{%\r
-\if@filesw\r
- {\let\protect\noexpand\let~\relax\r
- \immediate\r
- \write\@auxout{\string\bibcite{#5}{{#1}{#2}{{#3}}{{#4}}}}}\fi\r
-\ignorespaces}\r
-\def\NAT@noname{{}}\r
-\renewcommand\bibitem{\@ifnextchar[{\@lbibitem}{\@lbibitem[]}}%\r
-\let\NAT@bibitem@first@sw\@secondoftwo\r
-\def\@lbibitem[#1]#2{%\r
- \if\relax\@extra@b@citeb\relax\else\r
- \@ifundefined{br@#2\@extra@b@citeb}{}{%\r
- \@namedef{br@#2}{\@nameuse{br@#2\@extra@b@citeb}}%\r
- }%\r
- \fi\r
- \@ifundefined{b@#2\@extra@b@citeb}{%\r
- \def\NAT@num{}%\r
- }{%\r
- \NAT@parse{#2}%\r
- }%\r
- \def\NAT@tmp{#1}%\r
- \expandafter\let\expandafter\bibitemOpen\csname NAT@b@open@#2\endcsname\r
- \expandafter\let\expandafter\bibitemShut\csname NAT@b@shut@#2\endcsname\r
- \@ifnum{\NAT@merge>\@ne}{%\r
- \NAT@bibitem@first@sw{%\r
- \@firstoftwo\r
- }{%\r
- \@ifundefined{NAT@b*@#2}{%\r
- \@firstoftwo\r
- }{%\r
- \expandafter\def\expandafter\NAT@num\expandafter{\the\c@NAT@ctr}%\r
- \@secondoftwo\r
- }%\r
- }%\r
- }{%\r
- \@firstoftwo\r
- }%\r
- {%\r
- \global\advance\c@NAT@ctr\@ne\r
- \@ifx{\NAT@tmp\@empty}{\@firstoftwo}{%\r
- \@secondoftwo\r
- }%\r
- {%\r
- \expandafter\def\expandafter\NAT@num\expandafter{\the\c@NAT@ctr}%\r
- \global\NAT@stdbsttrue\r
- }{}%\r
- \bibitem@fin\r
- \item[\hfil\NAT@anchor{#2}{\NAT@num}]%\r
- \global\let\NAT@bibitem@first@sw\@secondoftwo\r
- \NAT@bibitem@init\r
- }%\r
- {%\r
- \NAT@anchor{#2}{}%\r
- \NAT@bibitem@cont\r
- \bibitem@fin\r
- }%\r
- \@ifx{\NAT@tmp\@empty}{%\r
- \NAT@wrout{\the\c@NAT@ctr}{}{}{}{#2}%\r
- }{%\r
- \expandafter\NAT@ifcmd\NAT@tmp(@)(@)\@nil{#2}%\r
- }%\r
-}%\r
-\def\bibitem@fin{%\r
- \@ifxundefined\@bibstop{}{\csname bibitem@\@bibstop\endcsname}%\r
-}%\r
-\def\NAT@bibitem@init{%\r
- \let\@bibstop\@undefined\r
-}%\r
-\def\NAT@bibitem@cont{%\r
- \let\bibitem@Stop\bibitemContinue\r
- \let\bibitem@NoStop\bibitemContinue\r
-}%\r
-\def\BibitemOpen{%\r
- \bibitemOpen\r
-}%\r
-\def\BibitemShut#1{%\r
- \def\@bibstop{#1}%\r
- \let\bibitem@Stop\bibitemStop\r
- \let\bibitem@NoStop\bibitemNoStop\r
- \@ifx{\bibitemShut\relax}{\let\@bibitemShut\@empty}{%\r
- \expandafter\def\expandafter\@bibitemShut\expandafter{\bibitemShut}%\r
- }%\r
-}%\r
-\def\@bibitemShut{}%\r
-\def\bibitemStop{\@bibitemShut}%\r
-\def\bibitemNoStop{%\r
- \@ifx{\@empty\@bibitemShut}{.\spacefactor\@mmm\space}{\@bibitemShut}%\r
-}%\r
-\def\bibitemContinue{%\r
- \@ifx{\@empty\@bibitemShut}{;\spacefactor\@mmm\space}{\@bibitemShut}%\r
-}%\r
-\mathchardef\@mmm=3000 %\r
-\let\bibitemOpen\relax\r
-\let\bibitemShut\relax\r
-\@ifnum{\NAT@merge>\@ne}{%\r
-\providecommand{\bibAnnote}[3]{%\r
- \BibitemShut{#1}%\r
- \def\@tempa{#3}\@ifx{\@tempa\@empty}{}{%\r
- \begin{quotation}\noindent\r
- \textsc{Key:}\ #2\\\textsc{Annotation:}\ \@tempa\r
- \end{quotation}%\r
- }%\r
- \ignorespaces\r
-}%\r
-\providecommand{\bibAnnoteFile}[2]{%\r
- \IfFileExists{#2}{%\r
- \bibAnnote{#1}{#2}{\input{#2}}%\r
- }{%\r
- \bibAnnote{#1}{#2}{}%\r
- }%\r
-}%\r
-}{}%\r
-\def\bibfield{\@ifnum{\NAT@merge>\tw@}{\@bibfield}{\@secondoftwo}}%\r
-\def\@bibfield#1#2{%\r
- \begingroup\r
- \let\Doi\@gobble\r
- \let\bibinfo\relax\r
- \let\restore@protect\@empty\r
- \protected@edef\@tempa{#2}%\r
- \aftergroup\def\aftergroup\@tempa\r
- \expandafter\endgroup\expandafter{\@tempa}%\r
- \expandafter\@ifx\expandafter{\csname @bib#1\endcsname\@tempa}{%\r
- \expandafter\let\expandafter\@tempa\csname @bib@X#1\endcsname\r
- }{%\r
- \expandafter\let\csname @bib#1\endcsname\@tempa\r
- \expandafter\let\expandafter\@tempa\csname @bib@Y#1\endcsname\r
- }%\r
- \@ifx{\@tempa\relax}{\let\@tempa\@firstofone}{}%\r
- \@tempa{#2}%\r
-}%\r
-\def\bibinfo#1{%\r
- \expandafter\let\expandafter\@tempa\csname bibinfo@X@#1\endcsname\r
- \@ifx{\@tempa\relax}{\@firstofone}{\@tempa}%\r
-}%\r
-\def\@bib@Xauthor#1{\let\@bib@Xjournal\@gobble}%\r
-\def\@bib@Xjournal#1{\begingroup\let\bibinfo@X@journal\@bib@Z@journal#1\endgroup}%\r
-\def\@bibibid@#1{\textit{ibid}.}%\r
-\appdef\NAT@bibitem@init{%\r
- \let\@bibauthor \@empty\r
- \let\@bibjournal \@empty\r
- \let\@bib@Z@journal\@bibibid@\r
-}%\r
-\ifx\SK@lbibitem\@undefined\else\r
- \let\SK@lbibitem\@lbibitem\r
- \def\@lbibitem[#1]#2{%\r
- \SK@lbibitem[#1]{#2}\SK@\SK@@label{#2}\ignorespaces}\fi\r
-\newif\ifNAT@stdbst \NAT@stdbstfalse\r
-\r
-\AtEndDocument{%\r
- \ifNAT@stdbst\if@filesw\r
- \immediate\write\@auxout{%\r
- \string\providecommand\string\NAT@force@numbers{}%\r
- \string\NAT@force@numbers\r
- }%\r
- \fi\fi\r
- }\r
-\newcommand\NAT@force@numbers{%\r
- \ifNAT@numbers\else\r
- \PackageError{natbib}{Bibliography not compatible with author-year\r
- citations.\MessageBreak\r
- Press <return> to continue in numerical citation style}\r
- {Check the bibliography entries for non-compliant syntax,\MessageBreak\r
- or select author-year BibTeX style, e.g. plainnat}%\r
- \global\NAT@numberstrue\fi}\r
-\r
-\providecommand\bibcite{}\r
-\renewcommand\bibcite[2]{%\r
- \@ifundefined{b@#1\@extra@binfo}{\relax}{%\r
- \NAT@citemultiple\r
- \PackageWarningNoLine{natbib}{Citation `#1' multiply defined}%\r
- }%\r
- \global\@namedef{b@#1\@extra@binfo}{#2}%\r
-}%\r
-\AtEndDocument{\NAT@swatrue\let\bibcite\NAT@testdef}\r
-\newcommand\NAT@testdef[2]{%\r
- \def\NAT@temp{#2}%\r
- \expandafter \ifx \csname b@#1\@extra@binfo\endcsname\NAT@temp\r
- \else\r
- \ifNAT@swa \NAT@swafalse\r
- \PackageWarningNoLine{natbib}{%\r
- Citation(s) may have changed.\MessageBreak\r
- Rerun to get citations correct%\r
- }%\r
- \fi\r
- \fi\r
-}%\r
-\newcommand\NAT@apalk{}\r
-\def\NAT@apalk#1, #2, #3\@nil#4{%\r
- \if\relax#2\relax\r
- \global\NAT@stdbsttrue\r
- \NAT@wrout{#1}{}{}{}{#4}%\r
- \else\r
- \NAT@wrout{\the\c@NAT@ctr}{#2}{#1}{}{#4}%\r
- \fi\r
-}%\r
-\newcommand\citeauthoryear{}\r
-\def\citeauthoryear#1#2#3(@)(@)\@nil#4{%\r
- \if\relax#3\relax\r
- \NAT@wrout{\the\c@NAT@ctr}{#2}{#1}{}{#4}%\r
- \else\r
- \NAT@wrout{\the\c@NAT@ctr}{#3}{#2}{#1}{#4}%\r
- \fi\r
-}%\r
-\newcommand\citestarts{\NAT@open}%\r
-\newcommand\citeends{\NAT@close}%\r
-\newcommand\betweenauthors{and}%\r
-\newcommand\astroncite{}\r
-\def\astroncite#1#2(@)(@)\@nil#3{%\r
- \NAT@wrout{\the\c@NAT@ctr}{#2}{#1}{}{#3}%\r
-}%\r
-\newcommand\citename{}\r
-\def\citename#1#2(@)(@)\@nil#3{\expandafter\NAT@apalk#1#2, \@nil{#3}}\r
-\newcommand\harvarditem[4][]{%\r
- \if\relax#1\relax\r
- \bibitem[#2(#3)]{#4}%\r
- \else\r
- \bibitem[#1(#3)#2]{#4}%\r
- \fi\r
-}%\r
-\newcommand\harvardleft{\NAT@open}\r
-\newcommand\harvardright{\NAT@close}\r
-\newcommand\harvardyearleft{\NAT@open}\r
-\newcommand\harvardyearright{\NAT@close}\r
-\AtBeginDocument{\providecommand{\harvardand}{and}}\r
-\newcommand\harvardurl[1]{\textbf{URL:} \textit{#1}}\r
-\providecommand\bibsection{}\r
-\@ifundefined{chapter}{%\r
- \renewcommand\bibsection{%\r
- \section*{\refname\@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}}%\r
- }%\r
-}{%\r
- \@ifxundefined\NAT@sectionbib{%\r
- \renewcommand\bibsection{%\r
- \chapter*{\bibname\@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}%\r
- }%\r
- }{%\r
- \renewcommand\bibsection{%\r
- \section*{\bibname\ifx\@mkboth\@gobbletwo\else\markright{\MakeUppercase{\bibname}}\fi}%\r
- }%\r
- }%\r
-}%\r
-\@ifclassloaded{amsart}{\renewcommand\bibsection{\section*{\refname}}}{}%\r
-\@ifclassloaded{amsbook}{\renewcommand\bibsection{\chapter*{\bibname}}}{}%\r
-\@ifxundefined\bib@heading{}{\let\bibsection\bib@heading}%\r
-\newcounter{NAT@ctr}\r
-\renewenvironment{thebibliography}[1]{%\r
- \bibsection\r
- \parindent\z@\r
- \bibpreamble\r
- \bibfont\r
- \list{\@biblabel{\the\c@NAT@ctr}}{\@bibsetup{#1}\global\c@NAT@ctr\z@}%\r
- \ifNAT@openbib\r
- \renewcommand\newblock{\par}%\r
- \else\r
- \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%\r
- \fi\r
- \sloppy\clubpenalty4000\widowpenalty4000\r
- \sfcode`\.\@m\r
- \let\NAT@bibitem@first@sw\@firstoftwo\r
- \let\citeN\cite \let\shortcite\cite\r
- \let\citeasnoun\cite\r
-}{%\r
- \bibitem@fin\r
- \bibpostamble\r
- \def\@noitemerr{%\r
- \PackageWarning{natbib}{Empty `thebibliography' environment}%\r
- }%\r
- \endlist\r
- \bibcleanup\r
-}%\r
-\let\bibfont\@empty\r
-\let\bibpreamble\@empty\r
-\let\bibpostamble\@empty\r
-\def\bibcleanup{\vskip-\lastskip}%\r
-\providecommand\reset@font{\relax}\r
-\providecommand\bibname{Bibliography}\r
-\providecommand\refname{References}\r
-\newcommand\NAT@citeundefined{\gdef \NAT@undefined {%\r
- \PackageWarningNoLine{natbib}{There were undefined citations}}}\r
-\let \NAT@undefined \relax\r
-\newcommand\NAT@citemultiple{\gdef \NAT@multiple {%\r
- \PackageWarningNoLine{natbib}{There were multiply defined citations}}}\r
-\let \NAT@multiple \relax\r
-\AtEndDocument{\NAT@undefined\NAT@multiple}\r
-\providecommand\@mkboth[2]{}\r
-\providecommand\MakeUppercase{\uppercase}\r
-\providecommand{\@extra@b@citeb}{}\r
-\gdef\@extra@binfo{}\r
-\def\NAT@anchor#1#2{%\r
- \hyper@natanchorstart{#1\@extra@b@citeb}%\r
- \def\@tempa{#2}\@ifx{\@tempa\@empty}{}{\@biblabel{#2}}%\r
- \hyper@natanchorend\r
-}%\r
-\providecommand\hyper@natanchorstart[1]{}%\r
-\providecommand\hyper@natanchorend{}%\r
-\providecommand\hyper@natlinkstart[1]{}%\r
-\providecommand\hyper@natlinkend{}%\r
-\providecommand\hyper@natlinkbreak[2]{#1}%\r
-\AtBeginDocument{%\r
- \@ifpackageloaded{babel}{%\r
- \let\org@@citex\@citex}{}}\r
-\providecommand\@safe@activestrue{}%\r
-\providecommand\@safe@activesfalse{}%\r
-\r
-\newcommand\NAT@sort@cites[1]{%\r
- \let\NAT@cite@list\@empty\r
- \@for\@citeb:=#1\do{\expandafter\NAT@star@cite\@citeb\@@}%\r
- \if@filesw\r
- \expandafter\immediate\expandafter\write\expandafter\@auxout\r
- \expandafter{\expandafter\string\expandafter\citation\expandafter{\NAT@cite@list}}%\r
- \fi\r
- \@ifnum{\NAT@sort>\z@}{%\r
- \expandafter\NAT@sort@cites@\expandafter{\NAT@cite@list}%\r
- }{}%\r
-}%\r
-\def\NAT@star@cite{%\r
- \let\NAT@star@sw\@secondoftwo\r
- \@ifnum{\NAT@merge>\z@}{%\r
- \@ifnextchar*{%\r
- \let\NAT@star@sw\@firstoftwo\r
- \NAT@star@cite@star\r
- }{%\r
- \NAT@star@cite@nostar\r
- }%\r
- }{%\r
- \NAT@star@cite@noextension\r
- }%\r
-}%\r
-\def\NAT@star@cite@star*{%\r
- \NAT@star@cite@nostar\r
-}%\r
-\def\NAT@star@cite@nostar{%\r
- \let\nat@keyopt@open\@empty\r
- \let\nat@keyopt@shut\@empty\r
- \@ifnextchar[{\NAT@star@cite@pre}{\NAT@star@cite@pre[]}%\r
-}%\r
-\def\NAT@star@cite@pre[#1]{%\r
- \def\nat@keyopt@open{#1}%\r
- \@ifnextchar[{\NAT@star@cite@post}{\NAT@star@cite@post[]}%\r
-}%\r
-\def\NAT@star@cite@post[#1]#2\@@{%\r
- \def\nat@keyopt@shut{#1}%\r
- \NAT@star@sw{\expandafter\global\expandafter\let\csname NAT@b*@#2\endcsname\@empty}{}%\r
- \NAT@cite@list@append{#2}%\r
-}%\r
-\def\NAT@star@cite@noextension#1\@@{%\r
- \let\nat@keyopt@open\@empty\r
- \let\nat@keyopt@shut\@empty\r
- \NAT@cite@list@append{#1}%\r
-}%\r
-\def\NAT@cite@list@append#1{%\r
- \edef\@citeb{\@firstofone#1\@empty}%\r
- \if@filesw\@ifxundefined\@cprwrite{}{\expandafter\@cprwrite\@citeb=}\fi\r
- \if\relax\nat@keyopt@open\relax\else\r
- \global\expandafter\let\csname NAT@b@open@\@citeb\endcsname\nat@keyopt@open\r
- \fi\r
- \if\relax\nat@keyopt@shut\relax\else\r
- \global\expandafter\let\csname NAT@b@shut@\@citeb\endcsname\nat@keyopt@shut\r
- \fi\r
- \toks@\expandafter{\NAT@cite@list}%\r
- \ifx\NAT@cite@list\@empty\r
- \@temptokena\expandafter{\@citeb}%\r
- \else\r
- \@temptokena\expandafter{\expandafter,\@citeb}%\r
- \fi\r
- \edef\NAT@cite@list{\the\toks@\the\@temptokena}%\r
-}%\r
-\newcommand\NAT@sort@cites@[1]{%\r
- \count@\z@\r
- \@tempcntb\m@ne\r
- \let\@celt\delimiter\r
- \def\NAT@num@list{}%\r
- \let\NAT@cite@list\@empty\r
- \let\NAT@nonsort@list\@empty\r
- \@for \@citeb:=#1\do{\NAT@make@cite@list}%\r
- \ifx\NAT@nonsort@list\@empty\else\r
- \protected@edef\NAT@cite@list{\NAT@cite@list\NAT@nonsort@list}%\r
- \fi\r
- \ifx\NAT@cite@list\@empty\else\r
- \protected@edef\NAT@cite@list{\expandafter\NAT@xcom\NAT@cite@list @@}%\r
- \fi\r
-}%\r
-\def\NAT@make@cite@list{%\r
- \advance\count@\@ne\r
- \@safe@activestrue\r
- \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%\r
- \@safe@activesfalse\r
- \@ifundefined{b@\@citeb\@extra@b@citeb}%\r
- {\def\NAT@num{A}}%\r
- {\NAT@parse{\@citeb}}%\r
- \NAT@ifcat@num\NAT@num\r
- {\@tempcnta\NAT@num \relax\r
- \@ifnum{\@tempcnta<\@tempcntb}{%\r
- \let\NAT@@cite@list=\NAT@cite@list\r
- \let\NAT@cite@list\@empty\r
- \begingroup\let\@celt=\NAT@celt\NAT@num@list\endgroup\r
- \protected@edef\NAT@num@list{%\r
- \expandafter\NAT@num@celt \NAT@num@list \@gobble @%\r
- }%\r
- }{%\r
- \protected@edef\NAT@num@list{\NAT@num@list \@celt{\NAT@num}}%\r
- \protected@edef\NAT@cite@list{\NAT@cite@list\@citeb,}%\r
- \@tempcntb\@tempcnta\r
- }%\r
- }%\r
- {\protected@edef\NAT@nonsort@list{\NAT@nonsort@list\@citeb,}}%\r
-}%\r
-\def\NAT@celt#1{%\r
- \@ifnum{#1>\@tempcnta}{%\r
- \xdef\NAT@cite@list{\NAT@cite@list\@citeb,\NAT@@cite@list}%\r
- \let\@celt\@gobble\r
- }{%\r
- \expandafter\def@NAT@cite@lists\NAT@@cite@list\@@\r
- }%\r
-}%\r
-\def\NAT@num@celt#1#2{%\r
- \ifx#1\@celt\r
- \@ifnum{#2>\@tempcnta}{%\r
- \@celt{\number\@tempcnta}%\r
- \@celt{#2}%\r
- }{%\r
- \@celt{#2}%\r
- \expandafter\NAT@num@celt\r
- }%\r
- \fi\r
-}%\r
-\def\def@NAT@cite@lists#1,#2\@@{%\r
- \xdef\NAT@cite@list{\NAT@cite@list#1,}%\r
- \xdef\NAT@@cite@list{#2}%\r
-}%\r
-\def\NAT@nextc#1,#2@@{#1,}\r
-\def\NAT@restc#1,#2{#2}\r
-\def\NAT@xcom#1,@@{#1}\r
-\InputIfFileExists{natbib.cfg}\r
- {\typeout{Local config file natbib.cfg used}}{}\r
-%% \r
-%% <<<<< End of generated file <<<<<<\r
-%%\r
-%% End of file `natbib.sty'.\r
+++ /dev/null
-- more examples
-
-- root position always has nonzero explicit submatch index
-
-- double explicit submatch group that maps to the same implicit submatch group: ((...)) is collapsed in mark() and enum ()
-
-- This is what I had to do in GOR correcness proof anyway --- first get rid of epsilon-loops (aka "problematic" paths),
- then prove right distributivity of comparison over concatenation for the rest. In the presence of epsilon-loops
- right distributivity doesn't hold --- I can give an example when a < b, but ac > bc (but then neither ac, nor bc
- correspond to the minimal path, so wrong comparison results for a and b does not cause any trouble). (We shall
- say it in the paper and mention the example, I think.
-
-- The definition of lastht() and first() mentions the case in which the argument begins with a letter.
- However, they seems to be applied only to frames (that do not contain letters). Are there cases in
- which they are applied to something other than frames?
-
-- P.S. I am still a bit uncertain about the usefulness of the subdivision in frames of PEs. Its usefulness is
- obvious in the case of Okui's PAT because them have sequences of parentheses on the arcs, corresponding
- to frames (and have no closure to be done). But in our case we have GOR1 that compares fragments
- of PEs that are not frames, and still uses a notion of rho that is somehow different.
- So, my question is how will we make use of frames in our context?
-
-- I was thinking how to demonstrate Theorem 1. This is an attempt to do it.
- Taken two distinct trees s and t, since the norms are defined over Pos(s) union Pos(t),
- then it is either s < t or t < s (i.e. the ordering is total). Suppose WLOG it is s < t. Then, there is a position p
- for which ||s||_p > ||t||_p and all preceding positions have equal norms. Clearly, it cannot also be t < s.
-
-- here are some examples to show why we define the norm as we do in Definition 4, and the rho and
- subsetting as we do in Definitions 7-10.
- (a|ε)* string a
- s: T^1(T^2(a^0))
- t: T^1(T^2(a^0,ε^0))
- s < t because the norm for position 1.2 is infinite since it is missing
- it shows subsetting: the first tree has one branch less
- (a|aa)* string aa
- s: T^1(T^2(T^3(a^0,a^0)))
- t: T^1(T^2(T^3(a^0),T^4(a^ 0)))
- s < t because the norm at position 1 is 2 > that of the other, which is 1
- it shows the first tree has the branch for the second a further away from the
- root than the second (bigger rho)
- a|a string a
- s: T^1(a^0,Φ^0)
- t: T^1(Φ^0,a^0)
- s < t because the norm at position 1 is > of the other which is -1 (missing alternative)
- it shows subsetting: the second tree has one null branch where the first has a
- non-null one
-
-- Lemma 5. I think that it could be useful to add a couple of lines to explain it, otherwise the reader would not
- understand its usefulness. Basically, it says that there isa RE e, a string w, and two trees for it, s and t,
- which are identical up to a position p. Then it sais, that in such a case there is another RE (r~) and another
- string (w~) and that the subtrees of t and s at position p belong to the trees of this new RE and string.
-
-- again on Lemma 5: last line, I suggest to add: Then r~ can be defined as follows: if r'= r1|r2 ...
-
-- The question is that Okui defined the ordering on trees that are a bit different from ours (and
- that were similar to our PTs rather than to IPTs). Perhaps we should tell how his trees correspond to ours?
-
-- Lemma 1, last line. Before "If r' ..." I would suggest to add: "Then r~ can be defined as follows."
-
-- Theorem 2: I think that is proof is just above it. Perhaps we should move it below.
-
-- in Figure 3. closure() is missing
-
-- > Hmm... I think that would be hard, and also needless effort.
- I was trying to prevent a question from some reviewer. Well, we could tell that we deliver an unspecified one that provides the correct submatches.
-
-- > You mean, mentioning that the user can specify the set of the implicit
- > submatch indices using a different mechanism than parentheses?
- Yes, this is what tagged automata are all about: letting the user specify the parts for which the submatch has to
- be delivered. What I mean is that our algorithm can do it, and this is more general than Posix subexpressions.
- Indeed, it can go from full-parsing to any user-defined submatch extraction.
-
-- Definition 17: F is used both to denote the set of final states and the function defined in Figure 2.
- Perhaps it could be better to use two letters?
-
-- Figure 2,
- - first graph: in it F(i,j,r) is defined for i != 0. However, an F with a first argument that is not zero is
- never used. Perhaps there is a need to give some explanation
- - graph for alternative: why the tags are defined only in the incoming arc of the second term, and the ougoing of the first?
-
-- in Figure 3:
- - in match(), closure is called with a first argument that should
-be the set containing the initial
- configuration, that in the call is a 4-tuple. However, closure
-expects configurations as 2-ples.
- - in the first configuration there is a t_0 that is not defined
- - reach() is called with three arguments, while in its definition
-it has two. I think that its signature
- should be reach(X,Delta,alpha).
- Configurations are 4-ples: (origin-state, target-state,
-input-symbol, tag), correct? The origin-state
- is there for precedence(), and was the 'origin' in the pseudocode.
-
-- in Figure 4, closure_goldberg_radzik should be closure, and it
-should handle 4-ples configurations.
-Figure 4:
-
- - relax. At the beginning all the values of result() are _|_, thus
-relax() should take care of it.
- I suggest to replace the first two lines with:
-
- if relax = _|_ or precedence(x,result(q),B,D then
-
- - closure_goldberg_radzik, 2nd and 3rd lines: here result and status
-are initialized for all the states.
- To prevent some reviewer to point out that "q" is not defined, I
-suggest to enclose the two
- statements in a foreach q in Q
- - same, line 14: here scan() is called, which in turn calls relax(),
-which accesses "status". Thus,
- "status" should be passed as argument to both
-
- - relax: its signature has B and D as last 5th and 6th arguments, but
-they are never passed when called.
- They should be passed all along closure_goldberg_radzik and scan.
-
- Comparing it with calc_rho_prec() in the pseudocode:
- - the first two "if" statements can be merged
- - the statement: h_1 = h_2 = height(...) can only be executed if k >
-1 (otherwise it accesses a_0 ...)
- - the statement: "if a_k > b_k then l = -1" and the following, are
-different from the ones in the
- pseudocode (if nonnegative (a[i]) return LT, etc.)
- Comparing it with update_rho in the pseudocode:
- - the pseudocode initializes h_1 and h_2 with the values read from
-B, while here it does so when
- k > 1, which is never the case when q_1 != q_2
-
-
-- the statement: "if a_k > b_k then l = -1" and the following, are
- different from the ones in the pseudocode (if nonnegative (a[i]) return LT, etc.)
-
-
-- DFS optimization of GOR1 when the closure forms a tree.
-
-- GOR performance depends on the left-bias or right-bias of bounded repetition: R{0, m} => R{1} | R{2} | ... | R{m} | R{0}
-
-
-
-- CORRECTNESS OF THE IN-DEGREE OPTIMIZATION:
-
-The fact that the node X has in-degree 1 means that it is not a join point.
-Therefore, if we have two different paths to X (old and new), these paths must
-share a common last arc X_1->X (the single incoming arc in the node X).
-Therefore, if we remove the last arc, we again get a pair of ambiguous paths
-that must have been considered on some previous step. Now we can inductively
-strip the common arcs X_{i-1}->X_i until we are left with two ambiguous paths
-that meet at a join point J:
-
-Y---.
- \
- J--->X_n-- ... -->X_1--->X
- /
-Z---'
-
-Now we can argue that because of the prefix-based property,
-Y->J < Z->J <==> Y->J->X < Z->J->X,
-and therefore if at J-node we found the new path Y->J to be shorter than
-the old path Z->J, then can blindly extend Y->J to all nodes X_n ... X_1
-and finally X.
-
-- INDEG OPTIMIZATION FAILS ON SPRAND Rand-len 4 family (gor1a.c).
-- GOR1 MAKES LINEAR NUMBER OF STEPS EVEN IN THE LONG CASE... RIGHT? RIGHT. 2x the number in the short case, but the sum of compared path lengths is much greater.
-- GLOBAL-TOPSORT IN PRINCIPLE MAKES ~2.5x more steps than GOR1.
-- WHY DOES GOR CONSTRUCT LONGER PATHS THAN OTHER ALGS? 0x3fffFFFF
-
-- Note: shortest paths *never* contain loops, not just in our case.
- We can't remove backedges, as they might be the only way to some of the core states reachable by closure.
- If we don't remove backedges, we can potentially cancel looping paths, but that would be too late:
- we would have already explored that path (and all the paths from the backedge).
-
-
-
-- Remember to put a note about predecessor chains. Example (a?a?)*.
-
-
-
-- Angelo: height() is defined on PE, but later used on t-strings in precedence().
-
-- Angelo: I was suggesting to write ak ≡ 0 mod 2 instead of ak mod 2 ≡ 0.
-
-- Angelo: a question on precedence(): it tests if ak mod 2 (or bk) is zero. This should mean that it
-is a closing tag. However, it could be a negative tag, in which case it is both opening and closing.
-P.S. I think that the math formula should be ak ≡ 0 mod 2 meaning that ak and 0 are congruent
-modulo 2. ----- Me: Hmm, looks like for the sake of this comparison the nil-parenthesis
-(negative tag) should behave like opening. That's what we do in TNFA:
-the opening negative tag stands to represent itself, the corresponding
-closing negative tags and all nested negative tags.
-
-
-- Angelo: Referring to step(), line 5: here we record the tag histories. I remember that in the old code
-we handled the case of negative tags recording -1 as their history. I guess that this should
-be done also now. Correct?
-
-
-- Compare with RE2 (in the sense that it cannot do POSIX)
-
-
-
-
---------------------------
-
-- Cox, storing offsets in configurations: inconvenient because cannot use stack update/restore order due to SSSP,
- and therefore requires a lot of copying.
-
-- Trie is not described in Okui or Kuklewicz, and it is not widely known
+++ /dev/null
-%
-% THIS IS AN ALPHA VERSION!!!
-%
-% USE AT YOUR OWN RISK
-%
-% This should work for articles...I don't know if it works well for
-% books, etc (give it a try and see!).
-%
-% PLEASE COMPARE RESULTS WITH THE INSTRUCTIONS FOR AUTHORS FOR THE
-% JOURNAL YOU ARE SUBMITTING FOR...I CANNOT ACCEPT RESPONSIBILITY
-% FOR REJECTED MANUSCRIPTS (but I will try to fix it if you point out
-% a bug)
-%
-% AMA Manual of Style (JAMA, Cancer, many others..)
-% -Up to 6 authors, otherwise 3 authors et al.
-% -Title in italics
-% -numeric labels
-% -order-of-reference.
-%
-% Author L, Author S, Author D, et al. Title. Journal.
-% YYYY;VOL(NUM):PPP-PPP.
-%
-%
-% History
-% 9/30/85 (HWT) IEETR Original version, by Howard Trickey.
-% 1/29/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
-% 3/27/02 IEETR style used as framework. Formats heavily changed by
-% Eric Kort (eric.kort@vai.org)
-%
-% THIS VERSION DOES NOT WORK WITH BIBTEX 0.98i.
-%
-
-ENTRY
- { address
- author
- booktitle
- chapter
- edition
- editor
- howpublished
- institution
- journal
- key
- month
- note
- number
- organization
- pages
- publisher
- school
- series
- title
- type
- volume
- year
- }
- {}
- { label }
-
-INTEGERS { output.state before.all mid.sentence after.quote after.sentence
- after.quoted.block after.block }
-
-FUNCTION {init.state.consts}
-{ #0 'before.all :=
- #1 'mid.sentence :=
- #2 'after.quote :=
- #3 'after.sentence :=
- #4 'after.quoted.block :=
- #5 'after.block :=
-}
-
-STRINGS { s t }
-
-FUNCTION {output.nonnull}
-{ 's :=
- output.state mid.sentence =
- { "" * write$ }
- { output.state after.quote =
- { " " * write$ }
- { output.state after.block =
- { add.period$ write$
- newline$
- "\newblock " write$
- }
- { output.state before.all =
- 'write$
- { output.state after.quoted.block =
- { write$
- newline$
- "\newblock " write$
- }
- { add.period$ " " * write$ }
- if$
- }
- if$
- }
- if$
- }
- if$
- mid.sentence 'output.state :=
- }
- if$
- s
-}
-
-FUNCTION {output}
-{ duplicate$ empty$
- 'pop$
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.check}
-{ 't :=
- duplicate$ empty$
- { pop$ "empty " t * " in " * cite$ * warning$ }
- 'output.nonnull
- if$
-}
-
-FUNCTION {output.bibitem}
-{ newline$
- "\bibitem{" write$
- cite$ write$
- "}" write$
- newline$
- ""
- before.all 'output.state :=
-}
-
-FUNCTION {blank.sep}
-{ after.quote 'output.state :=
-}
-
-FUNCTION {fin.entry}
-{ output.state after.quoted.block =
- 'skip$
- 'add.period$
- if$
- write$
- newline$
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { output.state after.quote =
- { after.quoted.block 'output.state := }
- { after.block 'output.state := }
- if$
- }
- if$
-}
-
-FUNCTION {new.sentence}
-{ output.state after.block =
- 'skip$
- { output.state before.all =
- 'skip$
- { after.sentence 'output.state := }
- if$
- }
- if$
-}
-
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
-
-FUNCTION {new.block.checka}
-{ empty$
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {new.block.checkb}
-{ empty$
- swap$ empty$
- and
- 'skip$
- 'new.block
- if$
-}
-
-FUNCTION {new.sentence.checka}
-{ empty$
- 'skip$
- 'new.sentence
- if$
-}
-
-FUNCTION {field.or.null}
-{ duplicate$ empty$
- { pop$ "" }
- 'skip$
- if$
-}
-
-FUNCTION {emphasize}
-{ duplicate$ empty$
- { pop$ "" }
- { "{\it " swap$ * "}" * }
- if$
-}
-
-INTEGERS { nameptr namesleft numnames etal}
-
-FUNCTION {format.names}
-{ 's := % push the name s, pop s and author (already on stack), assign author to s
- #1 'nameptr :=
- #0 'etal :=
-
- s num.names$ 'numnames :=
-
- numnames #6 >
- {#3 'numnames :=
- #1 'etal :=
- }
- {}
- %end if
- if$
-
- numnames 'namesleft :=
- { namesleft #0 > }
-
- {s nameptr "{ll~}{ff}" format.name$ 't :=
- namesleft #1 >
- {t * ", " * }
- {t}
- %end if
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-
- etal
- {", et al. "}
- {". "}
- if$
- *
-}
-
-FUNCTION {format.editors.names}
-{ 's := % push the name s, pop s and author (already on stack), assign author to s
- #1 'nameptr :=
- #0 'etal :=
-
- s num.names$ 'numnames :=
-
- numnames #6 >
- {#3 'numnames :=
- #1 'etal :=
- }
- {}
- %end if
- if$
-
- numnames 'namesleft :=
- { namesleft #0 > }
-
- {s nameptr "{ll~}{ff}" format.name$ 't :=
- namesleft #1 >
- {t * ", " * }
- {t}
- %end if
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
-
- etal
- {", et al. "}
- {""}
- if$
- *
-}
-
-FUNCTION {format.authors}
-{ author empty$
- { "" }
- { author format.names }
- if$
-}
-
-FUNCTION {format.editors}
-{ editor empty$
- { "" }
- { editor format.editors.names
- editor num.names$ #1 >
- { ", eds." * }
- { ", ed." * }
- if$
- }
- if$
-}
-
-FUNCTION {format.title}
-{ title empty$
- { "" }
- { title ". " *}% modified by SPi-Global on 12Jun2017
- if$
-}
-
-FUNCTION {format.journal}
-{ journal empty$
- { "" }
- { journal ". " *}
- if$
-}
-
-FUNCTION {format.title.p}
-{ title empty$
- { "" }
- { title " " *}
- if$
-}
-
-FUNCTION {n.dashify}
-{ 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }
- { { t #1 #1 substring$ "-" = }
- { "-" *
- t #2 global.max$ substring$ 't :=
- }
- while$
- }
- if$
- }
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
- }
- if$
- }
- while$
-}
-
-FUNCTION {format.date}
-{ year empty$
- { "" }
- { "" * year }
- if$
-}
-
-FUNCTION {inproformat.date}
-{ year empty$
- { "" }
- { "; " * year }
- if$
-}
-
-FUNCTION {format.btitle}
-%%{ title emphasize
-{ title % modified by SPi-Global on 12Jun2017
-}
-
-FUNCTION {tie.or.space.connect}
-{ duplicate$ text.length$ #3 <
- { "~" }
- { " " }
- if$
- swap$ * *
-}
-
-FUNCTION {either.or.check}
-{ empty$
- 'pop$
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
- if$
-}
-
-FUNCTION {format.bvolume}
-{ volume empty$
- { "" }
- { series empty$
- 'skip$
- { " " * series * ", vol. " volume * ": " *}
- if$
- "volume and number" number either.or.check
- }
- if$
-}
-
-FUNCTION {format.number.series}
-{ volume empty$
- { number empty$
- { series field.or.null }
- { output.state mid.sentence =
- { "no.~" }
- { "No.~" }
- if$
- number *
- series empty$
- { "there's a number but no series in " cite$ * warning$ }
- { " in " * series * }
- if$
- }
- if$
- }
- { "" }
- if$
-}
-
-FUNCTION {format.edition}
-{ edition empty$
- { "" }
- { edition "l" change.case$ "~ed." * }
- if$
-}
-
-INTEGERS { multiresult }
-
-FUNCTION {multi.page.check}
-{ 't :=
- #0 'multiresult :=
- { multiresult not
- t empty$ not
- and
- }
- { t #1 #1 substring$
- duplicate$ "-" =
- swap$ duplicate$ "," =
- swap$ "+" =
- or or
- { #1 'multiresult := }
- { t #2 global.max$ substring$ 't := }
- if$
- }
- while$
- multiresult
-}
-
-FUNCTION {format.pages}
-{ pages empty$
- { "" }
- {":" pages *}
- if$
-}
-
-FUNCTION {incollecformat.pages}
-{ pages empty$
- { "" }
- {" (pp. " pages * ")" *}
- if$
-}
-
-FUNCTION {format.volume}
-{ volume empty$
- { "" }
- { "" volume * }
- if$
-}
-
-FUNCTION {format.number}
-{ number empty$
- { "" }
- { "(" number * ")" *}
- if$
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
- 'format.pages
- { type empty$
- { "ch.~" chapter * }
- { type "l" change.case$ chapter tie.or.space.connect }
- if$
- pages empty$
- 'skip$
- { ", " * format.pages * }
- if$
- }
- if$
-}
-
-FUNCTION {format.in.ed.booktitle}
-{ booktitle empty$
- { "In: " }
- { "In: "
- editor empty$
- 'skip$
- { " " * format.editors * " " * booktitle emphasize * ", " * }
- if$
- }
- if$
-}
-
-FUNCTION {format.thesis.type}
-{ type empty$
- 'skip$
- { pop$
- output.state after.block =
- { type "t" change.case$ }
- { type "l" change.case$ }
- if$
- }
- if$
-}
-
-FUNCTION {empty.misc.check}
-{ author empty$ title empty$ howpublished empty$
- month empty$ year empty$ note empty$
- and and and and and
- { "all relevant fields are empty in " cite$ * warning$ }
- 'skip$
- if$
-}
-
-FUNCTION {format.tr.number}
-{ type empty$
- %%{ "Tech. Rep." }% modified by SPi-Global - 16Jun2017
- { "" }
- 'type
- if$
- number empty$
- { "l" change.case$ }
- { number tie.or.space.connect }
- if$
-}
-
-FUNCTION {format.addr.pub}
-{ publisher empty$
- { "" }
- { address empty$
- { "" }
- { address ": " * }
- if$
- publisher * " " *
- }
- if$
-}
-
-FUNCTION {format.book.addr.pub}
-{ publisher empty$
- { "" }
- { address empty$
- { "" }
- { address ": " * }
- if$
- publisher * "; " *
- }
- if$
-}
-
-FUNCTION {format.paddress}
-{ address empty$
- { "" }
- { "(" address * ")" * }
- if$
-}
-
-FUNCTION {format.ppaddress}
-{ address empty$
- { "" }
- { "; " address * "" * }
- if$
-}
-
-FUNCTION {format.article.crossref}
-{ key empty$
- { journal empty$
- { "need key or journal for " cite$ * " to crossref " * crossref *
- warning$
- ""
- }
- { "in {\em " journal * "\/}" * }
- if$
- }
- { "in " key * }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.crossref.editor}
-{ editor #1 "{vv~}{ll}" format.name$
- editor num.names$ duplicate$
- #2 >
- { pop$ " {\em et~al.}" * }
- { #2 <
- 'skip$
- { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
- { " {\em et~al.}" * }
- { " and " * editor #2 "{vv~}{ll}" format.name$ * }
- if$
- }
- if$
- }
- if$
-}
-
-FUNCTION {format.book.crossref}
-{ volume empty$
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
- "In "
- }
- { "Vol.~" volume *
- " of " *
- }
- if$
- editor empty$
- editor field.or.null author field.or.null =
- or
- { key empty$
- { series empty$
- { "need editor, key, or series for " cite$ * " to crossref " *
- crossref * warning$
- "" *
- }
- { "{\em " * series * "\/}" * }
- if$
- }
- { key * }
- if$
- }
- { format.crossref.editor * }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {format.incoll.inproc.crossref}
-{ editor empty$
- editor field.or.null author field.or.null =
- or
- { key empty$
- { booktitle empty$
- { "need editor, key, or booktitle for " cite$ * " to crossref " *
- crossref * warning$
- ""
- }
- { "in {\em " booktitle * "\/}" * }
- if$
- }
- { "in " key * }
- if$
- }
- { "in " format.crossref.editor * }
- if$
- " \cite{" * crossref * "}" *
-}
-
-FUNCTION {no.blank.or.punct}
-{ "" * before.all 'output.state :=
-}
-
-FUNCTION {add.semicolon}
-{
- ";" *
- no.blank.or.punct
-}
-
-FUNCTION {add.colon}
-{
- ": " *
- no.blank.or.punct
-}
-
-FUNCTION {add.space}
-{
- " " *
- no.blank.or.punct
-}
-
-FUNCTION {article}
-{ output.bibitem
- format.authors "author" output.check
- format.title "title" output.check
- blank.sep
- crossref missing$
- { format.journal emphasize "journal" output.check
- format.date add.semicolon "year" output.check
- format.volume output
- format.number output
- format.pages output
- }
- { format.article.crossref output.nonnull
- format.pages output
- }
- if$
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {book}
-{ output.bibitem
- author empty$
- { format.editors "author and editor" output.check }
- { format.authors output.nonnull
- crossref missing$
- { "author and editor" editor either.or.check }
- 'skip$
- if$
- }
- if$
- format.btitle emphasize "title" output.check
- crossref missing$
- { format.bvolume output
- new.block
- format.number.series output
- format.book.addr.pub "publisher" output.check
- }
- { new.block
- format.book.crossref output.nonnull
- }
- if$
- format.edition output
- format.date "year" output.check
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {booklet}
-{ output.bibitem
- format.authors output
- title empty$
- { "empty title in " cite$ * warning$
- howpublished new.sentence.checka
- }
- { howpublished empty$ not
- address empty$ month empty$ year empty$ and and
- or
- { format.title.p output.nonnull }
- { format.title output.nonnull }
- if$
- blank.sep
- }
- if$
- howpublished output
- address output
- format.date output
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
- author empty$
- { format.editors "author and editor" output.check }
- { format.authors output.nonnull
- crossref missing$
- { "author and editor" editor either.or.check }
- 'skip$
- if$
- }
- if$
- format.btitle "title" output.check
- crossref missing$
- { format.bvolume output
- format.chapter.pages "chapter and pages" output.check
- new.block
- format.number.series output
- format.addr.pub "publisher" output.check
- }
- { format.chapter.pages "chapter and pages" output.check
- new.block
- format.book.crossref output.nonnull
- }
- if$
- format.edition output
- format.date "year" output.check
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
- format.authors "author" output.check
- format.title "title" output.check
- blank.sep
- crossref missing$
- { format.in.ed.booktitle "booktitle" output.check
- format.number.series add.period$ add.space output
- format.bvolume output
- format.addr.pub "publisher" output.check
- format.edition output
- format.date "year" output.check
- %%format.chapter.pages output
- incollecformat.pages output
- }
- { format.incoll.inproc.crossref output.nonnull
- format.chapter.pages output
- }
- if$
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {inproceedings}
-{ output.bibitem
- format.authors "author" output.check
- format.title "title" output.check
- blank.sep
- crossref missing$
- { format.in.ed.booktitle "booktitle" output.check
- format.bvolume output
- format.number.series output
- format.pages output
- organization output
- publisher output
- inproformat.date "year" output.check
- format.ppaddress output
- }
- { format.incoll.inproc.crossref output.nonnull
- format.pages output
- }
- if$
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {conference} { inproceedings }
-
-FUNCTION {manual}
-{ output.bibitem
- author empty$
- { organization empty$
- 'skip$
- { organization output.nonnull
- address output
- }
- if$
- }
- { format.authors output.nonnull }
- if$
- format.btitle "title" output.check
- author empty$
- { organization empty$
- { address new.block.checka
- address output
- }
- 'skip$
- if$
- }
- { organization address new.block.checkb
- organization output
- address output
- }
- if$
- format.edition output
- format.date output
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
- format.authors "author" output.check
- format.title "title" output.check
- blank.sep
- "Master's thesis" format.thesis.type output.nonnull
- school "school" output.check
- address output
- format.date "year" output.check
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {format.note}
-{ note empty$
- { "" }
- { note "; " *}
- if$
-}
-
-FUNCTION {misc}
-{ output.bibitem
- format.authors output
- title empty$
- { howpublished new.sentence.checka }
- { howpublished empty$ not
- month empty$ year empty$ and
- or
- { format.title.p output.nonnull }
- { format.title emphasize output.nonnull }
- if$
- blank.sep
- }
- if$
- howpublished output
- format.note output
- %%new.block
- format.date output
- fin.entry
- empty.misc.check
-}
-
-FUNCTION {phdthesis}
-{ output.bibitem
- format.authors "author" output.check
- format.btitle "title" output.check
- new.block
- "PhD thesis" format.thesis.type output.nonnull
- school "school" output.check
- address output
- format.date "year" output.check
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
- editor empty$
- { organization output }
- { format.editors output.nonnull }
- if$
- format.btitle "title" output.check
- format.bvolume output
- format.number.series output
- format.paddress output
- editor empty$
- 'skip$
- { organization output }
- if$
- publisher output
- format.date "year" output.check
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {add.spperiod}
-{
- ". " *
- no.blank.or.punct
-}
-
-FUNCTION {techreport}
-{ output.bibitem
- format.authors "author" output.check
- format.title emphasize "title" output.check
- blank.sep
- format.tr.number add.colon output.nonnull
- institution "institution" output.check
- address output
- add.semicolon add.space format.date "year" output.check
- new.block
- note output
- fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
- format.authors "author" output.check
- format.title.p "title" output.check
- blank.sep
- note "note" output.check
- format.date output
- fin.entry
-}
-
-FUNCTION {default.type} { misc }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"June"}
-
-MACRO {jul} {"July"}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sept."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-MACRO {acmcs} {"ACM Computing Surveys"}
-
-MACRO {acta} {"Acta Informatica"}
-
-MACRO {cacm} {"Communications ACM"}
-
-MACRO {ibmjrd} {"IBM J. Research and Development"}
-
-MACRO {ibmsj} {"IBM Systems~J."}
-
-MACRO {ieeese} {"IEEE Trans. Software Engineering"}
-
-MACRO {ieeetc} {"IEEE Trans. Computers"}
-
-MACRO {ieeetcad}
- {"IEEE Trans. Computer-Aided Design"}
-
-MACRO {ipl} {"Information Processing Letters"}
-
-MACRO {jacm} {"J.~ACM"}
-
-MACRO {jcss} {"J.~Computer and System Sciences"}
-
-MACRO {scp} {"Science of Computer Programming"}
-
-MACRO {sicomp} {"SIAM J. Computing"}
-
-MACRO {tocs} {"ACM Trans. Computer Systems"}
-
-MACRO {tods} {"ACM Trans. Database Systems"}
-
-MACRO {tog} {"ACM Trans. Graphics"}
-
-MACRO {toms} {"ACM Trans. Mathematical Software"}
-
-MACRO {toois} {"ACM Trans. Office Information Systems"}
-
-MACRO {toplas} {"ACM Trans. Programming Languages and Systems"}
-
-MACRO {tcs} {"Theoretical Computer Science"}
-
-READ
-
-STRINGS { longest.label }
-
-INTEGERS { number.label longest.label.width }
-
-FUNCTION {initialize.longest.label}
-{ "" 'longest.label :=
- #1 'number.label :=
- #0 'longest.label.width :=
-}
-
-FUNCTION {longest.label.pass}
-{ number.label int.to.str$ 'label :=
- number.label #1 + 'number.label :=
- label width$ longest.label.width >
- { label 'longest.label :=
- label width$ 'longest.label.width :=
- }
- 'skip$
- if$
-}
-
-EXECUTE {initialize.longest.label}
-
-ITERATE {longest.label.pass}
-
-FUNCTION {begin.bib}
-{ preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
- if$
- "\begin{thebibliography}{" longest.label * "}" * write$ newline$
-}
-
-EXECUTE {begin.bib}
-
-EXECUTE {init.state.consts}
-
-ITERATE {call.type$}
-
-FUNCTION {end.bib}
-{ newline$
- "\end{thebibliography}" write$ newline$
-}
-
-EXECUTE {end.bib}
+++ /dev/null
-
-\documentclass[tikz,border=10pt]{standalone}
-
-
-\RequirePackage{luatex85}
-\usepackage[utf8]{inputenc}
-\usepackage{amsmath, amssymb, amsfonts, accents}
-\usetikzlibrary{graphdrawing, graphs, arrows, shapes, automata, calc, decorations.pathmorphing}
-\usegdlibrary{trees, layered}
-\usepackage{stix}
-
-
-\newcommand{\Xund}{\rule{.4em}{.4pt}}
-\newcommand{\Xl}{\langle}
-\newcommand{\Xr}{\rangle}
-\newcommand{\Xm}{\langle\!\rangle}
-
-
-\begin{document}
-
-\begin{tikzpicture}[
- >=stealth,
- ->,
- auto,
- node distance=0.7in,
- decoration = snake
- ]
-
-\tikzstyle{every node}=[draw=none]
-\tikzstyle{every state}=[rectangle, rounded corners = 5, minimum size=0.18in, inner sep = 3pt]
-
-\def\offsac{-0.35in}
-\def\offsad{-0.45in}
-\def\widc{1.1in}
-\def\widd{0.8in}
-
-
-
-\begin{scope}[xshift=1.7in, yshift=3.6in]
-
- \node (a0) {};
- \node[state, above right of = a0, xshift=-0.3in, yshift=-0.3in] (a) {$z_0$};
-
- \node[state, above right of = a] (d0) {$x_0$};
- \node[state, above right of = d0, xshift = 0.2in, yshift = -0.25in] (d01) {$z_1$};
- \node[state, below right of = d0, xshift = 0.2in, yshift = +0.25in] (d02) {$z_2$};
- \node[state, above right of = d01] (d1) {$x_1$};
- \node[state, above right of = d02] (d2) {$x_2$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = d1] (d11) {$f_1$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = d2] (d22) {$f_2$};
- \node[state, xshift = \offsad, right of = d11] (d3) {$y_1$};
- \node[state, xshift = \offsad, right of = d22] (d4) {$y_2$};
- \node[state, below right of = d3] (d33) {$w_1$};
- \node[state, below right of = d4] (d44) {$w_2$};
- \node[state, below right of = d33, xshift = 0.2in, yshift = +0.25in] (d5) {$y_0$};
-
- \node[state, accepting, below right of = d5] (e) {$w_0$};
- \node[below right of = e, xshift=-0.3in, yshift=0.3in] (e0) {};
-
- \path [draw]
- (a0) edge node {} (a)
- (a) edge node {$ 2i-1 $} (d0)
- %
- (d0) edge [bend left = 20] node {$ \epsilon $} (d01)
- (d0) edge [below left, near end, bend right = 20] node {$ -(2i_1-1) $} (d02)
- (d3) edge [above right, near end] node {$ 2i_1 $} (d33)
- (d4) edge [above right, near end] node {$ 2i_2 $} (d44)
- (d01) edge [above left, near start] node {$ 2i_1-1 $} (d1)
- (d02) edge [above left, near start] node {$ 2i_2-1 $} (d2)
- (d33) edge [bend left = 20] node {$ -(2i_2-1) $} (d5)
- (d44) edge [below right, bend right = 20] node {$ \epsilon $} (d5)
- %
- (d5) edge node {$ 2i $} (e)
- (e) edge node {} (e0)
- %
- ;
- \path (a) edge [draw=none] node [below=0.2in, midway] {
- (a) \quad $F \big( (i, \Xund, (i_1, \Xund, r_1) \mid (i_2, \Xund, r_2)) \big)$ where
- $f_i = F(0,0,r_i) \; \forall i = \overline{1,2}$
- } (e);
-\end{scope}
-
-
-
-\begin{scope}[xshift=1.7in, yshift=1.8in]
-
- \node (a0) {};
- \node[state, above right of = a0, xshift=-0.3in, yshift=-0.3in] (a) {$z_0$};
-
- \node[state, above right of = a] (b1) {$x_0$};
- \node[state, above right of = b1] (b2) {$x_1$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = b2] (b) {$f_1$};
- \node[state, xshift = \offsad, right of = b] (b3) {$y_1$};
- \node[state, below right of = b3] (c1) {$w_1$};
-
- \node[state, above right of = c1] (c2) {$x_2$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = c2] (c) {$f_2$};
- \node[state, xshift = \offsad, right of = c] (c3) {$y_2$};
- \node[state, below right of = c3] (c4) {$y_0$};
-
- \node[state, accepting, below right of = c4] (e) {$w_0$};
- \node[below right of = e, xshift=-0.3in, yshift=0.3in] (e0) {};
-
- \path [draw]
- (a0) edge node {} (a)
- (a) edge node {$ 2i-1 $} (b1)
- %
- (b1) edge node {$ 2i_1-1 $} (b2)
- (b3) edge [below left] node {$ 2i_1 $} (c1)
- %
- (c1) edge node {$ 2i_2-1 $} (c2)
- (c3) edge [below left] node {$ 2i_2 $} (c4)
- %
- (c4) edge [below left] node {$ 2i $} (e)
- (e) edge node {} (e0)
- %
- ;
- \path (a) edge [draw=none] node [below=0.2in, midway] {
- (b) \quad $F \big( (i, \Xund, (i_1, \Xund, r_1) \cdot (i_2, \Xund, r_2)) \big)$ where
- $f_i = F(0,0,r_i) \; \forall i = \overline{1,2}$
- } (e);
-\end{scope}
-
-
-
-
-\begin{scope}[xshift=0.7in, yshift=-0in]
-
- \node (a0) {};
- \node[state, above right of = a0, xshift=-0.3in, yshift=-0.3in] (a) {$z_0$};
-
- \node[state, above right of = a] (c0) {$x_0$};
- \node[state, right of = c0] (c1) {$z_{1}$};
- \node[state, above right of = c1] (c2) {$x_1$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = c2] (c) {$f_1$};
- \node[state, xshift = \offsad, right of = c] (c3) {$y_1$};
- \node[state, below right of = c3] (c4) {$w_{1}$};
- \node[state, right of = c4] (c5) {$z_{2}$};
-
- \node[state, right of = c5] (d1) {$z_{m}$};
- \node[state, above right of = d1] (d2) {$x_m$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = d2] (d) {$f_m$};
- \node[state, xshift = \offsad, right of = d] (d3) {$y_m$};
- \node[state, below right of = d3] (d4) {$y_0$};
-
- \node[state, accepting, below right of = d4] (e) {$w_0$};
- \node[below right of = e, xshift=-0.3in, yshift=0.3in] (e0) {};
-
- \path [draw, decorate] (c5) -- node {} (d1);
- \path [draw]
- (a0) edge node {} (a)
- (a) edge node {$ 2i-1 $} (c0)
- %
- (c0) edge node {$ \epsilon $} (c1)
- (c1) edge node {$ 2i_1-1 $} (c2)
- (c3) edge [below left] node {$ 2i_1 $} (c4)
- (c4) edge node {$ \epsilon $} (c5)
- %
- (d1) edge node {$ 2i_1-1 $} (d2)
- (d3) edge [below left] node {$ 2i_1 $} (d4)
- %
- (d4) edge [below left] node {$ 2i $} (e)
- (e) edge node {} (e0)
- %
- ;
- \draw (c4) .. controls ($ (c4) + (1.5, -1.0) $) and ($ (d4) + (-1.5, -1.0) $) .. node {$ \epsilon $} (d4);
- \draw (c0) .. controls ($ (c0) + (1.5, -1.5) $) and ($ (d4) + (-1.5, -1.5) $) .. node [above] {$ -(2i_1-1) $} (d4);
- \path (a) edge [draw=none] node [below, midway] {
- (c) \quad $F \big( (i, \Xund, (i_1, \Xund, r_1)^{0, m}) \big)$ where
- $0 < m < \infty$,
- $f_i = F(0,0,r_1) \; \forall i = \overline{1,m}$
- } (e);
-\end{scope}
-
-
-
-\begin{scope}[xshift=0in, yshift=-1.6in]
-
- \node (a0) {};
- \node[state, above right of = a0, xshift=-0.3in, yshift=-0.3in] (a) {$z_0$};
-
- \node[state, above right of = a] (b1) {$x_0$};
- \node[state, above right of = b1] (b2) {$x_1$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = b2] (b) {$f_{1}$};
- \node[state, xshift = \offsad, right of = b] (b3) {$y_1$};
- \node[state, below right of = b3] (b4) {$w_1$};
-
- \node[state, right of = b4] (c1) {$w_{n-1}$};
- \node[state, above right of = c1] (c2) {$x_n$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = c2] (c) {$f_{n}$};
- \node[state, xshift = \offsad, right of = c] (c3) {$y_n$};
- \node[state, below right of = c3] (c4) {$w_{n}$};
- \node[state, right of = c4] (c5) {$z_{n+1}$};
-
- \node[state, right of = c5] (d1) {$z_m$};
- \node[state, above right of = d1] (d2) {$x_m$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = d2] (d) {$f_m$};
- \node[state, xshift = \offsad, right of = d] (d3) {$y_m$};
- \node[state, below right of = d3] (d4) {$y_0$};
-
- \node[state, accepting, below right of = d4] (e) {$w_0$};
- \node[below right of = e, xshift=-0.3in, yshift=0.3in] (e0) {};
-
- \path [draw, decorate] (b4) -- node {} (c1);
- \path [draw, decorate] (c5) -- node {} (d1);
- \path [draw]
- (a0) edge node {} (a)
- (a) edge node {$ 2i-1 $} (b1)
- %
- (b1) edge node {$ 2i_1-1 $} (b2)
- (b3) edge [below left] node {$ 2i_1 $} (b4)
- %
- (c1) edge node {$ 2i_1-1 $} (c2)
- (c3) edge [below left] node {$ 2i_1 $} (c4)
- (c4) edge node {$ \epsilon $} (c5)
- %
- (d1) edge node {$ 2i_1-1 $} (d2)
- (d3) edge [below left] node {$ 2i_1 $} (d4)
- (d4) edge [below left] node {$ 2i $} (e)
- %
- (e) edge node {} (e0)
- %
- ;
- \draw (c4) .. controls ($ (c4) + (1.5, -1.0) $) and ($ (d4) + (-1.5, -1.0) $) .. node {$ \epsilon $} (d4);
- \path (a) edge [draw=none] node [below=-0.1in, midway] {
- (d) \quad $F \big( (i, \Xund, (i_1, \Xund, r_1)^{n, m}) \big)$ where
- $0 < n \leq m < \infty$,
- $f_i = F(0,0,r_1) \; \forall i = \overline{1,n}$
- } (e);
-\end{scope}
-
-
-
-\begin{scope}[xshift=1.7in, yshift=-3.1in]
-
- \node (a0) {};
- \node[state, above right of = a0, xshift=-0.3in, yshift=-0.3in] (a) {$z_0$};
-
- \node[state, above right of = a] (d0) {$x_0$};
- \node[state, right of = d0] (d1) {$z_{1}$};
- \node[state, above right of = d1] (d2) {$x_1$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = d2] (d) {$f_1$};
- \node[state, xshift = \offsad, right of = d] (d3) {$y_1$};
- \node[state, below right of = d3] (d4) {$w_{1}$};
- \node[state, right of = d4] (d5) {$y_0$};
-
- \node[state, accepting, below right of = d5] (e) {$w_0$};
- \node[below right of = e, xshift=-0.3in, yshift=0.3in] (e0) {};
-
- \path [draw]
- (a0) edge node {} (a)
- (a) edge node {$ 2i-1 $} (d0)
- %
- (d0) edge node {$ \epsilon $} (d1)
- (d1) edge node {$ 2i_1-1 $} (d2)
- (d3) edge [below left] node {$ 2i_1 $} (d4)
- (d4) edge node {$ \epsilon $} (d5)
- %
- (d5) edge [below left] node {$ 2i $} (e)
- (e) edge node {} (e0)
- %
- ;
- \draw (d4) .. controls ($ (d4) + (-1, -0.3) $) and ($ (d1) + (1, -0.3) $) .. node [above] {$ \epsilon $} (d1);
- \draw (d0) .. controls ($ (d0) + (1.5, -1) $) and ($ (d5) + (-1.5, -1) $) .. node [above] {$ -(2i_1-1) $} (d5);
- \path (a) edge [draw=none] node [below=0.1in, midway] {
- (e) \quad $F \big( (i, \Xund, (i_1, \Xund, r_1)^{0, \infty}) \big)$ where
- $f_1 = F(0,0,r_1)$
- } (e);
-\end{scope}
-
-
-
-\begin{scope}[xshift=0.2in, yshift=-4.8in]
-
- \node (a0) {};
- \node[state, above right of = a0, xshift=-0.3in, yshift=-0.3in] (a) {$z_0$};
-
- \node[state, above right of = a] (b1) {$x_0$};
- \node[state, above right of = b1] (b2) {$x_1$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = b2] (b) {$f_{1}$};
- \node[state, xshift = \offsad, right of = b] (b3) {$y_1$};
- \node[state, below right of = b3] (b4) {$w_1$};
-
- \node[state, right of = b4] (c1) {$w_{n-2}$};
- \node[state, above right of = c1] (c2) {$x_{n-1}$};
- \node[state, rounded corners = 10, minimum width = \widc, minimum height = 0.3in, xshift = \offsac, right of = c2] (c) {$f_{n-1}$};
- \node[state, xshift = \offsac, right of = c] (c3) {$y_{n-1}$};
- \node[state, below right of = c3] (d1) {$w_{n-1}$};
-
- \node[state, above right of = d1] (d2) {$x_n$};
- \node[state, rounded corners = 10, minimum width = \widd, minimum height = 0.3in, xshift = \offsad, right of = d2] (d) {$f_n$};
- \node[state, xshift = \offsad, right of = d] (d3) {$y_n$};
- \node[state, below right of = d3] (d4) {$w_{n}$};
- \node[state, right of = d4] (d5) {$y_0$};
-
- \node[state, accepting, below right of = d5] (e) {$w_0$};
- \node[below right of = e, xshift=-0.3in, yshift=0.3in] (e0) {};
-
- \path [draw, decorate] (b4) -- node {} (c1);
- \path [draw]
- (a0) edge node {} (a)
- (a) edge node {$ 2i-1 $} (b1)
- %
- (b1) edge node {$ 2i_1-1 $} (b2)
- (b3) edge [below left] node {$ 2i_1 $} (b4)
- %
- (c1) edge node {$ 2i_1-1 $} (c2)
- (c3) edge [below left] node {$ 2i_1 $} (d1)
- %
- (d1) edge node {$ 2i_1-1 $} (d2)
- (d3) edge [below left] node {$ 2i_1 $} (d4)
- (d4) edge node {$ \epsilon $} (d5)
-% (d4) edge node [below=0.05in] {$\epsilon $} (d1)
- %
- (d5) edge [below left] node {$ 2i $} (e)
- (e) edge node {} (e0)
- %
- ;
- \draw (d4) .. controls ($ (d4) + (-1, -0.3) $) and ($ (d1) + (1, -0.3) $) .. node [above] {$ \epsilon $} (d1);
- \path (a) edge [draw=none] node [below=-0.1in, midway] {
- (f) \quad $F \big( (i, \Xund, (i_1, \Xund, r_1)^{n, \infty}) \big)$ where
- $0 < n < \infty$,
- $f_i = F(0,0,r_1) \; \forall i = \overline{1,n}$
- } (e);
-\end{scope}
-
-
-
-
-\end{tikzpicture}
-
-
-\end{document}
-
+++ /dev/null
-
-\documentclass[tikz,border=10pt]{standalone}
-
-
-\RequirePackage{luatex85}
-\usepackage[utf8]{inputenc}
-\usepackage{amsmath, amssymb, amsfonts, accents}
-\usetikzlibrary{graphdrawing, graphs, arrows, shapes, automata, calc, decorations}
-\usegdlibrary{trees, layered}
-\usepackage{stix}
-
-
-\newcommand{\Xund}{\rule{.4em}{.4pt}}
-
-
-\begin{document}
-
-\def\offs{-0.65in}
-\def\widd{1in}
-\def\dist{1in}
-
-\begin{tikzpicture}[>=stealth, ->, auto, node distance=\dist]
-
-\tikzstyle{every node}=[draw=none]
-\tikzstyle{every state}=[rectangle, rounded corners = 5, minimum size=0.15in, inner sep = 3pt]
-
-\tikzset{style1/.style={draw, rectangle, rounded corners = 9, minimum width = \widd, minimum height = 0.25in, xshift = \offs}}
-\tikzset{style2/.style={state, accepting, xshift = \offs}}
-
-
-
-
-\begin{scope}[xshift=0in, yshift=0in]
-
-\begin{scope}[xshift=0in, yshift=0.2in]
- \node [label={[label distance=0.1in, below left]270:\large{(a)}}] (a) {};
- \node [label={[label distance=0.1in, below right]270:
-$\begin{aligned}
- &\begin{aligned}
- f_1 \cdot f_2 &= \big(\Sigma, Q, T, \Delta, x_1, y \big) \\
- \text{where }
- &\big(\Sigma, Q_i, T_i, \Delta_i, x_i, y_i\big) = f_i \; \forall i = \overline{1,2}\\
- &Q = Q_1 \cup \big( Q_2 \setminus \{ x_2 \} \big) \\
- &T = T_1 \cup T_2 \\
- &\Delta = \Delta_1
- \cup \big\{ (z, \alpha, \beta, w) \in \Delta_2 \mid z \neq x_2 \big\} \\[-0.3em]
- &\hphantom{\Delta = \Delta_1} \cup \big\{ (y_1, \alpha, \beta, w) \mid (x_2, \alpha, \beta, w) \in \Delta_2 \big\}
- \\
- &y = \text{if } x_2 = y_2 \text{ then } y_1 \text{ else } y_2
- \end{aligned}
- \\
- \\
- &\begin{aligned}
- f_1 \mid f_2 &= \big(\Sigma, Q, T, \Delta, x, y_1\big) \\
- \text{where }
- &\big(\Sigma, Q_i, T_i, \Delta_i, x_i, y_i\big) = f_i \; \forall i = \overline{1,2}\\
- &Q = Q_1 \cup \big( Q_2 \setminus \{y_2\} \big) \cup \{x\} \\
- &T = T_1 \cup T_2 \\
- &\Delta = \Delta_1
- \cup \big\{ (z, \alpha, \beta, w) \in \Delta_2 \mid w \neq y_2 \big\} \\[-0.3em]
- &\hphantom{\Delta = \Delta_1} \cup \big\{ (z, \alpha, \beta, y_1) \mid (z, \alpha, \beta, y_2) \in \Delta_2 \big\} \\[-0.3em]
- &\hphantom{\Delta = \Delta_1} \cup \big\{ (x, 1, \epsilon, x_1), (x, 2, \epsilon, x_3) \big\} \\[-0.3em]
- &\hphantom{\Delta = \Delta_1}
- \text{where } x_3 = \text{if } x_2 = y_2 \text{ then } y_1 \text{ else } x_2
- \end{aligned}
- \\
- \\
- &\begin{aligned}
- f^* &= \big(\Sigma, Q, T_1, \Delta, x, y\big) \\
- \text{where }
- &\big(\Sigma, Q_1, T_1, \Delta_1, x_1, y_1\big) = f \\
- &Q = Q_1 \cup \{ y \} \\
- &\Delta = \Delta_1 \cup
- \big\{ (y_1, 2, \epsilon, x_1), (y_1, 1, \epsilon, y) \big\}
- \end{aligned}
-\end{aligned}$
-}] (a) {};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-5.5in]
- \def\offs{-0.5in}
- \def\widd{1.3in}
-
- \node[state] (a) {};
- \node[state, above right of=a, xshift=-0.2in, yshift=-0.2in] (b1) {};
- \node[style1, right of = b1] (b) {$F ( (0, 0, r) )$};
- \node[style2, right of = b] (b2) {};
- \node[state, accepting, below right of=b2, xshift=-0.2in, yshift=0.2in] (d) {};
- \path
- (a) edge node {$1 / 2i \!-\! 1 $} (b1)
- (b2) edge node {$1 / 2i $} (d)
- ;
- \node [label={[label distance=0.1in, below left]270:\large{(b)}}] (a) {};
- \node [label={[label distance=0.1in, below right]270:
- $\begin{aligned}
- F \big( (i, \Xund, r) \big) \mid_{i \;\neq\; 0} &= \big(\Sigma, Q, T, \Delta, x, y\big) \\
- \text{where }
- &\big(\Sigma, Q_1, T_1, \Delta_1, x_1, y_1\big)= F \big( (0, 0, r) \big) \\
- &Q = Q_1 \cup \{ x, y \}\\
- &T = T_1 \cup \big\{ 2i \!-\! 1, 2i \big\} \\
- &\Delta = \Delta_1 \cup
- \big\{ (x, 1, 2i \!-\! 1, x_1), (y_1, 1, 2i, y) \big\}
- \end{aligned}$
- }] (a) {};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-7.3in]
- \def\offs{-0.5in}
- \def\widd{1.3in}
-
- \node[state] (a) {};
- \node[state, right of = a] (a1) {};
- \node[state, right of = a1] (b1) {};
- \node[style1, right of = b1] (b) {$ f_2 $};
- \node[style2, accepting, right of = b] (b2) {};
- \path
- (a) edge node {$1 / 1 -\! 2i $} (a1)
- (a1) edge node {$1 / -\! 2i $} (b1)
- ;
- \node [label={[label distance=0.1in, below left]270:\large{(c)}}] (a) {};
- \node [label={[label distance=0.1in, below right]270:
- $\begin{aligned}
- N \big( (0, \Xund, \Xund) \big) &= \big( \Sigma, \{x\}, \emptyset, \emptyset, x, x\big) \\
- N \big( (i, \Xund, r) \big) &\mid_{i \;\neq\; 0} = f_1 \cdot f_2 \\
- \text{where }
- &f_1 = \big( \Sigma, \{x, y, z\}, \big\{ 1 \!-\! 2i, -\! 2i \big\}, \\[-0.3em]
- &\quad\quad\quad \big\{ (x, 1, 1\!-\!2i, y), (y, 1, -\!2i, z) \big\}, x, z \big) \\
- &f_2 = \begin{cases}
- N(r_1) \cdot N(r_2) & \text{if } r = r_1 \cdot r_2 \vee r_1 \mid r_2 \\[-0.3em]
- N(0, \Xund, \Xund) & \text{if } r \in \{ \epsilon, \alpha \}
- \end{cases}
- \end{aligned}$
- }] (a) {};
-\end{scope}
-
-\end{scope}
-
-
-
-
-\begin{scope}[xshift=4.2in, yshift=0in]
-
-\begin{scope}[xshift=0in, yshift=0in]
- \node[state, accepting] (a) {};
- \node [label={[label distance=0.1in, below left]270:\large{(d)}}] (a) {};
- \node [label={[label distance=0.1in, below right]270:
- $F \big( (0, 0, \epsilon) \big) = \big( \Sigma, \{x\}, \emptyset, \emptyset, x, x \big)
- $}] (a) {};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-0.7in]
- \node[state] (a) {};
- \node[state, accepting, right of=a] (b) {};
- \path (a) edge node {$\alpha / \epsilon$} (b);
- \node [label={[label distance=0.1in, below left]270:\large{(e)}}] (a) {};
- \node [label={[label distance=0.1in, below right]270:
- $F \big( (0, 0, a) \big) = \big( \Sigma, \{x, y\}, \emptyset, \{ (x, \alpha, \epsilon, y) \}, x, y \big)
- $}] (a) {};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-1.5in]
- \def\offs{-0.5in}
- \def\widd{1.3in}
-
- \node[state] (a1) {};
- \node[style1, right of = a1] (a) {$F(r_1)$};
- \node[style2, right of = a] (a2) {};
- \node[style1, right of = a2] (b) {$F(r_2)$};
- \node[style2, right of = b] (b2) {};
- \node [label={[label distance=0.2in, below left]270:\large{(f)}}] (a) {};
- \node [label={[label distance=0.2in, below right]270:
- $\begin{aligned}
- F \big( (0, 0, r_1 \cdot r_2) \big) &= F(r_1) \cdot F(r_2)
- \end{aligned}$}] (a1) {};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-2.8in]
- \def\offs{-0.5in}
- \def\widd{1.3in}
-
- \node[state] (a) {};
- \node[state, above right of = a, yshift = -0.35in] (b1) {};
- \node[style1, right of = b1] (b) {$F(r_1)$};
- \node[style2, right of = b] (b2) {};
- \node[style1, right of = b2, rotate around={-21:(b2)}] (d) {$N(r_2)$};
-
- \node[state, below right of=a, yshift = 0.35in] (c1) {};
- \node[style1, right of = c1] (c2) {$N(r_1)$};
- \node[style2, right of = c2] (c3) {};
- \node[style1, right of = c3, rotate around={21:(c3)}] (c) {$F(r_2)$};
- \node[style2, right of = c, rotate around={21:(c)}] (d) {};
- \path
- (a) edge [bend left] node {$1 / \epsilon$} (b1)
- (a) edge [bend right] node [below left] {$2 / \epsilon $} (c1)
- ;
- \node [label={[label distance=0.5in, below left]270:\large{(g)}}] (a) {};
- \node [label={[label distance=0.5in, below right]270:
- $\begin{aligned}
- F \big( (0, 0, r_1 \mid r_2) \big) &=
- \big( F(r_1) \cdot N(r_2) \big) \mid
- \big( N(r_1) \cdot F(r_2) \big)
- \end{aligned}$}] (a) {};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-4in]
- \def\offs{-0.5in}
- \def\widd{1.3in}
-
- \node[state] (a1) {};
- \node[style1, right of = a1] (a) {$F(r)$};
- \node[style2, right of = a] (a2) {};
- \node[style1, right of = a2, minimum width = 1.7in, xshift = 0.2in] (b) {$F( (0, 0, r^{n-1, m-1}))$};
- \node[style2, right of = b, xshift = 0.2in] (b2) {};
- \node [label={[label distance=0.2in, below left]270:\large{(h)}}] (a) {};
- \node [label={[label distance=0.2in, below right]270:
- $\begin{aligned}
- F \big( (0, 0, r^{n, m}) \big) \mid_{n \;>\; 1} &= F \big( (0, 0, r) \big) \cdot F \big( (0, 0, r^{n-1, m-1}) \big)
- \end{aligned}$}] (a1) {};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-5.2in]
- \def\offs{-0.5in}
- \def\widd{1.3in}
-
- \node[state] (a) {};
- \node[state, above right of = a, yshift = -0.35in] (b1) {};
- \node[style1, right of = b1, rotate around={-21:(b1)}] (d) {$F( (0, 0, r^{1,m}))$};
-
- \node[state, below right of=a, yshift = 0.35in] (c1) {};
- \node[style1, right of = c1, rotate around={21:(c1)}] (c) {$N(r)$};
- \node[style2, right of = c, rotate around={21:(c)}] (d) {};
- \path
- (a) edge [bend left] node {$1 / \epsilon$} (b1)
- (a) edge [bend right] node [below left] {$2 / \epsilon $} (c1)
- ;
- \node [label={[label distance=0.5in, below left]270:\large{(i)}}] (a) {};
- \node [label={[label distance=0.5in, below right]270:
- $\begin{aligned}
- F \big( (0, 0, r^{0, m}) \big) &=
- \big( F \big( (0, 0, r^{1, m}) \big) \mid
- \big( N(r) \big) \big)
- \end{aligned}$}] (a) {};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-6.8in]
- \def\offs{-0.5in}
- \def\widd{1.3in}
-
- \node[state] (b1) {};
- \node[style1, right of = b1] (b) {$F(r)$};
- \node[style2, right of = b] (b2) {};
-
- \node[state, accepting, right of = b2] (c) {};
-
- \path
- (b2) edge node {$2 / \epsilon$} (c)
- ;
- \draw (b2) .. controls ($ (b2) + (0.7, 1.5) $) and ($ (b1) + (-0.7, 1.5) $) .. node [above] {$1 / \epsilon$} (b1);
- \node [label={[label distance=0.2in, below left]270:\large{(j)}}] (a) {};
- \node [label={[label distance=0.2in, below right]270:
- $\begin{aligned}
- F \big( (0, 0, r^{1, \infty}) \big) &= F(r)^*
- \end{aligned}$}] (b1) {};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-8in]
- \def\offs{-0.5in}
- \def\widd{0.9in}
- \def\dist{0.8in}
-
- \node[state] (b1) {};
- \node[style1, right of = b1] (b) {$F(r)$};
- \node[style2, right of = b] (b2) {};
-
- \node[state, right of = b2] (c1) {};
- \node[style1, right of = c1] (c) {$F(r)$};
- \node[style2, right of = c] (c2) {};
- %
- \node[state, right of = c2, draw = none] (cd) {\Large{$\dots$}};
- %
- \node[state, right of = cd] (d1) {};
- \node[style1, right of = d1] (d) {$F(r)$};
- \node[style2, right of = d] (d2) {};
-
- \path
- (c2) edge node {$2 / \epsilon$} (cd)
- (cd) edge node {$2 / \epsilon$} (d1)
- (b2) edge node {$2 / \epsilon$} (c1)
- ;
- \draw (b2) .. controls ($ (b2) + (0, 2) $) and ($ (d2) + (-1, 2) $) .. node [very near start] {$1 / \epsilon$} (d2);
- \draw (c2) .. controls ($ (c2) + (0, 1) $) and ($ (d2) + (-1, 1) $) .. node [very near start] {$1 / \epsilon$} (d2);
- \node [label={[label distance=0.2in, below left]270:\large{(k)}}] (a) {};
- \node [label={[label distance=0.2in, below right]270:
- $\begin{aligned}
- &F \big( (0, 0, r^{1, 1}) \big) = F(r) \\
- &F \big( (0, 0, r^{1, m}) \big) \mid_{1 < m < \infty} =
- F(r) \cdot
- \big( F((0,0,\epsilon)) \mid F((0, 0, r^{1, m - 1})) \big)
- \end{aligned}$}] (b1) {};
-\end{scope}
-
-\end{scope}
-
-
-\tikzstyle{every node}=[]
-\tikzstyle{every state}=[circle
- , minimum size=0.15in
- , rectangle
- , rounded corners=4
- , inner sep = 2pt
- , outer sep = 0pt
- , node distance = 0.4in]
-
-\newcommand{\zz}{0.06in}
-
-\begin{scope}[xshift=-0.8in, yshift=-10.5in]
- \footnotesize
- %\scriptsize
-
- % ((epsilon|a*)((a|epsilon){0,3}))
-
- \node[state] (x0) {$1$};
- \node[state, above right of = x0] (x1) {$2$};
-
- \node[state, above right of = x1] (z0) {$3$};
-
- \node[state, right of = z0] (x15) {$4$};
- \node[state, above right of = x15] (x16) {$5$};
- \node[state, fill=lightgray, above right of = x16, xshift = \zz, yshift = -\zz] (x17) {$6$};
- \node[state, below right of = x17, xshift = \zz, yshift = +\zz] (x21) {$7$};
- \node[state, below right of = x21] (x22) {$8$};
-
- \node[state, right of = x1, xshift=0.5in] (z1) {$18$};
- \node[state, right of = z1, xshift=0.3in] (z2) {$19$};
-
- \node[state, right of = x22] (y15) {$9$};
- \node[state, above right of = y15] (y16) {$10$};
- \node[state, fill=lightgray, above right of = y16, xshift = \zz, yshift = -\zz] (y17) {$11$};
- \node[state, below right of = y17, xshift = \zz, yshift = +\zz] (y21) {$12$};
- \node[state, below right of = y21] (y22) {$13$};
-
- \node[state, right of = y22] (z15) {$14$};
- \node[state, above right of = z15] (z16) {$15$};
- \node[state, fill=lightgray, above right of = z16, xshift = \zz, yshift = -\zz] (z17) {$16$};
- \node[state, below right of = z17, xshift = \zz, yshift = +\zz] (z21) {$17$};
- \node[state, below right of = z21] (z22) {$20$};
-
- \node[state, below right of = z22] (x23) {$21$};
-
- \node[state, above right of = x23] (x2) {$22$};
- \node[state, above right of = x2, xshift = \zz, yshift = -\zz] (x4X) {$23$};
- \node[state, above right of = x4X] (x4) {$24$};
-
- \node[state, below right of = x2, xshift = \zz+0.1in, yshift = +\zz] (x3) {$30$};
- \node[state, right of = x3, xshift=0.1in] (x3Y) {$31$};
- \node[state, right of = x3Y, xshift=0.1in] (x3Z) {$32$};
- \node[state, above right of = x3Z] (x3X) {$33$};
- \node[state, below right of = x3X, draw=none, inner sep=0, minimum size=0] (x3W) {};
-
- \node[state, fill=lightgray, above right of = x4, xshift = \zz, yshift = -\zz] (x5) {$25$};
- \node[state, right of = x5] (x6) {$26$};
- \node[state, below right of = x6, xshift = \zz, yshift = \zz] (x7) {$27$};
- \node[state, below right of = x7] (x7X) {$28$};
- \node[state, right of = x7X] (x7Y) {$29$};
- \node[state, below right of = x7Y, xshift = \zz, yshift = +\zz] (x12) {$34$};
- \node[state, below right of = x12] (x14) {$35$};
-
- \node[state, fill=lightgray, accepting, below right of = x14] (x24) {$36$};
-
- \path
- (x0) edge node [above left] {$1/1$} (x1)
- (x1) edge node [above left] {$1/3$} (z0)
- (z0) edge node {$1/\epsilon$} (x15)
-
- (z0) edge [bend right=20] node [above, near end] {$2/\epsilon$} (z1)
- (z1) edge node {$1/\!\!-\!\!5$} (z2)
-
- (x15) edge node [above left] {$1/5$} (x16)
- (x16) edge [bend left] node [above] {$1/\epsilon$} (x17)
- (x16) edge [bend right=20] node [above] {$2/\epsilon$} (x21)
- (x17) edge [bend left] node [above] {$a/\epsilon$} (x21)
- (x21) edge node [above right] {$1/6$} (x22)
-
- (x22) edge node [above] {$2/\epsilon$} (y15)
-
- (y15) edge node [above left] {$1/5$} (y16)
- (y16) edge [bend left] node [above] {$1/\epsilon$} (y17)
- (y16) edge [bend right=20] node [above] {$2/\epsilon$} (y21)
- (y17) edge [bend left] node [above] {$a/\epsilon$} (y21)
- (y21) edge node [above right] {$1/6$} (y22)
-
- (y22) edge node [above] {$2/\epsilon$} (z15)
-
- (z15) edge node [above left] {$1/5$} (z16)
- (z16) edge [bend left] node [above] {$1/\epsilon$} (z17)
- (z16) edge [bend right=20] node [above] {$2/\epsilon$} (z21)
- (z17) edge [bend left] node [above] {$a/\epsilon$} (z21)
- (z21) edge node [above right] {$1/6$} (z22)
-
- (z22) edge node [above right] {$1/4$} (x23)
-
- (x23) edge node [below right] {$1/7$} (x2)
- (x2) edge [bend left] node [above] {$1/\epsilon$} (x4X)
- (x2) edge [bend right] node [above] {$\quad 2/\epsilon$} (x3)
- (x3) edge node [above] {$2/\!\!-\!\!9$} (x3Y)
- (x3Y) edge node [above] {$2/\!\!-\!\!10$} (x3Z)
- (x3Z) edge node [below right] {$1/11$} (x3X)
- (x4X) edge node {$1/9$} (x4)
- (x4) edge [bend left] node [above] {$1/\epsilon$} (x5)
- (x4) edge [bend right=20] node [above] {$2/\epsilon$} (x7)
- (x5) edge node [above] {$a/\epsilon$} (x6)
- (x6) edge [bend left] node [above] {$2/\epsilon$} (x7)
- (x7) edge node {$1/10$} (x7X)
- (x7X) edge node {$1/\!\!-\!\!11$} (x7Y)
- (x7Y) edge [bend left] node {$1/\!\!-\!\!12$} (x12)
- (x12) edge node [above right] {$1/8$} (x14)
-
- (x14) edge node [above right] {$1/2$} (x24)
- ;
-
- \draw (y22) .. controls ($ (y22) + (0.5, -0.6) $) and ($ (z22) + (-0.5, -0.6) $) .. node [above] {$1/\epsilon$} (z22);
- \draw (x22) .. controls ($ (x22) + (0.8, -0.8) $) and ($ (z22) + (-0.8, -0.8) $) .. node [above, near start] {$1/\epsilon$} (z22);
- \draw (z2) .. controls ($ (z2) + (2, 0) $) and ($ (z22) + (-1.0, -1.0) $) .. node [above, very near start] {$1/\!\!-\!\!6$} (z22);
- \draw (x6) .. controls ($ (x6) + (0.3, 0.8) $) and ($ (x5) + (-0.3, 0.8) $) .. node [above] {$1/\epsilon$} (x5);
-
-% \draw (x3X) .. controls ($ (x3X) + (0.9, -0.9) $) and ($ (x3X) + (0.5, -0.9) $) .. node [above right, near start] {$1/12$} (x12);
- \path[-] (x3X) edge node {$1/12$} (x3W);
- \path (x3W) edge [bend right=20] node {} (x12);
-
- \path (x0) edge [draw=none] node [below=0.1in, midway] {\large{(l)}} (x24);
-
-\end{scope}
-
-\iffalse
-\tikzstyle{every node}=[draw=none, rectangle, rounded corners, node distance = 0.2in];
-\begin{scope}[xshift=-0.5in, yshift=-9in]
- %\footnotesize
- \scriptsize
-
- \node (n1) {$1$};
- \node [right of = n1] (n2) {$2$};
- \node [right of = n2] (n3) {$3$};
- \node [right of = n3] (n4) {$4$};
- \node [right of = n4] (n5) {$5$};
- \node [right of = n5, draw] (n6) {$6$};
-
- \node [below of = n6] (n8) {$8$};
- \node [right of = n8] (n9) {$9$};
- \node [right of = n9] (n10) {$10$};
- \node [right of = n10] (n11) {$11$};
- \node [right of = n11] (n27) {$27$};
- \node [right of = n27] (n29) {$28$};
- \node [right of = n29] (n30) {$29$};
- \node [right of = n30] (n31) {$30$};
- \node [right of = n31, draw] (n32) {$31$};
-
- \node [below of = n32] (n34) {$33$};
- \node [right of = n34] (n37) {$36$};
- \node [right of = n37] (n38) {$37$};
- \node [right of = n38, draw] (n39) {$38$};
-
- \node [below of = n31] (n31X) {};
- \node [below of = n34] (n35X) {$34$};
- \node [right of = n35X] (n36X) {$35$};
- \node [right of = n36X, draw, cross out] (n37X) {$36$};
-
- \node [below of = n30] (n28Y) {};
- \node [below of = n28Y] (n28YY) {};
- \node [below of = n28YY] (n12Y) {$12$};
- \node [right of = n12Y] (n13Y) {$13$};
- \node [right of = n13Y, draw] (n14Y) {$14$};
-
- \node [below of = n14Y] (n16Z) {$16$};
- \node [right of = n16Z] (n17Z) {$17$};
- \node [right of = n17Z] (n18Z) {$18$};
- \node [right of = n18Z] (n19Z) {$19$};
- \node [right of = n19Z, draw, cross out] (n27Z) {$27$};
-
- \node [below of = n27Z] (n20W) {$20$};
- \node [right of = n20W] (n21W) {$21$};
- \node [right of = n21W, draw] (n22W) {$22$};
-
- \node [below of = n27] (n27U) {};
- \node [below of = n27U] (n27UU) {};
- \node [below of = n27UU] (n27UUU) {};
- \node [below of = n27UUU] (n27UUUU) {};
- \node [below of = n27UUUU] (n27UUUUU) {};
- \node [below of = n27UUUUU, draw, cross out] (n27UUUUU) {$27$};
-
- \draw [-] (n1) -- (n2) -- (n3) -- (n4) -- (n5) -- (n6);
- \draw [-] (n5) -- (n8) -- (n9) -- (n10) -- (n11) -- (n27) -- (n29) -- (n30) -- (n31) -- (n32);
- \draw [-] (n31) -- (n34) -- (n37) -- (n38) -- (n39);
- \draw [-] (n30) -- (n35X) -- (n36X) -- (n37X);
- \draw [-] (n11) -- (n12Y) -- (n13Y) -- (n14Y);
- \draw [-] (n13Y) --(n16Z) -- (n17Z) -- (n18Z) -- (n19Z) -- (n27Z);
- \draw [-] (n19Z) -- (n20W) -- (n21W) -- (n22W);
- \draw [-] (n3) -- (n27UUUUU);
-
-MATCH a.
-THIS ALLOWS TO SHOW ALL RULES OF COMPARISON (some on the 1st epsilon-closure, some on second).
-
-
-\end{scope}
-\fi
-
-\end{tikzpicture}
-
-
-
-\end{document}
-
+++ /dev/null
-
-\documentclass[tikz,border=10pt]{standalone}
-
-
-\RequirePackage{luatex85}
-\usepackage[utf8]{inputenc}
-\usepackage{amsmath, amssymb, amsfonts, accents}
-\usetikzlibrary{graphdrawing, graphs, arrows, shapes, automata, calc, decorations}
-\usegdlibrary{trees, layered}
-\usepackage{stix}
-
-
-\newcommand{\Xund}{\rule{.4em}{.4pt}}
-
-
-\begin{document}
-
-\begin{tikzpicture}[>=stealth, ->, auto]
-
-
-\tikzstyle{every node}=[]
-\tikzstyle{every state}=[circle
- , minimum size=0.16in
- , rectangle
- , rounded corners=5
- , inner sep = 2pt
- , outer sep = 0pt
- , node distance = 0.4in]
-
-\newcommand{\zz}{0.06in}
-
-\begin{scope}[xshift=-0.8in, yshift=-10.5in]
- %\footnotesize
- \scriptsize
-
- % ((epsilon|a*)((a|epsilon){0,3}))
-
- \node[state] (x0) {$1$};
- \node[state, above right of = x0] (x1) {$2$};
-
- \node[state, above right of = x1] (z0) {$3$};
-
- \node[state, right of = z0] (x15) {$4$};
- \node[state, above right of = x15] (x16) {$5$};
- \node[state, fill=lightgray, above right of = x16, xshift = \zz, yshift = -\zz] (x17) {$6$};
- \node[state, below right of = x17, xshift = \zz, yshift = +\zz] (x21) {$7$};
- \node[state, below right of = x21] (x22) {$8$};
-
- \node[state, right of = x1, xshift=0.6in] (z1) {$18$};
- \node[state, right of = z1, xshift=0.27in] (z2) {$19$};
-
- \node[state, right of = x22] (y15) {$9$};
- \node[state, above right of = y15] (y16) {$10$};
- \node[state, fill=lightgray, above right of = y16, xshift = \zz, yshift = -\zz] (y17) {$11$};
- \node[state, below right of = y17, xshift = \zz, yshift = +\zz] (y21) {$12$};
- \node[state, below right of = y21] (y22) {$13$};
-
- \node[state, right of = y22] (z15) {$14$};
- \node[state, above right of = z15] (z16) {$15$};
- \node[state, fill=lightgray, above right of = z16, xshift = \zz, yshift = -\zz] (z17) {$16$};
- \node[state, below right of = z17, xshift = \zz, yshift = +\zz] (z21) {$17$};
- \node[state, below right of = z21] (z22) {$20$};
-
- \node[state, below right of = z22] (x23) {$21$};
-
- \node[state, above right of = x23] (x2) {$22$};
- \node[state, above right of = x2, xshift = \zz, yshift = -\zz] (x4X) {$23$};
- \node[state, above right of = x4X] (x4) {$24$};
-
- \node[state, below right of = x2, xshift = \zz+0.1in, yshift = +\zz] (x3) {$30$};
- \node[state, right of = x3, xshift=0.1in] (x3Y) {$31$};
- \node[state, right of = x3Y, xshift=0.1in] (x3Z) {$32$};
- \node[state, above right of = x3Z] (x3X) {$33$};
- \node[state, below right of = x3X, draw=none, inner sep=0, minimum size=0] (x3W) {};
-
- \node[state, fill=lightgray, above right of = x4, xshift = \zz, yshift = -\zz] (x5) {$25$};
- \node[state, right of = x5] (x6) {$26$};
- \node[state, below right of = x6, xshift = \zz, yshift = \zz] (x7) {$27$};
- \node[state, below right of = x7] (x7X) {$28$};
- \node[state, right of = x7X] (x7Y) {$29$};
- \node[state, below right of = x7Y, xshift = \zz, yshift = +\zz] (x12) {$34$};
- \node[state, below right of = x12] (x14) {$35$};
-
- \node[state, fill=lightgray, accepting, below right of = x14] (x24) {$36$};
-
- \path
- (x0) edge node [above left] {$1/1$} (x1)
- (x1) edge node [above left] {$1/3$} (z0)
- (z0) edge node {$1/\epsilon$} (x15)
-
- (z0) edge [bend right=20] node [above, near end] {$2/\epsilon$} (z1)
- (z1) edge node [below] {$1/\!\!-\!\!5$} (z2)
-
- (x15) edge node [above left] {$1/5$} (x16)
- (x16) edge [bend left] node [above] {$1/\epsilon$} (x17)
- (x16) edge [bend right=20] node [above] {$2/\epsilon$} (x21)
- (x17) edge [bend left] node [above] {$a/\epsilon$} (x21)
- (x21) edge node [above right] {$1/6$} (x22)
-
- (x22) edge node [above] {$2/\epsilon$} (y15)
-
- (y15) edge node [above left] {$1/5$} (y16)
- (y16) edge [bend left] node [above] {$1/\epsilon$} (y17)
- (y16) edge [bend right=20] node [above] {$2/\epsilon$} (y21)
- (y17) edge [bend left] node [above] {$a/\epsilon$} (y21)
- (y21) edge node [above right] {$1/6$} (y22)
-
- (y22) edge node [above] {$2/\epsilon$} (z15)
-
- (z15) edge node [above left] {$1/5$} (z16)
- (z16) edge [bend left] node [above] {$1/\epsilon$} (z17)
- (z16) edge [bend right=20] node [above] {$2/\epsilon$} (z21)
- (z17) edge [bend left] node [above] {$a/\epsilon$} (z21)
- (z21) edge node [above right] {$1/6$} (z22)
-
- (z22) edge node [above right] {$1/4$} (x23)
-
- (x23) edge node [below right] {$1/7$} (x2)
- (x2) edge [bend left] node [above] {$1/\epsilon$} (x4X)
- (x2) edge [bend right] node [above] {$\quad 2/\epsilon$} (x3)
- (x3) edge node [below] {$2/\!\!-\!\!9$} (x3Y)
- (x3Y) edge node [below] {$2/\!\!-\!\!10$} (x3Z)
- (x3Z) edge node [above left] {$1/11$} (x3X)
- (x4X) edge node {$1/9$} (x4)
- (x4) edge [bend left] node [above] {$1/\epsilon$} (x5)
- (x4) edge [bend right=20] node [above] {$2/\epsilon$} (x7)
- (x5) edge node [above] {$a/\epsilon$} (x6)
- (x6) edge [bend left] node [above] {$2/\epsilon$} (x7)
- (x7) edge node {$1/10$} (x7X)
- (x7X) edge node {$1/\!\!-\!\!11$} (x7Y)
- (x7Y) edge [bend left] node {$1/\!\!-\!\!12$} (x12)
- (x12) edge node [above right] {$1/8$} (x14)
-
- (x14) edge node [above right] {$1/2$} (x24)
- ;
-
- \draw (y22) .. controls ($ (y22) + (0.5, -0.6) $) and ($ (z22) + (-0.5, -0.6) $) .. node [above] {$1/\epsilon$} (z22);
- \draw (x22) .. controls ($ (x22) + (0.8, -0.8) $) and ($ (z22) + (-0.8, -0.8) $) .. node [above, near start] {$1/\epsilon$} (z22);
- \draw (z2) .. controls ($ (z2) + (2, 0) $) and ($ (z22) + (-1.0, -1.0) $) .. node [below, very near start] {$1/\!\!-\!\!6$} (z22);
- \draw (x6) .. controls ($ (x6) + (0.3, 0.8) $) and ($ (x5) + (-0.3, 0.8) $) .. node [above] {$1/\epsilon$} (x5);
-
-% \draw (x3X) .. controls ($ (x3X) + (0.9, -0.9) $) and ($ (x3X) + (0.5, -0.9) $) .. node [above right, near start] {$1/12$} (x12);
- \path[-] (x3X) edge node {$1/12$} (x3W);
- \path (x3W) edge [bend right=20] node {} (x12);
-
-\end{scope}
-
-\iffalse
-\tikzstyle{every node}=[draw=none, rectangle, rounded corners, node distance = 0.2in];
-\begin{scope}[xshift=-0.5in, yshift=-9in]
- %\footnotesize
- \scriptsize
-
- \node (n1) {$1$};
- \node [right of = n1] (n2) {$2$};
- \node [right of = n2] (n3) {$3$};
- \node [right of = n3] (n4) {$4$};
- \node [right of = n4] (n5) {$5$};
- \node [right of = n5, draw] (n6) {$6$};
-
- \node [below of = n6] (n8) {$8$};
- \node [right of = n8] (n9) {$9$};
- \node [right of = n9] (n10) {$10$};
- \node [right of = n10] (n11) {$11$};
- \node [right of = n11] (n27) {$27$};
- \node [right of = n27] (n29) {$28$};
- \node [right of = n29] (n30) {$29$};
- \node [right of = n30] (n31) {$30$};
- \node [right of = n31, draw] (n32) {$31$};
-
- \node [below of = n32] (n34) {$33$};
- \node [right of = n34] (n37) {$36$};
- \node [right of = n37] (n38) {$37$};
- \node [right of = n38, draw] (n39) {$38$};
-
- \node [below of = n31] (n31X) {};
- \node [below of = n34] (n35X) {$34$};
- \node [right of = n35X] (n36X) {$35$};
- \node [right of = n36X, draw, cross out] (n37X) {$36$};
-
- \node [below of = n30] (n28Y) {};
- \node [below of = n28Y] (n28YY) {};
- \node [below of = n28YY] (n12Y) {$12$};
- \node [right of = n12Y] (n13Y) {$13$};
- \node [right of = n13Y, draw] (n14Y) {$14$};
-
- \node [below of = n14Y] (n16Z) {$16$};
- \node [right of = n16Z] (n17Z) {$17$};
- \node [right of = n17Z] (n18Z) {$18$};
- \node [right of = n18Z] (n19Z) {$19$};
- \node [right of = n19Z, draw, cross out] (n27Z) {$27$};
-
- \node [below of = n27Z] (n20W) {$20$};
- \node [right of = n20W] (n21W) {$21$};
- \node [right of = n21W, draw] (n22W) {$22$};
-
- \node [below of = n27] (n27U) {};
- \node [below of = n27U] (n27UU) {};
- \node [below of = n27UU] (n27UUU) {};
- \node [below of = n27UUU] (n27UUUU) {};
- \node [below of = n27UUUU] (n27UUUUU) {};
- \node [below of = n27UUUUU, draw, cross out] (n27UUUUU) {$27$};
-
- \draw [-] (n1) -- (n2) -- (n3) -- (n4) -- (n5) -- (n6);
- \draw [-] (n5) -- (n8) -- (n9) -- (n10) -- (n11) -- (n27) -- (n29) -- (n30) -- (n31) -- (n32);
- \draw [-] (n31) -- (n34) -- (n37) -- (n38) -- (n39);
- \draw [-] (n30) -- (n35X) -- (n36X) -- (n37X);
- \draw [-] (n11) -- (n12Y) -- (n13Y) -- (n14Y);
- \draw [-] (n13Y) --(n16Z) -- (n17Z) -- (n18Z) -- (n19Z) -- (n27Z);
- \draw [-] (n19Z) -- (n20W) -- (n21W) -- (n22W);
- \draw [-] (n3) -- (n27UUUUU);
-
-MATCH a.
-THIS ALLOWS TO SHOW ALL RULES OF COMPARISON (some on the 1st epsilon-closure, some on second).
-
-
-\end{scope}
-\fi
-
-\end{tikzpicture}
-
-
-
-\end{document}
-
+++ /dev/null
-
-\documentclass[tikz,border=10pt]{standalone}
-
-
-\RequirePackage{luatex85}
-\usepackage[utf8]{inputenc}
-\usepackage{amsmath, amssymb, amsfonts, accents}
-\usetikzlibrary{graphdrawing, graphs, shapes, arrows}
-\usegdlibrary{trees}
-\usepackage{stix}
-
-\newcommand{\IRE}{I\!RE}
-
-\begin{document}
-
-%\begin{tikzpicture}[>=stealth, every node/.style={rectangle, rounded corners, draw, minimum size=0.1in}]
-\begin{tikzpicture}[>=stealth, every node/.style={draw=none, minimum size=0.1}]
-
-\begin{scope}[xshift=2.5in]
-% \node [rectangle, rounded corners, draw, minimum width=3.7in, minimum height=1.9in, yshift=-0.7in] {};
-% \node[yshift=0.3in, draw=none] {$t_1: T(T(\varnothing, T(a)), T(\varnothing))$};
- \graph [tree layout, grow=down, fresh nodes] {
- "${(1, 1, \cdot)}_{\Lambda}$" -- {
- "${(2, 2, |)}_{1}$" -- {
- "${(0, 0, \epsilon)}_{1.1}$"[draw=none],
- "${(0, 0, \{0,\infty\})}_{1.2}$"[draw=none] -- {
- "${(0, 0, a)}_{1.2.1}$"[draw=none]
- }
- },
- "${(3, 0, \{0,\infty\})}_{2}$" -- {
- "${(4, 3, |)}_{2.1}$" -- {
- "${(0, 0, a)}_{2.1.1}$"[draw=none],
- "${(0, 0, \epsilon)}_{2.1.2}$"[draw=none]
- }
- }
- }
- };
- \node[xshift=0in, yshift=-1.5in, draw=none]
- {\small{$
- \IRE ((\epsilon|a^{0,\infty})(\epsilon|a)^{0,\infty} )) = (1,1,(2,2,(0,0,\epsilon) \mid (0,0,(0,0,a)^{0,\infty}))
- \cdot (3,0,(4,3,(0,0,\epsilon) \mid (0,0,a))^{0,\infty}))
- $}};
-% \node[xshift=0in, yshift=-1.7in, draw=none] {$(\epsilon | a^{0,\infty})(a | \epsilon)^{0,\infty}$};
-\end{scope}
-
-\begin{scope}[xshift=0in, yshift=-2in]
- \node[xshift=-0.3in, draw=none] {$s:$};
- \graph [tree layout, grow=down, fresh nodes] {
- "${T}^{1}_{\Lambda}$" -- {
- "${T}^{2}_{1}$" -- {
- "${\varnothing}^{0}_{1.1}$"[draw=none],
- "${T}^{0}_{1.2}$"[draw=none] -- {
- "${a}^{0}_{1.2.1}$"[draw=none]
- }
- },
- "${T}^{3}_{2}$" -- {
- "${\varnothing}^{4}_{2.1}$"
- }
- }
- };
- \node[yshift=-1.5in, draw=none]
- {\small{${T}^{1} \big(
- {T}^{2} \big(
- {\varnothing}^{0},
- {T}^{0}({a}^{0})
- \big),
- {T}^{3}(
- {\varnothing}^{4}
- )
- \big)$}};
-\end{scope}
-
-\begin{scope}[xshift=2in, yshift=-2in]
- \node[xshift=-0.3in, draw=none] {$t:$};
- \graph [tree layout, grow=down, fresh nodes] {
- "${T}^{1}_{\Lambda}$" -- {
- "${T}^{2}_{1}$" -- {
- "${\varnothing}^{0}_{1.1}$"[draw=none],
- "${T}^{0}_{1.2}$"[draw=none] -- {
- "${\varnothing}^{0}_{1.2.1}$"[draw=none]
- }
- },
- "${T}^{3}_{2}$" -- {
- "${T}^{4}_{2.1}$" -- {
- "${a}^{0}_{2.1.1}$"[draw=none],
- "${\varnothing}^{0}_{2.1.2}$"[draw=none]
- }
- }
- }
- };
- \node[yshift=-1.5in, draw=none]
- {\small{${T}^{1}\big(
- {T}^{2}(
- {\varnothing}^{0},
- {T}^{0}({\varnothing}^{0})
- ),
- {T}^{3}\big(
- {T}^{4}({a}^{0},{\varnothing}^{0})
- \big)
- \big)$}};
-\end{scope}
-
-\begin{scope}[xshift=4.2in, yshift=-2in]
- \node[xshift=-0.3in, draw=none] {$u:$};
- \graph [tree layout, grow=down, fresh nodes] {
- "${T}^{1}_{\Lambda}$" -- {
- "${T}^{2}_{1}$" -- {
- "${\epsilon}^{0}_{1.1}$"[draw=none],
- "${\varnothing}^{0}_{1.2}$"[draw=none]
- },
- "${T}^{3}_{2}$" -- {
- "${T}^{4}_{2.1}$" -- {
- "${a}^{0}_{2.1.1}$"[draw=none],
- "${\varnothing}^{0}_{2.1.2}$"[draw=none]
- },
- "${T}^{4}_{2.2}$" -- {
- "${\varnothing}^{0}_{2.2.1}$"[draw=none],
- "${\epsilon}^{0}_{2.2.2}$"[draw=none]
- }
- }
- }
- };
- \node[xshift=0.2in, yshift=-1.5in, draw=none]
- {\small{${T}^{1}\big(
- {T}^{2}(
- {\epsilon}^{0},
- {\varnothing}^{0}
- ),
- {T}^{3}\big(
- {T}^{4}({a}^{0},{\varnothing}^{0}),
- {T}^{4}({\varnothing}^{0}, {\epsilon}^{0})
- \big)
- \big)$}};
-\end{scope}
-
-\end{tikzpicture}
-
-\end{document}
-