Delphi JavaDoc Parser
        Posted  
        
            by Christian Sciberras
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Christian Sciberras
        
        
        
        Published on 2010-06-16T19:00:25Z
        Indexed on 
            2010/06/16
            19:02 UTC
        
        
        Read the original article
        Hit count: 291
        
I need to parse JavaDoc (documentation) comment syntax with Delphi 7. It is well known in the java world as "JavaDoc", but I'm actually doing this for PHP, ie, parsing JavaDoc in some PHP code. Call it PHPDoc if you want to. To see how these comments work, you can see RAD IDEs like NetBeans etc.
Example of JavaDoc for addition function:
/**
 * Adds to numbers together.
 * @param integer $a The first number.
 * @param integer $b The second number.
 * @return integer The resulting number.
 */
function add($a,$b){
  return $a+$b;
}
Please note that the parser need not be full, ie, parsing all of the PHP code. I mean, it's perfectly fine if it accepted the comment text only as input.
Cheers, Chris.
© Stack Overflow or respective owner