On Wed 06 Sep, Mark-Jason Dominus wrote:
>
> I've been thinking the same thing. It seems to me that the attempts to
> shoehorn parsers into regex syntax have either been unsuccessful
> (yielding an underpowered extension) or illegible or both.
>
>SNOBOL:
> parenstring = '(' *parenstring ')'
> | *parenstring *parenstring
> | span('()')
>
>
> This is not exactly the same, but I tried a direct translation:
>
> $re = qr{ \( (??{$re}) \)
> | (??{$re}) (??{$re})
> | (?> [^()]+)
> }x;
>
I think what is needed is something along the line of :
$re = qz{ '(' \$re ')'
| \$re \$re
| [^()]+
};
Where qz is some hypothetical new quoting syntax
Richard
--
[EMAIL PROTECTED]
- Re: XML/HTML-specific ?< and ... Jonathan Scott Duff
- Re: XML/HTML-specific ?< and ... Michael Maraist
- Re: XML/HTML-specific ?< and ... Tom Christiansen
- Re: XML/HTML-specific ?< and ... Mark-Jason Dominus
- Re: XML/HTML-specific ?< and ... Randal L. Schwartz
- Re: XML/HTML-specific ?< and ... Mark-Jason Dominus
- Re: XML/HTML-specific ?< and ... Jarkko Hietaniemi
- Re: XML/HTML-specific ?< and ... Randal L. Schwartz
- Re: XML/HTML-specific ?< and ... Bart Lateur
- Re: XML/HTML-specific ?< and ... David L. Nicol
- Re: XML/HTML-specific ?< and ... Richard Proctor
- Re: XML/HTML-specific ?< and ... Jonathan Scott Duff
- Re: XML/HTML-specific ?< and ... Michael Maraist
- Re: XML/HTML-specific ?< and ... Mark-Jason Dominus
- Re: XML/HTML-specific ?< and ... Hugo
- Re: XML/HTML-specific ?< and ... Mark-Jason Dominus
- Re: XML/HTML-specific ?< and ... Hugo
- Re: XML/HTML-specific ?< and ... Mark-Jason Dominus
- Re: XML/HTML-specific ?< and ... David Corbin
- Re: RFC 145 (alternate approach) Jonathan Scott Duff
