Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add missing results for examples
  • Loading branch information
tbrowder committed Oct 1, 2016
1 parent 8a9c656 commit 09662f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/Language/grammars.pod6
Expand Up @@ -37,8 +37,8 @@ Being named gives us the advantage of being able to easily reuse the regex
elsewhere:
=begin code :allow<B>
say "32.51" ~~ B<&number>;
say "15 + 4.5" ~~ /B<< <number> >>\s* '+' \s*B<< <number> >>/
say so "32.51" ~~ B<&number>; # True
say so "15 + 4.5" ~~ /B<< <number> >>\s* '+' \s*B<< <number> >>/ # True
=end code
B<C<regex>> isn't the only declarator for named regexes – in fact, it's the
Expand All @@ -62,8 +62,8 @@ into effect for the Regex:
=begin code :allow<B>
my token non-space-y { 'once' 'upon' 'a' 'time' }
my rule space-y { 'once' 'upon' 'a' 'time' }
say 'onceuponatime' ~~ &non-space-y;
say 'once upon a time' ~~ &space-y;
say so 'onceuponatime' ~~ &non-space-y; # True
say so 'once upon a time' ~~ &space-y; # True
=end code
=head1 X<Creating Grammars|class,Grammar;declarator,grammar>
Expand Down

0 comments on commit 09662f5

Please sign in to comment.