summaryrefslogtreecommitdiffstats
path: root/vhdlparser/vhdlparser.jj
diff options
context:
space:
mode:
Diffstat (limited to 'vhdlparser/vhdlparser.jj')
-rw-r--r--vhdlparser/vhdlparser.jj20
1 files changed, 11 insertions, 9 deletions
diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj
index a3d6731..3151528 100644
--- a/vhdlparser/vhdlparser.jj
+++ b/vhdlparser/vhdlparser.jj
@@ -31,7 +31,7 @@ static Entry* current_root;
static Entry* tempEntry;
static Entry* lastEntity ;
static Entry* lastCompound ;
-static std::unique_ptr<Entry> current;
+static std::shared_ptr<Entry> current;
static QCString compSpec;
static QCString currName;
static int levelCounter;
@@ -42,7 +42,6 @@ static QCString forL;
static int param_sec ;
static int parse_sec;
static int currP;
-static Entry* currentCompound;
//----------------------------------------
@@ -108,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 */
@@ -1614,6 +1613,9 @@ QCString name_ext1() : {QCString s,s1,s2;}
{
(
+ LOOKAHEAD(<APOSTROPHE_T><SUBTYPE_T>)
+ <APOSTROPHE_T><SUBTYPE_T>{s+="'subtype";}
+|
LOOKAHEAD(<DOT_T> suffix())
<DOT_T> s1=suffix(){s+=".";s+=s1;}
|
@@ -1730,7 +1732,7 @@ void package_declaration(): {QCString s;}
<PACKAGE_T> s=identifier() <IS_T>
{
lastCompound=current.get();
- std::unique_ptr<Entry> clone=std::make_unique<Entry>(*current);
+ std::shared_ptr<Entry> clone=std::make_shared<Entry>(*current);
clone->section=Entry::NAMESPACE_SEC;
clone->spec=VhdlDocGen::PACKAGE;
clone->name=s;