Use SAX to parse the generated xml file. This will end up building the full tree of RbGCCXML::Nodes that fit the parsed C++ code.
Methods
Public Class methods
[ show source ]
# File lib/rbgccxml/sax_parser.rb, line 7
7: def initialize(xml_file)
8: @file = xml_file
9: @parser = Nokogiri::XML::SAX::Parser.new(ParserEventHandler.new)
10: end
Public Instance methods
Kick off the process. When the parsing finishes, we take the root node of the tree and return it
[ show source ]
# File lib/rbgccxml/sax_parser.rb, line 14
14: def parse
15: @parser.parse(::File.open(@file))
16: NodeCache.root
17: end