develooper Front page | perl.perl6.compiler | Postings from May 2011

Re: rakudo :sigspace interpretation, [ |a] vs [a| ]

Thread Previous
From:
Patrik Hägglund
Date:
May 6, 2011 05:26
Subject:
Re: rakudo :sigspace interpretation, [ |a] vs [a| ]
Message ID:
BANLkTi=w5zNDAsA84AXe-A_TCGh04ZK68A@mail.gmail.com
> The rule about empty (sub-)regexes being illegal is applied before the
> rule about everywhitespace being replaced by <.ws>.

Where is that specified?

2011/5/6 Carl Mäsak <cmasak@gmail.com>:
> Patrik (>):
>>> I find nothing in the spec that addresses this case specifically.
>>
>> From the spec:
>>
>> The new :s (:sigspace) modifier causes whitespace sequences to be
>> considered "significant"; they are replaced by a whitespace matching
>> rule, <.ws>
>>
>> I can't find any exception to this rule. Therefore, as I read it,
>> every whitespace should be replaced by <.ws>.
>
> The rule about empty (sub-)regexes being illegal is applied before the
> rule about everywhitespace being replaced by <.ws>. It doesn't matter
> whether :sigspace is on or not: nothing is always illegal.
>
> // Carl
>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About