Re: Re: [RFC] Improved parser error message

From: Date: Tue, 17 May 2011 17:01:36 +0000
Subject: Re: Re: [RFC] Improved parser error message
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-52439@lists.php.net to get a copy of this message
On 05/17/2011 09:58 AM, Ferenc Kovacs wrote:
On Tue, May 17, 2011 at 6:49 PM, Stas Malyshev<smalyshev@sugarcrm.com>wrote:
Hi! I think we need to keep token name in the message, since it makes it easier to understand what parser expected if you need to debug the parser (as opposed to your code). So I think we need to have both the human-readable name and the token name, as Andi suggested.
on the sidenote, I don't think that many people out there would start debuging the php src if they are presented with an error by the engine. but I'm fine with Andi's suggestion.
While that is true, I did run across some code a while back that used the tokenizer extension in conjunction with the error messages. If we decouple the error messages completely from the tokens there would be no way to write that same code. An edge case, but I don't think it hurts to keep the token name there. -Rasmus

« previous php.internals (#52439) next »