Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83272 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19090 invoked from network); 20 Feb 2015 07:29:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 07:29:45 -0000 Authentication-Results: pb1.pair.com header.from=marcio.web2@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=marcio.web2@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.49 as permitted sender) X-PHP-List-Original-Sender: marcio.web2@gmail.com X-Host-Fingerprint: 209.85.215.49 mail-la0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:43713] helo=mail-la0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/A5-25547-662E6E45 for ; Fri, 20 Feb 2015 02:29:43 -0500 Received: by labms9 with SMTP id ms9so4399205lab.10 for ; Thu, 19 Feb 2015 23:29:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; bh=5L8OS4b5OhCmvpP33avLD7u3pTnAyCcnzqJp00r5b4c=; b=C/dRbjzNcq3wxCF5mc0zzrbfC8TGd8Rgc1QoQmnLGAMqGPSdNNMFFQnZifbbtWeWE8 kx1z6Y8cb8KrlzBqYvH7Nfs6MM4nSzKbaVfzrBnt4PhSfs41vCPjidU/ZayjzaH8AUA5 MmNMlnjqABhLC6dbJQ+S3hi/p92jLPnfKC1pKX+qW3fANMVFCYI38YGMDHNc+l4Voa2J RDok3YVtywwJ9PUs5UVgH2YHIFQSO2buNinQZI/QcSvRh7R1cZHXpXGb3ZxHzCNNEdmb x6raKcdRR7PSrW6O/0Yu4WR/e4UeBKiyuaAsyuKw9zzpYOvGnpPzOor+pIHHve/VvrYJ 2jvw== X-Received: by 10.112.26.110 with SMTP id k14mr7169824lbg.29.1424417379084; Thu, 19 Feb 2015 23:29:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.21.101 with HTTP; Thu, 19 Feb 2015 23:29:18 -0800 (PST) Reply-To: marcio3w@gmail.com Date: Fri, 20 Feb 2015 04:29:18 -0300 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=001a1133ad5ce46dde050f800324 Subject: [RFC][DISCUSSION] Context Sensitive lexer From: marcio.web2@gmail.com (Marcio Almada) --001a1133ad5ce46dde050f800324 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi internals, I'd like to put the "Context Sensitive Lexer" RFC into discussion phase: RFC: https://wiki.php.net/rfc/context_sensitive_lexer TL;DR commit: https://github.com/marcioAlmada/php-src/commit/c01014f9 PR: https://github.com/php/php-src/pull/1054 PHP currently has ~64 globally reserved words. Not infrequently, these reserved words end up clashing with legit alternatives to userland API declarations. This RFC proposes minimal changes to have a context sensitive lexer with support for semi-reserved words on PHP7 without causing maintenance issues. This could be especially useful to: - Reduce the surface of BC breaks whenever new keywords are introduced - Avoid restricting userland APIs. Dispensing the need for hacks like unecessary magic method calls or prefixed identifiers. The patch is 98% finished, the entire test suite is passing. I'm still adding more tests to it but the hard part is done. So it's time to discuss! Sincerely, M=C3=A1rcio Almada --001a1133ad5ce46dde050f800324--