use warnings
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Parser.pm
1 package SQL::Translator::Parser;
2
3 use strict;
4 use warnings;
5 use vars qw( $VERSION );
6 $VERSION = '1.60';
7
8 sub parse { "" }
9
10 1;
11
12 # ----------------------------------------------------------------------
13 # Enough! or Too much.
14 # William Blake
15 # ----------------------------------------------------------------------
16
17 =pod
18
19 =head1 NAME
20
21 SQL::Translator::Parser - describes how to write a parser
22
23 =head1 DESCRIPTION
24
25 Parser modules that get invoked by SQL::Translator need to implement a
26 single function: B<parse>.  This function will be called by the
27 SQL::Translator instance as $class::parse($tr, $data_as_string), where
28 $tr is a SQL::Translator instance.  Other than that, the classes are
29 free to define any helper functions, or use any design pattern
30 internally that make the most sense.
31
32 When the parser has determined what exists, it will communicate the
33 structure to the producer through the SQL::Translator::Schema object.
34 This object can be retrieved from the translator (the first argument
35 pass to B<parse>) by calling the B<schema> method:
36
37   my $schema = $tr->schema;
38
39 The Schema object has methods for adding tables, fields, indices, etc.
40 For more information, consult the docs for SQL::Translator::Schema and
41 its related modules.  For examples of how this works, examine the
42 source code for existing SQL::Translator::Parser::* modules.
43
44 =head1 AUTHORS
45
46 Ken Youens-Clark, E<lt>kclark@cpan.org<gt>,
47 darren chamberlain E<lt>darren@cpan.orgE<gt>.
48
49 =head1 SEE ALSO
50
51 perl(1), SQL::Translator, SQL::Translator::Schema.
52
53 =cut