Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
oops, that should be xdigit, not hexdigit
  • Loading branch information
TimToady committed Sep 3, 2012
1 parent e3d3982 commit 9f91d53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions CursorBase.pmc
Expand Up @@ -1553,7 +1553,7 @@ sub ww { my $self = shift;
}
}

sub hexdigit { my $self = shift;
sub xdigit { my $self = shift;
local $CTX = $self->callm if DEBUG & DEBUG::trace_call;
my $P = $self->{_pos};
my $char = substr($::ORIG, $P, 1);
Expand All @@ -1562,16 +1562,16 @@ sub hexdigit { my $self = shift;
return $r->retm();
}
else {
# say "hexdigit didn't match $char at $P";
# say "xdigit didn't match $char at $P";
return ();
}
}

sub hexdigit_rev { my $self = shift;
sub xdigit_rev { my $self = shift;
local $CTX = $self->callm if DEBUG & DEBUG::trace_call;
my $from = $self->{_pos} - 1;
if ($from < 0) {
# say "hexdigit_rev didn't match $char at $from";
# say "xdigit_rev didn't match $char at $from";
return ();
}
my $char = substr($::ORIG, $from, 1);
Expand All @@ -1580,7 +1580,7 @@ sub hexdigit_rev { my $self = shift;
return $r->retm();
}
else {
# say "hexdigit_rev didn't match $char at $from";
# say "xdigit_rev didn't match $char at $from";
return ();
}
}
Expand Down
2 changes: 1 addition & 1 deletion STD.pm6
Expand Up @@ -770,7 +770,7 @@ token octint {
token hexints { [<.ws><hexint><.ws>] +% ',' }

token hexint {
<[ 0..9 a..f A..F ]>+ [ _ <[ 0..9 a..f A..F ]>+ ]*
<.xdigit>+ [ _ <.xdigit>+ ]*
}

token decints { [<.ws><decint><.ws>] +% ',' }
Expand Down
8 changes: 4 additions & 4 deletions STD_P5.pm6
Expand Up @@ -1134,7 +1134,7 @@ token p5number:numish { <numish> }
token integer {
[
| 0 [ b <[01]>+ [ _ <[01]>+ ]*
| x <.hexdigit>+ [ _ <.hexdigit>+ ]*
| x <.xdigit>+ [ _ <.xdigit>+ ]*
| d \d+ [ _ \d+]*
| <[0..7]>+ [ _ <[0..7]>+ ]*
]
Expand Down Expand Up @@ -1177,7 +1177,7 @@ token octint {
token hexints { [<.ws><hexint><.ws>] +% ',' }

token hexint {
<.hexdigit>+ [ _ <.hexdigit>+ ]*
<.xdigit>+ [ _ <.xdigit>+ ]*
}

##########
Expand Down Expand Up @@ -1501,7 +1501,7 @@ grammar Q is STD5 {
token p5backslash:N { <sym> '{' ~ '}' $<charname>=[.*?] }
token p5backslash:r { <sym> }
token p5backslash:t { <sym> }
token p5backslash:x { :dba('hex character') <sym> [ <.hexdigit> <.hexdigit>? | '{' ~ '}' <hexints> ] }
token p5backslash:x { :dba('hex character') <sym> [ <.xdigit> <.xdigit>? | '{' ~ '}' <hexints> ] }
# XXX viv doesn't support ** quantifiers yet
token p5backslash:sym<0> { :dba('octal character') <sym> [ [<[0..7]> [<[0..7]> <[0..7]>?]?]? | '{' ~ '}' <octints> ] }
} # end role
Expand Down Expand Up @@ -2600,7 +2600,7 @@ grammar Regex is STD {
token p5ccback:t { :i <sym> }
token p5ccback:v { :i <sym> }
token p5ccback:w { :i <sym> }
token p5ccback:x { :i :dba('hex character') <sym> [ <.hexdigit> <.hexdigit>? | '{' ~ '}' <hexints> ] }
token p5ccback:x { :i :dba('hex character') <sym> [ <.xdigit> <.xdigit>? | '{' ~ '}' <hexints> ] }
token p5ccback:sym<0> { :dba('octal character') <sym> [ [<[0..7]> [<[0..7]> <[0..7]>?]?]? | '{' ~ '}' <octints> ] }

token p5metachar:sym«(? )» {
Expand Down

0 comments on commit 9f91d53

Please sign in to comment.