# doc comment patch

- Thread: https://externals.io/message/131
- Original archive: https://news-web.php.net/php.internals/131
- Started by Andrei Zmievski on 2003-03-21T11:02:06+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #131 — Andrei Zmievski — 2003-03-21T11:02:06+00:00

URL: https://externals.io/message/131#131

Andi and Stas,

Here is reworked version of doc comment patch. It doesn't store last doc
comment in the compiler globals anymore, instead it's returned inside
the `T_DOC_COMMENT` token. I've also modified a couple of rules in the
parser to store the doc comment in zend_class_entry and zend_op_array
for classes and functions respectively. There is one problem, however,
that I need your help with. I tried adding optional_doc_comment to class
method declaration but it resulted in a bunch of shift/reduce conflicts.
I am not a parser expert, so might you tell me to fix it? The patch is
attached.

-Andrei                                       http://www.gravitonic.com/

"Beware of bugs in the above code; I have only proved it correct,
 not tried it." -- Donald Knuth

---

## #201 — Andi Gutmans — 2003-03-23T20:55:38+00:00

URL: https://externals.io/message/131#201 · In reply to: #131

Hi,

I'm not quite sure. Can you send me a patch which includes the shift/reduce 
conflicts and I'll try and mess around with it? (I'm a bit busy lately so I 
hope I'll find time quickly).

Andi

At 06:02 AM 3/21/2003 -0500, Andrei Zmievski wrote:
>Andi and Stas,
>
>Here is reworked version of doc comment patch. It doesn't store last doc
>comment in the compiler globals anymore, instead it's returned inside
>the `T_DOC_COMMENT` token. I've also modified a couple of rules in the
>parser to store the doc comment in zend_class_entry and zend_op_array
>for classes and functions respectively. There is one problem, however,
>that I need your help with. I tried adding optional_doc_comment to class
>method declaration but it resulted in a bunch of shift/reduce conflicts.
>I am not a parser expert, so might you tell me to fix it? The patch is
>attached.
>
>-Andrei                                       http://www.gravitonic.com/
>
>"Beware of bugs in the above code; I have only proved it correct,
>  not tried it." -- Donald Knuth
