Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55458 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96036 invoked from network); 15 Sep 2011 21:18:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2011 21:18:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=chrisstocktonaz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chrisstocktonaz@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: chrisstocktonaz@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:40980] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/BE-29375-FAB627E4 for ; Thu, 15 Sep 2011 17:18:40 -0400 Received: by gyb11 with SMTP id 11so2871318gyb.29 for ; Thu, 15 Sep 2011 14:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0fK44Ajn6EQdzSp63gefNLPJ9TkoCMkgAfaRxKT3CjI=; b=vP8nZgseZqBKcn5SERPNCTevko7Ru5UQlLI+BRUD/pmntgq6Jil3J7ZI47iOIrzAQv WdfmHBpZauzR7/f7Zv35uEbGJiY5LOYknYJe8NC11wnUX/Vk4ed0YtQmyzxDJSmGJ1rd yC871mrwIXiWpPTpQUGOHzslPisP0KQx7oDzk= MIME-Version: 1.0 Received: by 10.42.161.10 with SMTP id r10mr399071icx.6.1316121514112; Thu, 15 Sep 2011 14:18:34 -0700 (PDT) Received: by 10.42.169.197 with HTTP; Thu, 15 Sep 2011 14:18:34 -0700 (PDT) In-Reply-To: References: <4E6FB55E.4060906@oracle.com> Date: Thu, 15 Sep 2011 14:18:34 -0700 Message-ID: To: Nikita Popov Cc: Hannes Magnusson , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Revert Tokenizer behavior for 5.4 From: chrisstocktonaz@gmail.com (Chris Stockton) Hello, On Thu, Sep 15, 2011 at 8:13 AM, Nikita Popov wrote: > On Thu, Sep 15, 2011 at 5:05 PM, Hannes Magnusson > wrote: >> Wait wait wait. Thats the point here? >> __COMPILER_HALT_OFFSET__ already tells you where the data starts. > __COMPILER_HALT_OFFSET__ tells you the offset if you are running the > file. It is only available in the file that does the actual > __halt_compiler(); statement. When using the Tokenizer (this is what > this is about; this is *not* about PHP's own lexing/parsing behavior) > you don't have that constant available. > > Though, again, I don't think the second patch is strictly necessary. > I'd be happy without, if it creates too many problems / is not > intuitive. > > Nikita > What I am really hearing in this thread is some people have interest in a way to easily access the __COMPILER_HALT_OFFSET__ offset from another file's context. Why don't we simply create a function for this? Something like get_compiler_halt_offset(filename) or a similar function specifically for this, maybe a function which returns the data after the offset or a combination of the two. Whatever solves these use cases. Then the tokenizer may stay precisely what it is, a tokenizer. Changing the behavior of the tokenizer based off the contents of the file seem very incorrect to me. -Chris