diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index fdba5e2b..291b4afe 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -234,7 +234,7 @@ void isVhdlDocPending()
   str_doc.pending=FALSE;
   oldEntry=0; // prevents endless recursion
   iDocLine=str_doc.iDocLine;
-  VhdlParser::handleCommentBlock(str_doc.doc,str_doc.brief);
+  VhdlParser::handleCommentBlock(str_doc.doc,str_doc.brief,iDocLine);
   iDocLine=-1;
 }
 
@@ -306,16 +306,17 @@ void VhdlParser::handleFlowComment(const char* doc)
 }
 
 
-void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
+void VhdlParser::handleCommentBlock(const char* doc1,bool brief,int line)
 {
   int position=0;
   static bool isIn;
   QCString doc;
+  iDocLine=line;
   doc.append(doc1);
- // fprintf(stderr,"\n %s",doc.data());
+ // fprintf(stderr,"\n < Comment: %s >\n",doc.data());
   if (doc.isEmpty()) return;
 
-  if (checkMultiComment(doc,yyLineNr))
+  if (checkMultiComment(doc,line))
   {
     strComment.resize(0);
     return;
@@ -785,7 +786,7 @@ void VhdlParser::setMultCommentLine()
   iDocLine=yyLineNr;
 }
 
-void VhdlParser::oneLineComment(QCString qcs)
+void VhdlParser::oneLineComment(QCString qcs,int line)
 {
   bool isEndCode=qcs.contains("\\endcode");
 
@@ -807,13 +808,75 @@ void VhdlParser::oneLineComment(QCString qcs)
   {
     int j=qcs.find("--!");
     qcs=qcs.right(qcs.length()-3-j);
-    if (!checkMultiComment(qcs,iDocLine))
+    if (!checkMultiComment(qcs,line))
     {
-      handleCommentBlock(qcs,TRUE);
+      handleCommentBlock(qcs,TRUE,line);
     }
   }
 }
 
+void VhdlParser::parseComment(const char* com,int start,int end,int basic)
+{
+    QRegExp re("--![\t\r ]*@}");
+    QCString doc(com);
+    int i=doc.findRev(re);
+    int count=doc.contains("--!");
+
+ //   fprintf(stderr,"\n comment[ %s %d %d %d] \n",doc.data(),start,end,basic);
+
+    if(count==1)
+    {
+        iDocLine=start;
+        VhdlParser::lineCount(doc);
+        VhdlParser::oneLineComment(doc,start);
+        return;
+    }
+
+    // count : in std_logic;    --! @brief count down
+    // --! @}
+
+     if(i>0){
+       QStringList qsl=QStringList::split(re,doc);
+      for(uint jk=0;jk<qsl.count();jk++)
+      {
+       QCString val(qsl[jk].data());
+       VhdlParser::setMultCommentLine();
+        if(jk==1){
+           val.prepend("--! @}");
+          VhdlParser::oneLineComment(val,start+jk);
+        }
+        else
+           VhdlParser::oneLineComment(val,start);
+
+      VhdlParser::lineCount(val);
+       }
+
+      return;
+     }
+
+     //  signal counter: std_logic_vector(n-1 downto 0); --! counter register
+     //  --! cpu reg
+     //  signal reg: std_logic_vector(n-1 downto 0);
+
+     if(start==basic && count>1)
+     {
+        int k=doc.findRev("--!");
+
+        QCString s=doc.right(doc.length()-k);
+        doc=doc.left(k);
+        VhdlParser::oneLineComment(doc,start);
+        VhdlParser::lineCount(doc);
+        start++;
+        VhdlParser::oneLineComment(s,start);
+        VhdlParser::lineCount(s);
+        return;
+     }
+
+     VhdlParser::setMultCommentLine();
+     VhdlParser::handleCommentBlock(doc,FALSE,start);
+     VhdlParser::lineCount(doc);
+
+}
 
 bool  checkMultiComment(QCString& qcs,int line)
 {
@@ -830,6 +893,7 @@ bool  checkMultiComment(QCString& qcs,int line)
 
     pTemp->removeFirst();
   }
+
   return true;
 }
 
@@ -840,7 +904,7 @@ QList<Entry>* getEntryAtLine(const Entry* ce,int line)
   Entry *rt;
   for (;(rt=eli.current());++eli)
   {
-    if (rt->bodyLine==line)
+     if (rt->bodyLine==line)
     {
       lineEntry.insert(0,rt);
     }
diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj
index d21afe15..3ed9fadd 100644
--- a/vhdlparser/vhdlparser.jj
+++ b/vhdlparser/vhdlparser.jj
@@ -56,7 +56,7 @@ static void addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool i
 static void createFunction(const char *impure,uint64 spec,const char *fname);
 static void addVhdlType(const char *n,int startLine,int section, uint64 spec,const char* args,const char* type,Protection prot);
 static void addCompInst(const char *n, const char* instName, const char* comp,int iLine);
-static void handleCommentBlock(const char* doc,bool brief);
+static void handleCommentBlock(const char* doc,bool brief,int line);
 static void handleFlowComment(const char*);
 static void initEntry(Entry *e);
 static  void newEntry();
@@ -67,8 +67,11 @@ static  bool addLibUseClause(const QCString &type);
 static  void mapLibPackage( Entry* root);
 static void createFlow();
 static void error_skipto(int kind);
-static void oneLineComment(QCString qcs);
+static void oneLineComment(QCString qcs,int line);
 static void setMultCommentLine();
+static void parseComment(const char* com,int start,int end,int basic );
+
+
 PARSER_END(VhdlParser)
 
 SKIP :
@@ -87,18 +90,23 @@ SKIP:
   | <MULT_DOXYGEN_COMMENT: (<DOXYGEN_VHDL_COMMENT>)+ >
   {
     {
-    QCString doc(image.data());
-    int count=doc.contains("--!");
-    ::vhdl::parser::VhdlParser::setMultCommentLine();
-    ::vhdl::parser::VhdlParser::lineCount(image.data());
-    if (count == 1)
-      ::vhdl::parser::VhdlParser::oneLineComment(doc);
-    else
-      ::vhdl::parser::VhdlParser::handleCommentBlock(image.data(),FALSE); ;
+     
+    input_stream->setTrackLineColumn(true);
+    int li=input_stream->getBeginLine();
+    int liEnd=input_stream->getEndLine();
+    int basic = ::vhdl::parser::VhdlParser::getLine(BASIC_IDENTIFIER);
+    
+    ::vhdl::parser::VhdlParser::parseComment(image.data(),li,liEnd,basic);
+  
     }
 
   }
-  |<VHDL_FLOWCHART_COMMENT: "--#" (~["\n", "\r"])* ("\n" | "\r" | "\r\n")?>  { ::vhdl::parser::VhdlParser::handleFlowComment(image.data());}
+  |<VHDL_FLOWCHART_COMMENT: "--#" (~["\n", "\r"])* ("\n" | "\r" | "\r\n")?>  
+   { 
+    ::vhdl::parser::VhdlParser::handleFlowComment(image.data());
+    ::vhdl::parser::VhdlParser::lineCount(image.data());
+    image.clear();
+    }
   |<VHDL_COMMENT: "--" (~["\n", "\r"])* ("\n" | "\r" | "\r\n")?>
   {
     ::vhdl::parser::VhdlParser::lineCount(image.data());}
@@ -108,16 +116,23 @@ SKIP:
 // VHDL 2008 doxygen comment /*! .... */
 SKIP :
 {
-  <MULT_DOXYGEN_VHDL_COMMENT_2008 : "/*!"  (~[])* "*/" >
+ // <MULT_DOXYGEN_VHDL_COMMENT_2008 : "/*!"  (~[])* "*/" >
+  <MULT_DOXYGEN_VHDL_COMMENT_2008:"/*!" (~["*"])* "*" ("*" | (~["*","/"] (~["*"])* "*"))* "/">
   {
    {
+    input_stream->setTrackLineColumn(true);
+    int li=input_stream->getBeginLine();
+    int liEnd=input_stream->getEndLine();
      QCString q(image.data());
      q.stripPrefix("/*!");
      q.resize(q.length()-2);
-     ::vhdl::parser::VhdlParser::handleCommentBlock(q.data(),TRUE);image.clear();
+     ::vhdl::parser::VhdlParser::handleCommentBlock(q.data(),TRUE,li);
+     ::vhdl::parser::VhdlParser::lineCount(image.data());
+     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();}
+ //  | <MULT_VHDL_2008_COMMENT : "/*"  (~[])* "*/" >  {::vhdl::parser::VhdlParser::lineCount(image.data());image.clear();}
 }
 
 /* KEYWORDS */
@@ -291,7 +306,7 @@ TOKEN:
 {
   <INTEGER: <DIGIT> ((["_"])? (<DIGIT>))* >
  | <STRINGLITERAL: (( ["\""](<GRAPHIC_CHARACTER>)*) "\"")+ >
- | <BASIC_IDENTIFIER:  (<LETTER> ( (["_"])* <LETTER_OR_DIGIT> )*) >
+ | <BASIC_IDENTIFIER:  (<LETTER> ( (["_"])* <LETTER_OR_DIGIT> )*) >{::vhdl::parser::VhdlParser::setLineParsed(BASIC_IDENTIFIER);}
  | <EXTENDED_CHARACTER: ( ["\\"](<GRAPHIC_CHARACTER>)*["\\"] ) >
  | <CHARACTER_LITERAL: (["'"](<GRAPHIC_CHARACTER>|<QUOTE>)["'"]) >
  | <DECIMAL_LITERAL: (<INTEGER> (["."]<INTEGER>)? (<EXPONENT>)? ) >
@@ -1446,10 +1461,10 @@ s=interface_element() (LOOKAHEAD(1) <SEMI_T> s1=interface_element(){s2+=";";s2+=
 
 
 
-QCString interface_variable_declaration() :  {Token *tok=0;Token *tok1=0;Token *tok2=0;QCString s,s1,s2,s3,s4,s5;}
+QCString interface_variable_declaration() :  {Token *tok=0;Token *tok1=0;Token *tok2=0;Token *tok3=0;QCString s,s1,s2,s3,s4,s5;}
 {
 [( tok=<VARIABLE_T> | tok=<SIGNAL_T> | tok=<CONSTANT_T>|tok=<SHARED_T>) ]
-  s=identifier_list() <COLON_T> [ s1=mode() ]
+  s=identifier_list() tok3=<COLON_T> [ s1=mode() ]
   s2=subtype_indication()  [ tok1=<BUS_T> ] [ tok2=<VARASSIGN_T> s4=expression() ]
 {
                     if(tok)
@@ -1460,7 +1475,7 @@ QCString interface_variable_declaration() :  {Token *tok=0;Token *tok1=0;Token *
 
                     if(tok2)
                      s3+=":=";
-
+                     
                     QCString it=s+":"+s1+" "+s2+" "+s3+" "+s4;
                     if (currP!=VhdlDocGen::COMPONENT)
                     {
@@ -1472,9 +1487,9 @@ QCString interface_variable_declaration() :  {Token *tok=0;Token *tok1=0;Token *
                       {
                         QCString i=s2+s3+s4;
                         if (currP==VhdlDocGen::GENERIC && param_sec==0)
-                          addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,currP,i.data(),s1.data(),Public);
+                          addVhdlType(s.data(),tok3->beginLine,Entry::VARIABLE_SEC,currP,i.data(),s1.data(),Public);
                         else if(parse_sec != GEN_SEC)
-                          addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,currP,i.data(),s1.data(),Public);
+                          addVhdlType(s.data(),tok3->beginLine,Entry::VARIABLE_SEC,currP,i.data(),s1.data(),Public);
                       }
                       //   fprintf(stderr,"\n\n <<port  %s  >>\n",$$.data());
                     } // if component
