<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import vim <EOL> import socket <EOL> import base64 <EOL> import traceback <EOL> import xml . dom . minidom <EOL> class VimWindow : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , name = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> self . name = name <EOL> self . buffer = None <EOL> self . firstwrite = <NUM_LIT:1> <EOL> def isprepared ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . buffer == None or len ( dir ( self . buffer ) ) == <NUM_LIT:0> or self . getwinnr ( ) == - <NUM_LIT:1> : <EOL> return <NUM_LIT:0> <EOL> return <NUM_LIT:1> <EOL> def prepare ( self ) : <EOL> """<STR_LIT>""" <EOL> if not self . isprepared ( ) : <EOL> self . create ( ) <EOL> def on_create ( self ) : <EOL> pass <EOL> def getwinnr ( self ) : <EOL> return int ( vim . eval ( "<STR_LIT>" + self . name + "<STR_LIT>" ) ) <EOL> def xml_on_element ( self , node ) : <EOL> line = str ( node . nodeName ) <EOL> if node . hasAttributes ( ) : <EOL> for ( n , v ) in node . attributes . items ( ) : <EOL> line += str ( '<STR_LIT>' % ( n , v ) ) <EOL> return line <EOL> def xml_on_attribute ( self , node ) : <EOL> return str ( node . nodeName ) <EOL> def xml_on_entity ( self , node ) : <EOL> return '<STR_LIT>' <EOL> def xml_on_comment ( self , node ) : <EOL> return '<STR_LIT>' <EOL> def xml_on_document ( self , node ) : <EOL> return '<STR_LIT>' <EOL> def xml_on_document_type ( self , node ) : <EOL> return '<STR_LIT>' <EOL> def xml_on_notation ( self , node ) : <EOL> return '<STR_LIT>' <EOL> def xml_on_text ( self , node ) : <EOL> return node . data <EOL> def xml_on_processing_instruction ( self , node ) : <EOL> return '<STR_LIT>' <EOL> def xml_on_cdata_section ( self , node ) : <EOL> return node . data <EOL> def write ( self , msg ) : <EOL> """<STR_LIT>""" <EOL> self . prepare ( ) <EOL> if self . firstwrite == <NUM_LIT:1> : <EOL> self . firstwrite = <NUM_LIT:0> <EOL> self . buffer [ : ] = str ( msg ) . split ( '<STR_LIT:\n>' ) <EOL> else : <EOL> self . buffer . append ( str ( msg ) . split ( '<STR_LIT:\n>' ) ) <EOL> self . command ( '<STR_LIT>' ) <EOL> def create ( self , method = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> vim . command ( '<STR_LIT>' + method + '<STR_LIT:U+0020>' + self . name ) <EOL> vim . command ( "<STR_LIT>" ) <EOL> self . buffer = vim . current . buffer <EOL> self . width = int ( vim . eval ( "<STR_LIT>" ) ) <EOL> self . height = int ( vim . eval ( "<STR_LIT>" ) ) <EOL> self . on_create ( ) <EOL> def destroy ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . buffer == None or len ( dir ( self . buffer ) ) == <NUM_LIT:0> : <EOL> return <EOL> self . command ( '<STR_LIT>' + self . name ) <EOL> self . firstwrite = <NUM_LIT:1> <EOL> def clean ( self ) : <EOL> """<STR_LIT>""" <EOL> self . prepare ( ) <EOL> self . buffer [ : ] = [ ] <EOL> self . firstwrite = <NUM_LIT:1> <EOL> def command ( self , cmd ) : <EOL> """<STR_LIT>""" <EOL> self . prepare ( ) <EOL> winnr = self . getwinnr ( ) <EOL> if winnr != int ( vim . eval ( "<STR_LIT>" ) ) : <EOL> vim . command ( str ( winnr ) + '<STR_LIT>' ) <EOL> vim . command ( cmd ) <EOL> def _xml_stringfy ( self , node , level = <NUM_LIT:0> , encoding = None ) : <EOL> if node . nodeType == node . ELEMENT_NODE : <EOL> line = self . xml_on_element ( node ) <EOL> elif node . nodeType == node . ATTRIBUTE_NODE : <EOL> line = self . xml_on_attribute ( node ) <EOL> elif node . nodeType == node . ENTITY_NODE : <EOL> line = self . xml_on_entity ( node ) <EOL> elif node . nodeType == node . COMMENT_NODE : <EOL> line = self . xml_on_comment ( node ) <EOL> elif node . nodeType == node . DOCUMENT_NODE : <EOL> line = self . xml_on_document ( node ) <EOL> elif node . nodeType == node . DOCUMENT_TYPE_NODE : <EOL> line = self . xml_on_document_type ( node ) <EOL> elif node . nodeType == node . NOTATION_NODE : <EOL> line = self . xml_on_notation ( node ) <EOL> elif node . nodeType == node . PROCESSING_INSTRUCTION_NODE : <EOL> line = self . xml_on_processing_instruction ( node ) <EOL> elif node . nodeType == node . CDATA_SECTION_NODE : <EOL> line = self . xml_on_cdata_section ( node ) <EOL> elif node . nodeType == node . TEXT_NODE : <EOL> line = self . xml_on_text ( node ) <EOL> else : <EOL> line = '<STR_LIT>' <EOL> if node . hasChildNodes ( ) : <EOL> return self . fixup_childs ( line , node , level ) <EOL> else : <EOL> return self . fixup_single ( line , node , level ) <EOL> return line <EOL> def fixup_childs ( self , line , node , level ) : <EOL> line = '<STR_LIT>' . ljust ( level * <NUM_LIT:4> ) + line + '<STR_LIT:\n>' <EOL> line += self . xml_stringfy_childs ( node , level + <NUM_LIT:1> ) <EOL> return line <EOL> def fixup_single ( self , line , node , level ) : <EOL> return '<STR_LIT>' . ljust ( level * <NUM_LIT:4> ) + line + '<STR_LIT:\n>' <EOL> def xml_stringfy ( self , xml ) : <EOL> return self . _xml_stringfy ( xml ) <EOL> def xml_stringfy_childs ( self , node , level = <NUM_LIT:0> ) : <EOL> line = '<STR_LIT>' <EOL> for cnode in node . childNodes : <EOL> line = str ( line ) <EOL> line += str ( self . _xml_stringfy ( cnode , level ) ) <EOL> return line <EOL> def write_xml ( self , xml ) : <EOL> self . write ( self . xml_stringfy ( xml ) ) <EOL> def write_xml_childs ( self , xml ) : <EOL> self . write ( self . xml_stringfy_childs ( xml ) ) <EOL> class StackWindow ( VimWindow ) : <EOL> def __init__ ( self , name = '<STR_LIT>' ) : <EOL> VimWindow . __init__ ( self , name ) <EOL> def xml_on_element ( self , node ) : <EOL> if node . nodeName != '<STR_LIT>' : <EOL> return VimWindow . xml_on_element ( self , node ) <EOL> else : <EOL> if node . getAttribute ( '<STR_LIT>' ) != '<STR_LIT>' : <EOL> fmark = '<STR_LIT>' <EOL> else : <EOL> fmark = '<STR_LIT>' <EOL> return str ( '<STR_LIT>' % ( node . getAttribute ( '<STR_LIT>' ) , node . getAttribute ( '<STR_LIT>' ) + fmark , node . getAttribute ( '<STR_LIT:filename>' ) [ <NUM_LIT:7> : ] , node . getAttribute ( '<STR_LIT>' ) ) ) <EOL> def on_create ( self ) : <EOL> self . command ( '<STR_LIT>' ) <EOL> self . highlight_stack ( <NUM_LIT:0> ) <EOL> def highlight_stack ( self , no ) : <EOL> self . command ( '<STR_LIT>' ) <EOL> self . command ( '<STR_LIT>' + str ( no ) + '<STR_LIT>' ) <EOL> class LogWindow ( VimWindow ) : <EOL> def __init__ ( self , name = '<STR_LIT>' ) : <EOL> VimWindow . __init__ ( self , name ) <EOL> def on_create ( self ) : <EOL> self . command ( '<STR_LIT>' ) <EOL> self . write ( '<STR_LIT>' ) <EOL> class TraceWindow ( VimWindow ) : <EOL> def __init__ ( self , name = '<STR_LIT>' ) : <EOL> VimWindow . __init__ ( self , name ) <EOL> def xml_on_element ( self , node ) : <EOL> if node . nodeName != '<STR_LIT:error>' : <EOL> return VimWindow . xml_on_element ( self , node ) <EOL> else : <EOL> desc = '<STR_LIT>' <EOL> if node . hasAttribute ( '<STR_LIT:code>' ) : <EOL> desc = '<STR_LIT>' + error_msg [ int ( node . getAttribute ( '<STR_LIT:code>' ) ) ] <EOL> return VimWindow . xml_on_element ( self , node ) + desc <EOL> def on_create ( self ) : <EOL> self . command ( '<STR_LIT>' ) <EOL> class WatchWindow ( VimWindow ) : <EOL> def __init__ ( self , name = '<STR_LIT>' ) : <EOL> VimWindow . __init__ ( self , name ) <EOL> def fixup_single ( self , line , node , level ) : <EOL> return '<STR_LIT>' . ljust ( level * <NUM_LIT:1> ) + line + '<STR_LIT:\n>' <EOL> def fixup_childs ( self , line , node , level ) : <EOL> global z <EOL> if len ( node . childNodes ) == <NUM_LIT:1> and ( node . firstChild . nodeType == node . TEXT_NODE or node . firstChild . nodeType == node . CDATA_SECTION_NODE ) : <EOL> line = str ( '<STR_LIT>' . ljust ( level * <NUM_LIT:1> ) + line ) <EOL> encoding = node . getAttribute ( '<STR_LIT>' ) <EOL> if encoding == '<STR_LIT>' : <EOL> line += "<STR_LIT:'>" + base64 . decodestring ( str ( node . firstChild . data ) ) + "<STR_LIT>" <EOL> elif encoding == '<STR_LIT>' : <EOL> line += str ( node . firstChild . data ) + '<STR_LIT>' <EOL> else : <EOL> line += '<STR_LIT>' + encoding + '<STR_LIT>' + str ( node . firstChild . data ) + '<STR_LIT>' <EOL> else : <EOL> if level == <NUM_LIT:0> : <EOL> line = '<STR_LIT>' . ljust ( level * <NUM_LIT:1> ) + str ( line ) + '<STR_LIT:;>' + '<STR_LIT:\n>' <EOL> line += self . xml_stringfy_childs ( node , level + <NUM_LIT:1> ) <EOL> line += '<STR_LIT>' <EOL> else : <EOL> line = ( '<STR_LIT>' . ljust ( level * <NUM_LIT:1> ) + str ( line ) + '<STR_LIT:;>' ) . ljust ( self . width - <NUM_LIT:20> ) + '<STR_LIT>' . ljust ( level * <NUM_LIT:1> ) + '<STR_LIT>' + str ( level + <NUM_LIT:1> ) + '<STR_LIT>' + '<STR_LIT:\n>' <EOL> line += str ( self . xml_stringfy_childs ( node , level + <NUM_LIT:1> ) ) <EOL> line += ( '<STR_LIT>' . ljust ( level * <NUM_LIT:1> ) + '<STR_LIT>' . ljust ( level * <NUM_LIT:1> ) ) . ljust ( self . width - <NUM_LIT:20> ) + '<STR_LIT>' . ljust ( level * <NUM_LIT:1> ) + '<STR_LIT>' + str ( level + <NUM_LIT:1> ) + '<STR_LIT>' <EOL> return line <EOL> def xml_on_element ( self , node ) : <EOL> if node . nodeName == '<STR_LIT>' : <EOL> self . type = node . getAttribute ( '<STR_LIT:type>' ) <EOL> name = node . getAttribute ( '<STR_LIT:name>' ) <EOL> fullname = node . getAttribute ( '<STR_LIT>' ) <EOL> if name == '<STR_LIT>' : <EOL> name = '<STR_LIT>' <EOL> if fullname == '<STR_LIT>' : <EOL> fullname = '<STR_LIT>' <EOL> if self . type == '<STR_LIT>' : <EOL> return str ( ( '<STR_LIT>' % name ) + "<STR_LIT>" ) <EOL> else : <EOL> return str ( '<STR_LIT>' % fullname ) + '<STR_LIT>' + self . type + '<STR_LIT>' <EOL> elif node . nodeName == '<STR_LIT>' : <EOL> return "<STR_LIT>" + node . getAttribute ( '<STR_LIT>' ) + "<STR_LIT:'>" <EOL> else : <EOL> return VimWindow . xml_on_element ( self , node ) <EOL> def xml_on_text ( self , node ) : <EOL> if self . type == '<STR_LIT:string>' : <EOL> return "<STR_LIT:'>" + str ( node . data ) + "<STR_LIT:'>" <EOL> else : <EOL> return str ( node . data ) <EOL> def xml_on_cdata_section ( self , node ) : <EOL> if self . type == '<STR_LIT:string>' : <EOL> return "<STR_LIT:'>" + str ( node . data ) + "<STR_LIT:'>" <EOL> else : <EOL> return str ( node . data ) <EOL> def on_create ( self ) : <EOL> self . write ( '<STR_LIT>' ) <EOL> self . command ( '<STR_LIT>' ) <EOL> self . command ( '<STR_LIT>' ) <EOL> self . command ( '<STR_LIT>' ) <EOL> def input ( self , mode , arg = '<STR_LIT>' ) : <EOL> line = self . buffer [ - <NUM_LIT:1> ] <EOL> if line [ : len ( mode ) + <NUM_LIT:1> ] == '<STR_LIT>' + mode + '<STR_LIT::>' : <EOL> self . buffer [ - <NUM_LIT:1> ] = line + arg <EOL> else : <EOL> self . buffer . append ( '<STR_LIT>' + mode + '<STR_LIT>' + arg ) <EOL> self . command ( '<STR_LIT>' ) <EOL> def get_command ( self ) : <EOL> line = self . buffer [ - <NUM_LIT:1> ] <EOL> if line [ <NUM_LIT:0> : <NUM_LIT> ] == '<STR_LIT>' : <EOL> print "<STR_LIT>" <EOL> return ( '<STR_LIT:none>' , '<STR_LIT>' ) <EOL> elif line [ <NUM_LIT:0> : <NUM_LIT> ] == '<STR_LIT>' : <EOL> return ( '<STR_LIT>' , line [ <NUM_LIT> : ] . strip ( '<STR_LIT:U+0020>' ) ) <EOL> elif line [ <NUM_LIT:0> : <NUM_LIT> ] == '<STR_LIT>' : <EOL> return ( '<STR_LIT>' , line [ <NUM_LIT> : ] . strip ( '<STR_LIT:U+0020>' ) ) <EOL> elif line [ <NUM_LIT:0> : <NUM_LIT> ] == '<STR_LIT>' : <EOL> return ( '<STR_LIT>' , line [ <NUM_LIT> : ] . strip ( '<STR_LIT:U+0020>' ) ) <EOL> else : <EOL> return ( '<STR_LIT:none>' , '<STR_LIT>' ) <EOL> class HelpWindow ( VimWindow ) : <EOL> def __init__ ( self , name = '<STR_LIT>' ) : <EOL> VimWindow . __init__ ( self , name ) <EOL> def on_create ( self ) : <EOL> self . write ( '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT>' + '<STR_LIT:\n>' ) <EOL> self . command ( '<STR_LIT:1>' ) <EOL> class DebugUI : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , minibufexpl = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> self . watchwin = WatchWindow ( ) <EOL> self . stackwin = StackWindow ( ) <EOL> self . tracewin = TraceWindow ( ) <EOL> self . helpwin = HelpWindow ( '<STR_LIT>' ) <EOL> self . mode = <NUM_LIT:0> <EOL> self . file = None <EOL> self . line = None <EOL> self . winbuf = { } <EOL> self . cursign = None <EOL> self . sessfile = "<STR_LIT>" + str ( os . getpid ( ) ) <EOL> self . minibufexpl = minibufexpl <EOL> def debug_mode ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . mode == <NUM_LIT:1> : <EOL> return <EOL> self . mode = <NUM_LIT:1> <EOL> if self . minibufexpl == <NUM_LIT:1> : <EOL> vim . command ( '<STR_LIT>' ) <EOL> vim . command ( '<STR_LIT>' + self . sessfile ) <EOL> for i in range ( <NUM_LIT:1> , len ( vim . windows ) + <NUM_LIT:1> ) : <EOL> vim . command ( str ( i ) + '<STR_LIT>' ) <EOL> self . winbuf [ i ] = vim . eval ( '<STR_LIT>' ) <EOL> vim . command ( '<STR_LIT>' ) <EOL> for i in range ( <NUM_LIT:2> , len ( vim . windows ) + <NUM_LIT:1> ) : <EOL> vim . command ( str ( i ) + '<STR_LIT>' ) <EOL> vim . command ( '<STR_LIT>' ) <EOL> self . create ( ) <EOL> vim . command ( '<STR_LIT>' ) <EOL> self . cursign = '<STR_LIT:1>' <EOL> self . set_highlight ( ) <EOL> def normal_mode ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . mode == <NUM_LIT:0> : <EOL> return <EOL> vim . command ( '<STR_LIT>' ) <EOL> vim . command ( '<STR_LIT>' ) <EOL> self . destroy ( ) <EOL> vim . command ( '<STR_LIT>' + self . sessfile ) <EOL> os . system ( '<STR_LIT>' + self . sessfile ) <EOL> self . set_highlight ( ) <EOL> self . winbuf . clear ( ) <EOL> self . file = None <EOL> self . line = None <EOL> self . mode = <NUM_LIT:0> <EOL> self . cursign = None <EOL> if self . minibufexpl == <NUM_LIT:1> : <EOL> vim . command ( '<STR_LIT>' ) <EOL> def create ( self ) : <EOL> """<STR_LIT>""" <EOL> self . watchwin . create ( '<STR_LIT>' ) <EOL> self . helpwin . create ( '<STR_LIT>' ) <EOL> self . stackwin . create ( '<STR_LIT>' ) <EOL> self . tracewin . create ( '<STR_LIT>' ) <EOL> def set_highlight ( self ) : <EOL> """<STR_LIT>""" <EOL> vim . command ( "<STR_LIT>" ) <EOL> vim . command ( "<STR_LIT>" ) <EOL> def destroy ( self ) : <EOL> """<STR_LIT>""" <EOL> self . helpwin . destroy ( ) <EOL> self . watchwin . destroy ( ) <EOL> self . stackwin . destroy ( ) <EOL> self . tracewin . destroy ( ) <EOL> def go_srcview ( self ) : <EOL> vim . command ( '<STR_LIT>' ) <EOL> def next_sign ( self ) : <EOL> if self . cursign == '<STR_LIT:1>' : <EOL> return '<STR_LIT:2>' <EOL> else : <EOL> return '<STR_LIT:1>' <EOL> def set_srcview ( self , file , line ) : <EOL> """<STR_LIT>""" <EOL> import re <EOL> map_sep = re . compile ( '<STR_LIT>' ) <EOL> path_sep = re . compile ( '<STR_LIT>' ) <EOL> mappings = map_sep . split ( vim . eval ( '<STR_LIT>' ) ) <EOL> if mappings : <EOL> for mapping in mappings : <EOL> if len ( mapping ) == <NUM_LIT:0> : <EOL> continue <EOL> ( remote_path , local_path ) = path_sep . split ( mapping ) <EOL> path_map = re . compile ( '<STR_LIT:(>' + remote_path + '<STR_LIT:)>' ) <EOL> file = path_map . sub ( local_path , file ) <EOL> if file == self . file and self . line == line : <EOL> return <EOL> nextsign = self . next_sign ( ) <EOL> if file != self . file : <EOL> self . file = file <EOL> self . go_srcview ( ) <EOL> vim . command ( '<STR_LIT>' + file ) <EOL> vim . command ( '<STR_LIT>' + nextsign + '<STR_LIT>' + str ( line ) + '<STR_LIT>' + file ) <EOL> vim . command ( '<STR_LIT>' + self . cursign ) <EOL> vim . command ( '<STR_LIT>' + nextsign + '<STR_LIT>' + file ) <EOL> self . line = line <EOL> self . cursign = nextsign <EOL> class DbgProtocol : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , port = <NUM_LIT> , timeout = <NUM_LIT:0> ) : <EOL> self . port = port <EOL> self . sock = None <EOL> self . isconned = <NUM_LIT:0> <EOL> self . timeout = timeout <EOL> if self . timeout <= <NUM_LIT:0> : <EOL> self . timeout = socket . getdefaulttimeout ( ) <EOL> def isconnected ( self ) : <EOL> return self . isconned <EOL> def accept ( self ) : <EOL> print '<STR_LIT>' + str ( self . port ) + '<STR_LIT>' + str ( socket . getdefaulttimeout ( ) ) + '<STR_LIT>' <EOL> serv = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) <EOL> try : <EOL> serv . setsockopt ( socket . SOL_SOCKET , socket . SO_REUSEADDR , <NUM_LIT:1> ) <EOL> serv . bind ( ( '<STR_LIT>' , self . port ) ) <EOL> serv . listen ( <NUM_LIT:5> ) <EOL> ( self . sock , address ) = serv . accept ( ) <EOL> self . sock . settimeout ( self . timeout ) <EOL> except socket . timeout : <EOL> serv . close ( ) <EOL> self . stop ( ) <EOL> print '<STR_LIT>' <EOL> return <EOL> print '<STR_LIT>' , address <EOL> self . isconned = <NUM_LIT:1> <EOL> serv . close ( ) <EOL> def close ( self ) : <EOL> if self . sock != None : <EOL> self . sock . close ( ) <EOL> self . sock = None <EOL> self . isconned = <NUM_LIT:0> <EOL> def recv_length ( self ) : <EOL> length = '<STR_LIT>' <EOL> while <NUM_LIT:1> : <EOL> c = self . sock . recv ( <NUM_LIT:1> ) <EOL> if c == '<STR_LIT>' : <EOL> self . close ( ) <EOL> raise EOFError , '<STR_LIT>' <EOL> if c == '<STR_LIT>' : <EOL> return int ( length ) <EOL> if c . isdigit ( ) : <EOL> length = length + c <EOL> def recv_null ( self ) : <EOL> while <NUM_LIT:1> : <EOL> c = self . sock . recv ( <NUM_LIT:1> ) <EOL> if c == '<STR_LIT>' : <EOL> self . close ( ) <EOL> raise EOFError , '<STR_LIT>' <EOL> if c == '<STR_LIT>' : <EOL> return <EOL> def recv_body ( self , to_recv ) : <EOL> body = '<STR_LIT>' <EOL> while to_recv > <NUM_LIT:0> : <EOL> buf = self . sock . recv ( to_recv ) <EOL> if buf == '<STR_LIT>' : <EOL> self . close ( ) <EOL> raise EOFError , '<STR_LIT>' <EOL> to_recv -= len ( buf ) <EOL> body = body + buf <EOL> return body <EOL> def recv_msg ( self ) : <EOL> length = self . recv_length ( ) <EOL> body = self . recv_body ( length ) <EOL> self . recv_null ( ) <EOL> return body <EOL> def send_msg ( self , cmd ) : <EOL> self . sock . send ( cmd + '<STR_LIT>' ) <EOL> class BreakPoint : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> self . breakpt = { } <EOL> self . revmap = { } <EOL> self . startbno = <NUM_LIT> <EOL> self . maxbno = self . startbno <EOL> def clear ( self ) : <EOL> """<STR_LIT>""" <EOL> self . breakpt . clear ( ) <EOL> self . revmap . clear ( ) <EOL> self . maxbno = self . startbno <EOL> def add ( self , file , line , exp = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> self . maxbno = self . maxbno + <NUM_LIT:1> <EOL> self . breakpt [ self . maxbno ] = { '<STR_LIT:file>' : file , '<STR_LIT>' : line , '<STR_LIT>' : exp , '<STR_LIT:id>' : None } <EOL> return self . maxbno <EOL> def remove ( self , bno ) : <EOL> """<STR_LIT>""" <EOL> del self . breakpt [ bno ] <EOL> def find ( self , file , line ) : <EOL> """<STR_LIT>""" <EOL> for bno in self . breakpt . keys ( ) : <EOL> if self . breakpt [ bno ] [ '<STR_LIT:file>' ] == file and self . breakpt [ bno ] [ '<STR_LIT>' ] == line : <EOL> return bno <EOL> return None <EOL> def getfile ( self , bno ) : <EOL> """<STR_LIT>""" <EOL> return self . breakpt [ bno ] [ '<STR_LIT:file>' ] <EOL> def getline ( self , bno ) : <EOL> """<STR_LIT>""" <EOL> return self . breakpt [ bno ] [ '<STR_LIT>' ] <EOL> def getexp ( self , bno ) : <EOL> """<STR_LIT>""" <EOL> return self . breakpt [ bno ] [ '<STR_LIT>' ] <EOL> def getid ( self , bno ) : <EOL> """<STR_LIT>""" <EOL> return self . breakpt [ bno ] [ '<STR_LIT:id>' ] <EOL> def setid ( self , bno , id ) : <EOL> """<STR_LIT>""" <EOL> self . breakpt [ bno ] [ '<STR_LIT:id>' ] = id <EOL> def list ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . breakpt . keys ( ) <EOL> class Debugger : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , port = <NUM_LIT> , max_children = '<STR_LIT>' , max_data = '<STR_LIT>' , max_depth = '<STR_LIT:1>' , minibufexpl = '<STR_LIT:0>' , debug = <NUM_LIT:0> , waittime = <NUM_LIT:5> , timeout = <NUM_LIT:5> ) : <EOL> """<STR_LIT>""" <EOL> socket . setdefaulttimeout ( waittime ) <EOL> self . waittime = waittime <EOL> self . timeout = timeout <EOL> self . port = port <EOL> self . debug = debug <EOL> self . current = None <EOL> self . file = None <EOL> self . lasterror = None <EOL> self . msgid = <NUM_LIT:0> <EOL> self . running = <NUM_LIT:0> <EOL> self . stacks = [ ] <EOL> self . curstack = <NUM_LIT:0> <EOL> self . laststack = <NUM_LIT:0> <EOL> self . bptsetlst = { } <EOL> self . status = None <EOL> self . max_children = max_children <EOL> self . max_data = max_data <EOL> self . max_depth = max_depth <EOL> self . protocol = DbgProtocol ( self . port , self . timeout ) <EOL> self . ui = DebugUI ( minibufexpl ) <EOL> self . breakpt = BreakPoint ( ) <EOL> vim . command ( '<STR_LIT>' ) <EOL> def clear ( self ) : <EOL> self . current = None <EOL> self . lasterror = None <EOL> self . msgid = <NUM_LIT:0> <EOL> self . running = <NUM_LIT:0> <EOL> self . stacks = [ ] <EOL> self . curstack = <NUM_LIT:0> <EOL> self . laststack = <NUM_LIT:0> <EOL> self . bptsetlst = { } <EOL> self . protocol . close ( ) <EOL> def send ( self , msg ) : <EOL> """<STR_LIT>""" <EOL> self . protocol . send_msg ( msg ) <EOL> if self . debug : <EOL> self . ui . tracewin . write ( str ( self . msgid ) + '<STR_LIT>' + msg ) <EOL> def recv ( self , count = <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> while count > <NUM_LIT:0> : <EOL> count = count - <NUM_LIT:1> <EOL> txt = self . protocol . recv_msg ( ) <EOL> res = xml . dom . minidom . parseString ( txt ) <EOL> if self . debug : <EOL> self . ui . tracewin . write ( str ( self . msgid ) + '<STR_LIT>' + txt ) <EOL> self . ui . tracewin . write ( '<STR_LIT>' ) <EOL> self . handle_msg ( res ) <EOL> try : <EOL> if int ( res . firstChild . getAttribute ( '<STR_LIT>' ) ) == int ( self . msgid ) : <EOL> return <EOL> except : <EOL> pass <EOL> def send_command ( self , cmd , arg1 = '<STR_LIT>' , arg2 = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> self . msgid = self . msgid + <NUM_LIT:1> <EOL> line = cmd + '<STR_LIT>' + str ( self . msgid ) <EOL> if arg1 != '<STR_LIT>' : <EOL> line = line + '<STR_LIT:U+0020>' + arg1 <EOL> if arg2 != '<STR_LIT>' : <EOL> line = line + '<STR_LIT>' + base64 . encodestring ( arg2 ) [ <NUM_LIT:0> : - <NUM_LIT:1> ] <EOL> self . send ( line ) <EOL> return self . msgid <EOL> def handle_msg ( self , res ) : <EOL> """<STR_LIT>""" <EOL> fc = res . firstChild <EOL> try : <EOL> handler = getattr ( self , '<STR_LIT>' + fc . tagName ) <EOL> handler ( res ) <EOL> except AttributeError : <EOL> print '<STR_LIT>' + fc . tagName + '<STR_LIT>' <EOL> self . ui . go_srcview ( ) <EOL> def handle_response ( self , res ) : <EOL> """<STR_LIT>""" <EOL> if res . firstChild . hasAttribute ( '<STR_LIT>' ) and res . firstChild . getAttribute ( '<STR_LIT>' ) == '<STR_LIT:error>' : <EOL> self . handle_response_error ( res ) <EOL> return <EOL> errors = res . getElementsByTagName ( '<STR_LIT:error>' ) <EOL> if len ( errors ) > <NUM_LIT:0> : <EOL> self . handle_response_error ( res ) <EOL> return <EOL> command = res . firstChild . getAttribute ( '<STR_LIT>' ) <EOL> try : <EOL> handler = getattr ( self , '<STR_LIT>' + command ) <EOL> except AttributeError : <EOL> print '<STR_LIT>' + command + '<STR_LIT>' <EOL> return <EOL> handler ( res ) <EOL> return <EOL> def handle_init ( self , res ) : <EOL> """<STR_LIT>""" <EOL> file = res . firstChild . getAttribute ( '<STR_LIT>' ) [ <NUM_LIT:7> : ] <EOL> self . ui . set_srcview ( file , <NUM_LIT:1> ) <EOL> def handle_response_error ( self , res ) : <EOL> """<STR_LIT>""" <EOL> self . ui . tracewin . write_xml_childs ( res ) <EOL> def handle_response_stack_get ( self , res ) : <EOL> """<STR_LIT>""" <EOL> stacks = res . getElementsByTagName ( '<STR_LIT>' ) <EOL> if len ( stacks ) > <NUM_LIT:0> : <EOL> self . curstack = <NUM_LIT:0> <EOL> self . laststack = len ( stacks ) - <NUM_LIT:1> <EOL> self . stacks = [ ] <EOL> for s in stacks : <EOL> self . stacks . append ( { '<STR_LIT:file>' : s . getAttribute ( '<STR_LIT:filename>' ) [ <NUM_LIT:7> : ] , '<STR_LIT>' : int ( s . getAttribute ( '<STR_LIT>' ) ) , '<STR_LIT>' : s . getAttribute ( '<STR_LIT>' ) , '<STR_LIT>' : int ( s . getAttribute ( '<STR_LIT>' ) ) <EOL> } ) <EOL> self . ui . stackwin . clean ( ) <EOL> self . ui . stackwin . highlight_stack ( self . curstack ) <EOL> self . ui . stackwin . write_xml_childs ( res . firstChild ) <EOL> self . ui . set_srcview ( self . stacks [ self . curstack ] [ '<STR_LIT:file>' ] , self . stacks [ self . curstack ] [ '<STR_LIT>' ] ) <EOL> def handle_response_step_out ( self , res ) : <EOL> """<STR_LIT>""" <EOL> if res . firstChild . hasAttribute ( '<STR_LIT>' ) and res . firstChild . getAttribute ( '<STR_LIT>' ) == '<STR_LIT>' : <EOL> if res . firstChild . hasAttribute ( '<STR_LIT:status>' ) : <EOL> self . status = res . firstChild . getAttribute ( '<STR_LIT:status>' ) <EOL> return <EOL> else : <EOL> print res . toprettyxml ( ) <EOL> def handle_response_step_over ( self , res ) : <EOL> """<STR_LIT>""" <EOL> if res . firstChild . hasAttribute ( '<STR_LIT>' ) and res . firstChild . getAttribute ( '<STR_LIT>' ) == '<STR_LIT>' : <EOL> if res . firstChild . hasAttribute ( '<STR_LIT:status>' ) : <EOL> self . status = res . firstChild . getAttribute ( '<STR_LIT:status>' ) <EOL> return <EOL> else : <EOL> print res . toprettyxml ( ) <EOL> def handle_response_step_into ( self , res ) : <EOL> """<STR_LIT>""" <EOL> if res . firstChild . hasAttribute ( '<STR_LIT>' ) and res . firstChild . getAttribute ( '<STR_LIT>' ) == '<STR_LIT>' : <EOL> if res . firstChild . hasAttribute ( '<STR_LIT:status>' ) : <EOL> self . status = res . firstChild . getAttribute ( '<STR_LIT:status>' ) <EOL> return <EOL> else : <EOL> print res . toprettyxml ( ) <EOL> def handle_response_run ( self , res ) : <EOL> """<STR_LIT>""" <EOL> if res . firstChild . hasAttribute ( '<STR_LIT:status>' ) : <EOL> self . status = res . firstChild . getAttribute ( '<STR_LIT:status>' ) <EOL> return <EOL> def handle_response_breakpoint_set ( self , res ) : <EOL> """<STR_LIT>""" <EOL> if res . firstChild . hasAttribute ( '<STR_LIT:id>' ) : <EOL> tid = int ( res . firstChild . getAttribute ( '<STR_LIT>' ) ) <EOL> bno = self . bptsetlst [ tid ] <EOL> del self . bptsetlst [ tid ] <EOL> self . breakpt . setid ( bno , str ( res . firstChild . getAttribute ( '<STR_LIT:id>' ) ) ) <EOL> def handle_response_eval ( self , res ) : <EOL> """<STR_LIT>""" <EOL> self . ui . watchwin . write_xml_childs ( res ) <EOL> def handle_response_property_get ( self , res ) : <EOL> """<STR_LIT>""" <EOL> self . ui . watchwin . write_xml_childs ( res ) <EOL> def handle_response_context_get ( self , res ) : <EOL> """<STR_LIT>""" <EOL> self . ui . watchwin . write_xml_childs ( res ) <EOL> def handle_response_feature_set ( self , res ) : <EOL> """<STR_LIT>""" <EOL> self . ui . watchwin . write_xml_childs ( res ) <EOL> def handle_response_default ( self , res ) : <EOL> """<STR_LIT>""" <EOL> print res . toprettyxml ( ) <EOL> def command ( self , cmd , arg1 = '<STR_LIT>' , arg2 = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> if self . running == <NUM_LIT:0> : <EOL> print "<STR_LIT>" <EOL> return <EOL> msgid = self . send_command ( cmd , arg1 , arg2 ) <EOL> self . recv ( ) <EOL> return msgid <EOL> def run ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . protocol . isconnected ( ) : <EOL> self . command ( '<STR_LIT>' ) <EOL> if self . status != '<STR_LIT>' : <EOL> self . command ( '<STR_LIT>' ) <EOL> else : <EOL> self . clear ( ) <EOL> self . protocol . accept ( ) <EOL> self . ui . debug_mode ( ) <EOL> self . running = <NUM_LIT:1> <EOL> self . recv ( <NUM_LIT:1> ) <EOL> self . command ( '<STR_LIT>' , '<STR_LIT>' + self . max_children ) <EOL> self . command ( '<STR_LIT>' , '<STR_LIT>' + self . max_data ) <EOL> self . command ( '<STR_LIT>' , '<STR_LIT>' + self . max_depth ) <EOL> self . command ( '<STR_LIT>' ) <EOL> flag = <NUM_LIT:0> <EOL> for bno in self . breakpt . list ( ) : <EOL> msgid = self . send_command ( '<STR_LIT>' , '<STR_LIT>' + self . breakpt . getfile ( bno ) + '<STR_LIT>' + str ( self . breakpt . getline ( bno ) ) + '<STR_LIT>' , self . breakpt . getexp ( bno ) ) <EOL> self . bptsetlst [ msgid ] = bno <EOL> flag = <NUM_LIT:1> <EOL> if flag : <EOL> self . recv ( ) <EOL> self . ui . go_srcview ( ) <EOL> def quit ( self ) : <EOL> self . ui . normal_mode ( ) <EOL> self . clear ( ) <EOL> def stop ( self ) : <EOL> self . clear ( ) <EOL> def up ( self ) : <EOL> if self . curstack > <NUM_LIT:0> : <EOL> self . curstack -= <NUM_LIT:1> <EOL> self . ui . stackwin . highlight_stack ( self . curstack ) <EOL> self . ui . set_srcview ( self . stacks [ self . curstack ] [ '<STR_LIT:file>' ] , self . stacks [ self . curstack ] [ '<STR_LIT>' ] ) <EOL> def down ( self ) : <EOL> if self . curstack < self . laststack : <EOL> self . curstack += <NUM_LIT:1> <EOL> self . ui . stackwin . highlight_stack ( self . curstack ) <EOL> self . ui . set_srcview ( self . stacks [ self . curstack ] [ '<STR_LIT:file>' ] , self . stacks [ self . curstack ] [ '<STR_LIT>' ] ) <EOL> def mark ( self , exp = '<STR_LIT>' ) : <EOL> ( row , rol ) = vim . current . window . cursor <EOL> file = vim . current . buffer . name <EOL> import re <EOL> map_sep = re . compile ( '<STR_LIT>' ) <EOL> path_sep = re . compile ( '<STR_LIT>' ) <EOL> remote_file = file <EOL> mappings = map_sep . split ( vim . eval ( '<STR_LIT>' ) ) <EOL> if mappings : <EOL> for mapping in mappings : <EOL> if len ( mapping ) == <NUM_LIT:0> : <EOL> continue <EOL> ( remote_path , local_path ) = path_sep . split ( mapping ) <EOL> path_map = re . compile ( '<STR_LIT:(>' + local_path + '<STR_LIT:)>' ) <EOL> remote_file = path_map . sub ( remote_path , file ) <EOL> bno = self . breakpt . find ( remote_file , row ) <EOL> if bno != None : <EOL> id = self . breakpt . getid ( bno ) <EOL> self . breakpt . remove ( bno ) <EOL> vim . command ( '<STR_LIT>' + str ( bno ) ) <EOL> if self . protocol . isconnected ( ) : <EOL> self . send_command ( '<STR_LIT>' , '<STR_LIT>' + str ( id ) ) <EOL> self . recv ( ) <EOL> else : <EOL> bno = self . breakpt . add ( remote_file , row , exp ) <EOL> vim . command ( '<STR_LIT>' + str ( bno ) + '<STR_LIT>' + str ( row ) + '<STR_LIT>' + file ) <EOL> if self . protocol . isconnected ( ) : <EOL> msgid = self . send_command ( '<STR_LIT>' , '<STR_LIT>' + self . breakpt . getfile ( bno ) + '<STR_LIT>' + str ( self . breakpt . getline ( bno ) ) , self . breakpt . getexp ( bno ) ) <EOL> self . bptsetlst [ msgid ] = bno <EOL> self . recv ( ) <EOL> def watch_input ( self , mode , arg = '<STR_LIT>' ) : <EOL> self . ui . watchwin . input ( mode , arg ) <EOL> def property_get ( self , name = '<STR_LIT>' ) : <EOL> if name == '<STR_LIT>' : <EOL> name = vim . eval ( '<STR_LIT>' ) <EOL> self . ui . watchwin . write ( '<STR_LIT>' + name ) <EOL> self . command ( '<STR_LIT>' , '<STR_LIT>' + name ) <EOL> def watch_execute ( self ) : <EOL> """<STR_LIT>""" <EOL> ( cmd , expr ) = self . ui . watchwin . get_command ( ) <EOL> if cmd == '<STR_LIT>' : <EOL> self . command ( '<STR_LIT>' , '<STR_LIT>' , expr ) <EOL> print cmd , '<STR_LIT>' , expr <EOL> elif cmd == '<STR_LIT>' : <EOL> self . command ( '<STR_LIT>' , '<STR_LIT>' , expr ) <EOL> print cmd , '<STR_LIT>' , expr <EOL> elif cmd == '<STR_LIT>' : <EOL> self . command ( '<STR_LIT>' , '<STR_LIT>' % ( self . curstack , expr ) ) <EOL> print cmd , '<STR_LIT>' , expr <EOL> elif cmd == '<STR_LIT>' : <EOL> self . command ( '<STR_LIT>' , ( '<STR_LIT>' % self . curstack ) ) <EOL> print cmd <EOL> else : <EOL> print "<STR_LIT>" , cmd , expr <EOL> def debugger_init ( debug = <NUM_LIT:0> ) : <EOL> global debugger <EOL> port = int ( vim . eval ( '<STR_LIT>' ) ) <EOL> if port == <NUM_LIT:0> : <EOL> port = <NUM_LIT> <EOL> waittime = int ( vim . eval ( '<STR_LIT>' ) ) <EOL> if waittime == <NUM_LIT:0> : <EOL> waittime = <NUM_LIT:5> <EOL> timeout = int ( vim . eval ( '<STR_LIT>' ) ) <EOL> if timeout == <NUM_LIT:0> : <EOL> timeout = <NUM_LIT:5> <EOL> max_children = vim . eval ( '<STR_LIT>' ) <EOL> if max_children == '<STR_LIT>' : <EOL> max_children = '<STR_LIT>' <EOL> max_data = vim . eval ( '<STR_LIT>' ) <EOL> if max_data == '<STR_LIT>' : <EOL> max_data = '<STR_LIT>' <EOL> max_depth = vim . eval ( '<STR_LIT>' ) <EOL> if max_depth == '<STR_LIT>' : <EOL> max_depth = '<STR_LIT:1>' <EOL> minibufexpl = int ( vim . eval ( '<STR_LIT>' ) ) <EOL> if minibufexpl == <NUM_LIT:0> : <EOL> minibufexpl = <NUM_LIT:0> <EOL> debugger = Debugger ( port , max_children , max_data , max_depth , minibufexpl , debug , waittime , timeout ) <EOL> def debugger_command ( msg , arg1 = '<STR_LIT>' , arg2 = '<STR_LIT>' ) : <EOL> try : <EOL> debugger . command ( msg , arg1 , arg2 ) <EOL> if debugger . status != '<STR_LIT>' : <EOL> debugger . command ( '<STR_LIT>' ) <EOL> except : <EOL> debugger . ui . tracewin . write ( sys . exc_info ( ) ) <EOL> debugger . ui . tracewin . write ( "<STR_LIT>" . join ( traceback . format_tb ( sys . exc_info ( ) [ <NUM_LIT:2> ] ) ) ) <EOL> debugger . stop ( ) <EOL> print '<STR_LIT>' , sys . exc_info ( ) <EOL> def debugger_run ( ) : <EOL> try : <EOL> debugger . run ( ) <EOL> except : <EOL> debugger . ui . tracewin . write ( sys . exc_info ( ) ) <EOL> debugger . ui . tracewin . write ( "<STR_LIT>" . join ( traceback . format_tb ( sys . exc_info ( ) [ <NUM_LIT:2> ] ) ) ) <EOL> debugger . stop ( ) <EOL> print '<STR_LIT>' , sys . exc_info ( ) <EOL> def debugger_watch_input ( cmd , arg = '<STR_LIT>' ) : <EOL> try : <EOL> if arg == '<STR_LIT>' : <EOL> arg = vim . eval ( '<STR_LIT>' ) <EOL> debugger . watch_input ( cmd , arg ) <EOL> except : <EOL> debugger . ui . tracewin . write ( sys . exc_info ( ) ) <EOL> debugger . ui . tracewin . write ( "<STR_LIT>" . join ( traceback . format_tb ( sys . exc_info ( ) [ <NUM_LIT:2> ] ) ) ) <EOL> debugger . stop ( ) <EOL> print '<STR_LIT>' <EOL> def debugger_context ( ) : <EOL> try : <EOL> debugger . command ( '<STR_LIT>' ) <EOL> except : <EOL> debugger . ui . tracewin . write ( sys . exc_info ( ) ) <EOL> debugger . ui . tracewin . write ( "<STR_LIT>" . join ( traceback . format_tb ( sys . exc_info ( ) [ <NUM_LIT:2> ] ) ) ) <EOL> debugger . stop ( ) <EOL> print '<STR_LIT>' <EOL> def debugger_property ( name = '<STR_LIT>' ) : <EOL> try : <EOL> debugger . property_get ( ) <EOL> except : <EOL> debugger . ui . tracewin . write ( sys . exc_info ( ) ) <EOL> debugger . ui . tracewin . write ( "<STR_LIT>" . join ( traceback . format_tb ( sys . exc_info ( ) [ <NUM_LIT:2> ] ) ) ) <EOL> debugger . stop ( ) <EOL> print '<STR_LIT>' , sys . exc_info ( ) <EOL> def debugger_mark ( exp = '<STR_LIT>' ) : <EOL> try : <EOL> debugger . mark ( exp ) <EOL> except : <EOL> debugger . ui . tracewin . write ( sys . exc_info ( ) ) <EOL> debugger . ui . tracewin . write ( "<STR_LIT>" . join ( traceback . format_tb ( sys . exc_info ( ) [ <NUM_LIT:2> ] ) ) ) <EOL> debugger . stop ( ) <EOL> print '<STR_LIT>' , sys . exc_info ( ) <EOL> def debugger_up ( ) : <EOL> try : <EOL> debugger . up ( ) <EOL> except : <EOL> debugger . ui . tracewin . write ( sys . exc_info ( ) ) <EOL> debugger . ui . tracewin . write ( "<STR_LIT>" . join ( traceback . format_tb ( sys . exc_info ( ) [ <NUM_LIT:2> ] ) ) ) <EOL> debugger . stop ( ) <EOL> print '<STR_LIT>' , sys . exc_info ( ) <EOL> def debugger_down ( ) : <EOL> try : <EOL> debugger . down ( ) <EOL> except : <EOL> debugger . ui . tracewin . write ( sys . exc_info ( ) ) <EOL> debugger . ui . tracewin . write ( "<STR_LIT>" . join ( traceback . format_tb ( sys . exc_info ( ) [ <NUM_LIT:2> ] ) ) ) <EOL> debugger . stop ( ) <EOL> print '<STR_LIT>' , sys . exc_info ( ) <EOL> def debugger_quit ( ) : <EOL> global debugger <EOL> debugger . quit ( ) <EOL> mode = <NUM_LIT:0> <EOL> def debugger_resize ( ) : <EOL> global mode <EOL> mode = mode + <NUM_LIT:1> <EOL> if mode >= <NUM_LIT:3> : <EOL> mode = <NUM_LIT:0> <EOL> if mode == <NUM_LIT:0> : <EOL> vim . command ( "<STR_LIT>" ) <EOL> elif mode == <NUM_LIT:1> : <EOL> vim . command ( "<STR_LIT>" ) <EOL> if mode == <NUM_LIT:2> : <EOL> vim . command ( "<STR_LIT>" ) <EOL> error_msg = { <EOL> <NUM_LIT:0> : """<STR_LIT>""" , <NUM_LIT:1> : """<STR_LIT>""" , <NUM_LIT:2> : """<STR_LIT>""" , <NUM_LIT:3> : """<STR_LIT>""" , <NUM_LIT:4> : """<STR_LIT>""" , <NUM_LIT:5> : """<STR_LIT>""" , <EOL> <NUM_LIT:100> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <EOL> <NUM_LIT:200> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" + """<STR_LIT>""" + """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <EOL> <NUM_LIT> : """<STR_LIT>""" + """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <EOL> <NUM_LIT> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" , <NUM_LIT> : """<STR_LIT>""" } </s>
