Hi,

2011/7/10 Lars Strojny <l...@strojny.net>:
> Hi Felipe,
>
> Am 11.07.11 00:41 schrieb "Felipe Pena" unter <felipe...@gmail.com>:
>
>>I'm against this patch, because we will just add more inconsistency.
>>Allow reserved words in method name, OK. But what about class
>>name/namespace name etc?
>
> Good argument, namespace names and class names should be treated similar.
> Would you object a patch doing it for class names, interface names and
> namespaces?
>

To handle the class name in a method call turn out tricky. For example:

include::list();

When matching 'include' we have to check if it's (ignoring whitespaces
and comments) an 'include ".."', 'include(...)', 'include::'. This
will require massive use of lookahead, which lead to handling trailing
context in the scanner, for each current reserved words. It's not so
simple.

Using re2c we can to match 'include' only if followed by something
using the r/s syntax, but this doesn't solve all. As the one could
use: include /* foobar */ ::list() - and even being quite weird, it
should keep working.

Complexity++

-- 
Regards,
Felipe Pena

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to