diff options
author | Zoffix Znet <cpan@zoffix.com> | 2015-12-05 16:35:19 -0500 |
---|---|---|
committer | Zoffix Znet <cpan@zoffix.com> | 2015-12-05 16:35:19 -0500 |
commit | e0b2a598b9475edcfca40b7cb4faa7746232a30c (patch) | |
tree | 4ead7309e8b2998690b43020952bfddffefddb11 /test.p6 | |
parent | 976aaa5e7caa5506ead757bb511207462526cb26 (diff) |
Moar changes
Diffstat (limited to 'test.p6')
-rw-r--r-- | test.p6 | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1,6 +1,6 @@ use v6; grammar IRC::Grammar:ver<1.001001> { - token TOP { <message> } + token TOP { <message>+ } token SPACE { ' '+ } token message { [':' <prefix> <SPACE> ]? <command> <params> \n } token prefix { @@ -21,6 +21,14 @@ grammar IRC::Grammar:ver<1.001001> { token special { <[-\[\]\\`^{}]> } } +class IRC::Grammar::Actions{ + method TOP ($/) { $/.make: $<message>>>.made } +} + +say IRC::Grammar.parse(":verne.freenode.net 372 Perl6IRC :- running for their sustained support.\r\n"); + +=finish + my @messages = ( ":verne.freenode.net 372 Perl6IRC :- running for their sustained support.\r\n", ":Perl6IRC MODE Perl6IRC :+i\r\n", @@ -30,5 +38,5 @@ my @messages = ( ":ZoffixW!~ZoffixW@unaffiliated/zoffix JOIN #perl6bot\r\n", ":ZoffixW!~ZoffixW@unaffiliated/zoffix PRIVMSG #perl6bot :test\r\n", ); -say so IRC::Grammar.parse(@messages[$_]) for 0..@messages.elems-1; +# say so IRC::Grammar.parse(@messages[$_]) for 0..@messages.elems-1; # say IRC::Grammar.parse(":verne.freenode.net 372 Perl6IRC :- running for their sustained support.\r\n"); |