<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="chrome://global/skin/" type="text/css"?><?xml-stylesheet href="takahashi.css" type="text/css"?><page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="presentation" xmlns:html="http:/www.w3.org/1999/xhtml" orient="vertical" onkeypress="Presentation.onKeyPress(event);"><html:textarea id="builtinCode" style="visibility: collapse">
Practical Extraction
with Perl 6
{{#q|Nathan Gray}}
----
Practical Extraction
with Perl 5
{{#q|Nathan Gray}}
----
s:g/5/6/;
----
Practical Extraction
with Perl {{#c|6}}
{{#q|Nathan Gray}}
----
http://pghpw.org/schedule.html
----
-talk:
presenter: brian d foy
title: Making Perl Work for You
-talk:
presenter: Beth Skwarecki
title: Make your database work for you
----
<tr>
<td class="time">9:45 AM</td>
<td class="beginner" rowspan="2">
<span class="talk"><a href="schedule/making_perl_work_for_you.html">Making Perl Work for You</a></span>
<span class="speaker"><tt>brian d foy</tt></span>
</td>
<td class="advanced">
<span class="talk"><a href="schedule/make_your_database_work_for_you.html">Make your database work for you</a></span>
<span class="speaker">Beth Skwarecki</span>
</td>
</tr>
----
<tr>
<td class="time">9:45 AM</td>
<td class="beginner" rowspan="2">
<span class="talk"><a href="schedule/making_perl_work_for_you.html">Making Perl Work for You</a></span>
<span class="speaker">{{#c|<tt>brian d foy</tt>}}</span>
</td>
<td class="advanced">
<span class="talk"><a href="schedule/make_your_database_work_for_you.html">Make your database work for you</a></span>
<span class="speaker">{{#c|Beth Skwarecki}}</span>
</td>
</tr>
----
package main;
my $content = slurp @*ARGS[0];
while (my $match = $content ~~ m:c /<talk>/) {
say $match;
}
----
package main;
my $content = slurp @*ARGS[0];
{{#c|for $content ~~ m:g /<talk>/ -> $match}} {
say $match;
}
----
package main;
my $content = slurp @*ARGS[0];
for $content ~~ m:g /{{#c|<talk>}}/ -> $match {
say $match;
}
----
use v6-alpha;
grammar workshop;
token {{#c|talk}} { <presenter> }
token presenter {
<'<span class="speaker">'> .+? <'</span>'>
}
----
use v6-alpha;
grammar workshop;
token talk { <presenter> }
token presenter {
<'<span class="speaker">'> {{#c|.+?}} <'</span>'>
}
----
<span class="speaker"><tt>brian d foy</tt></span>
<span class="speaker">Beth Skwarecki</span>
----
<span class="speaker">{{#c|<tt>brian d foy</tt>}}</span>
<span class="speaker">{{#c|Beth Skwarecki}}</span>
----
use v6-alpha;
grammar workshop;
token talk { <presenter> }
token presenter {
<'<span class="speaker">'> {{#c|<( .+? )>}} <'</span>'>
}
----
<tt>brian d foy</tt>
Beth Skwarecki
----
{{#c|<tt>}}brian d foy{{#c|</tt>}}
Beth Skwarecki
----
use v6-alpha;
grammar workshop;
token talk { <presenter> }
token presenter {
<'<span class="speaker">'> <( .+? )> <'</span>'>
{{#c|{ return strip_html($$/) } }}
}
----
brian d foy
Beth Skwarecki
----
<!-- want to show how to turn $match into a yml structure -->
use v6-alpha;
grammar workshop;
token talk {
<presenter>
{{#c|{ return { talk => $$<presenter> } } }}
}
token presenter {
<'<span class="speaker">'> <( .+? )> <'</span>'>
{{#c|{ return { presenter => strip_html($$/) } } }}
}
----
package main;
my $content = slurp @*ARGS[0];
for $content ~~ m:g /<talk>/ -> $match {
say {{#c|$$match.yaml}};
}
----
-talk:
presenter: brian d foy
-talk:
presenter: Beth Skwarecki
----
<tr>
<td class="time">9:45 AM</td>
<td class="beginner" rowspan="2">
<span class="talk"><a href="schedule/making_perl_work_for_you.html">{{#c|Making Perl Work for You}}</a></span>
<span class="speaker"><tt>brian d foy</tt></span>
</td>
<td class="advanced">
<span class="talk"><a href="schedule/make_your_database_work_for_you.html">{{#c|Make your database work for you}}</a></span>
<span class="speaker">Beth Skwarecki</span>
</td>
</tr>
----
use v6-alpha;
grammar workshop;
token talk {
<presenter>
{ return { talk => $$<presenter> } }
}
token presenter {
<'<span class="speaker">'> <( .+? )> <'</span>'>
{ return { presenter => strip_html($$/) } }
}
{{#c|token link { }}
{{#c| <'<a href="'> $<url> := (.+?) <'">'> $<label> := (.+?) <'</a>'> }}
{{#c|} }}
----
use v6-alpha;
grammar workshop;
token talk {
<title> <ws> <presenter>
{ return {
talk => { $$<presenter>, $$<title> }
} }
}
token presenter {
<'<span class="speaker">'> <( .+? )> <'</span>'>
{ return { presenter => strip_html($$/) } }
}
{{#c|token title { }}
{{#c| <'<span class="talk">'> <link> <'</span>'> }}
{{#c| { return { title => $<link><label> } } }}
{{#c|} }}
token link {
<'<a href="'> $<url> := (.+?) <'">'> $<label> := (.+?) <'</a>'>
}
----
use v6-alpha;
grammar workshop;
token talk {
{{#c|<title> <ws>}} <presenter>
{ return {
talk => {{#c|{ $$<presenter>, $$<title> } }}
} }
}
token presenter {
<'<span class="speaker">'> <( .+? )> <'</span>'>
{ return { presenter => strip_html($$/) } }
}
token title {
<'<span class="talk">'> <link> <'</span>'>
{ return { title => $<link><label> } }
}
token link {
<'<a href="'> $<url> := (.+?) <'">'> $<label> := (.+?) <'</a>'>
}
----
token title {
<'<span class="talk">'> <link> <'</span>'>
{ return { title => $<link><label> } }
}
----
$<link><label>
=
$<link>{'label'}
----
-talk:
presenter: brian d foy
title: Making Perl Work for You
-talk:
presenter: Beth Skwarecki
title: Make your database work for you
----
token talk {
<title> <ws> <presenter>
{ return {
talk => { $$<presenter>, $$<title> }
} }
}
----
{{#c|rule}} talk {
<title> <presenter>
{ return {
talk => { $$<presenter>, $$<title> }
} }
}
----
regex { ... }
----
regex :ratchet { ... }
=
token { ... }
----
token :sigspace { ... }
=
rule { ... }
----
rule talk {
<title> <presenter>
{ return {
talk => {
$$<presenter>,
$$<title>
}
} }
}
----
rule talk {
<title> <presenter>
{ return {
talk => {
:$<presenter>,
:$<title>
}
} }
}
----
token presenter {
<'<span class="speaker">'> <( .+? )> <'</span>'>
{ return { presenter => strip_html($$/) } }
}
----
token presenter {
<'<span class="speaker">'> <( .+? )> <'</span>'>
{ return strip_html($$/) }
}
----
rule talk {
<title> <presenter>
}
----
package main;
my $content = slurp @*ARGS[0];
for $content ~~ m:g /<talk>/ -> $match {
say $$match.yaml;
}
----
package main;
my $content = slurp @*ARGS[0];
for $content ~~ m:g /<talk>/ -> $match {
say hash($match.kv.map( -> $k, $v { $k => ~$v } )).yaml;
}
----
magic hand waving
----
-talk:
presenter: brian d foy
time: 9:45 AM
title: Making Perl Work for You
-talk:
presenter: Beth Skwarecki
time: 9:45 AM
title: Make your database work for you
----
{{#q|Thank you!}}
{{#c|☺}}
----
Credits
Larry Wall: creating the syntax and finding my typos
Audrey Tang: making my insane <ws> a reality and
syntax improvements
Patrick Michaud: writing PGE - my initial testing ground
Gaal Yahas: helping me realize I had to speak
Jerry Gay: syntax improvements
Flavio S. Glock: writing Pugs::Compiler::Rule and
implementing missing features in v6.pm
Capitol Advantage: employing Perl programmers (like me)
</html:textarea>
<deck flex="1" id="deck"><vbox flex="1" onmousemove="Presentation.onMouseMoveOnCanvas(event);"><toolbox id="canvasToolbar"><toolbar><toolbarbutton oncommand="Presentation.home()" label="|<<" observes="canBack"/><toolbarbutton oncommand="Presentation.back()" label="<" observes="canBack"/><toolbarbutton oncommand="Presentation.forward()" label=">" observes="canForward"/><toolbarbutton oncommand="Presentation.end()" label=">>|" observes="canForward"/><toolbarseparator/><hbox align="center"><textbox id="current_page" size="4" oninput="if (this.value) Presentation.showPage(parseInt(this.value)-1);"/><description value="/"/><description id="max_page"/></hbox><toolbarseparator/><vbox flex="2"><spacer flex="1"/><scrollbar id="scroller" align="center" orient="horizontal" oncommand="Presentation.showPage(parseInt(event.target.getAttribute('curpos')));" onclick="Presentation.showPage(parseInt(event.target.getAttribute('curpos')));" onmousedown="Presentation.onScrollerDragStart();" onmousemove="Presentation.onScrollerDragMove();" onmouseup="Presentation.onScrollerDragDrop();"/><spacer flex="1"/></vbox><toolbarseparator/><spacer flex="1"/><toolbarseparator/><toolbarbutton id="toggleEva" label="Eva" type="checkbox" autoCheck="false" oncommand="Presentation.toggleEvaMode();"/><toolbarseparator/><toolbarbutton label="Edit" oncommand="Presentation.toggleEditMode();"/><toolbarbutton oncommand="Presentation.reload();" label="Reload"/></toolbar></toolbox><vbox flex="1" id="canvas" onclick="Presentation.onPresentationClick(event);"><spacer flex="1"/><hbox flex="1"><spacer flex="1"/><vbox id="content"/><spacer flex="1"/></hbox><spacer flex="1"/></vbox></vbox><vbox flex="1" id="edit"><toolbox><toolbar><toolbarbutton label="New Page" oncommand="Presentation.addPage()"/><spacer flex="1"/><toolbarseparator/><toolbarbutton label="View" oncommand="Presentation.toggleEditMode();"/><toolbarbutton oncommand="Presentation.reload();" label="Reload"/></toolbar></toolbox><textbox id="textField" flex="1" multiline="true" oninput="Presentation.onEdit()"/><hbox collapsed="true"><iframe id="dataLoader" onload="if (window.Presentation) Presentation.onDataLoad();"/></hbox></vbox></deck><broadcasterset><broadcaster id="canBack"/><broadcaster id="canForward"/></broadcasterset><commandset><command id="cmd_forward" oncommand="if (Presentation.isPresentationMode) Presentation.forward();"/><command id="cmd_back" oncommand="if (Presentation.isPresentationMode) Presentation.back();"/><command id="cmd_home" oncommand="if (Presentation.isPresentationMode) Presentation.home();"/><command id="cmd_end" oncommand="if (Presentation.isPresentationMode) Presentation.end();"/></commandset><keyset><key keycode="VK_ENTER" command="cmd_forward"/><key keycode="VK_RETURN" command="cmd_forward"/><key key=" " command="cmd_forward"/><key keycode="VK_PAGE_DOWN" command="cmd_forward"/><key keycode="VK_RIGHT" command="cmd_forward"/><key keycode="VK_DOWN" command="cmd_forward"/><!--key keycode="VK_BACK_SPACE" command="cmd_back"/--><key keycode="VK_UP" command="cmd_back"/><key keycode="VK_PAGE_UP" command="cmd_back"/><!--<key keycode="VK_BACK_UP" command="cmd_back"/>--><!--<key keycode="VK_BACK_LEFT" command="cmd_back"/>--><key keycode="VK_HOME" command="cmd_home"/><!--<key keycode="VK_END" command="cmd_end"/>--><key key="n" modifiers="accel" oncommand="Presentation.addPage();"/><key key="r" modifiers="accel" oncommand="window.location.reload();"/><key key="e" modifiers="accel" oncommand="Presentation.toggleEditMode();"/><key key="a" modifiers="accel" oncommand="Presentation.toggleEvaMode();"/></keyset><script src="takahashi.js" type="application/x-javascript" /></page>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is the Takahashi-Method-based Presentation Tool in XUL.
-
- The Initial Developer of the Original Code is SHIMODA Hiroshi.
- Portions created by the Initial Developer are Copyright (C) 2005
- the Initial Developer. All Rights Reserved.
-
- Contributor(s): SHIMODA Hiroshi <piro@p.club.ne.jp>
-
- ***** END LICENSE BLOCK ***** -->