<s> """<STR_LIT>""" <EOL> MAXREPEAT = <NUM_LIT> <EOL> import operator , sys <EOL> from sre_constants import ATCODES , OPCODES , CHCODES <EOL> from sre_constants import SRE_INFO_PREFIX , SRE_INFO_LITERAL <EOL> from sre_constants import SRE_FLAG_UNICODE , SRE_FLAG_LOCALE <EOL> import sys <EOL> MAGIC = <NUM_LIT> <EOL> CODESIZE = <NUM_LIT:4> <EOL> copyright = "<STR_LIT>" <EOL> def getcodesize ( ) : <EOL> return CODESIZE <EOL> def compile ( pattern , flags , code , groups = <NUM_LIT:0> , groupindex = { } , indexgroup = [ None ] ) : <EOL> """<STR_LIT>""" <EOL> return SRE_Pattern ( pattern , flags , code , groups , groupindex , indexgroup ) <EOL> def getlower ( char_ord , flags ) : <EOL> if ( char_ord < <NUM_LIT> ) or ( flags & SRE_FLAG_UNICODE ) or ( flags & SRE_FLAG_LOCALE and char_ord < <NUM_LIT> ) : <EOL> return ord ( chr ( char_ord ) . lower ( ) ) <EOL> else : <EOL> return char_ord <EOL> class SRE_Pattern : <EOL> def __init__ ( self , pattern , flags , code , groups = <NUM_LIT:0> , groupindex = { } , indexgroup = [ None ] ) : <EOL> self . pattern = pattern <EOL> self . flags = flags <EOL> self . groups = groups <EOL> self . groupindex = groupindex <EOL> self . _indexgroup = indexgroup <EOL> self . _code = code <EOL> def match ( self , string , pos = <NUM_LIT:0> , endpos = sys . maxsize ) : <EOL> """<STR_LIT>""" <EOL> state = _State ( string , pos , endpos , self . flags ) <EOL> if state . match ( self . _code ) : <EOL> return SRE_Match ( self , state ) <EOL> return None <EOL> def search ( self , string , pos = <NUM_LIT:0> , endpos = sys . maxsize ) : <EOL> """<STR_LIT>""" <EOL> state = _State ( string , pos , endpos , self . flags ) <EOL> if state . search ( self . _code ) : <EOL> return SRE_Match ( self , state ) <EOL> else : <EOL> return None <EOL> def findall ( self , string , pos = <NUM_LIT:0> , endpos = sys . maxsize ) : <EOL> """<STR_LIT>""" <EOL> matchlist = [ ] <EOL> state = _State ( string , pos , endpos , self . flags ) <EOL> while state . start <= state . end : <EOL> state . reset ( ) <EOL> state . string_position = state . start <EOL> if not state . search ( self . _code ) : <EOL> break <EOL> match = SRE_Match ( self , state ) <EOL> if self . groups == <NUM_LIT:0> or self . groups == <NUM_LIT:1> : <EOL> item = match . group ( self . groups ) <EOL> else : <EOL> item = match . groups ( "<STR_LIT>" ) <EOL> matchlist . append ( item ) <EOL> if state . string_position == state . start : <EOL> state . start += <NUM_LIT:1> <EOL> else : <EOL> state . start = state . string_position <EOL> return matchlist <EOL> def _subx ( self , template , string , count = <NUM_LIT:0> , subn = False ) : <EOL> filter = template <EOL> if not callable ( template ) and "<STR_LIT:\\>" in template : <EOL> import re as sre <EOL> filter = sre . _subx ( self , template ) <EOL> state = _State ( string , <NUM_LIT:0> , sys . maxsize , self . flags ) <EOL> sublist = [ ] <EOL> n = last_pos = <NUM_LIT:0> <EOL> while not count or n < count : <EOL> state . reset ( ) <EOL> state . string_position = state . start <EOL> if not state . search ( self . _code ) : <EOL> break <EOL> if last_pos < state . start : <EOL> sublist . append ( string [ last_pos : state . start ] ) <EOL> if not ( last_pos == state . start and <EOL> last_pos == state . string_position and n > <NUM_LIT:0> ) : <EOL> if callable ( filter ) : <EOL> sublist . append ( filter ( SRE_Match ( self , state ) ) ) <EOL> else : <EOL> sublist . append ( filter ) <EOL> last_pos = state . string_position <EOL> n += <NUM_LIT:1> <EOL> if state . string_position == state . start : <EOL> state . start += <NUM_LIT:1> <EOL> else : <EOL> state . start = state . string_position <EOL> if last_pos < state . end : <EOL> sublist . append ( string [ last_pos : state . end ] ) <EOL> item = "<STR_LIT>" . join ( sublist ) <EOL> if subn : <EOL> return item , n <EOL> else : <EOL> return item <EOL> def sub ( self , repl , string , count = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> return self . _subx ( repl , string , count , False ) <EOL> def subn ( self , repl , string , count = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> return self . _subx ( repl , string , count , True ) <EOL> def split ( self , string , maxsplit = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> splitlist = [ ] <EOL> state = _State ( string , <NUM_LIT:0> , sys . maxsize , self . flags ) <EOL> n = <NUM_LIT:0> <EOL> last = state . start <EOL> while not maxsplit or n < maxsplit : <EOL> state . reset ( ) <EOL> state . string_position = state . start <EOL> if not state . search ( self . _code ) : <EOL> break <EOL> if state . start == state . string_position : <EOL> if last == state . end : <EOL> break <EOL> state . start += <NUM_LIT:1> <EOL> continue <EOL> splitlist . append ( string [ last : state . start ] ) <EOL> if self . groups : <EOL> match = SRE_Match ( self , state ) <EOL> splitlist . extend ( list ( match . groups ( None ) ) ) <EOL> n += <NUM_LIT:1> <EOL> last = state . start = state . string_position <EOL> splitlist . append ( string [ last : state . end ] ) <EOL> return splitlist <EOL> def finditer ( self , string , pos = <NUM_LIT:0> , endpos = sys . maxsize ) : <EOL> """<STR_LIT>""" <EOL> _list = [ ] <EOL> _m = self . scanner ( string , pos , endpos ) <EOL> _re = SRE_Scanner ( self , string , pos , endpos ) <EOL> _m = _re . search ( ) <EOL> while _m : <EOL> _list . append ( _m ) <EOL> _m = _re . search ( ) <EOL> return _list <EOL> def scanner ( self , string , start = <NUM_LIT:0> , end = sys . maxsize ) : <EOL> return SRE_Scanner ( self , string , start , end ) <EOL> def __copy__ ( self ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> def __deepcopy__ ( self ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> class SRE_Scanner : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , pattern , string , start , end ) : <EOL> self . pattern = pattern <EOL> self . _state = _State ( string , start , end , self . pattern . flags ) <EOL> def _match_search ( self , matcher ) : <EOL> state = self . _state <EOL> state . reset ( ) <EOL> state . string_position = state . start <EOL> match = None <EOL> if matcher ( self . pattern . _code ) : <EOL> match = SRE_Match ( self . pattern , state ) <EOL> if match is None or state . string_position == state . start : <EOL> state . start += <NUM_LIT:1> <EOL> else : <EOL> state . start = state . string_position <EOL> return match <EOL> def match ( self ) : <EOL> return self . _match_search ( self . _state . match ) <EOL> def search ( self ) : <EOL> return self . _match_search ( self . _state . search ) <EOL> class SRE_Match : <EOL> def __init__ ( self , pattern , state ) : <EOL> self . re = pattern <EOL> self . string = state . string <EOL> self . pos = state . pos <EOL> self . endpos = state . end <EOL> self . lastindex = state . lastindex <EOL> if self . lastindex < <NUM_LIT:0> : <EOL> self . lastindex = None <EOL> self . regs = self . _create_regs ( state ) <EOL> if self . lastindex is not None and pattern . _indexgroup and <NUM_LIT:0> <= self . lastindex < len ( pattern . _indexgroup ) : <EOL> self . lastgroup = pattern . _indexgroup [ self . lastindex ] <EOL> else : <EOL> self . lastgroup = None <EOL> def _create_regs ( self , state ) : <EOL> """<STR_LIT>""" <EOL> regs = [ ( state . start , state . string_position ) ] <EOL> for group in range ( self . re . groups ) : <EOL> mark_index = <NUM_LIT:2> * group <EOL> if mark_index + <NUM_LIT:1> < len ( state . marks ) and state . marks [ mark_index ] is not None and state . marks [ mark_index + <NUM_LIT:1> ] is not None : <EOL> regs . append ( ( state . marks [ mark_index ] , state . marks [ mark_index + <NUM_LIT:1> ] ) ) <EOL> else : <EOL> regs . append ( ( - <NUM_LIT:1> , - <NUM_LIT:1> ) ) <EOL> return tuple ( regs ) <EOL> def _get_index ( self , group ) : <EOL> if isinstance ( group , int ) : <EOL> if group >= <NUM_LIT:0> and group <= self . re . groups : <EOL> return group <EOL> else : <EOL> if group in self . re . groupindex : <EOL> return self . re . groupindex [ group ] <EOL> raise IndexError ( "<STR_LIT>" ) <EOL> def _get_slice ( self , group , default ) : <EOL> group_indices = self . regs [ group ] <EOL> if group_indices [ <NUM_LIT:0> ] >= <NUM_LIT:0> : <EOL> return self . string [ group_indices [ <NUM_LIT:0> ] : group_indices [ <NUM_LIT:1> ] ] <EOL> else : <EOL> return default <EOL> def start ( self , group = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> return self . regs [ self . _get_index ( group ) ] [ <NUM_LIT:0> ] <EOL> def end ( self , group = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> return self . regs [ self . _get_index ( group ) ] [ <NUM_LIT:1> ] <EOL> def span ( self , group = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> return self . start ( group ) , self . end ( group ) <EOL> def expand ( self , template ) : <EOL> """<STR_LIT>""" <EOL> import sre <EOL> return sre . _expand ( self . re , self , template ) <EOL> def groups ( self , default = None ) : <EOL> """<STR_LIT>""" <EOL> groups = [ ] <EOL> for indices in self . regs [ <NUM_LIT:1> : ] : <EOL> if indices [ <NUM_LIT:0> ] >= <NUM_LIT:0> : <EOL> groups . append ( self . string [ indices [ <NUM_LIT:0> ] : indices [ <NUM_LIT:1> ] ] ) <EOL> else : <EOL> groups . append ( default ) <EOL> return tuple ( groups ) <EOL> def groupdict ( self , default = None ) : <EOL> """<STR_LIT>""" <EOL> groupdict = { } <EOL> for key , value in self . re . groupindex . items ( ) : <EOL> groupdict [ key ] = self . _get_slice ( value , default ) <EOL> return groupdict <EOL> def group ( self , * args ) : <EOL> """<STR_LIT>""" <EOL> if len ( args ) == <NUM_LIT:0> : <EOL> args = ( <NUM_LIT:0> , ) <EOL> grouplist = [ ] <EOL> for group in args : <EOL> grouplist . append ( self . _get_slice ( self . _get_index ( group ) , None ) ) <EOL> if len ( grouplist ) == <NUM_LIT:1> : <EOL> return grouplist [ <NUM_LIT:0> ] <EOL> else : <EOL> return tuple ( grouplist ) <EOL> def __copy__ ( ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> def __deepcopy__ ( ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> class _State : <EOL> def __init__ ( self , string , start , end , flags ) : <EOL> self . string = string <EOL> if start < <NUM_LIT:0> : <EOL> start = <NUM_LIT:0> <EOL> if end > len ( string ) : <EOL> end = len ( string ) <EOL> self . start = start <EOL> self . string_position = self . start <EOL> self . end = end <EOL> self . pos = start <EOL> self . flags = flags <EOL> self . reset ( ) <EOL> def reset ( self ) : <EOL> self . marks = [ ] <EOL> self . lastindex = - <NUM_LIT:1> <EOL> self . marks_stack = [ ] <EOL> self . context_stack = [ ] <EOL> self . repeat = None <EOL> def match ( self , pattern_codes ) : <EOL> dispatcher = _OpcodeDispatcher ( ) <EOL> self . context_stack . append ( _MatchContext ( self , pattern_codes ) ) <EOL> has_matched = None <EOL> while len ( self . context_stack ) > <NUM_LIT:0> : <EOL> context = self . context_stack [ - <NUM_LIT:1> ] <EOL> has_matched = dispatcher . match ( context ) <EOL> if has_matched is not None : <EOL> self . context_stack . pop ( ) <EOL> return has_matched <EOL> def search ( self , pattern_codes ) : <EOL> flags = <NUM_LIT:0> <EOL> if pattern_codes [ <NUM_LIT:0> ] == OPCODES [ "<STR_LIT:info>" ] : <EOL> if pattern_codes [ <NUM_LIT:2> ] & SRE_INFO_PREFIX and pattern_codes [ <NUM_LIT:5> ] > <NUM_LIT:1> : <EOL> return self . fast_search ( pattern_codes ) <EOL> flags = pattern_codes [ <NUM_LIT:2> ] <EOL> pattern_codes = pattern_codes [ pattern_codes [ <NUM_LIT:1> ] + <NUM_LIT:1> : ] <EOL> string_position = self . start <EOL> if pattern_codes [ <NUM_LIT:0> ] == OPCODES [ "<STR_LIT>" ] : <EOL> character = pattern_codes [ <NUM_LIT:1> ] <EOL> while True : <EOL> while string_position < self . end and ord ( self . string [ string_position ] ) != character : <EOL> string_position += <NUM_LIT:1> <EOL> if string_position >= self . end : <EOL> return False <EOL> self . start = string_position <EOL> string_position += <NUM_LIT:1> <EOL> self . string_position = string_position <EOL> if flags & SRE_INFO_LITERAL : <EOL> return True <EOL> if self . match ( pattern_codes [ <NUM_LIT:2> : ] ) : <EOL> return True <EOL> return False <EOL> while string_position <= self . end : <EOL> self . reset ( ) <EOL> self . start = self . string_position = string_position <EOL> if self . match ( pattern_codes ) : <EOL> return True <EOL> string_position += <NUM_LIT:1> <EOL> return False <EOL> def fast_search ( self , pattern_codes ) : <EOL> """<STR_LIT>""" <EOL> flags = pattern_codes [ <NUM_LIT:2> ] <EOL> prefix_len = pattern_codes [ <NUM_LIT:5> ] <EOL> prefix_skip = pattern_codes [ <NUM_LIT:6> ] <EOL> prefix = pattern_codes [ <NUM_LIT:7> : <NUM_LIT:7> + prefix_len ] <EOL> overlap = pattern_codes [ <NUM_LIT:7> + prefix_len - <NUM_LIT:1> : pattern_codes [ <NUM_LIT:1> ] + <NUM_LIT:1> ] <EOL> pattern_codes = pattern_codes [ pattern_codes [ <NUM_LIT:1> ] + <NUM_LIT:1> : ] <EOL> i = <NUM_LIT:0> <EOL> string_position = self . string_position <EOL> while string_position < self . end : <EOL> while True : <EOL> if ord ( self . string [ string_position ] ) != prefix [ i ] : <EOL> if i == <NUM_LIT:0> : <EOL> break <EOL> else : <EOL> i = overlap [ i ] <EOL> else : <EOL> i += <NUM_LIT:1> <EOL> if i == prefix_len : <EOL> self . start = string_position + <NUM_LIT:1> - prefix_len <EOL> self . string_position = string_position + <NUM_LIT:1> - prefix_len + prefix_skip <EOL> if flags & SRE_INFO_LITERAL : <EOL> return True <EOL> if self . match ( pattern_codes [ <NUM_LIT:2> * prefix_skip : ] ) : <EOL> return True <EOL> i = overlap [ i ] <EOL> break <EOL> string_position += <NUM_LIT:1> <EOL> return False <EOL> def set_mark ( self , mark_nr , position ) : <EOL> if mark_nr & <NUM_LIT:1> : <EOL> self . lastindex = mark_nr // <NUM_LIT:2> + <NUM_LIT:1> <EOL> if mark_nr >= len ( self . marks ) : <EOL> self . marks . extend ( [ None ] * ( mark_nr - len ( self . marks ) + <NUM_LIT:1> ) ) <EOL> self . marks [ mark_nr ] = position <EOL> def get_marks ( self , group_index ) : <EOL> marks_index = <NUM_LIT:2> * group_index <EOL> if len ( self . marks ) > marks_index + <NUM_LIT:1> : <EOL> return self . marks [ marks_index ] , self . marks [ marks_index + <NUM_LIT:1> ] <EOL> else : <EOL> return None , None <EOL> def marks_push ( self ) : <EOL> self . marks_stack . append ( ( self . marks [ : ] , self . lastindex ) ) <EOL> def marks_pop ( self ) : <EOL> self . marks , self . lastindex = self . marks_stack . pop ( ) <EOL> def marks_pop_keep ( self ) : <EOL> self . marks , self . lastindex = self . marks_stack [ - <NUM_LIT:1> ] <EOL> def marks_pop_discard ( self ) : <EOL> self . marks_stack . pop ( ) <EOL> def lower ( self , char_ord ) : <EOL> return getlower ( char_ord , self . flags ) <EOL> class _MatchContext : <EOL> def __init__ ( self , state , pattern_codes ) : <EOL> self . state = state <EOL> self . pattern_codes = pattern_codes <EOL> self . string_position = state . string_position <EOL> self . code_position = <NUM_LIT:0> <EOL> self . has_matched = None <EOL> def push_new_context ( self , pattern_offset ) : <EOL> """<STR_LIT>""" <EOL> child_context = _MatchContext ( self . state , <EOL> self . pattern_codes [ self . code_position + pattern_offset : ] ) <EOL> self . state . context_stack . append ( child_context ) <EOL> return child_context <EOL> def peek_char ( self , peek = <NUM_LIT:0> ) : <EOL> return self . state . string [ self . string_position + peek ] <EOL> def skip_char ( self , skip_count ) : <EOL> self . string_position += skip_count <EOL> def remaining_chars ( self ) : <EOL> return self . state . end - self . string_position <EOL> def peek_code ( self , peek = <NUM_LIT:0> ) : <EOL> return self . pattern_codes [ self . code_position + peek ] <EOL> def skip_code ( self , skip_count ) : <EOL> self . code_position += skip_count <EOL> def remaining_codes ( self ) : <EOL> return len ( self . pattern_codes ) - self . code_position <EOL> def at_beginning ( self ) : <EOL> return self . string_position == <NUM_LIT:0> <EOL> def at_end ( self ) : <EOL> return self . string_position == self . state . end <EOL> def at_linebreak ( self ) : <EOL> return not self . at_end ( ) and _is_linebreak ( self . peek_char ( ) ) <EOL> def at_boundary ( self , word_checker ) : <EOL> if self . at_beginning ( ) and self . at_end ( ) : <EOL> return False <EOL> that = not self . at_beginning ( ) and word_checker ( self . peek_char ( - <NUM_LIT:1> ) ) <EOL> this = not self . at_end ( ) and word_checker ( self . peek_char ( ) ) <EOL> return this != that <EOL> class _RepeatContext ( _MatchContext ) : <EOL> def __init__ ( self , context ) : <EOL> _MatchContext . __init__ ( self , context . state , <EOL> context . pattern_codes [ context . code_position : ] ) <EOL> self . count = - <NUM_LIT:1> <EOL> self . previous = context . state . repeat <EOL> self . last_position = None <EOL> class _Dispatcher : <EOL> DISPATCH_TABLE = None <EOL> def dispatch ( self , code , context ) : <EOL> method = self . DISPATCH_TABLE . get ( code , self . __class__ . unknown ) <EOL> return method ( self , context ) <EOL> def unknown ( self , code , ctx ) : <EOL> raise NotImplementedError ( ) <EOL> def build_dispatch_table ( cls , code_dict , method_prefix ) : <EOL> if cls . DISPATCH_TABLE is not None : <EOL> return <EOL> table = { } <EOL> for key , value in code_dict . items ( ) : <EOL> if hasattr ( cls , "<STR_LIT>" % ( method_prefix , key ) ) : <EOL> table [ value ] = getattr ( cls , "<STR_LIT>" % ( method_prefix , key ) ) <EOL> cls . DISPATCH_TABLE = table <EOL> build_dispatch_table = classmethod ( build_dispatch_table ) <EOL> class _OpcodeDispatcher ( _Dispatcher ) : <EOL> def __init__ ( self ) : <EOL> self . executing_contexts = { } <EOL> self . at_dispatcher = _AtcodeDispatcher ( ) <EOL> self . ch_dispatcher = _ChcodeDispatcher ( ) <EOL> self . set_dispatcher = _CharsetDispatcher ( ) <EOL> def match ( self , context ) : <EOL> """<STR_LIT>""" <EOL> while context . remaining_codes ( ) > <NUM_LIT:0> and context . has_matched is None : <EOL> opcode = context . peek_code ( ) <EOL> if not self . dispatch ( opcode , context ) : <EOL> return None <EOL> if context . has_matched is None : <EOL> context . has_matched = False <EOL> return context . has_matched <EOL> def dispatch ( self , opcode , context ) : <EOL> """<STR_LIT>""" <EOL> if id ( context ) in self . executing_contexts : <EOL> generator = self . executing_contexts [ id ( context ) ] <EOL> del self . executing_contexts [ id ( context ) ] <EOL> has_finished = next ( generator ) <EOL> else : <EOL> method = self . DISPATCH_TABLE . get ( opcode , _OpcodeDispatcher . unknown ) <EOL> has_finished = method ( self , context ) <EOL> if hasattr ( has_finished , "<STR_LIT>" ) : <EOL> generator = has_finished <EOL> has_finished = next ( generator ) <EOL> if not has_finished : <EOL> self . executing_contexts [ id ( context ) ] = generator <EOL> return has_finished <EOL> def op_success ( self , ctx ) : <EOL> ctx . state . string_position = ctx . string_position <EOL> ctx . has_matched = True <EOL> return True <EOL> def op_failure ( self , ctx ) : <EOL> ctx . has_matched = False <EOL> return True <EOL> def general_op_literal ( self , ctx , compare , decorate = lambda x : x ) : <EOL> if ctx . at_end ( ) or not compare ( decorate ( ord ( ctx . peek_char ( ) ) ) , <EOL> decorate ( ctx . peek_code ( <NUM_LIT:1> ) ) ) : <EOL> ctx . has_matched = False <EOL> ctx . skip_code ( <NUM_LIT:2> ) <EOL> ctx . skip_char ( <NUM_LIT:1> ) <EOL> def op_literal ( self , ctx ) : <EOL> self . general_op_literal ( ctx , operator . eq ) <EOL> return True <EOL> def op_not_literal ( self , ctx ) : <EOL> self . general_op_literal ( ctx , operator . ne ) <EOL> return True <EOL> def op_literal_ignore ( self , ctx ) : <EOL> self . general_op_literal ( ctx , operator . eq , ctx . state . lower ) <EOL> return True <EOL> def op_not_literal_ignore ( self , ctx ) : <EOL> self . general_op_literal ( ctx , operator . ne , ctx . state . lower ) <EOL> return True <EOL> def op_at ( self , ctx ) : <EOL> if not self . at_dispatcher . dispatch ( ctx . peek_code ( <NUM_LIT:1> ) , ctx ) : <EOL> ctx . has_matched = False <EOL> return True <EOL> ctx . skip_code ( <NUM_LIT:2> ) <EOL> return True <EOL> def op_category ( self , ctx ) : <EOL> if ctx . at_end ( ) or not self . ch_dispatcher . dispatch ( ctx . peek_code ( <NUM_LIT:1> ) , ctx ) : <EOL> ctx . has_matched = False <EOL> return True <EOL> ctx . skip_code ( <NUM_LIT:2> ) <EOL> ctx . skip_char ( <NUM_LIT:1> ) <EOL> return True <EOL> def op_any ( self , ctx ) : <EOL> if ctx . at_end ( ) or ctx . at_linebreak ( ) : <EOL> ctx . has_matched = False <EOL> return True <EOL> ctx . skip_code ( <NUM_LIT:1> ) <EOL> ctx . skip_char ( <NUM_LIT:1> ) <EOL> return True <EOL> def op_any_all ( self , ctx ) : <EOL> if ctx . at_end ( ) : <EOL> ctx . has_matched = False <EOL> return True <EOL> ctx . skip_code ( <NUM_LIT:1> ) <EOL> ctx . skip_char ( <NUM_LIT:1> ) <EOL> return True <EOL> def general_op_in ( self , ctx , decorate = lambda x : x ) : <EOL> if ctx . at_end ( ) : <EOL> ctx . has_matched = False <EOL> return <EOL> skip = ctx . peek_code ( <NUM_LIT:1> ) <EOL> ctx . skip_code ( <NUM_LIT:2> ) <EOL> if not self . check_charset ( ctx , decorate ( ord ( ctx . peek_char ( ) ) ) ) : <EOL> ctx . has_matched = False <EOL> return <EOL> ctx . skip_code ( skip - <NUM_LIT:1> ) <EOL> ctx . skip_char ( <NUM_LIT:1> ) <EOL> def op_in ( self , ctx ) : <EOL> self . general_op_in ( ctx ) <EOL> return True <EOL> def op_in_ignore ( self , ctx ) : <EOL> self . general_op_in ( ctx , ctx . state . lower ) <EOL> return True <EOL> def op_jump ( self , ctx ) : <EOL> ctx . skip_code ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) <EOL> return True <EOL> op_info = op_jump <EOL> def op_mark ( self , ctx ) : <EOL> ctx . state . set_mark ( ctx . peek_code ( <NUM_LIT:1> ) , ctx . string_position ) <EOL> ctx . skip_code ( <NUM_LIT:2> ) <EOL> return True <EOL> def op_branch ( self , ctx ) : <EOL> ctx . state . marks_push ( ) <EOL> ctx . skip_code ( <NUM_LIT:1> ) <EOL> current_branch_length = ctx . peek_code ( <NUM_LIT:0> ) <EOL> while current_branch_length : <EOL> if not ( ctx . peek_code ( <NUM_LIT:1> ) == OPCODES [ "<STR_LIT>" ] and ( ctx . at_end ( ) or ctx . peek_code ( <NUM_LIT:2> ) != ord ( ctx . peek_char ( ) ) ) ) : <EOL> ctx . state . string_position = ctx . string_position <EOL> child_context = ctx . push_new_context ( <NUM_LIT:1> ) <EOL> yield False <EOL> if child_context . has_matched : <EOL> ctx . has_matched = True <EOL> yield True <EOL> ctx . state . marks_pop_keep ( ) <EOL> ctx . skip_code ( current_branch_length ) <EOL> current_branch_length = ctx . peek_code ( <NUM_LIT:0> ) <EOL> ctx . state . marks_pop_discard ( ) <EOL> ctx . has_matched = False <EOL> yield True <EOL> def op_repeat_one ( self , ctx ) : <EOL> mincount = ctx . peek_code ( <NUM_LIT:2> ) <EOL> maxcount = ctx . peek_code ( <NUM_LIT:3> ) <EOL> if ctx . remaining_chars ( ) < mincount : <EOL> ctx . has_matched = False <EOL> yield True <EOL> ctx . state . string_position = ctx . string_position <EOL> count = self . count_repetitions ( ctx , maxcount ) <EOL> ctx . skip_char ( count ) <EOL> if count < mincount : <EOL> ctx . has_matched = False <EOL> yield True <EOL> if ctx . peek_code ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) == OPCODES [ "<STR_LIT:success>" ] : <EOL> ctx . state . string_position = ctx . string_position <EOL> ctx . has_matched = True <EOL> yield True <EOL> ctx . state . marks_push ( ) <EOL> if ctx . peek_code ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) == OPCODES [ "<STR_LIT>" ] : <EOL> char = ctx . peek_code ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:2> ) <EOL> while True : <EOL> while count >= mincount and ( ctx . at_end ( ) or ord ( ctx . peek_char ( ) ) != char ) : <EOL> ctx . skip_char ( - <NUM_LIT:1> ) <EOL> count -= <NUM_LIT:1> <EOL> if count < mincount : <EOL> break <EOL> ctx . state . string_position = ctx . string_position <EOL> child_context = ctx . push_new_context ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) <EOL> yield False <EOL> if child_context . has_matched : <EOL> ctx . has_matched = True <EOL> yield True <EOL> ctx . skip_char ( - <NUM_LIT:1> ) <EOL> count -= <NUM_LIT:1> <EOL> ctx . state . marks_pop_keep ( ) <EOL> else : <EOL> while count >= mincount : <EOL> ctx . state . string_position = ctx . string_position <EOL> child_context = ctx . push_new_context ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) <EOL> yield False <EOL> if child_context . has_matched : <EOL> ctx . has_matched = True <EOL> yield True <EOL> ctx . skip_char ( - <NUM_LIT:1> ) <EOL> count -= <NUM_LIT:1> <EOL> ctx . state . marks_pop_keep ( ) <EOL> ctx . state . marks_pop_discard ( ) <EOL> ctx . has_matched = False <EOL> yield True <EOL> def op_min_repeat_one ( self , ctx ) : <EOL> mincount = ctx . peek_code ( <NUM_LIT:2> ) <EOL> maxcount = ctx . peek_code ( <NUM_LIT:3> ) <EOL> if ctx . remaining_chars ( ) < mincount : <EOL> ctx . has_matched = False <EOL> yield True <EOL> ctx . state . string_position = ctx . string_position <EOL> if mincount == <NUM_LIT:0> : <EOL> count = <NUM_LIT:0> <EOL> else : <EOL> count = self . count_repetitions ( ctx , mincount ) <EOL> if count < mincount : <EOL> ctx . has_matched = False <EOL> yield True <EOL> ctx . skip_char ( count ) <EOL> if ctx . peek_code ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) == OPCODES [ "<STR_LIT:success>" ] : <EOL> ctx . state . string_position = ctx . string_position <EOL> ctx . has_matched = True <EOL> yield True <EOL> ctx . state . marks_push ( ) <EOL> while maxcount == MAXREPEAT or count <= maxcount : <EOL> ctx . state . string_position = ctx . string_position <EOL> child_context = ctx . push_new_context ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) <EOL> yield False <EOL> if child_context . has_matched : <EOL> ctx . has_matched = True <EOL> yield True <EOL> ctx . state . string_position = ctx . string_position <EOL> if self . count_repetitions ( ctx , <NUM_LIT:1> ) == <NUM_LIT:0> : <EOL> break <EOL> ctx . skip_char ( <NUM_LIT:1> ) <EOL> count += <NUM_LIT:1> <EOL> ctx . state . marks_pop_keep ( ) <EOL> ctx . state . marks_pop_discard ( ) <EOL> ctx . has_matched = False <EOL> yield True <EOL> def op_repeat ( self , ctx ) : <EOL> repeat = _RepeatContext ( ctx ) <EOL> ctx . state . repeat = repeat <EOL> ctx . state . string_position = ctx . string_position <EOL> child_context = ctx . push_new_context ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) <EOL> yield False <EOL> ctx . state . repeat = repeat . previous <EOL> ctx . has_matched = child_context . has_matched <EOL> yield True <EOL> def op_max_until ( self , ctx ) : <EOL> repeat = ctx . state . repeat <EOL> if repeat is None : <EOL> raise RuntimeError ( "<STR_LIT>" ) <EOL> mincount = repeat . peek_code ( <NUM_LIT:2> ) <EOL> maxcount = repeat . peek_code ( <NUM_LIT:3> ) <EOL> ctx . state . string_position = ctx . string_position <EOL> count = repeat . count + <NUM_LIT:1> <EOL> if count < mincount : <EOL> repeat . count = count <EOL> child_context = repeat . push_new_context ( <NUM_LIT:4> ) <EOL> yield False <EOL> ctx . has_matched = child_context . has_matched <EOL> if not ctx . has_matched : <EOL> repeat . count = count - <NUM_LIT:1> <EOL> ctx . state . string_position = ctx . string_position <EOL> yield True <EOL> if ( count < maxcount or maxcount == MAXREPEAT ) and ctx . state . string_position != repeat . last_position : <EOL> repeat . count = count <EOL> ctx . state . marks_push ( ) <EOL> save_last_position = repeat . last_position <EOL> repeat . last_position = ctx . state . string_position <EOL> child_context = repeat . push_new_context ( <NUM_LIT:4> ) <EOL> yield False <EOL> repeat . last_position = save_last_position <EOL> if child_context . has_matched : <EOL> ctx . state . marks_pop_discard ( ) <EOL> ctx . has_matched = True <EOL> yield True <EOL> ctx . state . marks_pop ( ) <EOL> repeat . count = count - <NUM_LIT:1> <EOL> ctx . state . string_position = ctx . string_position <EOL> ctx . state . repeat = repeat . previous <EOL> child_context = ctx . push_new_context ( <NUM_LIT:1> ) <EOL> yield False <EOL> ctx . has_matched = child_context . has_matched <EOL> if not ctx . has_matched : <EOL> ctx . state . repeat = repeat <EOL> ctx . state . string_position = ctx . string_position <EOL> yield True <EOL> def op_min_until ( self , ctx ) : <EOL> repeat = ctx . state . repeat <EOL> if repeat is None : <EOL> raise RuntimeError ( "<STR_LIT>" ) <EOL> mincount = repeat . peek_code ( <NUM_LIT:2> ) <EOL> maxcount = repeat . peek_code ( <NUM_LIT:3> ) <EOL> ctx . state . string_position = ctx . string_position <EOL> count = repeat . count + <NUM_LIT:1> <EOL> if count < mincount : <EOL> repeat . count = count <EOL> child_context = repeat . push_new_context ( <NUM_LIT:4> ) <EOL> yield False <EOL> ctx . has_matched = child_context . has_matched <EOL> if not ctx . has_matched : <EOL> repeat . count = count - <NUM_LIT:1> <EOL> ctx . state . string_position = ctx . string_position <EOL> yield True <EOL> ctx . state . marks_push ( ) <EOL> ctx . state . repeat = repeat . previous <EOL> child_context = ctx . push_new_context ( <NUM_LIT:1> ) <EOL> yield False <EOL> if child_context . has_matched : <EOL> ctx . has_matched = True <EOL> yield True <EOL> ctx . state . repeat = repeat <EOL> ctx . state . string_position = ctx . string_position <EOL> ctx . state . marks_pop ( ) <EOL> if count >= maxcount and maxcount != MAXREPEAT : <EOL> ctx . has_matched = False <EOL> yield True <EOL> repeat . count = count <EOL> child_context = repeat . push_new_context ( <NUM_LIT:4> ) <EOL> yield False <EOL> ctx . has_matched = child_context . has_matched <EOL> if not ctx . has_matched : <EOL> repeat . count = count - <NUM_LIT:1> <EOL> ctx . state . string_position = ctx . string_position <EOL> yield True <EOL> def general_op_groupref ( self , ctx , decorate = lambda x : x ) : <EOL> group_start , group_end = ctx . state . get_marks ( ctx . peek_code ( <NUM_LIT:1> ) ) <EOL> if group_start is None or group_end is None or group_end < group_start : <EOL> ctx . has_matched = False <EOL> return True <EOL> while group_start < group_end : <EOL> if ctx . at_end ( ) or decorate ( ord ( ctx . peek_char ( ) ) ) != decorate ( ord ( ctx . state . string [ group_start ] ) ) : <EOL> ctx . has_matched = False <EOL> return True <EOL> group_start += <NUM_LIT:1> <EOL> ctx . skip_char ( <NUM_LIT:1> ) <EOL> ctx . skip_code ( <NUM_LIT:2> ) <EOL> return True <EOL> def op_groupref ( self , ctx ) : <EOL> return self . general_op_groupref ( ctx ) <EOL> def op_groupref_ignore ( self , ctx ) : <EOL> return self . general_op_groupref ( ctx , ctx . state . lower ) <EOL> def op_groupref_exists ( self , ctx ) : <EOL> group_start , group_end = ctx . state . get_marks ( ctx . peek_code ( <NUM_LIT:1> ) ) <EOL> if group_start is None or group_end is None or group_end < group_start : <EOL> ctx . skip_code ( ctx . peek_code ( <NUM_LIT:2> ) + <NUM_LIT:1> ) <EOL> else : <EOL> ctx . skip_code ( <NUM_LIT:3> ) <EOL> return True <EOL> def op_assert ( self , ctx ) : <EOL> ctx . state . string_position = ctx . string_position - ctx . peek_code ( <NUM_LIT:2> ) <EOL> if ctx . state . string_position < <NUM_LIT:0> : <EOL> ctx . has_matched = False <EOL> yield True <EOL> child_context = ctx . push_new_context ( <NUM_LIT:3> ) <EOL> yield False <EOL> if child_context . has_matched : <EOL> ctx . skip_code ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) <EOL> else : <EOL> ctx . has_matched = False <EOL> yield True <EOL> def op_assert_not ( self , ctx ) : <EOL> ctx . state . string_position = ctx . string_position - ctx . peek_code ( <NUM_LIT:2> ) <EOL> if ctx . state . string_position >= <NUM_LIT:0> : <EOL> child_context = ctx . push_new_context ( <NUM_LIT:3> ) <EOL> yield False <EOL> if child_context . has_matched : <EOL> ctx . has_matched = False <EOL> yield True <EOL> ctx . skip_code ( ctx . peek_code ( <NUM_LIT:1> ) + <NUM_LIT:1> ) <EOL> yield True <EOL> def unknown ( self , ctx ) : <EOL> raise RuntimeError ( "<STR_LIT>" % ctx . peek_code ( ) ) <EOL> def check_charset ( self , ctx , char ) : <EOL> """<STR_LIT>""" <EOL> self . set_dispatcher . reset ( char ) <EOL> save_position = ctx . code_position <EOL> result = None <EOL> while result is None : <EOL> result = self . set_dispatcher . dispatch ( ctx . peek_code ( ) , ctx ) <EOL> ctx . code_position = save_position <EOL> return result <EOL> def count_repetitions ( self , ctx , maxcount ) : <EOL> """<STR_LIT>""" <EOL> count = <NUM_LIT:0> <EOL> real_maxcount = ctx . state . end - ctx . string_position <EOL> if maxcount < real_maxcount and maxcount != MAXREPEAT : <EOL> real_maxcount = maxcount <EOL> code_position = ctx . code_position <EOL> string_position = ctx . string_position <EOL> ctx . skip_code ( <NUM_LIT:4> ) <EOL> reset_position = ctx . code_position <EOL> while count < real_maxcount : <EOL> ctx . code_position = reset_position <EOL> self . dispatch ( ctx . peek_code ( ) , ctx ) <EOL> if ctx . has_matched is False : <EOL> break <EOL> count += <NUM_LIT:1> <EOL> ctx . has_matched = None <EOL> ctx . code_position = code_position <EOL> ctx . string_position = string_position <EOL> return count <EOL> def _log ( self , context , opname , * args ) : <EOL> arg_string = ( "<STR_LIT>" * len ( args ) ) % args <EOL> _log ( "<STR_LIT>" % ( context . pattern_codes , <EOL> context . string_position , opname , arg_string ) ) <EOL> _OpcodeDispatcher . build_dispatch_table ( OPCODES , "<STR_LIT>" ) <EOL> class _CharsetDispatcher ( _Dispatcher ) : <EOL> def __init__ ( self ) : <EOL> self . ch_dispatcher = _ChcodeDispatcher ( ) <EOL> def reset ( self , char ) : <EOL> self . char = char <EOL> self . ok = True <EOL> def set_failure ( self , ctx ) : <EOL> return not self . ok <EOL> def set_literal ( self , ctx ) : <EOL> if ctx . peek_code ( <NUM_LIT:1> ) == self . char : <EOL> return self . ok <EOL> else : <EOL> ctx . skip_code ( <NUM_LIT:2> ) <EOL> def set_category ( self , ctx ) : <EOL> if self . ch_dispatcher . dispatch ( ctx . peek_code ( <NUM_LIT:1> ) , ctx ) : <EOL> return self . ok <EOL> else : <EOL> ctx . skip_code ( <NUM_LIT:2> ) <EOL> def set_charset ( self , ctx ) : <EOL> char_code = self . char <EOL> ctx . skip_code ( <NUM_LIT:1> ) <EOL> if CODESIZE == <NUM_LIT:2> : <EOL> if char_code < <NUM_LIT> and ctx . peek_code ( char_code >> <NUM_LIT:4> ) & ( <NUM_LIT:1> << ( char_code & <NUM_LIT:15> ) ) : <EOL> return self . ok <EOL> ctx . skip_code ( <NUM_LIT:16> ) <EOL> else : <EOL> if char_code < <NUM_LIT> and ctx . peek_code ( char_code >> <NUM_LIT:5> ) & ( <NUM_LIT:1> << ( char_code & <NUM_LIT> ) ) : <EOL> return self . ok <EOL> ctx . skip_code ( <NUM_LIT:8> ) <EOL> def set_range ( self , ctx ) : <EOL> if ctx . peek_code ( <NUM_LIT:1> ) <= self . char <= ctx . peek_code ( <NUM_LIT:2> ) : <EOL> return self . ok <EOL> ctx . skip_code ( <NUM_LIT:3> ) <EOL> def set_negate ( self , ctx ) : <EOL> self . ok = not self . ok <EOL> ctx . skip_code ( <NUM_LIT:1> ) <EOL> def set_bigcharset ( self , ctx ) : <EOL> raise NotImplementationError ( "<STR_LIT>" ) <EOL> char_code = self . char <EOL> count = ctx . peek_code ( <NUM_LIT:1> ) <EOL> ctx . skip_code ( <NUM_LIT:2> ) <EOL> if char_code < <NUM_LIT> : <EOL> block_index = char_code >> <NUM_LIT:8> <EOL> a = array . array ( "<STR_LIT:B>" ) <EOL> a . fromstring ( array . array ( CODESIZE == <NUM_LIT:2> and "<STR_LIT:H>" or "<STR_LIT:I>" , <EOL> [ ctx . peek_code ( block_index // CODESIZE ) ] ) . tostring ( ) ) <EOL> block = a [ block_index % CODESIZE ] <EOL> ctx . skip_code ( <NUM_LIT> // CODESIZE ) <EOL> block_value = ctx . peek_code ( block * ( <NUM_LIT:32> // CODESIZE ) <EOL> + ( ( char_code & <NUM_LIT:255> ) >> ( CODESIZE == <NUM_LIT:2> and <NUM_LIT:4> or <NUM_LIT:5> ) ) ) <EOL> if block_value & ( <NUM_LIT:1> << ( char_code & ( ( <NUM_LIT:8> * CODESIZE ) - <NUM_LIT:1> ) ) ) : <EOL> return self . ok <EOL> else : <EOL> ctx . skip_code ( <NUM_LIT> // CODESIZE ) <EOL> ctx . skip_code ( count * ( <NUM_LIT:32> // CODESIZE ) ) <EOL> def unknown ( self , ctx ) : <EOL> return False <EOL> _CharsetDispatcher . build_dispatch_table ( OPCODES , "<STR_LIT>" ) <EOL> class _AtcodeDispatcher ( _Dispatcher ) : <EOL> def at_beginning ( self , ctx ) : <EOL> return ctx . at_beginning ( ) <EOL> at_beginning_string = at_beginning <EOL> def at_beginning_line ( self , ctx ) : <EOL> return ctx . at_beginning ( ) or _is_linebreak ( ctx . peek_char ( - <NUM_LIT:1> ) ) <EOL> def at_end ( self , ctx ) : <EOL> return ( ctx . remaining_chars ( ) == <NUM_LIT:1> and ctx . at_linebreak ( ) ) or ctx . at_end ( ) <EOL> def at_end_line ( self , ctx ) : <EOL> return ctx . at_linebreak ( ) or ctx . at_end ( ) <EOL> def at_end_string ( self , ctx ) : <EOL> return ctx . at_end ( ) <EOL> def at_boundary ( self , ctx ) : <EOL> return ctx . at_boundary ( _is_word ) <EOL> def at_non_boundary ( self , ctx ) : <EOL> return not ctx . at_boundary ( _is_word ) <EOL> def at_loc_boundary ( self , ctx ) : <EOL> return ctx . at_boundary ( _is_loc_word ) <EOL> def at_loc_non_boundary ( self , ctx ) : <EOL> return not ctx . at_boundary ( _is_loc_word ) <EOL> def at_uni_boundary ( self , ctx ) : <EOL> return ctx . at_boundary ( _is_uni_word ) <EOL> def at_uni_non_boundary ( self , ctx ) : <EOL> return not ctx . at_boundary ( _is_uni_word ) <EOL> def unknown ( self , ctx ) : <EOL> return False <EOL> _AtcodeDispatcher . build_dispatch_table ( ATCODES , "<STR_LIT>" ) <EOL> class _ChcodeDispatcher ( _Dispatcher ) : <EOL> def category_digit ( self , ctx ) : <EOL> return _is_digit ( ctx . peek_char ( ) ) <EOL> def category_not_digit ( self , ctx ) : <EOL> return not _is_digit ( ctx . peek_char ( ) ) <EOL> def category_space ( self , ctx ) : <EOL> return _is_space ( ctx . peek_char ( ) ) <EOL> def category_not_space ( self , ctx ) : <EOL> return not _is_space ( ctx . peek_char ( ) ) <EOL> def category_word ( self , ctx ) : <EOL> return _is_word ( ctx . peek_char ( ) ) <EOL> def category_not_word ( self , ctx ) : <EOL> return not _is_word ( ctx . peek_char ( ) ) <EOL> def category_linebreak ( self , ctx ) : <EOL> return _is_linebreak ( ctx . peek_char ( ) ) <EOL> def category_not_linebreak ( self , ctx ) : <EOL> return not _is_linebreak ( ctx . peek_char ( ) ) <EOL> def category_loc_word ( self , ctx ) : <EOL> return _is_loc_word ( ctx . peek_char ( ) ) <EOL> def category_loc_not_word ( self , ctx ) : <EOL> return not _is_loc_word ( ctx . peek_char ( ) ) <EOL> def category_uni_digit ( self , ctx ) : <EOL> return ctx . peek_char ( ) . isdigit ( ) <EOL> def category_uni_not_digit ( self , ctx ) : <EOL> return not ctx . peek_char ( ) . isdigit ( ) <EOL> def category_uni_space ( self , ctx ) : <EOL> return ctx . peek_char ( ) . isspace ( ) <EOL> def category_uni_not_space ( self , ctx ) : <EOL> return not ctx . peek_char ( ) . isspace ( ) <EOL> def category_uni_word ( self , ctx ) : <EOL> return _is_uni_word ( ctx . peek_char ( ) ) <EOL> def category_uni_not_word ( self , ctx ) : <EOL> return not _is_uni_word ( ctx . peek_char ( ) ) <EOL> def category_uni_linebreak ( self , ctx ) : <EOL> return ord ( ctx . peek_char ( ) ) in _uni_linebreaks <EOL> def category_uni_not_linebreak ( self , ctx ) : <EOL> return ord ( ctx . peek_char ( ) ) not in _uni_linebreaks <EOL> def unknown ( self , ctx ) : <EOL> return False <EOL> _ChcodeDispatcher . build_dispatch_table ( CHCODES , "<STR_LIT>" ) <EOL> _ascii_char_info = [ <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:6> , <NUM_LIT:2> , <EOL> <NUM_LIT:2> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:0> , <EOL> <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <EOL> <NUM_LIT> , <NUM_LIT> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <EOL> <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:0> , <NUM_LIT:0> , <EOL> <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:16> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <EOL> <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ] <EOL> def _is_digit ( char ) : <EOL> code = ord ( char ) <EOL> return code < <NUM_LIT> and _ascii_char_info [ code ] & <NUM_LIT:1> <EOL> def _is_space ( char ) : <EOL> code = ord ( char ) <EOL> return code < <NUM_LIT> and _ascii_char_info [ code ] & <NUM_LIT:2> <EOL> def _is_word ( char ) : <EOL> code = ord ( char ) <EOL> return code < <NUM_LIT> and _ascii_char_info [ code ] & <NUM_LIT:16> <EOL> def _is_loc_word ( char ) : <EOL> return ( not ( ord ( char ) & ~ <NUM_LIT:255> ) and char . isalnum ( ) ) or char == '<STR_LIT:_>' <EOL> def _is_uni_word ( char ) : <EOL> return chr ( ord ( char ) ) . isalnum ( ) or char == '<STR_LIT:_>' <EOL> def _is_linebreak ( char ) : <EOL> return char == "<STR_LIT:\n>" <EOL> _uni_linebreaks = [ <NUM_LIT:10> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:30> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] <EOL> def _log ( message ) : <EOL> if <NUM_LIT:0> : <EOL> print ( message ) </s>
