diff --git a/pyste/src/GCCXMLParser.py b/pyste/src/GCCXMLParser.py index 3e900627..1f8c7550 100644 --- a/pyste/src/GCCXMLParser.py +++ b/pyste/src/GCCXMLParser.py @@ -44,6 +44,8 @@ class GCCXMLParser(object): if hasattr(self, method): func = getattr(self, method) func(id, element) + else: + self.ParseUnknown(id, element) def GetElementsFromXML(self,filename): @@ -75,7 +77,7 @@ class GCCXMLParser(object): raise InvalidContextError, 'Invalid context found in the xml file.' else: msg = 'ID not found in elements: %s' % id - raise ParserError, msg + raise ParserError, msg elem, decl = self.elements[id] if decl is None: @@ -125,6 +127,13 @@ class GCCXMLParser(object): self.elements[id] = element, decl + def ParseUnknown(self, id, element): + name = '__Unknown_Element_%s' % id + namespace = '::' + decl = Declaration(name, namespace) + self.Update(id, decl) + + def ParseNamespace(self, id, element): namespace = element.get('name') context = element.get('context') diff --git a/pyste/src/pyste.py b/pyste/src/pyste.py index 17095333..1314f10f 100644 --- a/pyste/src/pyste.py +++ b/pyste/src/pyste.py @@ -37,7 +37,7 @@ from policies import * from CppParser import CppParser, CppParserError import time -__VERSION__ = '0.9.1' +__VERSION__ = '0.9.2' def RecursiveIncludes(include): 'Return a list containg the include dir and all its subdirectories'