<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>[PHP-DEV] Trouble with zend_language_parser.y</title>
        <description> I'm having some trouble setting up the re2c to allow the isset/unset.  Here are the definitions, I've added the two T_ISSET statements:

------------------------------------------------------------
accessors:
                                accessor_function
                                accessor_function
                                accessor_function
                                accessor_function
                |              accessor_function
                                accessor_function
                                accessor_function
                |              accessor_function
                                accessor_function
                |              accessor_function
                | /* Empty */
;

accessor_modifiers:
                                /* empty */                                                                                       { Z_LVAL($$.u.constant) = CG(access_type); }
                |              non_empty_accessor_modifiers              { $$ = $1; }
;

non_empty_accessor_modifiers:
                                accessor_modifier                                                                                                                           { $$ = $1; }
                |              non_empty_accessor_modifiers accessor_modifier        { Z_LVAL($$.u.constant) = zend_do_verify_access_types(&amp;amp;$1, &amp;amp;$2); }


accessor_modifier:
                                T_PUBLIC                                                            { Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC; }
                |              T_PROTECTED                                                   { Z_LVAL($$.u.constant) = ZEND_ACC_PROTECTED; }
                |              T_PRIVATE                                                          { Z_LVAL($$.u.constant) = ZEND_ACC_PRIVATE; }
                |              T_STATIC                                                             { Z_LVAL($$.u.constant) = ZEND_ACC_STATIC; }
                |              T_FINAL                                                                               { Z_LVAL($$.u.constant) = ZEND_ACC_FINAL; }
;

accessor_function:
                                T_ISSET
                                                { Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC;  zend_do_begin_accessor_declaration(&amp;amp;$1, CG(accessor_node), &amp;amp;$$, 0 TSRMLS_CC); }
                                                                '{' inner_statement_list '}'
                                                { zend_do_end_accessor_declaration(&amp;amp;$1, CG(accessor_node), &amp;amp;$$, &amp;amp;$3 TSRMLS_CC); }
                |              T_ISSET
                                {              Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC;
                                                zend_do_begin_accessor_declaration(&amp;amp;$1, CG(accessor_node), &amp;amp;$$, 0 TSRMLS_CC);
                                                zend_do_end_accessor_declaration(&amp;amp;$1, CG(accessor_node), &amp;amp;$$, NULL TSRMLS_CC);
                                }
                                ';'
                |              accessor_modifiers is_reference T_STRING
                                                { zend_do_begin_accessor_declaration(&amp;amp;$3, CG(accessor_node), &amp;amp;$1, $2.op_type TSRMLS_CC); }
                                                                '{' inner_statement_list '}'
                                                { zend_do_end_accessor_declaration(&amp;amp;$3, CG(accessor_node), &amp;amp;$1, &amp;amp;$5 TSRMLS_CC); }
                |              accessor_modifiers is_reference T_STRING
                                {
                                                zend_do_begin_accessor_declaration(&amp;amp;$3, CG(accessor_node), &amp;amp;$1, $2.op_type TSRMLS_CC);
                                                zend_do_end_accessor_declaration(&amp;amp;$3, CG(accessor_node), &amp;amp;$1, NULL TSRMLS_CC);
                                }
                                ';'
;------------------------------------------------------------

Here is the PHP it's trying to parse:

                public $Hours {
                                get {
                                                echo &amp;quot;Getting Hours\r\n&amp;quot;;
                                                return $this-&amp;gt;Seconds / 3600;
                                }
                                set { // The variable $value holds the incoming value to be &amp;quot;set&amp;quot;
                                                echo &amp;quot;Setting Hours to {$value}\r\n&amp;quot;;
                                                $this-&amp;gt;Seconds = $value * 3600;
                                }
                                isset { return $this-&amp;gt;Seconds != NULL; }
                                unset { $this-&amp;gt;Seconds = NULL; }
                }

$1 of the first T_ISSET is matching against &amp;quot;\n\t\tisset {...&amp;quot;  (... being the rest of the set body through to the end of the script.

What's going on here?</description>
        <link>http://www.serverphorums.com/read.php?7,486118,486118#msg-486118</link>
        <lastBuildDate>Mon, 20 May 2013 09:55:30 +0200</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,486118,491742#msg-491742</guid>
            <title>RE: [PHP-DEV] RE: Trouble with zend_language_parser.y</title>
            <link>http://www.serverphorums.com/read.php?7,486118,491742#msg-491742</link>
            <description><![CDATA[ That makes complete sense, it is indeed a LONG type that's getting to that point, thank you!<br />
<br />
<br />
&gt; -----Original Message-----<br />
&gt; From: Nikita Popov [mailto:nikita.ppv@googlemail.com]<br />
&gt; Sent: Monday, May 07, 2012 2:27 PM<br />
&gt; To: Clint Priest<br />
&gt; Cc: Etienne Kneuss; Felipe Pena (felipensp@gmail.com); <a href="mailto:&#105;&#110;&#116;&#101;&#114;&#110;&#97;&#108;&#115;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#112;&#104;&#112;&#46;&#110;&#101;&#116;">&#105;&#110;&#116;&#101;&#114;&#110;&#97;&#108;&#115;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#112;&#104;&#112;&#46;&#110;&#101;&#116;</a><br />
&gt; Subject: Re: [PHP-DEV] RE: Trouble with zend_language_parser.y<br />
&gt; <br />
&gt; On Mon, May 7, 2012 at 9:16 PM, Clint Priest &lt;cpriest@zerocue.com&gt; wrote:<br />
&gt; &gt; Alright, I'm new to git but I believe I have a branch off my fork which demonstrates the issue.<br />
&gt; &gt;<br />
&gt; &gt; <a href="https://github.com/cpriest/php-src/tree/isset-unset-issue" target="_blank"  rel="nofollow">https://github.com/cpriest/php-src/tree/isset-unset-issue</a><br />
&gt; &gt;<br />
&gt; &gt; This branch also features just code necessary to produce the results, if you search in zend_compile.h for ISSUE-ISSET-LANGUAGE-<br />
&gt; PARSER you'll see further contextual notes on what I'm seeing that's the issue.<br />
&gt; &gt;<br />
&gt; &gt; It seems the function_token is getting the rest of the script stuffed into it.<br />
&gt; When you write $1 (where 1 references a terminal) you are accessing the zendlval of the token. Not all tokens define an lval. Only<br />
&gt; tokens which have a meaningful value (like numbers, strings, etc). So when accessing the value of T_ISSET you just get some junk (as<br />
&gt; it does not set a value).<br />
&gt; <br />
&gt; Not sure that's really right, but that would be my guess :)<br />
&gt; <br />
&gt; Nikita<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Clint Priest</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 08 May 2012 01:10:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,486118,491628#msg-491628</guid>
            <title>Re: [PHP-DEV] RE: Trouble with zend_language_parser.y</title>
            <link>http://www.serverphorums.com/read.php?7,486118,491628#msg-491628</link>
            <description><![CDATA[ On Mon, May 7, 2012 at 9:16 PM, Clint Priest &lt;cpriest@zerocue.com&gt; wrote:<br />
&gt; Alright, I'm new to git but I believe I have a branch off my fork which demonstrates the issue.<br />
&gt;<br />
&gt; <a href="https://github.com/cpriest/php-src/tree/isset-unset-issue" target="_blank"  rel="nofollow">https://github.com/cpriest/php-src/tree/isset-unset-issue</a><br />
&gt;<br />
&gt; This branch also features just code necessary to produce the results, if you search in zend_compile.h for ISSUE-ISSET-LANGUAGE-PARSER you'll see further contextual notes on what I'm seeing that's the issue.<br />
&gt;<br />
&gt; It seems the function_token is getting the rest of the script stuffed into it.<br />
When you write $1 (where 1 references a terminal) you are accessing<br />
the zendlval of the token. Not all tokens define an lval. Only tokens<br />
which have a meaningful value (like numbers, strings, etc). So when<br />
accessing the value of T_ISSET you just get some junk (as it does not<br />
set a value).<br />
<br />
Not sure that's really right, but that would be my guess :)<br />
<br />
Nikita<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Nikita Popov</dc:creator>
            <category>php-internals</category>
            <pubDate>Mon, 07 May 2012 21:30:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,486118,491622#msg-491622</guid>
            <title>RE: [PHP-DEV] RE: Trouble with zend_language_parser.y</title>
            <link>http://www.serverphorums.com/read.php?7,486118,491622#msg-491622</link>
            <description><![CDATA[ Alright, I'm new to git but I believe I have a branch off my fork which demonstrates the issue.<br />
<br />
<a href="https://github.com/cpriest/php-src/tree/isset-unset-issue" target="_blank"  rel="nofollow">https://github.com/cpriest/php-src/tree/isset-unset-issue</a><br />
<br />
This branch also features just code necessary to produce the results, if you search in zend_compile.h for ISSUE-ISSET-LANGUAGE-PARSER you'll see further contextual notes on what I'm seeing that's the issue.<br />
<br />
It seems the function_token is getting the rest of the script stuffed into it.<br />
<br />
&gt; -----Original Message-----<br />
&gt; From: <a href="mailto:&#101;&#107;&#110;&#101;&#117;&#115;&#115;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;">&#101;&#107;&#110;&#101;&#117;&#115;&#115;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;</a> [mailto:ekneuss@gmail.com] On Behalf Of Etienne Kneuss<br />
&gt; Sent: Saturday, May 05, 2012 10:07 AM<br />
&gt; To: Clint Priest<br />
&gt; Cc: <a href="mailto:&#105;&#110;&#116;&#101;&#114;&#110;&#97;&#108;&#115;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#112;&#104;&#112;&#46;&#110;&#101;&#116;">&#105;&#110;&#116;&#101;&#114;&#110;&#97;&#108;&#115;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#112;&#104;&#112;&#46;&#110;&#101;&#116;</a><br />
&gt; Subject: Re: [PHP-DEV] RE: Trouble with zend_language_parser.y<br />
&gt; <br />
&gt; Hi Clint,<br />
&gt; <br />
&gt; On Wed, May 2, 2012 at 3:23 PM, Clint Priest &lt;cpriest@zerocue.com&gt; wrote:<br />
&gt; &gt; Anyone have any help with this?<br />
&gt; <br />
&gt; hard to say like this with this partial patch, do you have some git branch I can pull from to reproduce and analyze this?<br />
&gt; Alternatively, the complete an up-to-date patch?<br />
&gt; <br />
&gt; Best Regards,]]></description>
            <dc:creator>Clint Priest</dc:creator>
            <category>php-internals</category>
            <pubDate>Mon, 07 May 2012 21:20:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,486118,491439#msg-491439</guid>
            <title>RE: [PHP-DEV] Trouble with zend_language_parser.y</title>
            <link>http://www.serverphorums.com/read.php?7,486118,491439#msg-491439</link>
            <description><![CDATA[ This has been changed to the more traditional way.  <br />
<br />
I've moved on and am using _isset and _unset for the moment, but I'll clone my branch with what I need to accomplish and post it here tonight.<br />
<br />
-----Original Message-----<br />
From: Felipe Pena [mailto:felipensp@gmail.com] <br />
Sent: Saturday, May 05, 2012 10:19 AM<br />
To: Clint Priest<br />
Cc: <a href="mailto:&#105;&#110;&#116;&#101;&#114;&#110;&#97;&#108;&#115;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#112;&#104;&#112;&#46;&#110;&#101;&#116;">&#105;&#110;&#116;&#101;&#114;&#110;&#97;&#108;&#115;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#112;&#104;&#112;&#46;&#110;&#101;&#116;</a><br />
Subject: Re: [PHP-DEV] Trouble with zend_language_parser.y<br />
<br />
Hi,<br />
<br />
2012/4/26 Clint Priest &lt;cpriest@zerocue.com&gt;:<br />
&gt; I'm having some trouble setting up the re2c to allow the isset/unset.  Here are the definitions, I've added the two T_ISSET statements:<br />
&gt;<br />
&gt; ------------------------------------------------------------<br />
&gt; accessors:<br />
&gt;                                accessor_function<br />
&gt;                                accessor_function<br />
&gt;                                accessor_function<br />
&gt;                                accessor_function<br />
&gt;                |              accessor_function<br />
&gt;                                accessor_function<br />
&gt;                                accessor_function<br />
&gt;                |              accessor_function<br />
&gt;                                accessor_function<br />
&gt;                |              accessor_function<br />
&gt;                | /* Empty */<br />
&gt; ;<br />
&gt;<br />
<br />
This rule is weird too, do you want a limited number of accessor?<br />
<br />
-- <br />
Regards,<br />
Felipe Pena]]></description>
            <dc:creator>Clint Priest</dc:creator>
            <category>php-internals</category>
            <pubDate>Mon, 07 May 2012 15:50:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,486118,490845#msg-490845</guid>
            <title>Re: [PHP-DEV] Trouble with zend_language_parser.y</title>
            <link>http://www.serverphorums.com/read.php?7,486118,490845#msg-490845</link>
            <description><![CDATA[ Hi,<br />
<br />
2012/4/26 Clint Priest &lt;cpriest@zerocue.com&gt;:<br />
&gt; I'm having some trouble setting up the re2c to allow the isset/unset.  Here are the definitions, I've added the two T_ISSET statements:<br />
&gt;<br />
&gt; ------------------------------------------------------------<br />
&gt; accessors:<br />
&gt;                                accessor_function<br />
&gt;                                accessor_function<br />
&gt;                                accessor_function<br />
&gt;                                accessor_function<br />
&gt;                |              accessor_function<br />
&gt;                                accessor_function<br />
&gt;                                accessor_function<br />
&gt;                |              accessor_function<br />
&gt;                                accessor_function<br />
&gt;                |              accessor_function<br />
&gt;                | /* Empty */<br />
&gt; ;<br />
&gt;<br />
<br />
This rule is weird too, do you want a limited number of accessor?<br />
<br />
-- <br />
Regards,<br />
Felipe Pena]]></description>
            <dc:creator>Felipe Pena</dc:creator>
            <category>php-internals</category>
            <pubDate>Sat, 05 May 2012 17:20:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,486118,490836#msg-490836</guid>
            <title>Re: [PHP-DEV] RE: Trouble with zend_language_parser.y</title>
            <link>http://www.serverphorums.com/read.php?7,486118,490836#msg-490836</link>
            <description><![CDATA[ Hi Clint,<br />
<br />
On Wed, May 2, 2012 at 3:23 PM, Clint Priest &lt;cpriest@zerocue.com&gt; wrote:<br />
&gt; Anyone have any help with this?<br />
<br />
hard to say like this with this partial patch, do you have some git<br />
branch I can pull from to reproduce and analyze this?<br />
Alternatively, the complete an up-to-date patch?<br />
<br />
Best Regards,<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Etienne Kneuss</dc:creator>
            <category>php-internals</category>
            <pubDate>Sat, 05 May 2012 17:10:04 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,486118,489030#msg-489030</guid>
            <title>[PHP-DEV] RE: Trouble with zend_language_parser.y</title>
            <link>http://www.serverphorums.com/read.php?7,486118,489030#msg-489030</link>
            <description><![CDATA[ Anyone have any help with this?<br />
<br />
$1 of the first T_ISSET is matching against &quot;\n\t\tisset {...&quot;  (... being the rest of the set body through to the end of the script.<br />
<br />
-----Original Message-----<br />
From: Clint Priest [mailto:cpriest@zerocue.com] <br />
Sent: Wednesday, April 25, 2012 10:41 PM<br />
To: <a href="mailto:&#105;&#110;&#116;&#101;&#114;&#110;&#97;&#108;&#115;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#112;&#104;&#112;&#46;&#110;&#101;&#116;">&#105;&#110;&#116;&#101;&#114;&#110;&#97;&#108;&#115;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#112;&#104;&#112;&#46;&#110;&#101;&#116;</a><br />
Subject: [PHP-DEV] Trouble with zend_language_parser.y<br />
<br />
I'm having some trouble setting up the re2c to allow the isset/unset.  Here are the definitions, I've added the two T_ISSET statements:<br />
<br />
------------------------------------------------------------<br />
accessors:<br />
                                accessor_function<br />
                                accessor_function<br />
                                accessor_function<br />
                                accessor_function<br />
                |              accessor_function<br />
                                accessor_function<br />
                                accessor_function<br />
                |              accessor_function<br />
                                accessor_function<br />
                |              accessor_function<br />
                | /* Empty */<br />
;<br />
<br />
accessor_modifiers:<br />
                                /* empty */                                                                                       { Z_LVAL($$.u.constant) = CG(access_type); }<br />
                |              non_empty_accessor_modifiers              { $$ = $1; }<br />
;<br />
<br />
non_empty_accessor_modifiers:<br />
                                accessor_modifier                                                                                                                           { $$ = $1; }<br />
                |              non_empty_accessor_modifiers accessor_modifier        { Z_LVAL($$.u.constant) = zend_do_verify_access_types(&amp;$1, &amp;$2); }<br />
<br />
<br />
accessor_modifier:<br />
                                T_PUBLIC                                                            { Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC; }<br />
                |              T_PROTECTED                                                   { Z_LVAL($$.u.constant) = ZEND_ACC_PROTECTED; }<br />
                |              T_PRIVATE                                                          { Z_LVAL($$.u.constant) = ZEND_ACC_PRIVATE; }<br />
                |              T_STATIC                                                             { Z_LVAL($$.u.constant) = ZEND_ACC_STATIC; }<br />
                |              T_FINAL                                                                               { Z_LVAL($$.u.constant) = ZEND_ACC_FINAL; }<br />
;<br />
<br />
accessor_function:<br />
                                T_ISSET<br />
                                                { Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC;  zend_do_begin_accessor_declaration(&amp;$1, CG(accessor_node), &amp;$$, 0 TSRMLS_CC); }<br />
                                                                '{' inner_statement_list '}'<br />
                                                { zend_do_end_accessor_declaration(&amp;$1, CG(accessor_node), &amp;$$, &amp;$3 TSRMLS_CC); }<br />
                |              T_ISSET<br />
                                {              Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC;<br />
                                                zend_do_begin_accessor_declaration(&amp;$1, CG(accessor_node), &amp;$$, 0 TSRMLS_CC);<br />
                                                zend_do_end_accessor_declaration(&amp;$1, CG(accessor_node), &amp;$$, NULL TSRMLS_CC);<br />
                                }<br />
                                ';'<br />
                |              accessor_modifiers is_reference T_STRING<br />
                                                { zend_do_begin_accessor_declaration(&amp;$3, CG(accessor_node), &amp;$1, $2.op_type TSRMLS_CC); }<br />
                                                                '{' inner_statement_list '}'<br />
                                                { zend_do_end_accessor_declaration(&amp;$3, CG(accessor_node), &amp;$1, &amp;$5 TSRMLS_CC); }<br />
                |              accessor_modifiers is_reference T_STRING<br />
                                {<br />
                                                zend_do_begin_accessor_declaration(&amp;$3, CG(accessor_node), &amp;$1, $2.op_type TSRMLS_CC);<br />
                                                zend_do_end_accessor_declaration(&amp;$3, CG(accessor_node), &amp;$1, NULL TSRMLS_CC);<br />
                                }<br />
                                ';'<br />
;------------------------------------------------------------<br />
<br />
Here is the PHP it's trying to parse:<br />
<br />
                public $Hours {<br />
                                get {<br />
                                                echo &quot;Getting Hours\r\n&quot;;<br />
                                                return $this-&gt;Seconds / 3600;<br />
                                }<br />
                                set { // The variable $value holds the incoming value to be &quot;set&quot;<br />
                                                echo &quot;Setting Hours to {$value}\r\n&quot;;<br />
                                                $this-&gt;Seconds = $value * 3600;<br />
                                }<br />
                                isset { return $this-&gt;Seconds != NULL; }<br />
                                unset { $this-&gt;Seconds = NULL; }<br />
                }<br />
<br />
$1 of the first T_ISSET is matching against &quot;\n\t\tisset {...&quot;  (... being the rest of the set body through to the end of the script.<br />
<br />
What's going on here?<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Clint Priest</dc:creator>
            <category>php-internals</category>
            <pubDate>Wed, 02 May 2012 15:30:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,486118,486118#msg-486118</guid>
            <title>[PHP-DEV] Trouble with zend_language_parser.y</title>
            <link>http://www.serverphorums.com/read.php?7,486118,486118#msg-486118</link>
            <description><![CDATA[ I'm having some trouble setting up the re2c to allow the isset/unset.  Here are the definitions, I've added the two T_ISSET statements:<br />
<br />
------------------------------------------------------------<br />
accessors:<br />
                                accessor_function<br />
                                accessor_function<br />
                                accessor_function<br />
                                accessor_function<br />
                |              accessor_function<br />
                                accessor_function<br />
                                accessor_function<br />
                |              accessor_function<br />
                                accessor_function<br />
                |              accessor_function<br />
                | /* Empty */<br />
;<br />
<br />
accessor_modifiers:<br />
                                /* empty */                                                                                       { Z_LVAL($$.u.constant) = CG(access_type); }<br />
                |              non_empty_accessor_modifiers              { $$ = $1; }<br />
;<br />
<br />
non_empty_accessor_modifiers:<br />
                                accessor_modifier                                                                                                                           { $$ = $1; }<br />
                |              non_empty_accessor_modifiers accessor_modifier        { Z_LVAL($$.u.constant) = zend_do_verify_access_types(&amp;$1, &amp;$2); }<br />
<br />
<br />
accessor_modifier:<br />
                                T_PUBLIC                                                            { Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC; }<br />
                |              T_PROTECTED                                                   { Z_LVAL($$.u.constant) = ZEND_ACC_PROTECTED; }<br />
                |              T_PRIVATE                                                          { Z_LVAL($$.u.constant) = ZEND_ACC_PRIVATE; }<br />
                |              T_STATIC                                                             { Z_LVAL($$.u.constant) = ZEND_ACC_STATIC; }<br />
                |              T_FINAL                                                                               { Z_LVAL($$.u.constant) = ZEND_ACC_FINAL; }<br />
;<br />
<br />
accessor_function:<br />
                                T_ISSET<br />
                                                { Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC;  zend_do_begin_accessor_declaration(&amp;$1, CG(accessor_node), &amp;$$, 0 TSRMLS_CC); }<br />
                                                                '{' inner_statement_list '}'<br />
                                                { zend_do_end_accessor_declaration(&amp;$1, CG(accessor_node), &amp;$$, &amp;$3 TSRMLS_CC); }<br />
                |              T_ISSET<br />
                                {              Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC;<br />
                                                zend_do_begin_accessor_declaration(&amp;$1, CG(accessor_node), &amp;$$, 0 TSRMLS_CC);<br />
                                                zend_do_end_accessor_declaration(&amp;$1, CG(accessor_node), &amp;$$, NULL TSRMLS_CC);<br />
                                }<br />
                                ';'<br />
                |              accessor_modifiers is_reference T_STRING<br />
                                                { zend_do_begin_accessor_declaration(&amp;$3, CG(accessor_node), &amp;$1, $2.op_type TSRMLS_CC); }<br />
                                                                '{' inner_statement_list '}'<br />
                                                { zend_do_end_accessor_declaration(&amp;$3, CG(accessor_node), &amp;$1, &amp;$5 TSRMLS_CC); }<br />
                |              accessor_modifiers is_reference T_STRING<br />
                                {<br />
                                                zend_do_begin_accessor_declaration(&amp;$3, CG(accessor_node), &amp;$1, $2.op_type TSRMLS_CC);<br />
                                                zend_do_end_accessor_declaration(&amp;$3, CG(accessor_node), &amp;$1, NULL TSRMLS_CC);<br />
                                }<br />
                                ';'<br />
;------------------------------------------------------------<br />
<br />
Here is the PHP it's trying to parse:<br />
<br />
                public $Hours {<br />
                                get {<br />
                                                echo &quot;Getting Hours\r\n&quot;;<br />
                                                return $this-&gt;Seconds / 3600;<br />
                                }<br />
                                set { // The variable $value holds the incoming value to be &quot;set&quot;<br />
                                                echo &quot;Setting Hours to {$value}\r\n&quot;;<br />
                                                $this-&gt;Seconds = $value * 3600;<br />
                                }<br />
                                isset { return $this-&gt;Seconds != NULL; }<br />
                                unset { $this-&gt;Seconds = NULL; }<br />
                }<br />
<br />
$1 of the first T_ISSET is matching against &quot;\n\t\tisset {...&quot;  (... being the rest of the set body through to the end of the script.<br />
<br />
What's going on here?]]></description>
            <dc:creator>Clint Priest</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 26 Apr 2012 05:50:02 +0200</pubDate>
        </item>
    </channel>
</rss>
