Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60315 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5076 invoked from network); 26 Apr 2012 03:41:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2012 03:41:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 74.115.204.80 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.80 migration-relay.domainlocalhost.com Received: from [74.115.204.80] ([74.115.204.80:43392] helo=relay-hub206.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/55-00428-6D3C89F4 for ; Wed, 25 Apr 2012 23:41:13 -0400 Received: from MBX202.domain.local ([169.254.19.147]) by HUB206.domain.local ([192.168.69.6]) with mapi id 14.01.0355.002; Wed, 25 Apr 2012 23:41:07 -0400 To: "internals@lists.php.net" Thread-Topic: Trouble with zend_language_parser.y Thread-Index: Ac0jXmQn8gRqmAt5QtCnm9BYYQr3DA== Date: Thu, 26 Apr 2012 03:41:07 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE48555BEE86D@MBX202.domain.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.25] Content-Type: multipart/alternative; boundary="_000_9570D903A3BECE4092E924C2985CE48555BEE86DMBX202domainloc_" MIME-Version: 1.0 Subject: Trouble with zend_language_parser.y From: cpriest@zerocue.com (Clint Priest) --_000_9570D903A3BECE4092E924C2985CE48555BEE86DMBX202domainloc_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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.consta= nt) =3D CG(access_type); } | non_empty_accessor_modifiers { = $$ =3D $1; } ; non_empty_accessor_modifiers: accessor_modifier = = { $$ =3D $1; } | non_empty_accessor_modifiers accessor_modifi= er { Z_LVAL($$.u.constant) =3D zend_do_verify_access_types(&$1, &$2)= ; } accessor_modifier: T_PUBLIC = { Z_LVAL($$.u.constant) =3D ZEND_ACC_PUBLIC; } | T_PROTECTED = { Z_LVAL($$.u.constant) =3D ZEND_ACC_PROTECTED; } | T_PRIVATE = { Z_LVAL($$.u.constant) =3D ZEND_ACC_PRIVATE; } | T_STATIC = { Z_LVAL($$.u.constant) =3D ZEND_ACC_STATIC; } | T_FINAL = { Z_LVAL($$.u.constant) =3D ZEND_= ACC_FINAL; } ; accessor_function: T_ISSET { Z_LVAL($$.u.constant) =3D= ZEND_ACC_PUBLIC; zend_do_begin_accessor_declaration(&$1, CG(accessor_node= ), &$$, 0 TSRMLS_CC); } '{' inner_s= tatement_list '}' { zend_do_end_accessor_decl= aration(&$1, CG(accessor_node), &$$, &$3 TSRMLS_CC); } | T_ISSET { Z_LVAL($$.u.constant) =3D ZE= ND_ACC_PUBLIC; zend_do_begin_accessor_decl= aration(&$1, CG(accessor_node), &$$, 0 TSRMLS_CC); zend_do_end_accessor_declar= ation(&$1, CG(accessor_node), &$$, NULL TSRMLS_CC); } ';' | accessor_modifiers is_reference T_STRING { zend_do_begin_accessor_de= claration(&$3, CG(accessor_node), &$1, $2.op_type TSRMLS_CC); } '{' inner_s= tatement_list '}' { zend_do_end_accessor_decl= aration(&$3, CG(accessor_node), &$1, &$5 TSRMLS_CC); } | accessor_modifiers is_reference T_STRING { zend_do_begin_accessor_decl= aration(&$3, CG(accessor_node), &$1, $2.op_type TSRMLS_CC); zend_do_end_accessor_declar= ation(&$3, CG(accessor_node), &$1, NULL TSRMLS_CC); } ';' ;------------------------------------------------------------ Here is the PHP it's trying to parse: public $Hours { get { echo "Getting Hours\r\n"; return $this->Seconds / 360= 0; } set { // The variable $value holds the inco= ming value to be "set" echo "Setting Hours to {$va= lue}\r\n"; $this->Seconds =3D $value *= 3600; } isset { return $this->Seconds !=3D NULL; } unset { $this->Seconds =3D NULL; } } $1 of the first T_ISSET is matching against "\n\t\tisset {..." (... being = the rest of the set body through to the end of the script. What's going on here? --_000_9570D903A3BECE4092E924C2985CE48555BEE86DMBX202domainloc_--