Exemplo n.º 1
0
def string_parser (string):
  from precog.parser.sqlLexer import sqlLexer
  from precog.parser.sqlParser import sqlParser
  lexer = sqlLexer(StringStream(string))
  tokenStream = MultiChannelTokenStream(lexer)
  parser = sqlParser(tokenStream)
  return parser
Exemplo n.º 2
0
 def __init__ (self, parsed_files=None):
   super().__init__()
   from precog.parser.sqlLexer import sqlLexer
   from precog.parser.sqlParser import sqlParser
   self.parser = sqlParser(MultiChannelTokenStream(sqlLexer()))
   self.parsed_files = []
   if parsed_files:
     self.parsed_files.extend(parsed_files)