'Scan the given multilang (UDL-based) buffer and return a CIX
element tree.
"buf" is the multi-lang Buffer instance (e.g.
lang_rhtml.RHTMLBuffer for RHTML).
"csl_cile_driver" (optional) is the CSL (client-side language)
CILE driver. While scanning, CSL tokens should be gathered and,
if any, passed to the CSL scanner like this:
csl_cile_driver.scan_csl_tokens(
file_elem, blob_name, csl_tokens)
The CSL scanner will append a CIX <scope ilk="blob"> element
to the <file> element.'

def scan_multilang(self, buf, csl_cile_driver=None):

    log.info('scan_multilang:    path:    %r    lang:    %s', buf.path, buf.lang)
    mtime = 'XXX'
    fullpath = buf.path
    cixtree = createCixRoot()
    cixfile = createCixFile(cixtree, fullpath, lang=buf.lang)
    if sys.platform.startswith('win'):
        fullpath = fullpath.replace('\\', '/')
    basepath = os.path.basename(fullpath)
    cixblob = createCixModule(cixfile, basepath, 'PHP', src=fullpath)
    phpciler = PHPParser(fullpath, buf.accessor.text, mtime)
    csl_tokens = phpciler.scan_multilang_content(buf.accessor.text)
    phpciler.convertToElementTreeModule(cixblob)
    if (csl_cile_driver and csl_tokens):
        csl_cile_driver.scan_csl_tokens(cixfile, basepath, csl_tokens)
    return cixtree
