Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-12-01 Thread Sara Golemon
> 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

RE: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-12-01 Thread Dmitry Stogov
gt; mixwell... all > bets are off... > > -Sara > > - Original Message - > From: "Dmitry Stogov" <[EMAIL PROTECTED]> > To: "'Sara Golemon'" <[EMAIL PROTECTED]>; > Cc: "Zeev Suraski" <[EMAIL PROTECTED]>;

RE: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-12-01 Thread Dmitry Stogov
e > mixwell... all > bets are off... > > -Sara > > - Original Message - > From: "Dmitry Stogov" <[EMAIL PROTECTED]> > To: "'Sara Golemon'" <[EMAIL PROTECTED]>; > Cc: "Zeev Suraski" <[EMAIL PROTECT

Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-12-01 Thread Stanislav Malyshev
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

Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-12-01 Thread Sara Golemon
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

RE: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-12-01 Thread Dmitry Stogov
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

Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-12-01 Thread Jochem Maas
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

Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-11-30 Thread Sara Golemon
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

Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-11-30 Thread Bart de Boer
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

RE: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-11-30 Thread Dmitry Stogov
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

Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-11-29 Thread Sara Golemon
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

Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-11-29 Thread Sara Golemon
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

Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO)

2005-11-29 Thread Sara Golemon
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