From c9179b41e313f035736c0155c3193d2e0e2340a4 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 5 Mar 2023 19:23:02 +0000 Subject: [PATCH] Fix parse error with nested comments --- src/lexer.l | 2 +- test/parse/vhdl2008.vhd | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lexer.l b/src/lexer.l index 832d3a27..213eae69 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -252,7 +252,7 @@ NEXT_EVENT ?i:next_event } .*"*/" { BEGIN(comment_caller); } \n { /* Must match a single character */ } -. { } +.* { } ; { BEGIN(INITIAL); TOKEN(tSEMI); } {PSL_CONT} { /* Multi-line PSL comment */ } diff --git a/test/parse/vhdl2008.vhd b/test/parse/vhdl2008.vhd index 4a698848..04b24dcd 100644 --- a/test/parse/vhdl2008.vhd +++ b/test/parse/vhdl2008.vhd @@ -246,4 +246,8 @@ begin when bar: others => begin end; end generate g5; -- Error + /* a delimited comment + -- Check that write burst was received correctly + */ + end architecture; -- 2.39.2