diff --git a/lib/config/config_lexer.ll b/lib/config/config_lexer.ll index d2d95f437..6729d966e 100644 --- a/lib/config/config_lexer.ll +++ b/lib/config/config_lexer.ll @@ -183,6 +183,14 @@ static char *lb_steal(lex_buf *lb) "*" /* ignore star */ } +<> { + std::ostringstream msgbuf; + msgbuf << "End-of-file while in comment: " << yytext << " " << *yylloc; + ConfigCompilerContext::GetInstance()->AddMessage(true, msgbuf.str()); + yyterminate(); + } + + \/\/[^\n]* /* ignore C++-style comments */ [ \t\r\n] /* ignore whitespace */