diff --git a/ivlpp/lexor.lex b/ivlpp/lexor.lex index d6271a5a8..d64e33866 100644 --- a/ivlpp/lexor.lex +++ b/ivlpp/lexor.lex @@ -149,6 +149,7 @@ static int comment_enter = 0; %x PPINCLUDE %x PPDEFINE %x CCOMMENT +%x IFCCOMMENT %x PCOMENT %x CSTRING %x ERROR_LINE @@ -338,6 +339,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); }