views:

140

answers:

3

I want to use phpDocumentor classes for parsing of my own PHP documentation and working with results. I can do this manually, but I'm pretty sure that phpDocumentor could be used.

The problem is that I can't find any documentation about this. How exactly should I use phpDocumentor's classes?

Thanks for the link!

A: 

The PHPDocumentor Manual conatins over 700 pages as the result of running PHPDoc under PHPDoc. But i only looked for a couple of hours at it a few month ago. The code is an extreme mix of tokenizer stuff mixed with regular expressions - which makes it for example impossible for PHPDoc to give a formal BNF grammer for its doc strings.

If it is important you should consider writing your own PHP parser - at least if know a little bit about compiler construction. PHP is a pretty simple language.

Lothar
Yes, I can write it, but I want to use phpDocumentor. 700 pages is fine, but do you have any more specific advise?
Vincenzo
A: 

I found out that Zend_Reflection_* classes can do this job.

Vincenzo
A: 

phpDocumentor was written back in the PHP4 days, and I don't believe it was designed in a way to allow easy extension of itself.

Further, I'd almost guess that what you actually want to start with as a base would be the tokenizer extension in PHP, which is mostly what phpDocumentor uses internally anyway.

ashnazg