#!/usr/bin/perl

use Search::OpenFTS::Parser;

my $parser = Search::OpenFTS::Parser->new();

foreach my $file (@ARGV) {

    open( INFILE, $file ) || die;

    print "$file\n";

    $parser->start_parser( \*INFILE );

    while ( ( ( $type, $word ) = $parser->get_word ) && $type ) {

        print $parser->type_description($type), "\t$word\n";

    }

    $parser->end_parser;

    close INFILE;

}
