Bitstream Interpretation Library (BIL)  0.1
XDLParser.cpp
Go to the documentation of this file.
1 
9 
10 using namespace bil;
11 
12 
14  m_tokenizer(0),
15  m_parserImp(0)
16 {
17  m_parserImp = new xdlparser_detail::XDLParserImp();
18 }
19 
20 
21 XDLParser::~XDLParser()
22 {
23  delete m_parserImp;
24  m_parserImp = 0;
25  delete m_tokenizer;
26  m_tokenizer = 0;
27 }
28 
29 
30 void XDLParser::parseHeader(std::istream& inputStream, Design& design)
31 {
32  if (0 != m_tokenizer) m_tokenizer->inputStream(inputStream);
33  else m_tokenizer = new StreamTokenizer(inputStream);
34  m_parserImp->parseHeader(*m_tokenizer, design);
35 }
36 
37 
38 void XDLParser::parseBody(const Device& device)
39 {
40  m_parserImp->parseBody(device);
41 }