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

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

Initial import

File size: 450 bytes
RevLine 
[1]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.