def __init__(self, idl_text, name): f = cStringIO.StringIO(idl_text) Scanner.__init__(self, self.lex, f, name) self.parsed = [ ] self.errors = [ ] self.types = { } self.imports = { } self.comment = None self.cur = None self.namespace = None self.searchPath = None self.idl_text = idl_text self.name = name if name: searchPath = os.path.dirname(os.path.abspath(name)) if os.environ.has_key('BARRISTER_PATH'): searchPath = searchPath + os.pathsep + os.environ['BARRISTER_PATH'] self.searchPath = searchPath
def __init__(self, info, name='<default>'): Scanner.__init__(self, self.lexicon, info, name)
def __init__(self, f): Scanner.__init__(self, self.lexicon, f) self.stack = [] self.begin('start') self.result = 0