> 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 reu
gt; mixwell... all
> bets are off...
>
> -Sara
>
> - Original Message -
> From: "Dmitry Stogov" <[EMAIL PROTECTED]>
> To: "'Sara Golemon'" <[EMAIL PROTECTED]>;
> Cc: "Zeev Suraski" <[EMAIL PROTECTED]>;
e
> mixwell... all
> bets are off...
>
> -Sara
>
> - Original Message -
> From: "Dmitry Stogov" <[EMAIL PROTECTED]>
> To: "'Sara Golemon'" <[EMAIL PROTECTED]>;
> Cc: "Zeev Suraski" <[EMAIL PROTECT
SG>>* labels aren't scoped to functions. The break container checks prevent
SG>>casual jumping, but:
SG>>
SG>>FOO: do { } while (0);
SG>>function bar() {
SG>> do { break FOO; } while (0);
SG>>}
This shouldn't work, of course.
--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED] http
t; <[EMAIL PROTECTED]>;
Cc: "Zeev Suraski" <[EMAIL PROTECTED]>; "Stanislav Malyshev" <[EMAIL PROTECTED]>
Sent: Thursday, December 01, 2005 2:45 AM
Subject: RE: [PHP-DEV] Labeled Break (nothing at all whatsoever to do
withGOTO)
Hi Sara,
I made another patc
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 sa
thanks for the explanation Sara, :-), as always your manner and ideas
are an example to the 'php core', 'we' (they) are lucky to have you :-)
Sara Golemon wrote:
what happens when I want to place a 'goto' label just before a while
or foreach
loop (upon which I haven't put a label)? I ask because
what happens when I want to place a 'goto' label just before a while or
foreach
loop (upon which I haven't put a label)? I ask because I assume that the
following 2
statements should be identical no:?
PHP's parser gives no importance to whitespace, so yes, these two are
identical.
In the
devils advocate:
what happens when I want to place a 'goto' label just before a while or
foreach
loop (upon which I haven't put a label)? I ask because I assume that the
following 2
statements should be identical no:?
I think there would be no such thing as a 'goto' or 'break' label. There
ct: Re: [PHP-DEV] Labeled Break (nothing at all
> whatsoever to do withGOTO)
>
>
> > It occured to me on the way onto the train that this
> construct doesn't
> > need pass_two(). When I get home to more bandwidth I'll cook up a
> > simplified version tha
It occured to me on the way onto the train that this construct doesn't
need pass_two(). When I get home to more bandwidth I'll cook up a
simplified version that resolves break distance in zend_do_brk_cont() and
frees the labels in do_end_loop().
Okay, simpler/leaner implementation now availab
Hello, I represent group B (not in any way officially or anything else
that might give my words an iota of weight), but I (*cough cough*) WE
think that the above break system would make a terrible system for
finite state machines.
Good, 'cause that's not its purpose. This doesn't supplant GOTO o
Hello Sara,
nice work, clean patch, good solution - thanks! what more can one
say?
commit? :)
Oh how you both love to tease me :p
It occured to me on the way onto the train that this construct doesn't need
pass_two(). When I get home to more bandwidth I'll cook up a simplified
version t
13 matches
Mail list logo