summaryrefslogtreecommitdiff
path: root/test.pl
blob: 04bcfbbd0cc0d777151c61d78a0958e2525faa5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl 
use strict;
use warnings;
use lib '../Tree-Template-Declare/blib/lib/';
use lib '../Tree-Transform-XSLTish/blib/lib/';
use lib './lib';
use Parser;
use Compiler;
 
sub Tree::DAG_Node::XPath::Root::xpath_get_root_node { return $_[0] }
sub Tree::DAG_Node::XPath::Root::xpath_get_parent_node { return }
 
my $src=do {local $/;<DATA>};
print $src,"----\n\n";
#$::RD_TRACE=1; 
my $doc=Parser::parse(\$src);
print "\n----\n$src----\n";
print map "$_\n", @{$doc->draw_ascii_tree};
print "\n----\n";
my $comp=Compiler->new();
print $comp->transform($doc);
 
__DATA__
gino = 5
if 5 + 3 then pino else rino
pino: print gino