yegor256
yegor256

Reputation: 105210

Is it possible to use phpDocumentor for parsing of DocBlock tags?

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!

Upvotes: 1

Views: 358

Answers (3)

ashnazg
ashnazg

Reputation: 6688

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.

Upvotes: 1

yegor256
yegor256

Reputation: 105210

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

Upvotes: 2

Lothar
Lothar

Reputation: 13092

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.

Upvotes: 1

Related Questions