def _internal_parse(self, csource):
        ast, macros, csource = self._parse(csource)
        # add the macros
        self._process_macros(macros)
        # find the first "__dotdotdot__" and use that as a separator
        # between the repeated typedefs and the real csource
        iterator = iter(ast.ext)
        for decl in iterator:
            if decl.name == '__dotdotdot__':
                break
        #
        try:
            self._inside_extern_python = False
            for decl in iterator:
                if isinstance(decl, pycparser.c_ast.Decl):
                    self._parse_decl(decl)
                elif isinstance(decl, pycparser.c_ast.Typedef):
                    if not decl.name:
                        raise api.CDefError("typedef does not declare any name",
                                            decl)
                    quals = 0
                    if (isinstance(decl.type.type, pycparser.c_ast.IdentifierType)
                            and decl.type.type.names[-1] == '__dotdotdot__'):
                        realtype = self._get_unknown_type(decl)
                    elif (isinstance(decl.type, pycparser.c_ast.PtrDecl) and
                          isinstance(decl.type.type, pycparser.c_ast.TypeDecl) and
                          isinstance(decl.type.type.type,
                                     pycparser.c_ast.IdentifierType) and
                          decl.type.type.type.names == ['__dotdotdot__']):
                        realtype = model.unknown_ptr_type(decl.name)
                    else:
                        realtype, quals = self._get_type_and_quals(
                            decl.type, name=decl.name)
                    self._declare('typedef ' + decl.name, realtype, quals=quals)
                else:
                    raise api.CDefError("unrecognized construct", decl)
        except api.FFIError as e:
            msg = self._convert_pycparser_error(e, csource)
            if msg:
                e.args = (e.args[0] + "\n    *** Err: %s" % msg,)
            raise
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cffi-1.5.2/cffi/cparser.py/Parser._internal_parse/original