On Mon, Apr 17, 2006 at 10:15:40AM -0700, [EMAIL PROTECTED] wrote:

> * grammar_rules.pge - support for POD sections.
> 
> Modified: trunk/languages/perl6/lib/grammar_rules.pge
> ==============================================================================
> --- trunk/languages/perl6/lib/grammar_rules.pge       (original)
> +++ trunk/languages/perl6/lib/grammar_rules.pge       Mon Apr 17 10:15:39 2006
> @@ -15,9 +15,15 @@
>  
>  
>  ## This rule handles whitespace and comments between tokens.
> -## XXX:  Add pod directive handling
>  
> -rule ws { [ \# \N+ | \s+ ]* ::: }
> +rule ws {
> +    [ \# \N+
> +    | \s+
> +    | ^^ =cut \s* $$
> +    | ^^ =for \s* \N+ .*? ^^$$
> +    | ^^ =\w\N* .*? ^^ =cut $$
> +    ]* :::
> +}

[People not reading the commit list should note that this wasn't the final
form]

I see you've taken out the XXX. However, isn't the plan for Perl 6 that all
the POD is going to be available as <DATA>-like streams? Whereas whitespace
does get eaten. So surely they should be 2 different rules?

(Or does whitespace get eaten? Is Larry planning a MAD-like mode for Perl 6
where it can regurgitate the entire program source code in byte-for-byte
perfection?)

Nicholas Clark

Reply via email to