From 31a68fcd8a9ceaa51ed1a68b3383a0c144ece15f Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 29 Jan 2021 18:08:45 -0800 Subject: [PATCH] Report possible nested comments --- lexor.lex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lexor.lex b/lexor.lex index c88725545..7639feaa9 100644 --- a/lexor.lex +++ b/lexor.lex @@ -179,6 +179,8 @@ TU [munpf] "/*" { comment_enter = YY_START; BEGIN(CCOMMENT); } . { ; } + /* Check for a possible nested comment. */ +"/*" { VLerror(yylloc, "error: Possible nested comment."); } \n { yylloc.first_line += 1; } "*/" { BEGIN(comment_enter); } @@ -259,7 +261,7 @@ TU [munpf] yylloc.first_line += 1; } \n { BEGIN(0); yylval.text = yytext_string_filter(yytext, yyleng); - VLerror(yylloc, "Missing closing quote for string."); + VLerror(yylloc, "error: Missing closing quote for string."); yylloc.first_line += 1; return STRING; } \" { BEGIN(0);