Changeset 21830 for src/perl6

Show
Ignore:
Timestamp:
08/07/08 19:46:35 (4 months ago)
Author:
lwall
Message:

[STD] refine nibbler to avoid LTM for now
avoid feeding canmatch() multiple large unicode characters at once

since that tends to make way too many digraph cache files

[t] whack illegal adverbials

Location:
src/perl6
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/perl6/Cursor.pmc

    r21819 r21830  
    434434    } 
    435435    my $ch2 = substr($$buf,$P,5); 
    436 #    $ch2 .= substr($$buf,$P+1,3) if $ch2 eq '['; 
    437     $ch2 =~ s/^(\[[\\<>«»]*..|[<>][<>]..|..).*$/$1/s; 
     436    # wish I could persuade p5 to parse this directly out of $$buf... 
     437    $ch2 =~ s/^(\[[\\<>«»]*..|[<>][<>]..|[ -~].|.).*$/$1/s; 
    438438 
    439439 
  • src/perl6/STD.pm

    r21819 r21830  
    17861786    :my $multiline = 0; 
    17871787    { $<firstpos> = self.pos; } 
    1788     [ 
     1788    [ <!before <stopper> > 
    17891789        [ 
    1790         | <?before <stopper> > :: <fail> 
    1791         | <starter> :: <nibbler> <stopper> 
     1790        || <starter> :: <nibbler> <stopper> 
    17921791                        { 
    17931792                            my $n = $<nibbler>[*-1]<nibbles>; 
     
    17971796                            push @nibbles, @n; 
    17981797                        } 
    1799         | <escape>   :: { 
     1798        || <escape>   :: { 
    18001799                            push @nibbles, $text, $<escape>; 
    18011800                            $text = ''; 
    18021801                        } 
    1803         |            :: . 
     1802        ||            :: . 
    18041803                        {{ 
    18051804                            my $ch = substr($$buf, $¢.pos-1, 1); 
     
    25382537                given $+zone { 
    25392538                    when 'posopt' { 
    2540 $¢.panic("Can't use required parameter in optional zone"); 
     2539$¢.panic("Can't put required parameter after optional parameters"); 
    25412540                    } 
    25422541                    when 'var' { 
    2543 $¢.panic("Can't use required parameter in variadic zone"); 
     2542$¢.panic("Can't put required parameter after variadic parameters"); 
    25442543                    } 
    25452544                } 
     
    25492548                    when 'posreq' { $+zone = 'posopt' } 
    25502549                    when 'var' { 
    2551 $¢.panic("Can't use optional positional parameter in variadic zone"); 
     2550$¢.panic("Can't put optional positional parameter after slurpy parameters"); 
    25522551                    } 
    25532552                }