phpDocumentor / fig-standards

Standards either proposed or approved by the Framework Interop Group
http://www.php-fig.org/
Other
361 stars 85 forks source link

About Tag Signature #148

Closed panlatent closed 5 years ago

panlatent commented 7 years ago

Hi,

I am working on lexical analyzer to implement a PHPDoc parser. I do not understand the specific meaning of meta-data or Tag Signature.

The contents of a signature are to be determined by the tag type (as described in the tag-name) and fall beyond the scope of this specification. However, a tag-signature MUST NOT be followed by a description or other form of meta-data.

Follow this PHPDoc ABNF:

tag-signature = "(" *tag-argument ")"

Tag-signature should be between "(" and ")"

For example:

@param \Exception $e          Another parameter description.

Who is meta-data,tag-signature or description?

Does the description belong to tag-signature or tag-description?

Thanks!

ashnazg commented 5 years ago

https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#533-tag-signature

I think the mention of meta-data is only to say that annotations may have such metadata... the tags in this spec will not.

In your param example, I believe the description would be the tag-description token.

@mvriel can you confirm my reading of this, with your more experienced ABNF eyes?

ashnazg commented 5 years ago

@panlatent , if you wish to pursue this further, please bring this up as a new thread on the FIG mailing list for discussion -- https://groups.google.com/forum/#!forum/php-fig