source: mp3-find/trunk/bin/cql @ 1

Last change on this file since 1 was 1, checked in by peter, 18 years ago

Initial import

File size: 450 bytes
Line 
1#!/usr/bin/perl -w
2use strict;
3
4package MyVisitor;
5use base qw( CQL::Visitor );
6
7sub term {
8    my ($self,$node) = @_;
9    # do something to the node
10    print $node->{qualifier}, " ", $node->{term}, "\n";
11}
12
13package main;
14
15use CQL::Parser;
16use YAML;
17
18my $p = CQL::Parser->new;
19
20my $cql = <<END;
21artist = (ilyaimy or rob) and title = angel
22END
23
24my $root = $p->parse($cql);
25
26#print Dump($root);
27
28my $visitor = MyVisitor->new;
29$visitor->visit($root);
30
Note: See TracBrowser for help on using the repository browser.