diff --git a/0123_t.pl b/0123_t.pl new file mode 100644 index 0000000..c4f4ebf --- /dev/null +++ b/0123_t.pl @@ -0,0 +1,5 @@ +use feature 'signatures'; + +sub normal_signature ($foo) {} + +sub slurpy_signature ($foo, @) {} diff --git a/N.pl b/N.pl new file mode 100644 index 0000000..81bca7e --- /dev/null +++ b/N.pl @@ -0,0 +1,5 @@ +$_ = "The brown fox jumps over the lazy dog"; +/the (\S+)(?{ $color = $^N }) (\S+)(?{ $animal = $^N })/i; +print "color = $color, animal = $animal\n"; +print $^R."\n"; +print $^R->[1]."\n"; diff --git a/amelia_1.pl b/amelia_1.pl new file mode 100644 index 0000000..d384a76 --- /dev/null +++ b/amelia_1.pl @@ -0,0 +1,10 @@ +use v5.10; +$_ = <<'HERE'; +Amelia said "I am a camel" +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + ( ['"] ) + /x; diff --git a/amelia_1.pl.bak b/amelia_1.pl.bak new file mode 100644 index 0000000..821ee2d --- /dev/null +++ b/amelia_1.pl.bak @@ -0,0 +1,9 @@ +$_ = <<'HERE'; +Amelia said "I am a camel" +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + ( ['"] ) + /x; diff --git a/amelia_10.pl b/amelia_10.pl new file mode 100644 index 0000000..40dcb34 --- /dev/null +++ b/amelia_10.pl @@ -0,0 +1,27 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +my @matches; + +say "Matched!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + (? + ( + (?(?"E_MARK)) + + (?: + (?&NOT_QUOTE_MARK)++ + (?"E) + )* + \g{quote} + ) + (?{ [ @{$^R}, $^N ] }) + ) + ) + (?"E) (?{ @matches=@{ $^R } }) + /x; + diff --git a/amelia_11.pl b/amelia_11.pl new file mode 100644 index 0000000..9a13b9c --- /dev/null +++ b/amelia_11.pl @@ -0,0 +1,27 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +my @matches; + +say "Matched!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + (? + ( + (?(?"E_MARK)) + + (?: + (?&NOT_QUOTE_MARK)++ + | + (?"E) + )* + \g{quote} + ) + (?{ [ @{$^R}, $^N ] }) + ) + ) + (?"E) (?{ @matches = @{ $^R } }) + /x; diff --git a/amelia_2.pl b/amelia_2.pl new file mode 100644 index 0000000..47bc9a2 --- /dev/null +++ b/amelia_2.pl @@ -0,0 +1,10 @@ +use v5.10; +$_ = <<'HERE'; +Amelia said "I am a camel" +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + ( \1 ) + /x; diff --git a/amelia_3.pl b/amelia_3.pl new file mode 100644 index 0000000..51d5082 --- /dev/null +++ b/amelia_3.pl @@ -0,0 +1,10 @@ +use v5.10; +$_ = <<'HERE'; +Amelia said "I am a camel" +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + (?1) + /x; diff --git a/amelia_4.pl b/amelia_4.pl new file mode 100644 index 0000000..e9456b8 --- /dev/null +++ b/amelia_4.pl @@ -0,0 +1,10 @@ +use v5.10; +$_ = <<'HERE'; +Amelia said "I am a camel' +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + (?1) + /x; diff --git a/amelia_5.pl b/amelia_5.pl new file mode 100644 index 0000000..7d91185 --- /dev/null +++ b/amelia_5.pl @@ -0,0 +1,16 @@ +use v5.18; +$_ = <<'HERE'; +He said 'Amelia said "I am a camel"' +HERE + +say "Matched [$+{said}]!" if m/ + (? #$1 + (?['"]) + (?: + [^'"]++ + | + (? (?1) ) + )* + \g{quote} + ) + /x; diff --git a/amelia_6.pl b/amelia_6.pl new file mode 100644 index 0000000..60c900f --- /dev/null +++ b/amelia_6.pl @@ -0,0 +1,17 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +say "Matched [$+{said}]!" if m/ + (? #$1 + (?['"]) + (?: + [^'"]++ + | + (?R) + )* + \g{quote} + ) + (?{say "Inside regex: $+{said}"}) + /x; diff --git a/amelia_7.pl b/amelia_7.pl new file mode 100644 index 0000000..1fb5e50 --- /dev/null +++ b/amelia_7.pl @@ -0,0 +1,23 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + + +say "Matched [$+{said}]!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + ) + (? + (?(?"E)) + (?: + (?&NOT_QUOTE)++ + | + (?R) + )* + \g{quote} + ) + (?{ say "Inside regex: $+{said}" }) + /x; + diff --git a/amelia_8.pl b/amelia_8.pl new file mode 100644 index 0000000..5ecdb18 --- /dev/null +++ b/amelia_8.pl @@ -0,0 +1,26 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +my @matches; + +say "Matched [$+{said}]!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + ) + (? + (?(?"E)) + (?: + (?&NOT_QUOTE)++ + | + (?R) + )* + \g{quote} + ) + (?{ push @matches, $^N }) + /x; + +say "\n".join '|',@matches; + diff --git a/amelia_9.pl b/amelia_9.pl new file mode 100644 index 0000000..907a4de --- /dev/null +++ b/amelia_9.pl @@ -0,0 +1,27 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +my @matches; + +say "Matched!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + (? + ( + (?(?"E_MARK)) + + (?: + (?&NOT_QUOTE_MARK)++ + (?"E) + )* + \g{quote} + ) + (?{ push @matches, $^N }) + ) + ) + (?"E) + /x; + diff --git a/buggy.pl b/buggy.pl new file mode 100644 index 0000000..460063e --- /dev/null +++ b/buggy.pl @@ -0,0 +1,8 @@ +#!/usr/bin/perl +use Modern::Perl; + +my $i = 1; +while ($i & 8 == 0 || $i & 256 == 0){ + ++$i; + } + print $i, "\n"; diff --git a/json.pl b/json.pl new file mode 100644 index 0000000..99c9b4d --- /dev/null +++ b/json.pl @@ -0,0 +1,106 @@ +#!/usr/bin/env perl + +use Data::Dumper qw(Dumper); + +my $FROM_JSON = qr{ + +(?&VALUE) (?{ $_ = $^R->[1] }) + +(?(DEFINE) + +(? + (?{ [$^R, {}] }) + \{ + (?: (?&KV) # [[$^R, {}], $k, $v] + (?{ # warn Dumper { obj1 => $^R }; + [$^R->[0][0], {$^R->[1] => $^R->[2]}] }) + (?: , (?&KV) # [[$^R, {...}], $k, $v] + (?{ # warn Dumper { obj2 => $^R }; + [$^R->[0][0], {%{$^R->[0][1]}, $^R->[1] => $^R->[2]}] }) + )* + )? + \} +) + +(? + (?&STRING) # [$^R, "string"] + : (?&VALUE) # [[$^R, "string"], $value] + (?{ # warn Dumper { kv => $^R }; + [$^R->[0][0], $^R->[0][1], $^R->[1]] }) +) + +(? + (?{ [$^R, []] }) + \[ + (?: (?&VALUE) (?{ [$^R->[0][0], [$^R->[1]]] }) + (?: , (?&VALUE) (?{ # warn Dumper { atwo => $^R }; + [$^R->[0][0], [@{$^R->[0][1]}, $^R->[1]]] }) + )* + )? + \] +) + +(? + \s* + ( + (?&STRING) + | + (?&NUMBER) + | + (?&OBJECT) + | + (?&ARRAY) + | + true (?{ [$^R, 1] }) + | + false (?{ [$^R, 0] }) + | + null (?{ [$^R, undef] }) + ) + \s* +) + +(? + ( + " + (?: + [^\\"]+ + | + \\ ["\\/bfnrt] +# | +# \\ u [0-9a-fA-f]{4} + )* + " + ) + + (?{ [$^R, eval $^N] }) +) + +(? + ( + -? + (?: 0 | [1-9]\d* ) + (?: \. \d+ )? + (?: [eE] [-+]? \d+ )? + ) + + (?{ [$^R, eval $^N] }) +) + +) }xms; + +sub from_json { + local $_ = shift; + local $^R; + eval { m{\A$FROM_JSON\z}; } and return $_; + die $@ if $@; + return 'no match'; +} + +while (<>) { + chomp; + print Dumper from_json($_); +} + + + diff --git a/regex_recursion/.help b/regex_recursion/.help new file mode 100644 index 0000000..33348ca --- /dev/null +++ b/regex_recursion/.help @@ -0,0 +1,15 @@ + + Advance + Go back + + ?? Help + QQ Quit Vroom + + RR Run slide as a program + VV vroom vroom + EE Edit file under cursor + OO Open file under cursor (Mac OS X) + + + (Press SPACE to leave Help screen and continue) + diff --git a/regex_recursion/.vimrc b/regex_recursion/.vimrc new file mode 100644 index 0000000..4c66c6b --- /dev/null +++ b/regex_recursion/.vimrc @@ -0,0 +1,29 @@ +" This .vimrc file was created by Vroom-0.37 +set nocompatible +syntax on + +map :n:gg +map :N:gg +map R :!vroom -run % +map RR :!vroom -run % +map AA :call RunNow(): +map VV :!vroom -vroom +map QQ :q! +map OO :!open +map EE :e +map !! G:!open +map ?? :e .help +set laststatus=2 +set statusline=%-20f\ Recursion\ in\ Regex! + +" Overrides from /home/mishin/.vroom/vimrc + + +" Values from slides.vroom config section. (under 'vimrc') +set statusline=%-3f\ \ \ \ \ Recursioni\ in\ Regex\ (or:\ How\ parse\ IBM\ Datastage\ dsx\ file) +map 3 +map 2 +map 5 +map 11 +map MSM ouse Method::Signatures::Modifiers; + diff --git a/regex_recursion/001 b/regex_recursion/001 new file mode 100644 index 0000000..bfd945a --- /dev/null +++ b/regex_recursion/001 @@ -0,0 +1,22 @@ + + + + + + + + Recursion in Regex + + or + + How parse IBM Datastage dsx file? + + + + + + + + + + diff --git a/regex_recursion/002 b/regex_recursion/002 new file mode 100644 index 0000000..6190674 --- /dev/null +++ b/regex_recursion/002 @@ -0,0 +1,22 @@ + + + + Inspired by + + Parsing JSON with a single regex + + brian d _foy + + http://blogs.perl.org/users/brian_d_foy + /2013/10/parsing-json-with-a-single-regex.html + + and Buddy Burden + + http://blogs.perl.org/users/buddy_burden + /2013/06/slideshows-in-vroom-so-noted.html + + + + + + diff --git a/regex_recursion/003.pl b/regex_recursion/003.pl new file mode 100644 index 0000000..2e3e13c --- /dev/null +++ b/regex_recursion/003.pl @@ -0,0 +1,22 @@ + + + + + + use v5.10; + $_ = <<'HERE'; + Amelia said "I am a camel" + HERE + + say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + ( ['"] ) + /x; + + + + + + + diff --git a/regex_recursion/004.pl b/regex_recursion/004.pl new file mode 100644 index 0000000..a467845 --- /dev/null +++ b/regex_recursion/004.pl @@ -0,0 +1,22 @@ + + + + + + use v5.10; + $_ = <<'HERE'; + Amelia said "I am a camel" + HERE + + say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + ( \1 ) + /x; + + + + + + + diff --git a/regex_recursion/005.pl b/regex_recursion/005.pl new file mode 100644 index 0000000..07d2577 --- /dev/null +++ b/regex_recursion/005.pl @@ -0,0 +1,22 @@ + + + + + + use v5.10; + $_ = <<'HERE'; + Amelia said "I am a camel" + HERE + + say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + (?1) + /x; + + + + + + + diff --git a/regex_recursion/006.pl b/regex_recursion/006.pl new file mode 100644 index 0000000..62407a6 --- /dev/null +++ b/regex_recursion/006.pl @@ -0,0 +1,22 @@ + + + + + + use v5.10; + $_ = <<'HERE'; + Amelia said "I am a camel' + HERE + + say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + (?1) + /x; + + + + + + + diff --git a/regex_recursion/007.pl b/regex_recursion/007.pl new file mode 100644 index 0000000..7e62f6d --- /dev/null +++ b/regex_recursion/007.pl @@ -0,0 +1,22 @@ + + + use v5.18; + $_ = <<'HERE'; + He said 'Amelia said "I am a camel"' + HERE + + say "Matched [$+{said}]!" if m/ + (? #$1 + (?['"]) + (?: + [^'"]++ + | + (? (?1) ) + )* + \g{quote} + ) + /x; + + + + diff --git a/regex_recursion/008.pl b/regex_recursion/008.pl new file mode 100644 index 0000000..7fbc171 --- /dev/null +++ b/regex_recursion/008.pl @@ -0,0 +1,22 @@ + + use v5.18; + $_ = <<'HERE'; + Out "Top 'Middle "Bottom" Middle' Out" + HERE + + say "Matched [$+{said}]!" if m/ + (? #$1 + (?['"]) + (?: + [^'"]++ + | + (?R) + )* + \g{quote} + ) + (?{say "Inside regex: $+{said}"}) + /x; + + + + diff --git a/regex_recursion/009.pl b/regex_recursion/009.pl new file mode 100644 index 0000000..a66329c --- /dev/null +++ b/regex_recursion/009.pl @@ -0,0 +1,22 @@ + use v5.18; + $_ = <<'HERE'; + Out "Top 'Middle "Bottom" Middle' Out" + HERE + + + say "Matched [$+{said}]!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + ) + (? + (?(?"E)) + (?: + (?&NOT_QUOTE)++ + | + (?R) + )* + \g{quote} + ) + (?{ say "Inside regex: $+{said}" }) + /x; diff --git a/regex_recursion/010.pl b/regex_recursion/010.pl new file mode 100644 index 0000000..1da8bcc --- /dev/null +++ b/regex_recursion/010.pl @@ -0,0 +1,25 @@ + use v5.18; + $_ = <<'HERE'; + Out "Top 'Middle "Bottom" Middle' Out" + HERE + + my @matches; + + say "Matched [$+{said}]!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + ) + (? + (?(?"E)) + (?: + (?&NOT_QUOTE)++ + | + (?R) + )* + \g{quote} + ) + (?{ push @matches, $^N }) + /x; + + say "\n".join '|',@matches; diff --git a/regex_recursion/011.pl b/regex_recursion/011.pl new file mode 100644 index 0000000..6dcb6db --- /dev/null +++ b/regex_recursion/011.pl @@ -0,0 +1,26 @@ + use v5.18; + $_ = <<'HERE'; + Out "Top 'Middle "Bottom" Middle' Out" + HERE + + my @matches; + + say "Matched!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + (? + ( + (?(?"E_MARK)) + + (?: + (?&NOT_QUOTE_MARK)++ + (?"E) + )* + \g{quote} + ) + (?{ push @matches, $^N }) + ) + ) + (?"E) + /x; diff --git a/regex_recursion/012.pl b/regex_recursion/012.pl new file mode 100644 index 0000000..b7e4215 --- /dev/null +++ b/regex_recursion/012.pl @@ -0,0 +1,26 @@ + use v5.18; + $_ = <<'HERE'; + Out "Top 'Middle "Bottom" Middle' Out" + HERE + + my @matches; + + say "Matched!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + (? + ( + (?(?"E_MARK)) + + (?: + (?&NOT_QUOTE_MARK)++ + (?"E) + )* + \g{quote} + ) + (?{ [ @{$^R}, $^N ] }) + ) + ) + (?"E) (?{ @matches=@{ $^R } }) + /x; diff --git a/regex_recursion/013 b/regex_recursion/013 new file mode 100644 index 0000000..4a1342d --- /dev/null +++ b/regex_recursion/013 @@ -0,0 +1,22 @@ + + + + + + + Slideshows in Vim + + * Hate using PowerPoint or HTML Slides for Talks? + + + + + + + + + + + + + diff --git a/regex_recursion/013b b/regex_recursion/013b new file mode 100644 index 0000000..e134524 --- /dev/null +++ b/regex_recursion/013b @@ -0,0 +1,23 @@ + + + + + + + Slideshows in Vim + + * Hate using PowerPoint or HTML Slides for Talks? + * Use Vroom! + + + + + + + + + + + + + diff --git a/regex_recursion/013z b/regex_recursion/013z new file mode 100644 index 0000000..d4c1c5b --- /dev/null +++ b/regex_recursion/013z @@ -0,0 +1,22 @@ + + + + + + + Slideshows in Vim + + * Hate using PowerPoint or HTML Slides for Talks? + * Use Vroom! + + * You can write you slides in Vim... + * ...and present them in Vim! + + + + + + + + + diff --git a/regex_recursion/014 b/regex_recursion/014 new file mode 100644 index 0000000..140ae0e --- /dev/null +++ b/regex_recursion/014 @@ -0,0 +1,22 @@ + + + + + + + + Getting Started + + * Write a file called 'slides.vroom'. + * Do this in a new directory. + * Run 'vroom vroom'. + * Voilà! + + + + + + + + + diff --git a/regex_recursion/015 b/regex_recursion/015 new file mode 100644 index 0000000..0283cea --- /dev/null +++ b/regex_recursion/015 @@ -0,0 +1,22 @@ + + + + + + + + Navigation + + * Hit to move forward. + * Hit to go backwards. + * Hit 'Q' to quit. + + + + + + + + + + diff --git a/regex_recursion/016.pl b/regex_recursion/016.pl new file mode 100644 index 0000000..f465acc --- /dev/null +++ b/regex_recursion/016.pl @@ -0,0 +1,22 @@ + + + + + + + + # This is some Perl code. + # Notice the syntax highlighting. + # Run it with the vim command. + for my $word (qw(Vroom totally rocks!)) { + print "$word\n"; + } + + + + + + + + + diff --git a/regex_recursion/017 b/regex_recursion/017 new file mode 100644 index 0000000..ac2c24d --- /dev/null +++ b/regex_recursion/017 @@ -0,0 +1,22 @@ + + + + + + + + + Get Vroom! + + * http://search.cpan.org/dist/Vroom/ + * http://github.com/ingydotnet/vroom-pm/ + + + + + + + + + + diff --git a/regex_recursion/018 b/regex_recursion/018 new file mode 100644 index 0000000..64d9823 --- /dev/null +++ b/regex_recursion/018 @@ -0,0 +1,22 @@ + + + + + + + + + Vroom as HTML + + * http://ingydotnet.github.com/vroom-pm/ + + + + + + + + + + + diff --git a/regex_recursion/019 b/regex_recursion/019 new file mode 100644 index 0000000..045082c --- /dev/null +++ b/regex_recursion/019 @@ -0,0 +1,22 @@ + + + + + + + + + + The End + + + + + + + + + + + + diff --git a/regex_recursion/MShowto.pdf b/regex_recursion/MShowto.pdf new file mode 100644 index 0000000..8e44975 Binary files /dev/null and b/regex_recursion/MShowto.pdf differ diff --git a/regex_recursion/Recursion_in_Regex.pdf b/regex_recursion/Recursion_in_Regex.pdf new file mode 100644 index 0000000..668636a Binary files /dev/null and b/regex_recursion/Recursion_in_Regex.pdf differ diff --git a/regex_recursion/amelia_1.pl b/regex_recursion/amelia_1.pl new file mode 100644 index 0000000..d384a76 --- /dev/null +++ b/regex_recursion/amelia_1.pl @@ -0,0 +1,10 @@ +use v5.10; +$_ = <<'HERE'; +Amelia said "I am a camel" +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + ( ['"] ) + /x; diff --git a/regex_recursion/amelia_1.pl.bak b/regex_recursion/amelia_1.pl.bak new file mode 100644 index 0000000..821ee2d --- /dev/null +++ b/regex_recursion/amelia_1.pl.bak @@ -0,0 +1,9 @@ +$_ = <<'HERE'; +Amelia said "I am a camel" +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + ( ['"] ) + /x; diff --git a/regex_recursion/amelia_10.pl b/regex_recursion/amelia_10.pl new file mode 100644 index 0000000..40dcb34 --- /dev/null +++ b/regex_recursion/amelia_10.pl @@ -0,0 +1,27 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +my @matches; + +say "Matched!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + (? + ( + (?(?"E_MARK)) + + (?: + (?&NOT_QUOTE_MARK)++ + (?"E) + )* + \g{quote} + ) + (?{ [ @{$^R}, $^N ] }) + ) + ) + (?"E) (?{ @matches=@{ $^R } }) + /x; + diff --git a/regex_recursion/amelia_11.pl b/regex_recursion/amelia_11.pl new file mode 100644 index 0000000..9a13b9c --- /dev/null +++ b/regex_recursion/amelia_11.pl @@ -0,0 +1,27 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +my @matches; + +say "Matched!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + (? + ( + (?(?"E_MARK)) + + (?: + (?&NOT_QUOTE_MARK)++ + | + (?"E) + )* + \g{quote} + ) + (?{ [ @{$^R}, $^N ] }) + ) + ) + (?"E) (?{ @matches = @{ $^R } }) + /x; diff --git a/regex_recursion/amelia_2.pl b/regex_recursion/amelia_2.pl new file mode 100644 index 0000000..47bc9a2 --- /dev/null +++ b/regex_recursion/amelia_2.pl @@ -0,0 +1,10 @@ +use v5.10; +$_ = <<'HERE'; +Amelia said "I am a camel" +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + ( \1 ) + /x; diff --git a/regex_recursion/amelia_3.pl b/regex_recursion/amelia_3.pl new file mode 100644 index 0000000..51d5082 --- /dev/null +++ b/regex_recursion/amelia_3.pl @@ -0,0 +1,10 @@ +use v5.10; +$_ = <<'HERE'; +Amelia said "I am a camel" +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + (?1) + /x; diff --git a/regex_recursion/amelia_4.pl b/regex_recursion/amelia_4.pl new file mode 100644 index 0000000..e9456b8 --- /dev/null +++ b/regex_recursion/amelia_4.pl @@ -0,0 +1,10 @@ +use v5.10; +$_ = <<'HERE'; +Amelia said "I am a camel' +HERE + +say "Matched [$+{said}]!" if m/ + ( ['"] ) + (?.*?) + (?1) + /x; diff --git a/regex_recursion/amelia_5.pl b/regex_recursion/amelia_5.pl new file mode 100644 index 0000000..7d91185 --- /dev/null +++ b/regex_recursion/amelia_5.pl @@ -0,0 +1,16 @@ +use v5.18; +$_ = <<'HERE'; +He said 'Amelia said "I am a camel"' +HERE + +say "Matched [$+{said}]!" if m/ + (? #$1 + (?['"]) + (?: + [^'"]++ + | + (? (?1) ) + )* + \g{quote} + ) + /x; diff --git a/regex_recursion/amelia_6.pl b/regex_recursion/amelia_6.pl new file mode 100644 index 0000000..60c900f --- /dev/null +++ b/regex_recursion/amelia_6.pl @@ -0,0 +1,17 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +say "Matched [$+{said}]!" if m/ + (? #$1 + (?['"]) + (?: + [^'"]++ + | + (?R) + )* + \g{quote} + ) + (?{say "Inside regex: $+{said}"}) + /x; diff --git a/regex_recursion/amelia_7.pl b/regex_recursion/amelia_7.pl new file mode 100644 index 0000000..1fb5e50 --- /dev/null +++ b/regex_recursion/amelia_7.pl @@ -0,0 +1,23 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + + +say "Matched [$+{said}]!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + ) + (? + (?(?"E)) + (?: + (?&NOT_QUOTE)++ + | + (?R) + )* + \g{quote} + ) + (?{ say "Inside regex: $+{said}" }) + /x; + diff --git a/regex_recursion/amelia_8.pl b/regex_recursion/amelia_8.pl new file mode 100644 index 0000000..5ecdb18 --- /dev/null +++ b/regex_recursion/amelia_8.pl @@ -0,0 +1,26 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +my @matches; + +say "Matched [$+{said}]!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + ) + (? + (?(?"E)) + (?: + (?&NOT_QUOTE)++ + | + (?R) + )* + \g{quote} + ) + (?{ push @matches, $^N }) + /x; + +say "\n".join '|',@matches; + diff --git a/regex_recursion/amelia_9.pl b/regex_recursion/amelia_9.pl new file mode 100644 index 0000000..907a4de --- /dev/null +++ b/regex_recursion/amelia_9.pl @@ -0,0 +1,27 @@ +use v5.18; +$_ = <<'HERE'; +Out "Top 'Middle "Bottom" Middle' Out" +HERE + +my @matches; + +say "Matched!" if m/ + (?(DEFINE) + (? ['"]) + (? [^'"]) + (? + ( + (?(?"E_MARK)) + + (?: + (?&NOT_QUOTE_MARK)++ + (?"E) + )* + \g{quote} + ) + (?{ push @matches, $^N }) + ) + ) + (?"E) + /x; + diff --git a/regex_recursion/html/001.html b/regex_recursion/html/001.html new file mode 100644 index 0000000..dc1f6a8 --- /dev/null +++ b/regex_recursion/html/001.html @@ -0,0 +1,57 @@ + + +Title Slide + + + + +
+
+
+
+
+
+
+
+                                 Recursion in Regex
+
+                                         or
+
+                          How parse IBM Datastage dsx file?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Today we'll talk about recursion in regular expressions

+
+ + diff --git a/regex_recursion/html/002.html b/regex_recursion/html/002.html new file mode 100644 index 0000000..2584591 --- /dev/null +++ b/regex_recursion/html/002.html @@ -0,0 +1,57 @@ + + +Slide 2 + + + + +
+
+
+
+                                     Inspired by
+
+                          Parsing JSON with a single regex
+
+                                    brian d _foy
+
+                       http://blogs.perl.org/users/brian_d_foy
+                   /2013/10/parsing-json-with-a-single-regex.html
+
+                                  and  Buddy Burden
+
+                      http://blogs.perl.org/users/buddy_burden
+                     /2013/06/slideshows-in-vroom-so-noted.html
+
+
+
+
+
+
+
+
+
+
+

Actually I am delighted by Brian D Foy as

He plays with regexes

+
+ + diff --git a/regex_recursion/html/003.pl.html b/regex_recursion/html/003.pl.html new file mode 100644 index 0000000..e77d46f --- /dev/null +++ b/regex_recursion/html/003.pl.html @@ -0,0 +1,57 @@ + + +Plain regular expression example + + + + +
+
+
+
+
+
+            use v5.10;
+            $_ = <<'HERE';
+            Amelia said "I am a camel"
+            HERE
+
+            say "Matched [$+{said}]!" if m/
+                       ( ['"] )
+                       (?<said>.*?)
+                       ( ['"] )
+                       /x;
+
+
+
+
+
+
+
+
+
+
+
+

Here we know that% $ + this hash contains named

brackets

+
+ + diff --git a/regex_recursion/html/004.pl.html b/regex_recursion/html/004.pl.html new file mode 100644 index 0000000..e99272f --- /dev/null +++ b/regex_recursion/html/004.pl.html @@ -0,0 +1,57 @@ + + +Slide 4 + + + + +
+
+
+
+
+
+     use v5.10;
+     $_ = <<'HERE';
+     Amelia said "I am a camel"
+     HERE
+
+     say "Matched [$+{said}]!" if m/
+                ( ['"] )
+                (?<said>.*?)
+                ( \1 )
+                /x;
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/005.pl.html b/regex_recursion/html/005.pl.html new file mode 100644 index 0000000..adc40a8 --- /dev/null +++ b/regex_recursion/html/005.pl.html @@ -0,0 +1,57 @@ + + +Slide 5 + + + + +
+
+
+
+
+
+    use v5.10;
+    $_ = <<'HERE';
+    Amelia said "I am a camel"
+    HERE
+
+    say "Matched [$+{said}]!" if m/
+               ( ['"] )
+               (?<said>.*?)
+               (?1)
+               /x;
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/006.pl.html b/regex_recursion/html/006.pl.html new file mode 100644 index 0000000..e516a4a --- /dev/null +++ b/regex_recursion/html/006.pl.html @@ -0,0 +1,57 @@ + + +Slide 6 + + + + +
+
+
+
+
+
+    use v5.10;
+    $_ = <<'HERE';
+    Amelia said "I am a camel'
+    HERE
+
+    say "Matched [$+{said}]!" if m/
+               ( ['"] )
+               (?<said>.*?)
+               (?1)
+               /x;
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/007.pl.html b/regex_recursion/html/007.pl.html new file mode 100644 index 0000000..f3ea059 --- /dev/null +++ b/regex_recursion/html/007.pl.html @@ -0,0 +1,57 @@ + + +Slide 7 + + + + +
+
+
+    use v5.18;
+    $_ = <<'HERE';
+    He said 'Amelia said "I am a camel"'
+    HERE
+
+    say "Matched [$+{said}]!" if m/
+               (?<said>              #$1
+               (?<quote>['"])
+                      (?:
+                          [^'"]++
+                          |
+                          (?<said> (?1) )
+                      )*
+               \g{quote}
+               )
+               /x;
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/008.pl.html b/regex_recursion/html/008.pl.html new file mode 100644 index 0000000..dee891f --- /dev/null +++ b/regex_recursion/html/008.pl.html @@ -0,0 +1,57 @@ + + +Slide 8 + + + + +
+
+    use v5.18;
+    $_ = <<'HERE';
+    Out "Top 'Middle "Bottom" Middle' Out"
+    HERE
+
+    say "Matched [$+{said}]!" if m/
+               (?<said>              #$1
+               (?<quote>['"])
+                      (?:
+                          [^'"]++
+                          |
+                          (?R)
+                      )*
+               \g{quote}
+               )
+               (?{say "Inside regex: $+{said}"})
+               /x;
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/009.pl.html b/regex_recursion/html/009.pl.html new file mode 100644 index 0000000..f765d16 --- /dev/null +++ b/regex_recursion/html/009.pl.html @@ -0,0 +1,57 @@ + + +Slide 9 + + + + +
+
    use v5.18;
+    $_ = <<'HERE';
+    Out "Top 'Middle "Bottom" Middle' Out"
+    HERE
+
+
+    say "Matched [$+{said}]!" if m/
+             (?(DEFINE)
+                 (?<QUOTE> ['"])
+                 (?<NOT_QUOTE> [^'"])
+             )
+             (?<said>
+             (?<quote>(?&QUOTE))
+                     (?:
+                        (?&NOT_QUOTE)++
+                        |
+                        (?R)
+                     )*
+              \g{quote}
+             )
+             (?{ say "Inside regex: $+{said}" })
+             /x;
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/010.pl.html b/regex_recursion/html/010.pl.html new file mode 100644 index 0000000..50f47eb --- /dev/null +++ b/regex_recursion/html/010.pl.html @@ -0,0 +1,60 @@ + + +Slide 10 + + + + +
+
    use v5.18;
+    $_ = <<'HERE';
+    Out "Top 'Middle "Bottom" Middle' Out"
+    HERE
+
+    my @matches;
+
+    say "Matched [$+{said}]!" if m/
+             (?(DEFINE)
+                 (?<QUOTE> ['"])
+                 (?<NOT_QUOTE> [^'"])
+             )
+             (?<said>
+             (?<quote>(?&QUOTE))
+                     (?:
+                        (?&NOT_QUOTE)++
+                        |
+                        (?R)
+                     )*
+              \g{quote}
+             )
+             (?{ push @matches, $^N })
+             /x;
+
+    say "\n".join '|',@matches;
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/011.pl.html b/regex_recursion/html/011.pl.html new file mode 100644 index 0000000..49f90bd --- /dev/null +++ b/regex_recursion/html/011.pl.html @@ -0,0 +1,61 @@ + + +Slide 11 + + + + +
+
    use v5.18;
+    $_ = <<'HERE';
+    Out "Top 'Middle "Bottom" Middle' Out"
+    HERE
+
+    my @matches;
+
+    say "Matched!" if m/
+             (?(DEFINE)
+                 (?<QUOTE_MARK> ['"])
+                 (?<NOT_QUOTE_MARK> [^'"])
+                 (?<QUOTE>
+                     (
+                          (?<quote>(?&QUOTE_MARK))
+
+                          (?:
+                               (?&NOT_QUOTE_MARK)++
+                               (?&QUOTE)
+                          )*
+                          \g{quote}
+               )
+              (?{ push @matches, $^N })
+    	     )
+    	    )
+    	  (?&QUOTE)
+             /x;
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/012.pl.html b/regex_recursion/html/012.pl.html new file mode 100644 index 0000000..68f3cb4 --- /dev/null +++ b/regex_recursion/html/012.pl.html @@ -0,0 +1,61 @@ + + +Slide 12 + + + + +
+
    use v5.18;
+    $_ = <<'HERE';
+    Out "Top 'Middle "Bottom" Middle' Out"
+    HERE
+
+    my @matches;
+
+    say "Matched!" if m/
+             (?(DEFINE)
+                 (?<QUOTE_MARK> ['"])
+                 (?<NOT_QUOTE_MARK> [^'"])
+                 (?<QUOTE>
+                     (
+                          (?<quote>(?&QUOTE_MARK))
+
+                          (?:
+                               (?&NOT_QUOTE_MARK)++
+                               (?&QUOTE)
+                          )*
+                          \g{quote}
+               )
+              (?{ [ @{$^R}, $^N ] })
+    	     )
+    	    )
+    	  (?&QUOTE) (?{ @matches=@{ $^R } })
+             /x;
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/013.html b/regex_recursion/html/013.html new file mode 100644 index 0000000..99103bf --- /dev/null +++ b/regex_recursion/html/013.html @@ -0,0 +1,57 @@ + + +Slide 13 + + + + +
+
+
+
+
+
+
+                                  Slideshows in Vim
+
+     * Hate using PowerPoint or HTML Slides for Talks?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/013b.html b/regex_recursion/html/013b.html new file mode 100644 index 0000000..87b2951 --- /dev/null +++ b/regex_recursion/html/013b.html @@ -0,0 +1,58 @@ + + +Slide 13 + + + + +
+
+
+
+
+
+
+                                  Slideshows in Vim
+
+     * Hate using PowerPoint or HTML Slides for Talks?
+     * Use Vroom!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/013z.html b/regex_recursion/html/013z.html new file mode 100644 index 0000000..577d3a4 --- /dev/null +++ b/regex_recursion/html/013z.html @@ -0,0 +1,57 @@ + + +Slide 13 + + + + +
+
+
+
+
+
+
+                                  Slideshows in Vim
+
+     * Hate using PowerPoint or HTML Slides for Talks?
+     * Use Vroom!
+
+     * You can write you slides in Vim...
+     * ...and present them in Vim!
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/014.html b/regex_recursion/html/014.html new file mode 100644 index 0000000..3db24e2 --- /dev/null +++ b/regex_recursion/html/014.html @@ -0,0 +1,57 @@ + + +Slide 14 + + + + +
+
+
+
+
+
+
+
+                                   Getting Started
+
+     * Write a file called 'slides.vroom'.
+       * Do this in a new directory.
+     * Run 'vroom vroom'.
+     * Voilà!
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/015.html b/regex_recursion/html/015.html new file mode 100644 index 0000000..e076f91 --- /dev/null +++ b/regex_recursion/html/015.html @@ -0,0 +1,57 @@ + + +Slide 15 + + + + +
+
+
+
+
+
+
+
+                                     Navigation
+
+     * Hit <SPACE> to move forward.
+     * Hit <BACKSPACE> to go backwards.
+     * Hit 'Q' to quit.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/016.pl.html b/regex_recursion/html/016.pl.html new file mode 100644 index 0000000..0d30831 --- /dev/null +++ b/regex_recursion/html/016.pl.html @@ -0,0 +1,57 @@ + + +Slide 16 + + + + +
+
+
+
+
+
+
+
+    # This is some Perl code.
+    # Notice the syntax highlighting.
+    # Run it with the <RR> vim command.
+    for my $word (qw(Vroom totally rocks!)) {
+        print "$word\n";
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/017.html b/regex_recursion/html/017.html new file mode 100644 index 0000000..606ee3d --- /dev/null +++ b/regex_recursion/html/017.html @@ -0,0 +1,57 @@ + + +Slide 17 + + + + +
+
+
+
+
+
+
+
+
+                                     Get Vroom!
+
+     * http://search.cpan.org/dist/Vroom/
+     * http://github.com/ingydotnet/vroom-pm/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/018.html b/regex_recursion/html/018.html new file mode 100644 index 0000000..ddafb55 --- /dev/null +++ b/regex_recursion/html/018.html @@ -0,0 +1,57 @@ + + +Slide 18 + + + + +
+
+
+
+
+
+
+
+
+                                    Vroom as HTML
+
+     * http://ingydotnet.github.com/vroom-pm/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/019.html b/regex_recursion/html/019.html new file mode 100644 index 0000000..6cf9510 --- /dev/null +++ b/regex_recursion/html/019.html @@ -0,0 +1,53 @@ + + +Slide 19 + + + + +
+
+
+
+
+
+
+
+
+
+                                       The End
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/regex_recursion/html/index.html b/regex_recursion/html/index.html new file mode 100644 index 0000000..89f5232 --- /dev/null +++ b/regex_recursion/html/index.html @@ -0,0 +1,55 @@ + + +Recursion in Regex! + + + + + +

Use SPACEBAR to peruse the slides or click one to start...

+

Recursion in Regex!

+ +

This presentation was generated by Vroom. Use <SPACE> key to go +forward and <BACKSPACE> to go backwards. +

+ + diff --git a/regex_recursion/notes.txt b/regex_recursion/notes.txt new file mode 100644 index 0000000..cf64965 --- /dev/null +++ b/regex_recursion/notes.txt @@ -0,0 +1,92 @@ + + -- Title Slide -- + + +Today we'll talk about recursion in regular expressions + + + + + -- Slide 2 -- + + +Actually I am delighted by Brian D Foy as +He plays with regexes + + + -- Plain regular expression example -- + + +Here we know that% $ + this hash contains named +brackets + + + + + -- Slide 4 -- + + + + -- Slide 5 -- + + + + -- Slide 6 -- + + + + -- Slide 7 -- + + + + -- Slide 8 -- + + + + -- Slide 9 -- + + + + -- Slide 10 -- + + + + -- Slide 11 -- + + + + -- Slide 12 -- + + + + -- Slide 13 -- + + + + + + + + -- Slide 14 -- + + + + -- Slide 15 -- + + + + -- Slide 16 -- + + + + -- Slide 17 -- + + + + -- Slide 18 -- + + + + -- Slide 19 -- + + diff --git a/regex_recursion/slides.vroom b/regex_recursion/slides.vroom new file mode 100644 index 0000000..97384ac --- /dev/null +++ b/regex_recursion/slides.vroom @@ -0,0 +1,155 @@ +# This is a sample Vroom input file. It should help you get started. +# +# Edit this file with your content. Then run `vroom vroom` to start +# the show! +# +# See `perldoc Vroom` for complete details. +# +---- config +# Basic config options. +title: Recursion in Regex! +indent: 5 +height: 22 +width: 85 +skip: 0 + +vim: vim -S ./.vimrc + +vimrc: | + set statusline=%-3f\ \ \ \ \ Recursioni\ in\ Regex\ (or:\ How\ parse\ IBM\ Datastage\ dsx\ file) + map 3 + map 2 + map 5 + map 11 + map MSM ouse Method::Signatures::Modifiers; + +#indent: 5 +#auto_size: 1 +# height: 18 +# width: 69 +#vim_opts: '-u NONE' +#skip: 0 + +# The following options are for Gvim usage. +# vim: gvim +# gvimrc: | +# set fuopt=maxhorz,maxvert +# set guioptions=egmLtT +# set guifont=Bitstream_Vera_Sans_Mono:h18 +# set guicursor=a:blinkon0-ver25-Cursor +# colorscheme default + +---- center +% Title Slide +Recursion in Regex + +or + +How parse IBM Datastage dsx file? +==== + +Today we'll talk about recursion in regular expressions + + +---- center + Inspired by + + Parsing JSON with a single regex + + brian d _foy + + http://blogs.perl.org/users/brian_d_foy + /2013/10/parsing-json-with-a-single-regex.html + + and Buddy Burden + + http://blogs.perl.org/users/buddy_burden + /2013/06/slideshows-in-vroom-so-noted.html + + +==== + +Actually I am delighted by Brian D Foy as +He plays with regexes +---- perl,i12 +% Plain regular expression example + +---- include amelia_1.pl +==== + +Here we know that% $ + this hash contains named +brackets + + +---- perl +---- include amelia_2.pl + +---- perl,i4 +---- include amelia_3.pl + +---- perl,i4 + +---- include amelia_4.pl +---- perl,i4 + +---- include amelia_5.pl +---- perl,i4 + +---- include amelia_6.pl +---- perl,i4 + +---- include amelia_7.pl +---- perl,i4 + +---- include amelia_8.pl +---- perl,i4 + +---- include amelia_9.pl +---- perl,i4 + +---- include amelia_10.pl +---- +== Slideshows in Vim + +* Hate using PowerPoint or HTML Slides for Talks? ++* Use Vroom! + ++* You can write you slides in Vim... +* ...and present them in Vim! + +---- +== Getting Started + +* Write a file called 'slides.vroom'. + * Do this in a new directory. +* Run 'vroom vroom'. +* Voilà! + +---- +== Navigation + +* Hit to move forward. +* Hit to go backwards. +* Hit 'Q' to quit. + +---- perl,i4 +# This is some Perl code. +# Notice the syntax highlighting. +# Run it with the vim command. +for my $word (qw(Vroom totally rocks!)) { + print "$word\n"; +} + +---- +== Get Vroom! + +* http://search.cpan.org/dist/Vroom/ +* http://github.com/ingydotnet/vroom-pm/ + +---- +== Vroom as HTML + +* http://ingydotnet.github.com/vroom-pm/ + +---- +== The End diff --git a/vroom_is_simple/Vroom_is_Simple.pdf b/vroom_is_simple/Vroom_is_Simple.pdf new file mode 100644 index 0000000..198f512 Binary files /dev/null and b/vroom_is_simple/Vroom_is_Simple.pdf differ diff --git a/vroom_is_simple/config_1.yml b/vroom_is_simple/config_1.yml new file mode 100644 index 0000000..d4a1012 --- /dev/null +++ b/vroom_is_simple/config_1.yml @@ -0,0 +1,17 @@ +\---- config +# Basic config options. +title: Recursion in Regex! +indent: 5 +height: 22 +width: 85 +skip: 0 + +vim: vim -S ./.vimrc + +vimrc: | + set statusline=%-3f\ \ \ \ \ Recursioni\ in\ Regex\ (or:\ How\ parse\ IBM\ Datastage\ dsx\ file) + map 3 + map 2 + map 5 + map 11 + map MSM ouse Method::Signatures::Modifiers; diff --git a/vroom_is_simple/gen_pdf_vroom b/vroom_is_simple/gen_pdf_vroom new file mode 100755 index 0000000..9af6bbe --- /dev/null +++ b/vroom_is_simple/gen_pdf_vroom @@ -0,0 +1,25 @@ +#! /bin/bash + +# To make this work, you will need Vroom 0.28 or later. Slide notes are optional, but +# recommended. Slide titles won't be used for this application. +# +# Earlier versions of Vroom will work if you add the dashes in front of the vroom commands +# (e.g. `vroom -compile` and `vroom -html`). But the HTML is formatted a bit differently, so +# I make no promises that it will come out looking as good as the newest versions. + +# You'll also need wkhtmltopdf. If you don't have it, you can get it here: +# http://code.google.com/p/wkhtmltopdf/ +# +# Note that you will almost certainly need the static version in order to handle multiple HTML +# files. See the README file for full details: +# https://github.com/antialize/wkhtmltopdf/blob/master/README_WKHTMLTOPDF + + +# for some reason, just doing an ls of html/ doesn't get the slides in the right order +# this seems to fix it +vroom compile +slides="$(ls 0* | perl -lne 'print "html/$_.html"')" +#echo $slides +vroom html + +wkhtmltopdf -O Landscape $slides Vroom_is_Simple.pdf diff --git a/vroom_is_simple/html/001.html b/vroom_is_simple/html/001.html new file mode 100644 index 0000000..d43fc37 --- /dev/null +++ b/vroom_is_simple/html/001.html @@ -0,0 +1,57 @@ + + +Title Slide + + + + +
+
+
+
+
+
+
+
+
+                                        Vroom
+
+                    is a vim based presentaiton software by INGY
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Vroom is cool

+
+ + diff --git a/vroom_is_simple/html/002.html b/vroom_is_simple/html/002.html new file mode 100644 index 0000000..6252175 --- /dev/null +++ b/vroom_is_simple/html/002.html @@ -0,0 +1,57 @@ + + +Slide 2 + + + + +
+
+
+
+
+
+
+
+
+
+                              I  just show basic future
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Lets see it

+
+ + diff --git a/vroom_is_simple/html/003.html b/vroom_is_simple/html/003.html new file mode 100644 index 0000000..d610e87 --- /dev/null +++ b/vroom_is_simple/html/003.html @@ -0,0 +1,57 @@ + + +Plain Make config + + + + +
+
+     \---- config
+     # Basic config options.
+     title: Recursion in Regex!
+     indent: 5
+     height: 22
+     width: 85
+     skip: 0
+
+     vim: vim -S ./.vimrc
+
+     vimrc: |
+       set statusline=%-3f\ \ \ \ \ Recursioni\ in\ Regex\ (or:\ How\ parse\ IBM\ Datastage\ dsx\ file)
+       map <C-C> 3<C-^><Ctrl-Home>
+       map <C-O> 2<C-^><Ctrl-Home>
+       map <C-E> 5<C-^><Ctrl-Home>
+       map <C-P> 11<C-^><Ctrl-Home>
+       map MSM ouse Method::Signatures::Modifiers;<Esc>
+
+
+
+
+
+
+
+
+

It is config here

+
+ + diff --git a/vroom_is_simple/html/004.html b/vroom_is_simple/html/004.html new file mode 100644 index 0000000..eaf3913 --- /dev/null +++ b/vroom_is_simple/html/004.html @@ -0,0 +1,57 @@ + + +Title Slide + + + + +
+
+
+
+
+
+     \---- center
+     Recursion in Regex
+
+     or
+
+     How parse IBM Datastage dsx file?
+     \====
+
+     Today we'll talk about recursion in regular expressions
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/vroom_is_simple/html/005.html b/vroom_is_simple/html/005.html new file mode 100644 index 0000000..37ad577 --- /dev/null +++ b/vroom_is_simple/html/005.html @@ -0,0 +1,57 @@ + + +Plain regular expression example + + + + +
+
+
+     \---- perl,i12
+
+     \---- include amelia_1.pl
+     \====
+
+     Here we know that% $ + this hash contains named
+     brackets
+
+
+
+                                   Getting Started
+
+     * Write a file called 'slides.vroom'.
+       * Do this in a new directory.
+     * Run 'vroom vroom'.
+     * Voilà!
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/vroom_is_simple/html/006.html b/vroom_is_simple/html/006.html new file mode 100644 index 0000000..9c5d3ce --- /dev/null +++ b/vroom_is_simple/html/006.html @@ -0,0 +1,60 @@ + + +Slide 6 + + + + +
+
     #! /bin/bash
+
+     # To make this work, you will need Vroom 0.28 or later.  Slide notes are optional, but
+     # recommended.  Slide titles won't be used for this application.
+     #
+     # Earlier versions of Vroom will work if you add the dashes in front of the vroom commands
+     # (e.g. `vroom -compile` and `vroom -html`).  But the HTML is formatted a bit differently, so
+     # I make no promises that it will come out looking as good as the newest versions.
+
+     # You'll also need wkhtmltopdf.  If you don't have it, you can get it here:
+     # http://code.google.com/p/wkhtmltopdf/
+     #
+     # Note that you will almost certainly need the static version in order to handle multiple HTML
+     # files.  See the README file for full details:
+     # https://github.com/antialize/wkhtmltopdf/blob/master/README_WKHTMLTOPDF
+
+
+     # for some reason, just doing an ls of html/ doesn't get the slides in the right order
+     # this seems to fix it
+     vroom compile
+     slides="$(ls 0* | perl -lne 'print "html/$_.html"')"
+     #echo $slides
+     vroom html
+
+     wkhtmltopdf -O Landscape $slides Vroom_is_Simple.pdf
+
+
+
+
+

+
+ + diff --git a/vroom_is_simple/html/007.html b/vroom_is_simple/html/007.html new file mode 100644 index 0000000..23c3766 --- /dev/null +++ b/vroom_is_simple/html/007.html @@ -0,0 +1,57 @@ + + +Slide 7 + + + + +
+
+
+
+
+
+
+
+
+
+     \---- bash
+     \---- include gen_pdf_vroom
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/vroom_is_simple/html/008.html b/vroom_is_simple/html/008.html new file mode 100644 index 0000000..81631c1 --- /dev/null +++ b/vroom_is_simple/html/008.html @@ -0,0 +1,57 @@ + + +Slide 8 + + + + +
+
+
+
+
+
+
+
+                                     Navigation
+
+     * Hit <SPACE> to move forward.
+     * Hit <BACKSPACE> to go backwards.
+     * Hit 'Q' to quit.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/vroom_is_simple/html/009.pl.html b/vroom_is_simple/html/009.pl.html new file mode 100644 index 0000000..fd1d6d1 --- /dev/null +++ b/vroom_is_simple/html/009.pl.html @@ -0,0 +1,57 @@ + + +Slide 9 + + + + +
+
+
+
+
+
+
+
+    # This is some Perl code.
+    # Notice the syntax highlighting.
+    # Run it with the <RR> vim command.
+    for my $word (qw(Vroom totally rocks!)) {
+        print "$word\n";
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/vroom_is_simple/html/010.html b/vroom_is_simple/html/010.html new file mode 100644 index 0000000..5931847 --- /dev/null +++ b/vroom_is_simple/html/010.html @@ -0,0 +1,57 @@ + + +Slide 10 + + + + +
+
+
+
+
+
+
+
+
+                                     Get Vroom!
+
+     * http://search.cpan.org/dist/Vroom/
+     * http://github.com/ingydotnet/vroom-pm/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/vroom_is_simple/html/011.html b/vroom_is_simple/html/011.html new file mode 100644 index 0000000..2c1d32c --- /dev/null +++ b/vroom_is_simple/html/011.html @@ -0,0 +1,57 @@ + + +Slide 11 + + + + +
+
+
+
+
+
+
+
+
+                                    Vroom as HTML
+
+     * http://ingydotnet.github.com/vroom-pm/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/vroom_is_simple/html/012.html b/vroom_is_simple/html/012.html new file mode 100644 index 0000000..03312c4 --- /dev/null +++ b/vroom_is_simple/html/012.html @@ -0,0 +1,53 @@ + + +Slide 12 + + + + +
+
+
+
+
+
+
+
+
+
+                                       The End
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+ + diff --git a/vroom_is_simple/html/index.html b/vroom_is_simple/html/index.html new file mode 100644 index 0000000..7d2a82e --- /dev/null +++ b/vroom_is_simple/html/index.html @@ -0,0 +1,48 @@ + + +Vroom is Simple! + + + + + +

Use SPACEBAR to peruse the slides or click one to start...

+

Vroom is Simple!

+ +

This presentation was generated by Vroom. Use <SPACE> key to go +forward and <BACKSPACE> to go backwards. +

+ + diff --git a/vroom_is_simple/include_3.yml b/vroom_is_simple/include_3.yml new file mode 100644 index 0000000..912b5bc --- /dev/null +++ b/vroom_is_simple/include_3.yml @@ -0,0 +1,10 @@ +\---- perl,i12 +% Plain regular expression example + +\---- include amelia_1.pl +\==== + +Here we know that% $ + this hash contains named +brackets + + diff --git a/vroom_is_simple/page_2.yml b/vroom_is_simple/page_2.yml new file mode 100644 index 0000000..b894d75 --- /dev/null +++ b/vroom_is_simple/page_2.yml @@ -0,0 +1,12 @@ +\---- center +% Title Slide +Recursion in Regex + +or + +How parse IBM Datastage dsx file? +\==== + +Today we'll talk about recursion in regular expressions + + diff --git a/vroom_is_simple/slides.vroom b/vroom_is_simple/slides.vroom new file mode 100644 index 0000000..90fb90d --- /dev/null +++ b/vroom_is_simple/slides.vroom @@ -0,0 +1,111 @@ +# This is a sample Vroom input file. It should help you get started. +# +# Edit this file with your content. Then run `vroom vroom` to start +# the show! +# +# See `perldoc Vroom` for complete details. +# +---- config +# Basic config options. +title: Vroom is Simple! +indent: 5 +height: 22 +width: 85 +skip: 0 + +vim: vim -S ./.vimrc + +vimrc: | + set statusline=%-3f\ \ \ \ \ Vroom\ is\ Simple + map 3 + map 2 + map 5 + map 11 + map MSM ouse Method::Signatures::Modifiers; + +#indent: 5 +#auto_size: 1 +# height: 18 +# width: 69 +#vim_opts: '-u NONE' +#skip: 0 + +# The following options are for Gvim usage. +# vim: gvim +# gvimrc: | +# set fuopt=maxhorz,maxvert +# set guioptions=egmLtT +# set guifont=Bitstream_Vera_Sans_Mono:h18 +# set guicursor=a:blinkon0-ver25-Cursor +# colorscheme default + +---- center +% Title Slide +Vroom + +is a vim based presentaiton software by INGY +==== + +Vroom is cool + + +---- center + I just show basic future + +==== + + Lets see it +---- +% Plain Make config + +---- include config_1.yml +==== + +It is config here + + +---- +---- include page_2.yml + +---- +---- include include_3.yml + +== Getting Started + +* Write a file called 'slides.vroom'. + * Do this in a new directory. +* Run 'vroom vroom'. +* Voilà! +---- bash +---- include gen_pdf_vroom +---- +\---- bash +\---- include gen_pdf_vroom +---- +== Navigation + +* Hit to move forward. +* Hit to go backwards. +* Hit 'Q' to quit. + +---- perl,i4 +# This is some Perl code. +# Notice the syntax highlighting. +# Run it with the vim command. +for my $word (qw(Vroom totally rocks!)) { + print "$word\n"; +} + +---- +== Get Vroom! + +* http://search.cpan.org/dist/Vroom/ +* http://github.com/ingydotnet/vroom-pm/ + +---- +== Vroom as HTML + +* http://ingydotnet.github.com/vroom-pm/ + +---- +== The End