示例#1
0
void V3ParseImp::lexFile(const string& modname) {
    // Prepare for lexing
    UINFO(3,"Lexing "<<modname<<endl);
    s_parsep = this;
    fileline()->warnResetDefault();	// Reenable warnings on each file
    lexDestroy();	// Restart from clean slate.
    lexNew(debugFlex()>=9);

    // Lex it
    if (bisonParse()) v3fatal("Cannot continue\n");
}
void V3ParseImp::lexNew(int debug) {
    if (m_lexerp) delete m_lexerp;	// Restart from clean slate.
    m_lexerp = new V3Lexer();
    if (debugFlex()>=9) { m_lexerp->set_debug(~0);  }
}