=head1 NAME

Config::Generic::Parser - Configuration File Parser

=head1 SYNOPSIS

 use Config::Generic::Parser;

 my $parser = new Config::Generic::Parser();
 my $parsetree = $parser->startrule($text);
 
=head1 DESCRIPTION

This module parses configuration files. If you are an "end-user",
you are probably looking for L<Config::Generic> and not for this
module.

This module is autogenerated from B<Parser.y> using L<Parse::RecDescent>.

=head1 METHODS

=over

=item startrule($text)

Starts parsing B<$text>. Returns an B<Config::Generic::UnnamedSection>
object containing the parsed configuration elements.

=back

=head1 NOTES

The description of B<Config::Generic::{Element, *Section, Directive}>
assumes that the parsetree was verified using
B<Config::Generic->verify()>. If this is not the case, you may
experience unexpected behaviour.

This is because the verify method does more than verifying. It
also "marks" some elements in a special way. For example, if you
have a specification

 MultiDirective alias /w+/

and a configuration

 alias foo

you might think that you can skip the verification because you
know that the configuration conforms to the specification. But
this is not the case. verify() will also mark the directive B<alias>
as multiple (because this cannot be concluded from the configuration)
so the access methods change. If you have tied the configuration, you
will get

 $config->{alias} = "foo"

before the verify call and

 $config->{alias} = [ "foo" ]

after the verify call. This is intended behaviour, because an
element that might be specified multiple should always be
accessed as if it is.

Note: B<"foo"> is a placeholder for an B<Config::Generic::Directive> object
that evaluates to B<"foo"> in a string context.


=head1 BUGS

None known yet. But they probably exist because the module is very new
and untested. So please report anything suspecious you find.

=head1 TODO

Nothing :-)

=head1 SEE ALSO

L<Config::Generic::Element>,
L<Config::Generic::Section>,
L<Config::Generic::Directive>,
L<Config::Generic::UnnamedSection>,
L<Config::Generic::NamedSection>,
L<Config::Generic::TieWrapper>,
L<Config::Generic::Parser>

=head1 AUTHOR

Nikolaus Rath, E<lt>Nikolaus@rath.orgE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright 2003 by Nikolaus Rath

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut
