@@ -341,7 +341,7 @@ token morename {
341
341
method peek_delimiters {
342
342
my $ pos = self . pos ;
343
343
my $ startpos = $ pos ;
344
- my $ char = substr ($ * ORIG ,$ pos ++ ,1 );
344
+ my $ char = substr (self . orig ,$ pos ++ ,1 );
345
345
if $ char ~~ /^ \s $ / {
346
346
self . panic(" Whitespace character is not allowed as delimiter" ); # "can't happen"
347
347
}
@@ -359,7 +359,7 @@ method peek_delimiters {
359
359
if not defined $ rightbrack {
360
360
return $ char , $ char ;
361
361
}
362
- while substr ($ * ORIG ,$ pos ,1 ) eq $ char {
362
+ while substr (self . orig ,$ pos ,1 ) eq $ char {
363
363
$ pos ++ ;
364
364
}
365
365
my $ len = $ pos - $ startpos ;
@@ -454,7 +454,7 @@ token nibbler {
454
454
}
455
455
|| .
456
456
{
457
- my $ ch = substr ($ * ORIG , $¢. pos-1, 1 );
457
+ my $ ch = substr (self . orig , $¢. pos-1, 1 );
458
458
$ text ~ = $ ch ;
459
459
$ to = $¢. pos ;
460
460
if $ ch ~~ " \n " {
@@ -2117,7 +2117,7 @@ grammar P6 is STD {
2117
2117
token special_variable :sym <$!{ } > {
2118
2118
'$!' '{' ~ '}' [<identifier > | <statementlist >]
2119
2119
{
2120
- my $ all = substr ($ * ORIG , self . pos , $¢. pos - self . pos );
2120
+ my $ all = substr (self . orig , self . pos , $¢. pos - self . pos );
2121
2121
my ($ inside ) = $ all ~~ m !^... \s * (.*? )\s *. $ !;
2122
2122
$¢. obs(" Perl 5's $ all construct" , " a smartmatch like \$! ~~ $ inside" );
2123
2123
}
@@ -2457,7 +2457,7 @@ grammar P6 is STD {
2457
2457
:dba ('new name to be defined' )
2458
2458
<name >
2459
2459
[
2460
- | <colonpair >+ { $¢. add_categorical(substr ($ * ORIG , self . pos , $¢. pos - self . pos )) if $ * IN_DECL ; }
2460
+ | <colonpair >+ { $¢. add_categorical(substr (self . orig , self . pos , $¢. pos - self . pos )) if $ * IN_DECL ; }
2461
2461
| { $¢. add_routine($ < name > . Str ) if $ * IN_DECL ; }
2462
2462
]
2463
2463
}
@@ -2756,7 +2756,7 @@ grammar P6 is STD {
2756
2756
$ * LEFTSIGIL = ' @' ;
2757
2757
if $ lexsig {
2758
2758
$ * CURLEX . <$?SIGNATURE > ~ = ' |' if $ lexsig > 1 ;
2759
- $ * CURLEX . <$?SIGNATURE > ~ = ' (' ~ substr ($ * ORIG , $ startpos , $¢. pos - $ startpos ) ~ ' )' ;
2759
+ $ * CURLEX . <$?SIGNATURE > ~ = ' (' ~ substr (self . orig , $ startpos , $¢. pos - $ startpos ) ~ ' )' ;
2760
2760
$ * CURLEX . <!NEEDSIG >: delete;
2761
2761
}
2762
2762
}
@@ -3982,7 +3982,7 @@ grammar P6 is STD {
3982
3982
$¢. check_nodecl($ name ) if $ isname ;
3983
3983
}
3984
3984
<args ($ isname )>
3985
- { self . add_mystery($ < identifier > ,$ pos ,substr ($ * ORIG ,$ pos ,1 )) unless $ < args >< invocant > ; }
3985
+ { self . add_mystery($ < identifier > ,$ pos ,substr (self . orig ,$ pos ,1 )) unless $ < args >< invocant > ; }
3986
3986
{
3987
3987
if $ * BORG and $ * BORG . <block > {
3988
3988
if not $ * BORG . <name > {
@@ -4748,7 +4748,7 @@ grammar Regex is STD {
4748
4748
<? before \s | '#' > [ :lang (% * LANG <MAIN >) <.ws > ]
4749
4749
}
4750
4750
4751
- token unsp { '\\' <? before \s | '#' > <.panic : "No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes ('" ~ substr ($::ORIG ,$¢. pos ,1 ) ~ "') or use a backslashed form like \\x" ~ sprintf (' %02x' , ord (substr ($::ORIG ,$¢. pos ,1 )))> } # no unspace in regexen
4751
+ token unsp { '\\' <? before \s | '#' > <.panic : "No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes ('" ~ substr (self . orig ,$¢. pos ,1 ) ~ "') or use a backslashed form like \\x" ~ sprintf (' %02x' , ord (substr (self . orig ,$¢. pos ,1 )))> } # no unspace in regexen
4752
4752
4753
4753
rule nibbler {
4754
4754
:temp % * RX ;
@@ -4770,7 +4770,7 @@ grammar Regex is STD {
4770
4770
[
4771
4771
|| <? before <stopper > | <[ &|~ ] > > <.panic : "Null pattern not allowed" >
4772
4772
|| <? before <[ \] \) \> ] > > {
4773
- my $ c = substr ($ * ORIG ,$¢. pos ,1 );
4773
+ my $ c = substr (self . orig ,$¢. pos ,1 );
4774
4774
if $ * GOAL eq $ c {
4775
4775
$¢. panic(" Null pattern not allowed" );
4776
4776
}
@@ -4941,7 +4941,7 @@ grammar Regex is STD {
4941
4941
token metachar :sym <" " > { <? before '"' > [:lang (% * LANG <MAIN >) <quote >] }
4942
4942
4943
4943
token metachar :var {
4944
- :my $ * QSIGIL ::= substr($ * ORIG ,self. pos,1);
4944
+ :my $ * QSIGIL ::= substr(self . orig ,self. pos,1);
4945
4945
<! before '$$' >
4946
4946
<? before <sigil >>
4947
4947
[:lang (% * LANG <MAIN >) <variable > ]
@@ -5157,7 +5157,7 @@ grammar Regex is STD {
5157
5157
token quantifier :sym <{N,M} > {
5158
5158
{ } '{' (\d + ) (',' ? ) (\d * ) '}'
5159
5159
{
5160
- my $ all = substr ($ * ORIG , self . pos , $¢. pos - self . pos );
5160
+ my $ all = substr (self . orig , self . pos , $¢. pos - self . pos );
5161
5161
my $ repl = chars ($1 . Str ) ??
5162
5162
($0 . Str ~ ' ..' ~ ($2 . Str || ' *' )) !! $0 . Str ;
5163
5163
$¢. sorryobs($ all ~ " as general quantifier" , ' X**' ~ $ repl );
@@ -6000,7 +6000,7 @@ method panic (Str $s) {
6000
6000
6001
6001
$ m ~ = $ s ;
6002
6002
6003
- if substr ($ * ORIG ,$ here . pos ,1 ) ~~ /\)| \]| \}| \» / {
6003
+ if substr (self . orig ,$ here . pos ,1 ) ~~ /\)| \]| \}| \» / {
6004
6004
$ m ~~ s |Confused |Unexpected closing bracket| and $ highvalid = False ;
6005
6005
}
6006
6006
0 commit comments