Well we don't support that syntax at this moment. If you are saying that we could add support for such syntax.. it does seem a good idea, but in that case we would need to modify a few rules of the grammar (like adding a const_expr production, and allow static_scalar derive it, etc..).

Right, that's what I had in mind. That doesn't seem to break anything and allows also a little more freedom. let's see if anyone objects.

I tried implementing this and it seems much more complicated than what I though. I modified the static_scalar rule of the grammar and I got hundreds of reduce/reduce and shift/reduce ambiguities. Ignoring the warnings, well.. didn't work (the parser then couldn't process the run-tests.php script).

Nuno

P.S.: I already spoted a few more places where we can produce better byte-code (including more simple constant folding).. but one thing at a time :)

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

Reply via email to