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