On Sat, 2002-08-17 at 14:31, Brent Dax wrote:
> Peter Behroozi:
> # After reading over Apocalypse 5 one more time, I noticed that
> # balanced matches (like capturing nested parenthetical
> # comments ((like this))) had been glossed over in the
> # rejection of RFC 145. What was not even mentioned in the
>
> rule parenthesized { \( ( <-[()]> | <parenthesized> ) \) }
>
So that would mean to match nested tables, I would have to write
rule nested_tables { <start_table> [ <!before <start_table>><!before
<end_table>> . | <nested_tables> ] <end_table> }
or maybe even
rule balanced { @_[0] [ <!before @_[0]><!before @_[1]> . | <self> ]
@_[1] };
$html =~ /<balanced(<start_table>, <end_table>)>/;
Forgiving lookahead syntax errors on my part, that isn't as bad as I had
thought. Thanks for pointing that out.
However, since you forced me to read through A5 again, I now have
another question :). Since we can now do
$string.tr %hash;
what happens when the keys of %hash have overlapping ranges by accident
or otherwise? Are there any other options than reporting an overlap
(hard), auto-sorting the key-value pairs (medium), or not allowing
hashes (easy)?
Peter Behroozi