RE: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)
| From: | Dmitry Stogov | Date: | Thu, 01 Dec 2005 10:45:07 +0000 |
| Subject: | RE: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20944@lists.php.net to get a copy of this message | ||
Hi Sara,
I made another patch that is based on your ideas.
1) It uses "right" syntax:
LABEL: while(1) {
break LABEL;
}
2) It doesn't allow usage of same label for different loops
L1: while(1) {...}
L1: while(1) {...}
3) It doesn't use executor data structures
4) It allows reuse of same labels for jump/goto (as was done in your first
patch).
It already declares "jump LABEL;" operator but emits error for now.
I think this patch can be committed and then we can discuss jump/goto.
Thanks. Dmitry.