| 1 | #!/bin/perl | ||
| 2 | |||
| 3 | use 5.010 ; | ||
| 4 | use warnings; | ||
| 5 | use strict; | ||
| 6 | |||
| 7 | use Data::Dump 'pp'; | ||
| 8 | use Data::Dumper; | ||
| 9 | |||
| 10 | use autodie qw(:all); | ||
| 11 | |||
| 12 | |||
| 13 | use TSQL::SplitStatement; | ||
| 14 | use TSQL::AST; | ||
| 15 | |||
| 16 | my $s = do { local $/ = undef; <> ;} ; | ||
| 17 | |||
| 18 | my $parser = TSQL::SplitStatement->new(); | ||
| 19 | |||
| 20 | my @parsedInput = $parser->splitSQL($s); | ||
| 21 | |||
| 22 | my $parser2 = TSQL::AST->new(); | ||
| 23 | |||
| 24 | |||
| 25 | #pp @parsedInput ; | ||
| 26 | |||
| 27 | my $parsedOutput= $parser2->parse(\@parsedInput); | ||
| 28 | |||
| 29 | #warn Dumper @parsedInput; | ||
| 30 | warn Dumper $parsedOutput; | ||
| 31 | |||
| 32 | #$parser2->parse($preProd[0],\@preProd); | ||
| 33 | |||
| 34 | #warn Dumper @preProd ; | ||
| 35 | |||
| 36 | |||
| 37 | |||
| 38 | __DATA__ |