[t/spec] Add tricky tests (which pass after latest Rakudo patch), unfudge old simple...
[pugs.git] / examples / rules / yapc_schedule.pl
blob635491e97b9330c4325652e37e1a31a630b1383d
1 # for extracting data from the YAPC::NA 2006 schedule
2 # wget -O monday http://yapcchicago.org/the-schedule/monday
3 # pugs yapc_schedule.pl monday
5 grammar yapc_schedule {
6 rule schedule { <title> [ <talk> ]+ }
8 token title { '<title>' .+? '</title>' }
10 regex ws { .*? }
12 token talk { '<small>' <speaker> '</small>' }
14 token speaker { [\w|\s|\,]+ }
17 ### extract.pl
18 use v6;
20 my $content = slurp @*ARGS[0];
22 my $match = $content ~~ m/<yapc_schedule::schedule>/;
24 say $match.perl;