Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78690 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44617 invoked from network); 4 Nov 2014 22:47:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 22:47:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-ig0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:34291] helo=mail-ig0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/37-02095-B9759545 for ; Tue, 04 Nov 2014 17:47:56 -0500 Received: by mail-ig0-f170.google.com with SMTP id h15so7324248igd.3 for ; Tue, 04 Nov 2014 14:47:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=VrPPY+KxYAUsPDNA+yUmSn+qbBHRXpVU/n/0FqGL3J0=; b=ww4ZK6X+kENGtNwxpVNkFjkw9h4DDJSY0d6IcJdWn2Sd1Msl2c0flYr2jfewsYJ6c+ jVD7n4PEPuXtkyNNMJd91MCxMWvK/NXD41314b3VnKWyvI+TEyAck+tm7RYV/vnjzGUb ElWE9m7h0TRH9IW5ucHVsd51r5zicjF6jjCDhGvtzioXtCMrhBoLdz+nZx9xiFoy3V9m 2KdyJr0pskxLVhJ0D+rnapha5v6x0YVYmLyQ/KXTEEtDgwvkxbvlAujZgzRxzjlIt9Au SPKPEHbSFOXke5ac5xDVm0A6kp69onzUcNXRCvN5n6R8stoQaj8505OE/0FD1iVyMWH9 1DBA== X-Received: by 10.42.16.74 with SMTP id o10mr788721ica.61.1415141273577; Tue, 04 Nov 2014 14:47:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.155.5 with HTTP; Tue, 4 Nov 2014 14:47:33 -0800 (PST) In-Reply-To: References: <5457AF2F.90808@php.net> <5457BDB7.8070701@garfieldtech.com> <54589A8D.3020607@sugarcrm.com> <1C3F4FA3-ABD5-4F6F-A898-F63AC1C723D5@ajf.me> <54591A76.8070302@sugarcrm.com> <967E30E5-71CB-40F8-9AE2-733D327DE197@ajf.me> <545945A5.2090204@sugarcrm.com> Date: Tue, 4 Nov 2014 17:47:33 -0500 Message-ID: To: Andrea Faulds Cc: Stas Malyshev , Benjamin Eberlei , Pierre Joye , Levi Morrison , PHP internals , Larry Garfield Content-Type: multipart/alternative; boundary=20cf303ea7b4eb2f3c050710406b Subject: Re: [PHP-DEV] Annotation PHP 7 From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") --20cf303ea7b4eb2f3c050710406b Content-Type: text/plain; charset=UTF-8 Sorry, I forgot to add references to how we fixed emails handling. It got split in 2 places: - Initial root level annotation https://github.com/doctrine/annotations/blob/master/lib/Doctrine/Common/Annotations/DocParser.php#L350 - Subsequent root level annotations https://github.com/doctrine/annotations/blob/master/lib/Doctrine/Common/Annotations/DocParser.php#L631 []s, On Tue, Nov 4, 2014 at 5:42 PM, guilhermeblanco@gmail.com < guilhermeblanco@gmail.com> wrote: > Hi, > > By dealing with annotations in docblocks will force the Annotations parser > to *much* smarter than you imagine. > > Currently in Doctrine Annotations implementation, @param and @Param are > considered different not only by first character to be uppercased, but > rather because a class also exist in that namespace and also because it's > an @Annotation. > Smarter I mean that you'll have to build a rejection list of > non-standardized annotations, such as phpdoc and phpunit. It also makes > pretty hard to parse emails. > You can see the list of ignored names as part of > https://github.com/doctrine/annotations/blob/master/lib/Doctrine/Common/Annotations/AnnotationReader.php#L48 > > Regards, > > > On Tue, Nov 4, 2014 at 5:20 PM, Andrea Faulds wrote: > >> >> > On 4 Nov 2014, at 21:31, Stas Malyshev wrote: >> > >> >> This brings the next piece of the puzzle. We have to update lexical and >> >> semantical understanding of PHP. Taking Java's approach (@) does not >> >> work in PHP, because it conflicts with error supression. Same thing >> > >> > Except for the mental context, how @ conflicts with errors? Suppression >> > is always in runtime context and applied to expressions, annotations are >> > always outside of it and apply to declarations. Unless of course you >> > want to annotate variables and closures, but I'm not sure annotating >> > expressions is such a good idea anyway >> >> At the top-level, @ is a shift/reduce conflict due to ambiguity between >> statement annotation and expression. >> >> Though it might be possible to work around that with the AST (ew). >> >> -- >> Andrea Faulds >> http://ajf.me/ >> >> >> >> >> > > > -- > Guilherme Blanco > MSN: guilhermeblanco@hotmail.com > GTalk: guilhermeblanco > Toronto - ON/Canada > -- Guilherme Blanco MSN: guilhermeblanco@hotmail.com GTalk: guilhermeblanco Toronto - ON/Canada --20cf303ea7b4eb2f3c050710406b--