#!/usr/local/bin/perl use lib '../../../src/perl6','../../src/perl6'; use sm0p5; use DumpMatch; use utf8; use YAML::XS; use Encode; use strict; use warnings; use Getopt::Long; my $nocolor = 0; my $vertical = 0; my $yaml = 0; GetOptions("nocolor"=>\$nocolor,"vertical"=>\$vertical,"yaml"=>\$yaml); unless ($#ARGV <= 0) { die "USAGE: [--nocolor] [filename]\n"; } if ($nocolor) { $DumpMatch::NOCOLOR = 1; } my $what = 'frame'; my $text; { local $/; $text = Encode::decode('utf8', scalar <>); } my $r = sm0p->new($text)->$what(); if ($yaml) { print Dump($r); exit; } else { print dump_match($what=>$r,{vertical=>$vertical}),"\n"; }