changeset 7:9a283d72ddc3

XSLScript: --dump option.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 24 Feb 2014 03:47:17 +0400
parents d3340fdeadf6
children 86721b270ebb
files xslscript.pl
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/xslscript.pl	Fri Feb 21 18:53:17 2014 +0400
+++ b/xslscript.pl	Mon Feb 24 03:47:17 2014 +0400
@@ -23,9 +23,12 @@
 
 ###############################################################################
 
+my $dump = 0;
+
 GetOptions(
 	"trace!" => \$::RD_TRACE,
 	"hint!" => \$::RD_HINT,
+	"dump!" => \$dump,
 )
 	or die "oops\n";
 
@@ -417,7 +420,11 @@
 my $tree = $parser->startrule($lines)
 	or die "Failed to parse $ARGV.\n";
 
-#print Dumper($tree);
+if ($dump) {
+	print Dumper($tree);
+	exit(0);
+}
+
 print format_tree($tree);
 
 ###############################################################################