This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=config C<> :allow<R> | |
=begin pod | |
=head1 Basics | |
Binary grammars, henceforth referred to as "formats" (taken from e.g. "file | |
format"), are in my mind sketched as follows: | |
=item Formats work on the byte level (which for sanity's sake we'll consider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the EGC rule, in P6 form (UAX#29, Table 1b) | |
use v6; | |
# note that | alternatives in the Unicode syntax is really || in P6 syntax | |
# ("Note that given alternates (X|Y), the first match is taken.") | |
my token CRLF { <:GCB<CR>> <:GCB<LF>> } | |
my token RI-Sequence { <:GCB<Regional_Indicator>>+ } | |
my token Hangul-Syllable { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# safe quantifiers | |
use v6; | |
# you need to wrap your usage of the safe- calls in a <safe-start ...> call; | |
# this is so the dynvar works properly | |
my token safe-star($rx) { | |
[ <!{$*GOTNULL}> ($rx) [<?{$0[*-1] ~~ ""}> {$*GOTNULL = True}]? ]* | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin pod | |
Before para | |
=table | |
+-----+----+---+ | |
| a | b | c | | |
+-----+----+---+ | |
| foo | 52 | Y | | |
| bar | 17 | N | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently, to specify a list item with a sublist, you use successive =itemN | |
blocks, where N is the next level of list: | |
=item These are some of Perl 6's number types: | |
=item2 Int | |
=item2 Rat | |
=item2 Num | |
=item2 Complex | |
In this format, it happens to work fine. However, when you use delimited item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Saw 1 call to deprecated code during execution. | |
================================================================================ | |
%head = { ... } called at: | |
/home/matthew/.perl6/2014.06-61-g25c5114/lib/Pod/To/HTML.pm, line 155 | |
Please use %head = ... instead. | |
-------------------------------------------------------------------------------- | |
Please contact the author to have these calls to deprecated code adapted, | |
so that this message will disappear! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTOR LIST | |
General layout: | |
ACTOR # <number> '<description>' | |
Using object(s) <objects> | |
Variable fields: | |
Field: <description> (Bitmask: <bits> / <nybbles>) | |
<Pre-shifted value> (<raw number, if different>) --- <description> | |
When adding up field values for the variable, use the pre-shifted values, NOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my token wikilink { | |
"[[" ~ "]]" [ | |
<( | |
[ <!before "]]"> . ]+ | |
)> | |
] | |
}; | |
sub percent-char($str) { | |
[~] $str.encode('utf-8').list.map: {"%" ~ $_.fmt("%02X")}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
my regex atom { \N } | |
my regex foo { (<atom>)+ } | |
my regex bar { (<.atom>)+ } | |
my regex baz { ($<atom>=(\N))+ } | |
my regex quux { (\N)+ } | |
say "TEST 1: Many positional captures of capturing subrule"; | |
"ABC" ~~ /<foo>/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make p-all | |
/usr/bin/perl5.16.3 tools/build/gen-cat.pl parrot src/core/core_prologue.pm src/core/traits.pm src/core/Positional.pm src/core/Associative.pm src/core/Callable.pm src/core/natives.pm src/core/stubs.pm src/core/control.pm src/core/Mu.pm src/core/Stringy.pm src/core/Any.pm src/core/array_slice.pm src/core/hash_slice.pm src/core/Scalar.pm src/core/Code.pm src/core/WhateverCode.pm src/core/Block.pm src/core/Attribute.pm src/core/Variable.pm src/core/Routine.pm src/core/Sub.pm src/core/Macro.pm src/core/Method.pm src/core/Submethod.pm src/core/Junction.pm src/core/Cool.pm src/core/Enumeration.pm src/core/Whatever.pm src/core/Bool.pm src/core/Numeric.pm src/core/Real.pm src/core/Int.pm src/core/Order.pm src/core/UInt64.pm src/core/Num.pm src/core/Buf.pm src/core/Str.pm src/core/Capture.pm src/core/Parcel.pm src/core/Iterable.pm src/core/Iterator.pm src/core/Nil.pm src/core/Range.pm src/core/ListIter.pm src/core/MapIter.pm src/core/GatherIter.pm src/core/List.pm src/core/LoL.pm src/core/Array.pm src/cor |
NewerOlder