[pcre-dev] [Bug 960] /(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/ gets…

Kezdőlap
Üzenet törlése
Szerző: Mamoru Asagami
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 960] /(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/ gets recursive call error.
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=960




--- Comment #1 from Mamoru Asagami <lovelylovelyflora@???> 2010-02-06 09:20:59 ---
(In reply to comment #0)
> I wonder why (?P<L1>(?P<L2>0)|(?P>L2)(?P>L1)) gets a left recursive error:
>
>     Failed: recursive call could loop indefinitely at offset 30

>
> , where as (?P<L1>(?P<L2>0)(?P>L1)|(?P>L2)) is OK.
>
> The BNF equivalences of the above is as follows, respectively.
>
>     <digits> := <digit> | <digit> <digits>
>     <digit>  := 0

>
>     <digits> :=  <digits> | <digit>
>     <digit>  := 0

>


Sorry, the second one should have been: 
     <digits> :=  <digit><digits> | <digit>
     <digit>  := 0



--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email