Beispiel #1
0
 def __init__(self):
     StreamParser.__init__(self)
     self._command_buffer = []
     self._left_part = []
     self._left_complete = False
     self._tuple_count = 0
     self._right_part = []
Beispiel #2
0
def worker():
    # read json + reply
    data = request.get_json()
    print('data')
    stream_parser = StreamParser(user=data['username'], token=data['token'])
    annotations = stream_parser.get_annotations()
    result = ''

    return result
Beispiel #3
0
 def __init__(self, in_type_in, in_type_out, in_search_body,
              in_replace_name):
     StreamParser.__init__(self)
     self._token_buffer = []
     self._last_rbreaket = False
     self._type_in = in_type_in
     self._type_out = in_type_out
     self._search_body = in_search_body
     self._replace_name = in_replace_name
     self._stream_ended = False
     self._ignore_standalone = False
Beispiel #4
0
 def __init__(self):
     StreamParser.__init__(self)
     self._token_buffer = []
     self._stream_ended = False
     self._main_state = self.STATE_DEFAULT
     self._charstr_state = self.STRWAIT_DEFAULT
     self._string_state = self.STRWAIT_DEFAULT
     self._line_state = self.LNST_BEGIN
     self._symb_buffer = []
     self._last_space = True
     self._breaket_state = self.BREAKET_NONE
Beispiel #5
0
 def __init__(self):
     StreamParser.__init__(self)
Beispiel #6
0
 def set_source(self, in_source):
     StreamParser.set_source(self, in_source)
     if in_source.get_output_type() != 'named_token_set':
         raise errors.ParserInitException()
Beispiel #7
0
 def set_source(self, in_source):
     StreamParser.set_source(self, in_source)
     if in_source.get_output_type() != self._type_in:
         raise errors.ParserInitException()
Beispiel #8
0
 def __init__(self, in_string):
     StreamParser.__init__(self)
     self._string = in_string
     self._len = len(in_string)
     self._counter = 0
Beispiel #9
0
 def set_source(self, in_source):
     StreamParser.set_source(self, in_source)
     if in_source.get_output_type() != 'command':
         raise ParserInitException()
Beispiel #10
0
 def __init__(self):
     StreamParser.__init__(self)
     self._syntaxers = []
     self._global_context = ContextMeta()