Beispiel #1
0
// extra print function because operator<< cannot be member-> no access to privates
void MemoryType::print(std::ostream& os) const
{
    os << startAddress
       << " Size " << std::dec << getSize()
       <<  "\t" << getInitString() << "\tAllocated here: " << SourcePosition(allocPos)
       << std::endl;

    rtedRTS(this).getPointerManager().printPointersToThisChunk(os, *this);

    if (typedata.size() > 0)
    {
        os << "\t" << "Type Info" <<std::endl;
        for(TypeData::const_iterator i = typedata.begin(); i != typedata.end(); ++i)
        {
            os << "\t" << i->first << "\t" << i->second->getName() <<std::endl;
        }
    }
}
GrammarParser::GrammarParser(const String &fileName, int tabSize, Grammar &g) : m_lex(fileName, tabSize), m_grammar(g) {
  m_currentPrecedence = 0;
  m_grammar.addTerminal(_T("EOI"), TERMINAL, m_currentPrecedence, SourcePosition(0, 0)); /* always make EOI symbol no. 0, see skeletonparser parser.cpp */
  m_grammar.setName(fileName);
}