From 855daae00fcc8833eef658126cb7819dd3a25bb1 Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 30 Mar 2010 10:46:10 -0700 Subject: [PATCH] Fix line number error with to end of line comments. The single line comment "//" was getting double counted. (cherry picked from commit cbce1ddc047c9892152846d234b55a7d5b3f598b) --- vpi/sdf_lexor.lex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vpi/sdf_lexor.lex b/vpi/sdf_lexor.lex index c4b03d3fe..f5b4d3a7d 100644 --- a/vpi/sdf_lexor.lex +++ b/vpi/sdf_lexor.lex @@ -50,12 +50,12 @@ static int yywrap(void) %% /* Skip C++-style comments. */ -"//".* { sdflloc.first_line += 1; } +"//".* { ; } /* Skip C-style comments. */ "/*" { BEGIN(CCOMMENT); } -. { yymore(); } -\n { sdflloc.first_line += 1; yymore(); } +. { ; } +\n { sdflloc.first_line += 1; } "*/" { BEGIN(0); } [ \m\t] { /* Skip white space. */; }