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