mirror of
https://github.com/verilator/verilator.git
synced 2025-01-21 05:44:03 +00:00
Preproc: Fix syntax error when include defname is ifdefed.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1069 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
parent
d6e9c72424
commit
de4358f8d8
@ -812,14 +812,12 @@ int V3PreProcImp::getToken() {
|
||||
case ps_INCNAME: {
|
||||
if (tok==VP_STRING) {
|
||||
m_state = ps_TOP;
|
||||
if (!m_off) {
|
||||
m_lastSym.assign(yytext,yyleng);
|
||||
UINFO(4,"Include "<<m_lastSym<<endl);
|
||||
// Drop leading and trailing quotes.
|
||||
m_lastSym.erase(0,1);
|
||||
m_lastSym.erase(m_lastSym.length()-1,1);
|
||||
include(m_lastSym);
|
||||
}
|
||||
goto next_tok;
|
||||
}
|
||||
else if (tok==VP_TEXT && yyleng==1 && yytext[0]=='<') {
|
||||
@ -858,7 +856,9 @@ int V3PreProcImp::getToken() {
|
||||
// Default is to do top level expansion of some tokens
|
||||
switch (tok) {
|
||||
case VP_INCLUDE:
|
||||
if (!m_off) {
|
||||
m_state = ps_INCNAME; m_stateFor = tok;
|
||||
}
|
||||
goto next_tok;
|
||||
case VP_UNDEF:
|
||||
case VP_DEFINE:
|
||||
|
Loading…
Reference in New Issue
Block a user