Fix Preprocessor dropping some line directives

git-svn-id: file://localhost/svn/verilator/trunk/verilator@934 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder
2007-06-13 17:34:09 +00:00
parent dff5d5c4e4
commit 9c968c590c
6 changed files with 13 additions and 2 deletions
+5
View File
@@ -328,6 +328,7 @@ const char* V3PreProcImp::tokenName(int tok) {
case VP_DEFINE : return("DEFINE");
case VP_ELSE : return("ELSE");
case VP_ELSIF : return("ELSIF");
case VP_LINE : return("LINE");
case VP_SYMBOL : return("SYMBOL");
case VP_STRING : return("STRING");
case VP_DEFVALUE : return("DEFVALUE");
@@ -583,6 +584,10 @@ int V3PreProcImp::getToken() {
for (int len=0; len<yyleng; len++) { if (yytext[len]=='\n') m_lineAdd++; }
goto next_tok;
}
if (tok==VP_LINE) {
addLineComment(0);
goto next_tok;
}
// Deal with some special parser states
switch (m_state) {
case ps_TOP: {