> : Text::Balanced has to track in order to parse almost any Perl code.
   > 
   > It's a good thing you said "almost".

Ah, that Jesuit education finally pays off! ;-)

   
   > Does it parse [*]] correctly?

No, but only because C<extract_variable> ignores punctuation vars entirely.
It would be a simple fix to allow it to handle those too.

It does handle C<[*{']'}]>, though. :-)


   > Does Text::Balanced take into account functions declared with a
   > prototype of ()?

No. It ignores the function prototypes. Again, that could be fixed
easily enough, were the demand there.

However, for Perl 6 I'd really like to see run-time access to the
Real Tokenizer (tm):

        use tokenizer;

        my $tree = tokenizer( $sourcecode );

This would be dead handy for building source-code filtering modules,
rather than relying on the pseudo-parsing tricks we're currently
forced to use.

Sigh. Of course it's a forthcoming RFC...

Damian

Reply via email to