diff --git a/ivlpp/lexor.lex b/ivlpp/lexor.lex index ba013738d..2b0ff086f 100644 --- a/ivlpp/lexor.lex +++ b/ivlpp/lexor.lex @@ -142,6 +142,7 @@ static int comment_enter = 0; %x PPINCLUDE %x PPDEFINE %x CCOMMENT +%x IFCCOMMENT %x PCOMENT %x CSTRING %x ERROR_LINE @@ -314,6 +315,15 @@ W [ \t\b\f]+ `else { } "//"[^\r\n]* { } + +"/*" { comment_enter = YY_START; BEGIN(IFCCOMMENT); } +[^\r\n] { } +\n\r { istack->lineno += 1; } +\r\n { istack->lineno += 1; } +\n { istack->lineno += 1; } +\r { istack->lineno += 1; } +"*/" { BEGIN(comment_enter); } + [^\r\n] { } \n\r { istack->lineno += 1; fputc('\n', yyout); } \r\n { istack->lineno += 1; fputc('\n', yyout); }