2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

- Fixed bug in GCCXMLParser

[SVN r18672]
This commit is contained in:
Bruno da Silva de Oliveira
2003-06-04 22:07:27 +00:00
parent 5da3e1deea
commit 6ca5280b2c
2 changed files with 11 additions and 2 deletions

View File

@@ -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')

View File

@@ -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'