diff options
author | albert-github <albert.tests@gmail.com> | 2019-12-11 19:14:29 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-12-11 19:14:29 (GMT) |
commit | 1a5bbadb43b2d30e338d26a0d495b60e2b12f704 (patch) | |
tree | 36fe86281370507e9ba4706b5edcfd31dc8c8116 /vhdlparser | |
parent | 2ed458302d43a6385c310c685fa4174818f0b67e (diff) | |
download | Doxygen-1a5bbadb43b2d30e338d26a0d495b60e2b12f704.zip Doxygen-1a5bbadb43b2d30e338d26a0d495b60e2b12f704.tar.gz Doxygen-1a5bbadb43b2d30e338d26a0d495b60e2b12f704.tar.bz2 |
issue #7436 Incorrect handling of block comments in VHDL
The search for `/*` or /*!` ended at the last `*/` in a file and thus skipping other intermediate block end and new starts. Also the intermediate code was lost see as comment.
The filter pattern used was incorrect and should have been `<"/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">` (thanks to https://javacc.org/contrib/C.jj).
Here also the space plus one or more `*` at the end beginning of the line are still incorporated as well as multiple `*` before the colosing `*/` this is also filtered.
Diffstat (limited to 'vhdlparser')
-rw-r--r-- | vhdlparser/vhdlparser.jj | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj index 8a76bc6..3151528 100644 --- a/vhdlparser/vhdlparser.jj +++ b/vhdlparser/vhdlparser.jj @@ -107,17 +107,17 @@ SKIP: // VHDL 2008 doxygen comment /*! .... */ SKIP : { - <MULT_DOXYGEN_VHDL_COMMENT_2008 : "/*!" (~[])* "*/" > + <MULT_DOXYGEN_VHDL_COMMENT_2008 : "/*!" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/"> { { - QCString q(image.data()); - q.stripPrefix("/*!"); - q.resize(q.length()-2); + QCString q = filter2008VhdlComment(image.data()); ::vhdl::parser::VhdlParser::handleCommentBlock(q.data(),TRUE);image.clear(); } } - | <MULT_VHDL_2008_COMMENT : "/*" (~[])* "*/" > {::vhdl::parser::VhdlParser::lineCount(image.data());image.clear();} -} + | <MULT_VHDL_2008_COMMENT : "/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/"> + { + ::vhdl::parser::VhdlParser::lineCount(image.data());image.clear();} + } /* KEYWORDS */ |