/opt/imunify360/venv/lib/python3.11/site-packages/docutils/__pycache__
NameSizeModeActions
core.cpython-311.pyc358290644editdlrm
examples.cpython-311.pyc41750644editdlrm
frontend.cpython-311.pyc460320644editdlrm
io.cpython-311.pyc288040644editdlrm
nodes.cpython-311.pyc1189940644editdlrm
statemachine.cpython-311.pyc723780644editdlrm
__init__.cpython-311.pyc71680644editdlrm
__main__.cpython-311.pyc38680644editdlrm
Edit: /opt/imunify360/venv/lib/python3.11/site-packages/docutils/__pycache__/statemachine.cpython-311.pyc (72378B)
§ «S¤zÓÄW�ãóv—dZdZddlZddlZddlmZddlmZGd„d¦«ZGd„d ¦«Z Gd „d e¦«Z Gd „d e ¦«Z Gd„d¦«Z Gd„de e¦«Z Gd„de e ¦«ZGd„d¦«ZGd„de¦«ZGd„de¦«ZGd„de¦«ZGd„de¦«ZGd„de¦«ZGd „d!e¦«ZGd"„d#e¦«ZGd$„d%e¦«ZGd&„d'e¦«ZGd(„d)e¦«ZGd*„d+e¦«Zd,d-ejd.¦«fd/„Zd0„ZdS)1a« A finite state machine specialized for regular-expression-based text filters, this module defines the following classes: - `StateMachine`, a state machine - `State`, a state superclass - `StateMachineWS`, a whitespace-sensitive version of `StateMachine` - `StateWS`, a state superclass for use with `StateMachineWS` - `SearchStateMachine`, uses `re.search()` instead of `re.match()` - `SearchStateMachineWS`, uses `re.search()` instead of `re.match()` - `ViewList`, extends standard Python lists. - `StringList`, string-specific ViewList. Exception classes: - `StateMachineError` - `UnknownStateError` - `DuplicateStateError` - `UnknownTransitionError` - `DuplicateTransitionError` - `TransitionPatternNotFound` - `TransitionMethodNotFound` - `UnexpectedIndentationError` - `TransitionCorrection`: Raised to switch to another transition. - `StateCorrection`: Raised to switch to another state & transition. Functions: - `string2lines()`: split a multi-line string into a list of one-line strings How To Use This Module ====================== (See the individual classes, methods, and attributes for details.) 1. Import it: ``import statemachine`` or ``from statemachine import ...``. You will also need to ``import re``. 2. Derive a subclass of `State` (or `StateWS`) for each state in your state machine:: class MyState(statemachine.State): Within the state's class definition: a) Include a pattern for each transition, in `State.patterns`:: patterns = {'atransition': r'pattern', ...} b) Include a list of initial transitions to be set up automatically, in `State.initial_transitions`:: initial_transitions = ['atransition', ...] c) Define a method for each transition, with the same name as the transition pattern:: def atransition(self, match, context, next_state): # do something result = [...] # a list return context, next_state, result # context, next_state may be altered Transition methods may raise an `EOFError` to cut processing short. d) You may wish to override the `State.bof()` and/or `State.eof()` implicit transition methods, which handle the beginning- and end-of-file. e) In order to handle nested processing, you may wish to override the attributes `State.nested_sm` and/or `State.nested_sm_kwargs`. If you are using `StateWS` as a base class, in order to handle nested indented blocks, you may wish to: - override the attributes `StateWS.indent_sm`, `StateWS.indent_sm_kwargs`, `StateWS.known_indent_sm`, and/or `StateWS.known_indent_sm_kwargs`; - override the `StateWS.blank()` method; and/or - override or extend the `StateWS.indent()`, `StateWS.known_indent()`, and/or `StateWS.firstknown_indent()` methods. 3. Create a state machine object:: sm = StateMachine(state_classes=[MyState, ...], initial_state='MyState') 4. Obtain the input text, which needs to be converted into a tab-free list of one-line strings. For example, to read text from a file called 'inputfile':: with open('inputfile', encoding='utf-8') as fp: input_string = fp.read() input_lines = statemachine.string2lines(input_string) 5. Run the state machine on the input text and collect the results, a list:: results = sm.run(input_lines) 6. Remove any lingering circular references:: sm.unlink() ÚrestructuredtextéN)Úeast_asian_width)Úutilscó¶—eZdZdZdd„Zd„Z dd„Zd d„Zd!d „Zd „Z d „Z d „Z d!d„Z d„Z d„Zd„Zd„Zd d„Zd„Zdd„Zd d„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZdS)"Ú StateMachinea´ A finite state machine for text filters using regular expressions. The input is provided in the form of a list of one-line strings (no newlines). States are subclasses of the `State` class. Transitions consist of regular expression patterns and transition methods, and are defined in each state. The state machine is started with the `run()` method, which returns the results of processing in a list. Fcó¾—d|_ d|_ d|_ d|_ ||_ ||_ ||_ i|_ | |¦«g|_ dS)a+ Initialize a `StateMachine` object; add state objects. Parameters: - `state_classes`: a list of `State` (sub)classes. - `initial_state`: a string, the class name of the initial state. - `debug`: a boolean; produce verbose output if true (nonzero). Nréÿÿÿÿ) Ú input_linesÚ input_offsetÚlineÚ line_offsetÚdebugÚ initial_stateÚ current_stateÚstatesÚ add_statesÚ observers)ÚselfÚ state_classesrrs úu/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/docutils/statemachine.pyÚ__init__zStateMachine.__init__ƒs€€ð ˆÔð #ðˆÔØJàˆŒ Ø!àˆÔØMàˆŒ Ø$à*ˆÔØCà*ˆÔØCàˆŒ Ø4à �Š˜ Ñ&Ô&Ð&àˆŒð *ð *ócót—|j ¦«D]}| ¦«Œd|_dS©z9Remove circular references to objects no longer required.N)rÚvaluesÚunlink©rÚstates rrzStateMachine.unlink®s9€à”[×'Ò'Ñ)Ô)ð ð ˆEØ �LŠL‰NŒNˆNˆN؈Œ ˆ ˆ rrNcó²—| ¦«t|t¦«r||_nt||¬¦«|_||_d|_|p|j|_|jr>td|j›dd  |j¦«›�tj ¬¦«d}g}|  ¦«} |jrtdtj ¬¦«| |¦«\}} | | ¦« | ¦«|jrK|j |j¦«\} } td | ›d | ›d|j›�tj ¬¦«| |||¦«\}} } | | ¦«nj#t($r]|jr(td |jjztj ¬¦«| |¦«} | | ¦«Y�nwxYw d}nþ#t0$rf} | ¦«| jd f}|jr2td|jj›d|d ›d�tj ¬¦«Yd} ~ �Œsd} ~ wt6$rƒ} | ¦«| jd } t9| j¦«dkrd}n| jdf}|jr(td| ›d|d ›d�tj ¬¦«Yd} ~ nd} ~ wwxYw|  | ¦«}�Œn!#|jr| ¦«‚xYwg|_|S)aÜ Run the state machine on `input_lines`. Return results (a list). Reset `self.line_offset` and `self.current_state`. Run the beginning-of-file transition. Input one line at a time and check for a matching transition. If a match is found, call the transition method and possibly change the state. Store the context returned by the transition method to be passed on to the next transition matched. Accumulate the results returned by the transition methods in a list. Run the end-of-file transition. Finally, return the accumulated results. Parameters: - `input_lines`: a list of strings without newlines, or `StringList`. - `input_offset`: the line offset of `input_lines` from the beginning of the file. - `context`: application-specific storage. - `input_source`: name or path of source of `input_lines`. - `initial_state`: name of initial state. )Úsourcer z, StateMachine.run: input_lines (line_offset=z): | z | ©ÚfileNz! StateMachine.run: bof transitionTz StateMachine.run: line (source=z , offset=z$ StateMachine.run: %s.eof transitionrz2 StateMachine.run: TransitionCorrection to state "z", transition ú.éz- StateMachine.run: StateCorrection to state ")Ú runtime_initÚ isinstanceÚ StringListr r r rrrÚprintÚjoinÚsysÚstderrÚ get_stateÚbofÚextendÚ next_lineÚinfor Ú check_lineÚEOFErrorÚ __class__Ú__name__ÚeofÚTransitionCorrectionÚ previous_lineÚargsÚStateCorrectionÚlenÚerrorr)rr r ÚcontextÚ input_sourcerÚ transitionsÚresultsrÚresultr ÚoffsetÚ next_stateÚ exceptions rÚrunzStateMachine.run´s*€ð. ×ÒÑÔÐÝ �k¥:Ñ .Ô .ð LØ*ˆDÔ Ð å)¨+¸lÐKÑKÔKˆDÔ Ø(ˆÔØˆÔØ*Ð@¨dÔ.@ˆÔØ Œ:ð #Ý ˆEØÔ%Ð%Ð% v§{¢{°4Ô3CÑ'DÔ'DÐ'DðFå”zð #ñ #ô #ð #ðˆ ØˆØ—’Ñ Ô ˆð4 ØŒzð MÝÐ:ÅÄÐLÑLÔLÐLØ#Ÿiši¨Ñ0Ô0‰OˆG�VØ �NŠN˜6Ñ "Ô "Ð "ð+ 3ð)'ð/ØŸšÑ(Ô(Ð(Øœ:ðEØ-1Ô-=×-BÒ-BØ $Ô 0ñ.2ô.2™N˜F Få!ð#3Ø-3ð#3ð#3Ø@Fð#3ð#3à'+¤yð#3ð#3å9<¼ðEñEôEðEð7;·o²oØ# U¨Kñ79ô79Ñ3˜ ¨Vð Ÿš vÑ.Ô.Ð.Ð.øõ$ðððØœ:ðOÝ!Ð"IØ$)¤OÔ$<ñ#=ÝCFÄ:ðOñOôOðOà!&§¢¨7Ñ!3Ô!3˜ØŸš vÑ.Ô.Ð.Ø™ð øøøð/ð,#'�K�Køõ+,ðððØ×&Ò&Ñ(Ô(Ð(Ø#,¤>°!Ô#4Ð"6�KØ”zð/Ýð>Ø(-¬Ô(@ð>ð>à,7¸¬Nð>ð>ð>õ$'¤:ð/ñ/ô/ð/ð�H�H�H‘HøøøøÝ&ð /ð /ð /Ø×&Ò&Ñ(Ô(Ð(Ø!*¤°Ô!2�Jݘ9œ>Ñ*Ô*¨aÒ/Ð/Ø&*˜ ˜ à'0¤~°aÔ'8Ð&:˜ Ø”zð/ÝðNØ",ðNðNØL/Ê LÊA9LÌ L/ÌLÌL/Ì/M c ó—|rU|jrG||jkrÒ>Ð>Ý�àÔ+Ð+Ð+¨Z¨Z¨ZØ×-Ò-Ñ/Ô/Ð/Ð/ð1õ8;´zðCñCôCðCð",ˆDÔ ð 8Ø”;˜tÔ1Ô2Ð 2øÝð 8ð 8ð 8Ý# DÔ$6Ñ7Ô7Ð 7ð 8øøøs ÁA+Á+B r$cóö— |xj|z c_|j|j|_n#t$rd|_t‚wxYw|j| ¦«S#| ¦«wxYw)z9Load `self.line` with the `n`'th next line and return it.N)r r r Ú IndexErrorr2Únotify_observers©rÚns rr/zStateMachine.next_line&s�€ð $ð ØÐ Ô  AÑ%Ð Ô Ø Ô,¨TÔ-=Ô>�” � øÝð ð ð Ø �” Ý�ð øøøð”9à × !Ò !Ñ #Ô #Ð #Ð #øˆD× !Ò !Ñ #Ô #Ð #Ð #øøøsƒ'+ªA"«AÁ A"Á"A8cóv— |j|jdz ¦« S#t$rYdSwxYw)z6Return True if the next line is blank or non-existent.r$)r r ÚstriprJ©rs rÚis_next_line_blankzStateMachine.is_next_line_blank3sN€ð ØÔ'¨Ô(8¸1Ñ(<Ô=×CÒCÑEÔEÐEÐ EøÝð ð ð Ø�1�1ð øøøs ‚'*ª 8·8cóB—|jt|j¦«dz kS)z0Return 1 if the input is at or past end-of-file.r$)r r:r rPs rÚat_eofzStateMachine.at_eof:s €àÔ¥3 tÔ'7Ñ#8Ô#8¸1Ñ#<Ò<Ðs€àÔ 1Ò$Ð$rcó¬—|xj|zc_|jdkrd|_n|j|j|_| ¦«|jS)z=Load `self.line` with the `n`'th previous line and return it.rN)r r r rKrLs rr7zStateMachine.previous_lineBsY€à ÐÔ˜AÑÐÔØ Ô ˜aÒ Ð ØˆDŒIˆIàÔ(¨Ô)9Ô:ˆDŒIØ ×ÒÑÔÐØŒyÐrcóô— ||jz |_|j|j|_n#t$rd|_t ‚wxYw|j| ¦«S#| ¦«wxYw)z?Jump to absolute line offset `line_offset`, load and return it.N)r r r r rJr2rK©rr s rÚ goto_linezStateMachine.goto_lineLs‹€ð $ð Ø#.°Ô1BÑ#B�Ô Ø Ô,¨TÔ-=Ô>�” � øÝð ð ð Ø �” Ý�ð øøøð”9à × !Ò !Ñ #Ô #Ð #Ð #øˆD× !Ò !Ñ #Ô #Ð #Ð #øøøsƒ&*©A!ªAÁ A!Á!A7cóF—|j ||jz ¦«S)zØÔ%ˆFˆFà˜dÔ/Ñ/°!Ñ3ˆFð &Ø!Ô-×2Ò2°6Ñ:Ô:‰NˆC�Ø !‘mˆGˆGøÝð $ð $ð $à×3Ò3°F¸TÔ=NÑ4NÑOÔO‰LˆC�ؘ !™ Ð#Ð #Ð #Ð #Ýð &ð &ð &Ø%‰LˆC���ð &øøøð �Gˆ|Ðs™"<¼1BÁ/BÁ?Bcó&—|j |jdzdd|zt|¦«¬¦«|j |jdzdd|zd¬¦«|j |jdzt ||¦«¦«dS)Nr$Úzinternal padding after )r rAzinternal padding before r é)r Úinsertr r:r')rr r s rÚ insert_inputzStateMachine.insert_input€s½€Ø Ô×Ò Ô 0°1Ñ 4°bØ'@ÀÑ'GÝ'*¨;Ñ'7Ô'7ð ñ 9ô 9ð 9ð Ô×Ò Ô 0°1Ñ 4°bØ'AÀ&Ñ'HØ')ð ñ +ô +ð +ð Ô×Ò Ô 0°1Ñ 4Ý *¨;¸Ñ ?Ô ?ñ Aô Að Að Að Arcó— |j |j|¦«}| t |¦«dz ¦«|S#t $r8}|jd}| t |¦«dz ¦«‚d}~wwxYw)úÜ Return a contiguous block of text. If `flush_left` is true, raise `UnexpectedIndentationError` if an indented line is encountered before the text block ends (with a blank line). r$rN)r Úget_text_blockr r/r:ÚUnexpectedIndentationErrorr8)rÚ flush_leftÚblockÚerrs rrozStateMachine.get_text_blockŠs“€ð ØÔ$×3Ò3°DÔ4DØ4>ñ@ô@ˆEà �NŠN�3˜u™:œ:¨™>Ñ *Ô *Ð *؈LøÝ)ð ð ð Ø”H˜Q”KˆEØ �NŠN�3˜u™:œ:¨™>Ñ *Ô *Ð *Ø øøøøð øøøs‚AA Á B Á3BÂB cóì—|€|j}|jr,td|jj›d|›d�t j¬¦«|D]q}|j|\}}}| |j ¦«}|rB|jr,td|›d|jj›d�t j¬¦«||||¦«cSŒr|jr(td |jjzt j¬¦«|  ||¦«S) a¯ Examine one line of input for a transition match & execute its method. Parameters: - `context`: application-dependent storage. - `state`: a `State` object, the current state. - `transitions`: an optional ordered list of transition names to try, instead of ``state.transition_order``. Return the values returned by the transition method: - context: possibly modified from the parameter `context`; - next state name (`State` subclass name); - the result output of the transition, a list. When there is no match, ``state.no_match()`` is called and its return value is returned. Nz! StateMachine.check_line: state="z", transitions=r#r!z. StateMachine.check_line: Matched transition "z " in state "z".z1 StateMachine.check_line: No match in state "%s".) Útransition_orderrr(r3r4r*r+r>Úmatchr Úno_match) rr<rr>ÚnameÚpatternÚmethodrBrvs rr1zStateMachine.check_lineœs]€ð( Ð ØÔ0ˆKØ Œ:ð NÝ ˆEØ”_Ô-Ð-Ð-¨{¨{¨{ð<ÝBEÄ*ð Nñ Nô Nð Nàð 8ð 8ˆDØ*/Ô*;¸DÔ*AÑ 'ˆG�V˜ZØ—M’M $¤)Ñ,Ô,ˆEØð :Ø”:ð+ÝðMØ"ðMðMØ05´Ô0HðMðMðMå"œzð+ñ+ô+ð+ð�v˜e W¨jÑ9Ô9Ð9Ð9Ð9ð  :ðŒzð CÝÐJØœÔ0ñ1Ý7:´zðCñCôCðCà—>’> '¨;Ñ7Ô7Ð 7rcóv—|j}||jvrt|¦«‚|||j¦«|j|<dS)zª Initialize & add a `state_class` (`State` subclass) object. Exception: `DuplicateStateError` raised if `state_class` was already added. N)r4rÚDuplicateStateErrorr)rÚ state_classÚ statenames rÚ add_statezStateMachine.add_stateÄsG€ð Ô(ˆ Ø ˜œ Ð #Ð #Ý% iÑ0Ô0Ð 0Ø!, ¨T°4´:Ñ!>Ô!>ˆŒ �IÑÐÐrcó:—|D]}| |¦«ŒdS)zE Add `state_classes` (a list of `State` subclasses). N)r)rrr}s rrzStateMachine.add_statesÐs2€ð)ð (ð (ˆKØ �NŠN˜;Ñ 'Ô 'Ð 'Ð 'ð (ð (rcóf—|j ¦«D]}| ¦«ŒdS)z+ Initialize `self.states`. N)rrr%rs rr%zStateMachine.runtime_init×s@€ð”[×'Ò'Ñ)Ô)ð !ð !ˆEØ × Ò Ñ Ô Ð Ð ð !ð !rcó—t¦«\}}}}}t|›d|›�tj¬¦«td| ¦«ztj¬¦«td|›d|›d|›�tj¬¦«dS)zReport error details.z: r!z input line %szmodule z, line z , function N)Ú_exception_datar(r*r+rF)rÚtypeÚvalueÚmoduler Úfunctions rr;zStateMachine.errorÞs™€å.=Ñ.?Ô.?Ñ+ˆˆe�V˜T 8Ý ˜$˜$˜$  Ð&­S¬ZÐ8Ñ8Ô8Ð8Ý ˆo ×!5Ò!5Ñ!7Ô!7Ñ8½s¼zÐJÑJÔJÐJÝ ˆ°6°6°6¸4¸4¸4ÀÀÐJÝ”:ð ñ ô ð ð ð rcó:—|j |¦«dS)z– The `observer` parameter is a function or bound method which takes two arguments, the source and offset of the current line. N)rÚappend©rÚobservers rÚattach_observerzStateMachine.attach_observeræs €ð Œ×Ò˜hÑ'Ô'Ð'Ð'Ð'rcó:—|j |¦«dS©N)rÚremoverŠs rÚdetach_observerzStateMachine.detach_observerís€Ø Œ×Ò˜hÑ'Ô'Ð'Ð'Ð'rcóŠ—|jD]:} |j |j¦«}n#t$rd}YnwxYw||ŽŒ;dS)Nra)rr r0r rJ)rr‹r0s rrKzStateMachine.notify_observersðsn€Øœð ð ˆHð $ØÔ'×,Ò,¨TÔ-=Ñ>Ô>��øÝð $ð $ð $Ø#���ð $øøøà ˆH�dˆOˆOˆOð  ð s ‹+« :¹:©F)rNNNrŽ©r$)r4Ú __module__Ú __qualname__Ú__doc__rrrDr,r/rQrSrUr7rYr[r^rFrcrlror1rrr%r;rŒr�rK©rrrrusÀ€€€€ð ð ð)*ð)*ð)*ð)*ðVððð 8<Ø-1ð\ð\ð\ð\ð|8ð8ð8ð8ð( $ð $ð $ð $ðððð=ð=ð=ð%ð%ð%ððððð $ð $ð $ðHðHðHð4ð4ð4ð8ð8ð8ððððð6AðAðAððððð$&8ð&8ð&8ð&8ðP ?ð ?ð ?ð(ð(ð(ð!ð!ð!ðððð(ð(ð(ð(ð(ð(ðððððrrcó|—eZdZdZdZ dZ dZ dZ dd„Zd„Z d„Z d„Z d„Z d „Z d „Zdd „Zd „Zd „Zd„Zd„Zd„ZdS)ÚStateaw State superclass. Contains a list of transitions, and transition methods. Transition methods all have the same signature. They take 3 parameters: - An `re` match object. ``match.string`` contains the matched input line, ``match.start()`` gives the start index of the match, and ``match.end()`` gives the end index. - A context object, whose meaning is application-defined (initial value ``None``). It can be used to store any information required by the state machine, and the returned context is passed on to the next transition method unchanged. - The name of the next state, a string, taken from the transitions list; normally it is returned unchanged, but it may be altered by the transition method if necessary. Transition methods all return a 3-tuple: - A context object, as (potentially) modified by the transition method. - The next state name (a return value of ``None`` means no state change). - The processing result, a list, which is accumulated by the state machine. Transition methods may raise an `EOFError` to cut processing short. There are two implicit transitions, and corresponding transition methods are defined: `bof()` handles the beginning-of-file, and `eof()` handles the end-of-file. These methods have non-standard signatures and return values. `bof()` returns the initial context and results, and may be used to return a header string, or do any other processing needed. `eof()` should handle any remaining context and wrap things up; it returns the final processing result. Typical applications need only subclass `State` (or a subclass), set the `patterns` and `initial_transitions` class attributes, and provide corresponding transition methods. The default object initialization will take care of constructing the list of transitions. NFcóä—g|_ i|_ | ¦«||_ ||_ |j€|jj|_|j€|jg|jjdœ|_dSdS)zã Initialize a `State` object; make & add initial transitions. Parameters: - `statemachine`: the controlling `StateMachine` object. - `debug`: a boolean; produce verbose output if true. N)rr) rur>Úadd_initial_transitionsÚ state_machinerÚ nested_smr3Únested_sm_kwargsr4©rrœrs rrzState.__init__Fs’€ð!#ˆÔØ9àˆÔð ð ×$Ò$Ñ&Ô&Ð&à*ˆÔØCàˆŒ Ø$à Œ>Ð !Ø!Ô/Ô9ˆDŒNØ Ô Ð (Ø7;´~Ð6FØ6:´nÔ6Mð%Oð%OˆDÔ !Ð !Ð !ð )Ð (rcó—dS)z{ Initialize this `State` before running the state machine; called from `self.state_machine.run()`. Nr—rPs rr%zState.runtime_initjs €ð ˆrcó—d|_dSr)rœrPs rrz State.unlinkqs€à!ˆÔÐÐrcó~—|jr5| |j¦«\}}| ||¦«dSdS)z>Make and add transitions listed in `self.initial_transitions`.N)Úinitial_transitionsÚmake_transitionsÚadd_transitions©rÚnamesr>s rr›zState.add_initial_transitionsusS€à Ô #ð 5Ø!%×!6Ò!6Ø%)Ô%=ñ"?ô"?Ñ ˆE�;à × Ò  ¨ Ñ 4Ô 4Ð 4Ð 4Ð 4ð 5ð 5rcó²—|D]-}||jvrt|¦«‚||vrt|¦«‚Œ.||jdd…<|j |¦«dS)a" Add a list of transitions to the start of the transition list. Parameters: - `names`: a list of transition names. - `transitions`: a mapping of names to transition tuples. Exceptions: `DuplicateTransitionError`, `UnknownTransitionError`. Nr)r>ÚDuplicateTransitionErrorÚUnknownTransitionErrorruÚupdate)rr§r>rxs rr¥zState.add_transitions|s{€ðð 3ð 3ˆDØ�tÔ'Ð'Ð'Ý.¨tÑ4Ô4Ð4ؘ;Ð&Ð&Ý,¨TÑ2Ô2Ð2ð'à$)ˆÔ˜b˜q˜bÑ!Ø Ô×Ò  Ñ,Ô,Ð,Ð,Ð,rcód—||jvrt|¦«‚|g|jdd…<||j|<dS)z¹ Add a transition to the start of the transition list. Parameter `transition`: a ready-made transition 3-tuple. Exception: `DuplicateTransitionError`. Nr)r>r©ru)rrxÚ transitions rÚadd_transitionzState.add_transition�sF€ð �4Ô#Ð #Ð #Ý*¨4Ñ0Ô0Ð 0Ø%) FˆÔ˜b˜q˜bÑ!Ø!+ˆÔ˜ÑÐÐrcót— |j|=|j |¦«dS#t|¦«‚xYw)z^ Remove a transition by `name`. Exception: `UnknownTransitionError`. N)r>rur�rª)rrxs rÚremove_transitionzState.remove_transitionœsF€ð  /ØÔ  Ð&Ø Ô !× (Ò (¨Ñ .Ô .Ð .Ð .Ð .øð /Ý(¨Ñ.Ô.Ð .øøøs‚"&¦7cóx—|€ |jj} |j|}t|d¦«st j|¦«x}|j|<n-#t $r t|jj›d|›d�¦«‚wxYw t||¦«}n,#t$rt|jj›d|›�¦«‚wxYw|||fS)aŽ Make & return a transition tuple based on `name`. This is a convenience function to simplify transition creation. Parameters: - `name`: a string, the name of the transition pattern & method. This `State` object must have a method called '`name`', and a dictionary `self.patterns` containing a key '`name`'. - `next_state`: a string, the name of the next `State` object for this transition. A value of ``None`` (or absent) implies no state change (i.e., continue with the same state). Exceptions: `TransitionPatternNotFound`, `TransitionMethodNotFound`. Nrvz .patterns[ú]r#) r3r4ÚpatternsÚhasattrÚreÚcompilerGÚTransitionPatternNotFoundÚgetattrÚAttributeErrorÚTransitionMethodNotFound)rrxrBryrzs rÚmake_transitionzState.make_transition¨s€ð" Ð ØœÔ0ˆJð GØ”m DÔ)ˆGݘ7 GÑ,Ô,ð DÝ02´ ¸7Ñ0CÔ0CÐC�˜$œ-¨Ñ-øøÝð Gð Gð GÝ+Ø'+¤~Ô'>Ð'>Ð'>ÀÀÀÐEñGôGð Gð Gøøøð =ݘT 4Ñ(Ô(ˆFˆFøÝð =ð =ð =Ý*Ø!œ^Ô4Ð4Ð4°d°dÐ;ñ=ô=ð =ð =øøøð˜  Ð*Ð*s�;A Á *A6Á:B  )B4cóþ—g}i}|D]s}t|t¦«r.| |¦«||<| |¦«ŒE|j|Ž||d<| |d¦«Œt||fS)zú Return a list of transition names and a transition mapping. Parameter `name_list`: a list, where each entry is either a transition name string, or a 1- or 2-tuple (transition name, optional next state name). r)r&Ústrr»r‰)rÚ name_listr§r>Ú namestates rr¤zState.make_transitionsÉs˜€ðˆØˆ Ø"ð +ð +ˆIݘ)¥SÑ)Ô)ð +Ø)-×)=Ò)=¸iÑ)HÔ)H� ˜IÑ&Ø— ’ ˜YÑ'Ô'Ð'Ð'à,@¨DÔ,@À)Ð,L� ˜I aœLÑ)Ø— ’ ˜Y qœ\Ñ*Ô*Ð*Ð*Ø�kÐ!Ð!rcó —|dgfS)a' Called when there is no match from `StateMachine.check_line()`. Return the same values returned by transition methods: - context: unchanged; - next state name: ``None``; - empty result list. Override in subclasses to catch this event. Nr—)rr<r>s rrwzState.no_matchÜs€ð˜˜bÐ Ð rcó —|gfS)z± Handle beginning-of-file. Return unchanged `context`, empty result. Override in subclasses. Parameter `context`: application-defined storage. r—©rr<s rr-z State.bofês€ð˜ˆ{Ðrcó—gS)z– Handle end-of-file. Return empty result. Override in subclasses. Parameter `context`: application-defined storage. r—rÂs rr5z State.eofôs €ðˆ rcó —||gfS)z· A "do nothing" transition method. Return unchanged `context` & `next_state`, empty result. Useful for simple state changes (actionless transitions). r—©rrvr<rBs rÚnopz State.nopþs€ð˜  BÐ&Ð&rr’rŽ)r4r”r•r–r³r£r�ržrr%rr›r¥r®r°r»r¤rwr-r5rÆr—rrr™r™ùs$€€€€€ð%ð%ðN€Hðð Ððð €IððÐð ð"Oð"Oð"Oð"OðH ð ð ð"ð"ð"ð5ð5ð5ð-ð-ð-ð& ,ð ,ð ,ð /ð /ð /ð+ð+ð+ð+ðB"ð"ð"ð& !ð !ð !ððððððð'ð'ð'ð'ð'rr™có.—eZdZdZdd„Zdd„Z d d„ZdS) ÚStateMachineWSaq `StateMachine` subclass specialized for whitespace recognition. There are three methods provided for extracting indented text blocks: - `get_indented()`: use when the indent is unknown. - `get_known_indented()`: use when the indent is known for all lines. - `get_first_known_indented()`: use when only the first line's indent is known. FTcóp—| ¦«}|j |j||¦«\}}}|r%| t |¦«dz ¦«|rO|d ¦«s5| ¦«|dz }|r|d ¦«¯5||||fS)a Return a block of indented lines of text, and info. Extract an indented block where the indent is unknown for all lines. :Parameters: - `until_blank`: Stop collecting at the first blank line if true. - `strip_indent`: Strip common leading indent if true (default). :Return: - the indented block (a list of lines of text), - its indent, - its first line offset from BOF, and - whether or not it finished with a blank line. r$r©r^r Ú get_indentedr r/r:rOÚ trim_start)rÚ until_blankÚ strip_indentrAÚindentedÚindentÚ blank_finishs rrËzStateMachineWS.get_indentedsÏ€ð ×%Ò%Ñ'Ô'ˆØ)-Ô)9×)FÒ)FØÔ  ¨\ñ*;ô*;Ñ&ˆ�&˜,à ð .Ø �NŠN�3˜x™=œ=¨1Ñ,Ñ -Ô -Ð -Øð ˜x¨œ{×0Ò0Ñ2Ô2ð Ø × Ò Ñ !Ô !Ð !Ø �a‰KˆFðð ˜x¨œ{×0Ò0Ñ2Ô2ð 𘠨Ð5Ð5rcón—| ¦«}|j |j|||¬¦«\}}}| t |¦«dz ¦«|rO|d ¦«s5| ¦«|dz }|r|d ¦«¯5|||fS)aß Return an indented block and info. Extract an indented block where the indent is known for all lines. Starting with the current line, extract the entire text block with at least `indent` indentation (which must be whitespace, except for the first line). :Parameters: - `indent`: The number of indent columns/characters. - `until_blank`: Stop collecting at the first blank line if true. - `strip_indent`: Strip `indent` characters of indentation if true (default). :Return: - the indented block, - its first line offset from BOF, and - whether or not it finished with a blank line. )Ú block_indentr$rrÊ)rrÐrÍrÎrArÏrÑs rÚget_known_indentedz!StateMachineWS.get_known_indented/sЀð(×%Ò%Ñ'Ô'ˆØ)-Ô)9×)FÒ)FØÔ  ¨\Ø!ð*Gñ*#ô*#Ñ&ˆ�&˜,ð �Š•s˜8‘}”} qÑ(Ñ)Ô)Ð)Øð ˜x¨œ{×0Ò0Ñ2Ô2ð Ø × Ò Ñ !Ô !Ð !Ø �a‰KˆFðð ˜x¨œ{×0Ò0Ñ2Ô2ð ð˜ Ð-Ð-rcót—| ¦«}|j |j|||¬¦«\}}}| t |¦«dz ¦«|rQ|rO|d ¦«s5| ¦«|dz }|r|d ¦«¯5||||fS)aã Return an indented block and info. Extract an indented block where the indent is known for the first line and unknown for all other lines. :Parameters: - `indent`: The first line's indent (# of columns/characters). - `until_blank`: Stop collecting at the first blank line if true (1). - `strip_indent`: Strip `indent` characters of indentation if true (1, default). - `strip_top`: Strip blank lines from the beginning of the block. :Return: - the indented block, - its indent, - its first line offset from BOF, and - whether or not it finished with a blank line. )Ú first_indentr$rrÊ)rrÐrÍrÎÚ strip_toprArÏrÑs rÚget_first_known_indentedz'StateMachineWS.get_first_known_indentedMsÚ€ð,×%Ò%Ñ'Ô'ˆØ)-Ô)9×)FÒ)FØÔ  ¨\Ø!ð*Gñ*#ô*#Ñ&ˆ�&˜,ð �Š•s˜8‘}”} qÑ(Ñ)Ô)Ð)Ø ð Øð  8¨A¤;×#4Ò#4Ñ#6Ô#6ð Ø×#Ò#Ñ%Ô%Ð%ؘ!‘ �ðð  8¨A¤;×#4Ò#4Ñ#6Ô#6ð 𘠨Ð5Ð5rN)FT)FTT)r4r”r•r–rËrÔrØr—rrrÈrÈsc€€€€€ð ð ð6ð6ð6ð6ð4.ð.ð.ð.ð<Bð6ð6ð6ð6ð6ð6rrÈcóš—eZdZdZdZ dZ dZ dZ ej d¦«ej d¦«dœZ dZ d d„Z d„Z d „Zd „Zd „Zd „ZdS)ÚStateWSa´ State superclass specialized for whitespace (blank lines & indents). Use this class with `StateMachineWS`. The transitions 'blank' (for blank lines) and 'indent' (for indented text blocks) are added automatically, before any other transitions. The transition method `blank()` handles blank lines and `indent()` handles nested indented blocks. Indented blocks trigger a new state machine to be created by `indent()` and run. The class of the state machine to be created is in `indent_sm`, and the constructor keyword arguments are in the dictionary `indent_sm_kwargs`. The methods `known_indent()` and `firstknown_indent()` are provided for indented blocks where the indent (all lines' and first line's only, respectively) is known to the transition method, along with the attributes `known_indent_sm` and `known_indent_sm_kwargs`. Neither transition method is triggered automatically. Nz *$z +)ÚblankrÐFcóÚ—t |||¦«|j€ |j|_|j€ |j|_|j€ |j|_|j€|j|_dSdS)z™ Initialize a `StateSM` object; extends `State.__init__()`. Check for indent state machine attributes, set defaults if not set. N)r™rÚ indent_smr�Úindent_sm_kwargsržÚknown_indent_smÚknown_indent_sm_kwargsrŸs rrzStateWS.__init__¬st€õ �Š�t˜]¨EÑ2Ô2Ð2Ø Œ>Ð !Ø!œ^ˆDŒNØ Ô Ð (Ø$(Ô$9ˆDÔ !Ø Ô Ð 'Ø#'¤>ˆDÔ Ø Ô &Ð .Ø*.Ô*?ˆDÔ 'Ð 'Ð 'ð /Ð .rcóú—t |¦«|j€i|_|j |j¦«| |j¦«\}}| ||¦«dS)z‹ Add whitespace-specific transitions before those defined in subclass. Extends `State.add_initial_transitions()`. N)r™r›r³r«Ú ws_patternsr¤Úws_initial_transitionsr¥r¦s rr›zStateWS.add_initial_transitions¼s|€õ ×%Ò% dÑ+Ô+Ð+Ø Œ=Р؈DŒMØ Œ ×Ò˜TÔ-Ñ.Ô.Ð.Ø!×2Ò2Ø Ô 'ñ)ô)шˆ{à ×Ò˜U KÑ0Ô0Ð0Ð0Ð0rcó0—| |||¦«S)z9Handle blank lines. Does nothing. Override in subclasses.)rÆrÅs rrÛz StateWS.blankÊs€à�xŠx˜˜w¨ Ñ3Ô3Ð3rcó¨—|j ¦«\}}}}|jdd|ji|j¤Ž}| ||¬¦«} ||| fS)z¸ Handle an indented text block. Extend or override in subclasses. Recursively run the registered state machine for indented blocks (`self.indent_sm`). r©r r—)rœrËrÝrrÞrD) rrvr<rBrÏrÐr rÑÚsmr?s rrÐzStateWS.indentÎsf€ðÔ × ,Ò ,Ñ .Ô .ñ ˆ�6˜;¨ à ˆTŒ^Ð FÐ F $¤*Ð F°Ô0EÐ FÐ FˆØ—&’&˜° �&Ñ<Ô<ˆØ˜  GÐ+Ð+rcóÌ—|j | ¦«¦«\}}}|jdd|ji|j¤Ž}| ||¬¦«}|||fS)a Handle a known-indent text block. Extend or override in subclasses. Recursively run the registered state machine for known-indent indented blocks (`self.known_indent_sm`). The indent is the length of the match, ``match.end()``. rrær—)rœrÔÚendrßrràrD© rrvr<rBrÏr rÑrçr?s rÚ known_indentzStateWS.known_indentÛs€ðÔ × 2Ò 2°5·9²9±;´;Ñ ?Ô ?ñ ˆ�;  à !ˆTÔ !ðAðA¨¬ ðAØ$(Ô$?ðAðAˆà—&’&˜° �&Ñ<Ô<ˆØ˜  GÐ+Ð+rcóÌ—|j | ¦«¦«\}}}|jdd|ji|j¤Ž}| ||¬¦«}|||fS)a0 Handle an indented text block (first line's indent known). Extend or override in subclasses. Recursively run the registered state machine for known-indent indented blocks (`self.known_indent_sm`). The indent is the length of the match, ``match.end()``. rrær—)rœrØrérßrràrDrês rÚfirst_known_indentzStateWS.first_known_indentês€ðÔ × 8Ò 8¸¿º¹¼Ñ EÔ Eñ ˆ�;  à !ˆTÔ !ðAðA¨¬ ðAØ$(Ô$?ðAðAˆà—&’&˜° �&Ñ<Ô<ˆØ˜  GÐ+Ð+rr’)r4r”r•r–rÝrÞrßràrµr¶rârãrr›rÛrÐrërír—rrrÚrÚosò€€€€€ððð$€IððÐðð€Oðð"Ððð'˜BœJ uÑ-Ô-Ø'˜RœZ¨Ñ-Ô-ð/ð/€Kðð1ÐðFð@ð@ð@ð@ð 1ð 1ð 1ð4ð4ð4ð ,ð ,ð ,ð ,ð ,ð ,ð,ð,ð,ð,ð,rrÚcó—eZdZdZd„ZdS)Ú_SearchOverridea£ Mix-in class to override `StateMachine` regular expression behavior. Changes regular expression matching, from the default `re.match()` (succeeds only if the pattern matches at the start of `self.line`) to `re.search()` (succeeds if the pattern matches anywhere in `self.line`). When subclassing a `StateMachine`, list this class **first** in the inheritance list of the class definition. có6—| |j¦«S)z® Return the result of a regular expression search. Overrides `StateMachine.match()`. Parameter `pattern`: `re` compiled regular expression. )Úsearchr )rrys rrvz_SearchOverride.matchs€ð�~Š~˜dœiÑ(Ô(Ð(rN)r4r”r•r–rvr—rrrïrïüs-€€€€€ððð)ð)ð)ð)ð)rrïcó—eZdZdZdS)ÚSearchStateMachinez@`StateMachine` which uses `re.search()` instead of `re.match()`.N©r4r”r•r–r—rrrórós€€€€€ØJÐJØ€Drrócó—eZdZdZdS)ÚSearchStateMachineWSzB`StateMachineWS` which uses `re.search()` instead of `re.match()`.Nrôr—rrrörös€€€€€ØLÐLØ€Drröcó—eZdZdZ d+d„Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z d „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZeZd„Zd„Zd,d„Zd,d„Zd-d„Zd.d„Zd.d„Zd „Zd!„Z d"„Z!d#„Z"d$„Z#d%„Z$d&„Z%d'„Z&d(„Z'd)„Z(d*„Z)dS)/ÚViewLista> List with extended functionality: slices of ViewList objects are child lists, linked to their parents. Changes made to a child list also affect the parent list. A child list is effectively a "view" (in the SQL sense) of the parent list. Changes to parent lists, however, do *not* affect active child lists. If a parent list is changed, any active child lists should be recreated. The start and end of the slice can be trimmed using the `trim_start()` and `trim_end()` methods, without affecting the parent list. The link between child and parent lists can be broken by calling `disconnect()` on the child list. Also, ViewList objects keep track of the source & offset of each item. This information is accessible via the `source()`, `offset()`, and `info()` methods. Nc󯇗g|_ g|_ ||_ ||_ t |t ¦«r)|jdd…|_|jdd…|_nM|�Kt |¦«|_|r||_n-ˆfd„tt|¦«¦«D¦«|_t|j¦«t|j¦«ks Jd¦«‚dS)Ncó•—g|]}‰|f‘ŒSr—r—)Ú.0Úir s €rú z%ViewList.__init__..Isø€ÐHÐHÐH¨a˜v q˜kÐHÐHÐHrú data mismatch) ÚdataÚitemsÚparentÚ parent_offsetr&røÚlistÚranger:)rÚinitlistr rrrs ` rrzViewList.__init__1sæø€àˆŒ ØFàˆŒ ð ðˆŒ Øà*ˆÔØHå �h¥Ñ )Ô )ð IØ œ  a a aÔ(ˆDŒIØ!œ¨¨¨Ô*ˆDŒJˆJØ Ð !ݘX™œˆDŒIØð IØ"�” � àHÐHÐHÐHµ5½¸X¹¼Ñ3GÔ3GÐHÑHÔH�” Ý�4”9‰~Œ~¥ T¤Z¡¤Ò0Ð0Ð0°/Ñ0Ô0Ð0Ð0Ð0rcó*—t|j¦«SrŽ)r½rÿrPs rÚ__str__zViewList.__str__Ló€Ý�4”9‰~Œ~Ðrcó@—|jj›d|j›d|j›d�S)Nú(z, items=ú))r3r4rÿrrPs rÚ__repr__zViewList.__repr__Os*€Ø”.Ô)ÐLÐL¨D¬IÐLÐL¸t¼zÐLÐLÐLÐLrcó>—|j| |¦«kSrŽ©rÿÚ_ViewList__cast©rÚothers rÚ__lt__zViewList.__lt__Ró€ D¤I°· ² ¸EÑ0BÔ0BÒ$BÐBrcó>—|j| |¦«kSrŽrrs rÚ__le__zViewList.__le__Só€ D¤I°·²¸UÑ1CÔ1CÒ$CÐCrcó>—|j| |¦«kSrŽrrs rÚ__eq__zViewList.__eq__Trrcó>—|j| |¦«kSrŽrrs rÚ__ne__zViewList.__ne__Urrcó>—|j| |¦«kSrŽrrs rÚ__gt__zViewList.__gt__Vrrcó>—|j| |¦«kSrŽrrs rÚ__ge__zViewList.__ge__Wrrcó>—t|t¦«r|jS|SrŽ)r&rørÿrs rÚ__castzViewList.__castYs!€Ý �e�XÑ &Ô &ð Ø”:Ð àˆLrcó—||jvSrŽ©rÿ©rÚitems rÚ __contains__zViewList.__contains___s€Ø�t”yÐ Ð rcó*—t|j¦«SrŽ)r:rÿrPs rÚ__len__zViewList.__len__brrcó—t|t¦«ra|jdvs Jd¦«‚| |j|j|j…|j|j|j…||jpd¬¦«S|j|S)N©Nr$úcannot handle slice with strider)rrr)r&ÚsliceÚstepr3rÿÚstartÚstopr©rrüs rÚ __getitem__zViewList.__getitem__isŠ€Ý �a�Ñ Ô ð Ø”6˜YÐ&Ð&Ð&Ð(IÑ&Ô&Ð&Ø—>’> $¤)¨A¬G°A´F¨NÔ";Ø(,¬ °1´7¸1¼6°>Ô(BØ)-¸Q¼W¸\Èð"ñKôKð Kð”9˜Q”<Ð rcóH—t|t¦«rç|jdvs Jd¦«‚t|t¦«st d¦«‚|j|j|j|j…<|j|j|j|j…<t|j¦«t|j¦«ks Jd¦«‚|j r=|jpd|j z}|jpt|¦«|j z}||j ||…<dSdS||j|<|j r||j ||j z<dSdS)Nr)r*z(assigning non-ViewList to ViewList slicerþr) r&r+r,rørbrÿr-r.rr:rr)rrür$ÚkrMs rÚ __setitem__zViewList.__setitem__rs9€Ý �a�Ñ Ô ð ;Ø”6˜YÐ&Ð&Ð&Ð(IÑ&Ô&Ð&ݘd¥HÑ-Ô-ð LÝÐ JÑKÔKÐKØ(,¬ ˆDŒI�a”g˜aœf�nÑ %Ø)-¬ˆDŒJ�q”w˜qœv�~Ñ &Ý�t”y‘>”>¥S¨¬¡_¤_Ò4Ð4Ð4°oÑ4Ô4Ð4ØŒ{ð (Ø”W�\  TÔ%7Ñ7�Ø”VÐ(�s 4™yœy¨DÔ,>Ñ>�Ø#'�” ˜A˜a˜CÑ Ð Ð ð (ð (ð  ˆDŒI�a‰LØŒ{ð ;Ø6:�” ˜A Ô 2Ñ2Ñ3Ð3Ð3ð ;ð ;rcót— |j|=|j|=|jr|j||jz=dSdS#t$r€|j� Jd¦«‚|j|j|j…=|j|j|j…=|jr<|jpd|jz}|jpt|¦«|jz}|j||…=YdSYdSwxYw)Nr*r) rÿrrrrbr,r-r.r:)rrür2rMs rÚ __delitem__zViewList.__delitem__ƒsó€ð %Ø” ˜!� Ø” ˜1� ØŒ{ð 8Ø”K  DÔ$6Ñ 6Ð7Ð7Ð7ð 8ð 8øåð %ð %ð %Ø”6�>�>Ð#D‘>”>�>Ø” ˜!œ' !¤&˜.Ð)Ø” ˜1œ7 1¤6˜>Ð*ØŒ{ð %Ø”W�\  TÔ%7Ñ7�Ø”VÐ(�s 4™yœy¨DÔ,>Ñ>�Ø”K  ! Ð$Ð$Ð$Ð$ð %ð %ð %ð  %øøøs‚'-­BB7Â6B7có¬—t|t¦«r1| |j|jz|j|jz¬¦«St d¦«‚)N©rz!adding non-ViewList to a ViewList©r&rør3rÿrrbrs rÚ__add__zViewList.__add__’s[€Ý �e�XÑ &Ô &ð AØ—>’> $¤)¨e¬jÑ"8Ø)-¬°e´kÑ)Að"ñDôDð DõÐ?Ñ@Ô@Ð @rcó¬—t|t¦«r1| |j|jz|j|jz¬¦«St d¦«‚)Nr7z!adding ViewList to a non-ViewListr8rs rÚ__radd__zViewList.__radd__™s[€Ý �e�XÑ &Ô &ð AØ—>’> %¤*¨t¬yÑ"8Ø).¬°t´zÑ)Að"ñDôDð DõÐ?Ñ@Ô@Ð @rcóz—t|t¦«r|xj|jz c_ntd¦«‚|S)Nz!argument to += must be a ViewList)r&rørÿrbrs rÚ__iadd__zViewList.__iadd__ s=€Ý �e�XÑ &Ô &ð AØ ˆIŒI˜œÑ #ˆIŒIˆIåÐ?Ñ@Ô@Ð @؈ rcóP—| |j|z|j|z¬¦«S)Nr7)r3rÿrrLs rÚ__mul__zViewList.__mul__§s$€Ø�~Š~˜dœi¨!™m°D´JÀ±Nˆ~ÑDÔDÐDrcóF—|xj|zc_|xj|zc_|SrŽ)rÿrrLs rÚ__imul__zViewList.__imul__¬s%€Ø ˆ Œ �Q‰ˆ Œ Ø ˆ Œ �a‰ˆ Œ ؈ rcóB—t|t¦«std¦«‚|jr5|j t |j¦«|jz|¦«|j |j¦«|j  |j ¦«dS)Nz(extending a ViewList with a non-ViewList) r&rørbrrkr:rÿrr.rrs rr.zViewList.extend±s�€Ý˜%¥Ñ*Ô*ð HÝÐFÑGÔGÐ GØ Œ;ð KØ ŒK× Ò �s 4¤9™~œ~°Ô0BÑBÀEÑ JÔ JÐ JØ Œ ×Ò˜œÑ$Ô$Ð$Ø Œ ×Ò˜%œ+Ñ&Ô&Ð&Ð&Ð&rrcó —|€| |¦«dS|jr7|j t|j¦«|jz|||¦«|j |¦«|j ||f¦«dSrŽ)r.rrkr:rÿrr‰r)rr$r rAs rr‰zViewList.append¹s“€Ø ˆ>Ø �KŠK˜Ñ Ô Ð Ð Ð àŒ{ð 3Ø” ×"Ò"¥3 t¤y¡>¤>°DÔ4FÑ#FÈØ#)¨6ñ3ô3ð3à ŒI× Ò ˜TÑ "Ô "Ð "Ø ŒJ× Ò ˜v vÐ.Ñ /Ô /Ð /Ð /Ð /rcón—|€ t|t¦«std¦«‚|j|j||…<|j|j||…<|jrQt |j¦«|zt |j¦«z}|j ||jz|¦«dSdS|j ||¦«|j |||f¦«|jrSt |j¦«|zt |j¦«z}|j ||jz|||¦«dSdS)Nz+inserting non-ViewList with no source given) r&rørbrÿrrr:rkr)rrür$r rAÚindexs rrkzViewList.insertÃsF€Ø ˆ>ݘd¥HÑ-Ô-ð OÝÐ MÑNÔNÐNØ!œYˆDŒI�a˜�c‰NØ"œjˆDŒJ�q˜�s‰OØŒ{ð EݘTœY™œ¨!Ñ+­s°4´9©~¬~Ñ=�Ø” ×"Ò" 5¨4Ô+=Ñ#=¸tÑDÔDÐDÐDÐDð Eð Eð ŒI× Ò ˜Q Ñ %Ô %Ð %Ø ŒJ× Ò ˜a &¨&Ð!1Ñ 2Ô 2Ð 2ØŒ{ð 3ݘTœY™œ¨!Ñ+­s°4´9©~¬~Ñ=�Ø” ×"Ò" 5¨4Ô+=Ñ#=¸tØ#)¨6ñ3ô3ð3ð3ð3ð 3ð 3rr có—|jrNt|j¦«|zt|j¦«z}|j ||jz¦«|j |¦«|j |¦«SrŽ)rr:rÿÚpoprr)rrürEs rrGz ViewList.popÔso€Ø Œ;ð 8ݘœ‘^”^ aÑ'­3¨t¬y©>¬>Ñ9ˆEØ ŒK�OŠO˜E DÔ$6Ñ6Ñ 7Ô 7Ð 7Ø Œ �Š�qÑÔÐØŒy�}Š}˜QÑÔÐrr$có —|t|j¦«kr(td|›dt|j¦«›d�¦«‚|dkrtd¦«‚|jd|…=|jd|…=|jr|xj|z c_dSdS)zW Remove items from the start of the list, without touching the parent. ú#Size of trim too large; can't trim ú items from a list of size r#rúTrim size must be >= 0.N)r:rÿrJrrrrLs rrÌzViewList.trim_startÛs©€ð �s�4”9‰~Œ~Ò Ð Ý�*Ø:;¸!¸!½SÀĹ^¼^¸^¸^ðMñNôNð Nà �ŠUˆUÝÐ6Ñ7Ô7Ð 7Ø ŒI�b�q�bˆMØ ŒJ�r˜�rˆNØ Œ;ð $Ø Ð Ô  !Ñ #Ð Ô Ð Ð ð $ð $rcóÜ—|t|j¦«kr(td|›dt|j¦«›d�¦«‚|dkrtd¦«‚|j| d…=|j| d…=dS)zU Remove items from the end of the list, without touching the parent. rIrJr#rrKN)r:rÿrJrrLs rÚtrim_endzViewList.trim_endésƒ€ð �s�4”9‰~Œ~Ò Ð Ý�*Ø:;¸!¸!½SÀĹ^¼^¸^¸^ðMñNôNð Nà �ŠUˆUÝÐ6Ñ7Ô7Ð 7Ø ŒI�q�b�c�cˆNØ ŒJ˜�r�s�sˆOˆOˆOrcó6—| |¦«}||=dSrŽ)rE)rr$rEs rr�zViewList.removeõs€Ø— ’ ˜4Ñ Ô ˆØ �ˆKˆKˆKrcó6—|j |¦«SrŽ)rÿÚcountr#s rrPzViewList.countùó€ØŒy�Š˜tÑ$Ô$Ð$rcó6—|j |¦«SrŽ)rÿrEr#s rrEzViewList.indexürQrcóx—|j ¦«|j ¦«d|_dSrŽ)rÿÚreverserrrPs rrTzViewList.reverseÿs5€Ø Œ ×ÒÑÔÐØ Œ ×ÒÑÔÐØˆŒ ˆ ˆ rcó¢—tt|j|j¦«g|¢RŽ}d„|D¦«|_d„|D¦«|_d|_dS)Ncó—g|] }|d‘Œ S)rr—©rûÚentrys rrýz!ViewList.sort..s€Ð/Ð/Ð/ %�U˜1”XÐ/Ð/Ð/rcó—g|] }|d‘Œ Sr“r—rWs rrýz!ViewList.sort..s€Ð0Ð0Ð0 5�e˜A”hÐ0Ð0Ð0r)ÚsortedÚziprÿrr)rr8Útmps rÚsortz ViewList.sortsZ€Ý•S˜œ D¤JÑ/Ô/Ð7°$Ð7Ð7Ð7ˆØ/Ð/¨3Ð/Ñ/Ô/ˆŒ Ø0Ð0¨CÐ0Ñ0Ô0ˆŒ ؈Œ ˆ ˆ rcó — |j|S#t$r4|t|j¦«kr|j|dz ddfcYS‚wxYw)z%Return source & offset for index `i`.r$rN)rrJr:rÿr/s rr0z ViewList.info se€ð Ø”:˜a”=Ð øÝð ð ð Ø•C˜œ ‘N”NÒ"Ð"Ø”z ! a¡%Ô(¨Ô+¨TÐ1Ð1Ð1Ð1àð  øøøs‚ �:A Á A có8—| |¦«dS)zReturn source for index `i`.r©r0r/s rr zViewList.sourceó€à�yŠy˜‰|Œ|˜AŒÐrcó8—| |¦«dS)zReturn offset for index `i`.r$r`r/s rrAzViewList.offsetrarcó—d|_dS)z-Break link between this list and parent list.N)rrPs rÚ disconnectzViewList.disconnects €àˆŒ ˆ ˆ rc#ó^K—t|j|j¦«D]\}\}}|||fV—ŒdS)z8Return iterator yielding (source, offset, value) tuples.N)r[rÿr)rr…r rAs rÚxitemszViewList.xitems sMèè€å),¨T¬Y¸¼ Ñ)CÔ)Cð (ð (Ñ %ˆUÑ$�V˜Vؘ& %Ð'Ð 'Ð 'Ð 'Ð 'ð (ð (rcóX—| ¦«D]}td|z¦«ŒdS)z=Print the list in `grep` format (`source:offset:value` lines)z%s:%d:%sN)rfr()rr s rÚpprintzViewList.pprint%s9€à—K’K‘M”Mð %ð %ˆDÝ �*˜tÑ#Ñ $Ô $Ð $Ð $ð %ð %r)NNNNN)Nr)r r“)*r4r”r•r–rrr rrrrrrrr%r'r0r3r5r9r;r=r?Ú__rmul__rAr.r‰rkrGrÌrMr�rPrErTr]r0r rArdrfrhr—rrrørøse€€€€€ððð$:>Ø,0ðBðBðBðBð6ðððMðMðMðCÐBÐBØCÐCÐCØCÐCÐCØCÐCÐCØBÐBÐBØCÐCÐCðððð !ð!ð!ðððð ð ð ð;ð;ð;ð" %ð %ð %ðAðAðAðAðAðAððððEðEðEð€Hðððð 'ð'ð'ð0ð0ð0ð0ð3ð3ð3ð3ð" ð ð ð ð $ð $ð $ð $ð ð ð ð ðððð%ð%ð%ð%ð%ð%ðððð ððð ðððððððððððð(ð(ð(ð %ð%ð%ð%ð%rrøcóP—eZdZdZdejfd„Zd d„Z d d„Zdd „Z d „Z d „Z dS)r'z*A `ViewList` with string-specific methods.rcóR‡—ˆfd„|j||…D¦«|j||…<dS)zÕ Trim `length` characters off the beginning of each item, in-place, from index `start` to `end`. No whitespace-checking is done on the trimmed text. Does not affect slice parent. có$•—g|] }|‰d…‘Œ SrŽr—)rûr Úlengths €rrýz(StringList.trim_left..5s7ø€ð Bð Bð BØ$(ð!% V W W¤ ð Bð Bð BrNr")rrmr-rés ` rÚ trim_leftzStringList.trim_left/sNø€ð  Bð Bð Bð BØ,0¬I°e¸C°iÔ,@ð Bñ Bô BˆŒ �%˜�)ÑÐÐrFcó,—|}t|j¦«}||kro|j|}| ¦«snM|r@|ddkr4| |¦«\}}t |||…||dz¦«‚|dz }||k°o|||…S)rnrú r$)r:rÿrOr0rp)rr-rqréÚlastr r rAs rrozStringList.get_text_block8s­€ðˆÝ�4”9‰~Œ~ˆØ�DŠjˆjØ”9˜S”>ˆDØ—:’:‘<”<ð ØØð =˜t Aœw¨#š~˜~Ø!%§¢¨3¡¤‘�˜Ý0°°e¸C°i´À&Ø17¸!±ñ=ô=ð=à �1‰HˆCð�DŠjˆjð�E˜#�IŒÐrTNcóz—|}|}|�|€|}|�|dz }t|j¦«}||krÀ|j|} | rT| ddks|�F| d|… ¦«r*||ko"|j|dz  ¦« } n_|  ¦«} | s|rd} nDn6|€4t| ¦«t| ¦«z } |€| }nt || ¦«}|dz }||k°Àd} |||…} |�| r| jd|d…| jd<|r|r|  ||du¬¦«| |pd| fS)a¯ Extract and return a StringList of indented lines of text. Collect all lines with indentation, determine the minimum indentation, remove the minimum indentation from all indented lines (unless `strip_indent` is false), and return them. All lines up to but not including the first unindented line will be returned. :Parameters: - `start`: The index of the first line to examine. - `until_blank`: Stop collecting at the first blank line if true. - `strip_indent`: Strip common leading indent if true (default). - `block_indent`: The indent of the entire block, if known. - `first_indent`: The indent of the first line, if known. :Return: - a StringList of indented lines with minimum indent removed; - the amount of the indent; - a boolean: did the indented block finish with a blank line or EOF? Nr$rrp)r-)r:rÿrOÚlstripÚminrn)rr-rÍrÎrÓrÖrÐrérqr rÑÚstrippedÚ line_indentrrs rrËzStringList.get_indentedMs¦€ð,ˆØˆØ Ð #¨ Ð(<Ø'ˆLØ Ð #Ø �1‰HˆCÝ�4”9‰~Œ~ˆØ�DŠjˆjØ”9˜S”>ˆDØð ˜˜aœ Cš˜Ø)Ð5Ø!% m | mÔ!4×!:Ò!:Ñ!<Ô!<ð6ð"% u¢ð!CØ(,¬ °#¸±'Ô(:×(@Ò(@Ñ(BÔ(BÐ$BðàØ—{’{‘}”}ˆHØð 6ØðØ#$�LØððÐ%Ý! $™iœi­#¨h©-¬-Ñ7� Ø�>Ø(�F�Få  ¨Ñ5Ô5�FØ �1‰HˆCð+�DŠjˆjð.ˆLØ�U˜3�Y”ˆØ Ð #¨Ð #Ø!œJ qœM¨,¨-¨-Ô8ˆEŒJ�q‰MØ ð F�lð FØ �OŠO˜F¨<¸tÐ+CˆOÑ EÔ EÐ EØ�f�k  <Ð/Ð/rc óþ‡ —|||…}|Š tt|j¦«¦«D�]"}tj|j|¦«} ||}n=#t $r0|t|j|¦«t|¦«z z }YnwxYw ||}n=#t $r0|t|j|¦«t|¦«z z }YnwxYw|j|||… ¦«x|j|<} | r?t‰ t| ¦«t|  ¦«¦«z ¦«Š �Œ$|r(d‰ cxkr|krnnˆ fd„|jD¦«|_|S)Nrcó$•—g|] }|‰d…‘Œ SrŽr—)rûr rÐs €rrýz+StringList.get_2D_block..›s!ø€Ð?Ð?Ð?¨D˜$˜v˜w˜wœ-Ð?Ð?Ð?r) rr:rÿrÚcolumn_indicesrJÚrstriprtrs) rÚtopÚleftÚbottomÚrightrÎrrrüÚcir rÐs @rÚ get_2D_blockzStringList.get_2D_block‰sœø€Ø�S˜�ZÔ ˆØˆÝ•s˜5œ:‘”Ñ'Ô'ð Eñ EˆAåÔ% e¤j°¤mÑ4Ô4ˆBð 5ؘ$”x��øÝð 5ð 5ð 5Ø�˜EœJ qœMÑ*Ô*­S°©W¬WÑ4Ñ4���ð 5øøøð 6ؘ5œ ��øÝð 6ð 6ð 6Ø�˜UœZ¨œ]Ñ+Ô+­c°"©g¬gÑ5Ñ5���ð 6øøøà#(¤:¨a¤=°°e°Ô#<×#CÒ#CÑ#EÔ#EÐ EˆEŒJ�q‰M˜DØð EݘV¥S¨¡Y¤Yµ°T·[²[±]´]Ñ1CÔ1CÑ%CÑDÔD�ùØ ð @˜A Ð.Ð.Ò.Ð.¨Ò.Ð.Ð.Ð.Ð.Ø?Ð?Ð?Ð?°E´JÐ?Ñ?Ô?ˆEŒJ؈ s$ÁAÁ7BÂBÂB"Â"7CÃCcóP—tt|j¦«¦«D]ƒ}|j|}t|t¦«r_g}|D]=}| |¦«t |¦«dvr| |¦«Œ>d |¦«|j|<Œ„dS)zrPad all double-width characters in `self` appending `pad_char`. For East Asian language support. ÚWFriN)rr:rÿr&r½r‰rr))rÚpad_charrür ÚnewÚchars rÚpad_double_widthzStringList.pad_double_widthžs¬€õ •s˜4œ9‘~”~Ñ&Ô&ð ,ð ,ˆAØ”9˜Q”<ˆDݘ$¥Ñ$Ô$ð ,Ø�Ø ð-ð-�DØ—J’J˜tÑ$Ô$Ð$Ý'¨Ñ-Ô-°Ð5Ð5ØŸ š  8Ñ,Ô,Ð,øØ!Ÿwšw s™|œ|�” ˜!‘ øð ,ð ,rcó —tt|j¦«¦«D]+}|j| ||¦«|j|<Œ,dS)z6Replace all occurrences of substring `old` with `new`.N)rr:rÿÚreplace)rÚoldr„rüs rrˆzStringList.replace­sN€å•s˜4œ9‘~”~Ñ&Ô&ð :ð :ˆAØœ9 Qœ<×/Ò/°°SÑ9Ô9ˆDŒI�a‰LˆLð :ð :rr’)rFTNN)T) r4r”r•r–r*ÚmaxsizernrorËr€r†rˆr—rrr'r'+sž€€€€€à4Ð4à&'¨S¬[ðBðBðBðBððððð*EIØ59ð:0ð:0ð:0ð:0ðxðððð* ,ð ,ð ,ð:ð:ð:ð:ð:rr'có—eZdZdS)ÚStateMachineErrorN©r4r”r•r—rrrŒrŒ³ó€€€€€€€rrŒcó—eZdZdS)rHNr�r—rrrHrH´rŽrrHcó—eZdZdS)r|Nr�r—rrr|r|µrŽrr|có—eZdZdS)rªNr�r—rrrªrª¶rŽrrªcó—eZdZdS)r©Nr�r—rrr©r©·rŽrr©có—eZdZdS)r·Nr�r—rrr·r·¸rŽrr·có—eZdZdS)rºNr�r—rrrºrº¹rŽrrºcó—eZdZdS)rpNr�r—rrrprpºrŽrrpcó—eZdZdZdS)r6z‡ Raise from within a transition method to switch to another transition. Raise with one argument, the new transition name. Nrôr—rrr6r6½s€€€€€ððððrr6có—eZdZdZdS)r9zª Raise from within a transition method to switch to another state. Raise with one or two arguments: new state name, and an optional new transition name. Nrôr—rrr9r9Æs€€€€€ððððrr9éFz[ ]cót‡—|r| d|¦«}ˆfd„| ¦«D¦«S)a6 Return a list of one-line strings with tabs expanded, no newlines, and trailing whitespace stripped. Each tab is expanded with between 1 and `tab_width` spaces, so that the next character's index becomes a multiple of `tab_width` (8 by default). Parameters: - `astring`: a multi-line string. - `tab_width`: the number of columns between tab stops. - `convert_whitespace`: convert form feeds and vertical tabs to spaces? - `whitespace`: pattern object with the to-be-converted whitespace characters (default [\v\f]). rpcó^•—g|])}| ‰¦« ¦«‘Œ*Sr—)Ú expandtabsrz)rûÚsÚ tab_widths €rrýz string2lines..ãs1ø€Ð KÐ KÐ K°ˆA�LŠL˜Ñ #Ô #× *Ò *Ñ ,Ô ,Ð KÐ KÐ Kr)ÚsubÚ splitlines)Úastringr�Úconvert_whitespaceÚ whitespaces ` rÚ string2linesr£ÐsFø€ð"ð/Ø—.’.  gÑ.Ô.ˆØ KÐ KÐ KÐ K°g×6HÒ6HÑ6JÔ6JÐ KÑ KÔ KÐKrcó¨—tj¦«\}}}|jr|j}|j°|jj}|j||j|j|jfS)zü Return exception information: - the exception's class name; - the exception object; - the name of the file containing the offending code; - the line number of the offending code; - the function name of the offending code. ) r*Úexc_infoÚtb_nextÚtb_frameÚf_coder4Ú co_filenameÚ tb_linenoÚco_name)r„r…Ú tracebackÚcodes rrƒrƒæsa€õ!œ\™^œ^Ñ€Dˆ%�Ø Ô ð&ØÔ%ˆ ð Ô ð&à Ô Ô $€DØ ŒM˜5 $Ô"2°IÔ4GØ ŒLð ðr)r–Ú __docformat__r*rµÚ unicodedatarÚdocutilsrrr™rÈrÚrïrórörør'Ú ExceptionrŒrHr|rªr©r·rºrpr6r9r¶r£rƒr—rrúr²soðð eðeðN#€ à € € € Ø € € € Ø(Ð(Ð(Ð(Ð(Ð(àÐÐÐÐÐðAðAðAðAðAñAôAðAðH L'ðL'ðL'ðL'ðL'ñL'ôL'ðL'ð^d6ðd6ðd6ðd6ðd6�\ñd6ôd6ðd6ðNJ,ðJ,ðJ,ðJ,ðJ,ˆeñJ,ôJ,ðJ,ðZ)ð)ð)ð)ð)ñ)ô)ð)ð. ð ð ð 𠘨,ñ ô ð ð  ð ð ð ð ˜?¨Nñ ô ð ð K%ðK%ðK%ðK%ðK%ñK%ôK%ðK%ð\E:ðE:ðE:ðE:ðE:�ñE:ôE:ðE:ðP)Ð(Ð(Ð(Ð(˜ Ñ(Ô(Ð(Ø0Ð0Ð0Ð0Ð0Ð)Ñ0Ô0Ð0Ø2Ð2Ð2Ð2Ð2Ð+Ñ2Ô2Ð2Ø5Ð5Ð5Ð5Ð5Ð.Ñ5Ô5Ð5Ø7Ð7Ð7Ð7Ð7Ð0Ñ7Ô7Ð7Ø8Ð8Ð8Ð8Ð8Ð 1Ñ8Ô8Ð8Ø7Ð7Ð7Ð7Ð7Ð0Ñ7Ô7Ð7Ø9Ð9Ð9Ð9Ð9Ð!2Ñ9Ô9Ð9ððððð˜9ñôðððððð�iñôðð%&¸%Ø&˜BœJ xÑ0Ô0ðLðLðLðLð,ððððr