Bitstream Interpretation Library (BIL)  0.1
XDLRCParser.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 xdlrcparser_detail::XDLRCParserImp();
18 }
19 
20 
21 XDLRCParser::~XDLRCParser()
22 {
23  delete m_parserImp;
24  m_parserImp = 0;
25  delete m_tokenizer;
26  m_tokenizer = 0;
27 }
28 
29 
30 void XDLRCParser::parseFirstPass(std::istream& inputStream, Device& device)
31 {
32  if (0 != m_tokenizer) m_tokenizer->inputStream(inputStream);
33  else m_tokenizer = new StreamTokenizer(inputStream);
34  m_parserImp->parseFirstPass(*m_tokenizer, device);
35 }
36 
37 
39 {
40  if (0 != m_tokenizer) m_tokenizer->reset();
41  m_parserImp->parseSecondPass();
42 }