NAME

ABNF::Validator - class to verify strings based on ABNF-grammars

DESCRIPTION

METHODS

ABNF::Validator->new($grammar)

Creates a new ABNF::Validator object.

$grammar isa ABNF::Grammar.

$validator->validate($rule, $string)

Return 1 if $string matches $rule and 0 otherwise.

$rule is rulename.

$string is arguments string.

dies if there is no command like $rule.

$validator->validateArguments($rule, $string)

Return 1 if $string matches arguments rules form $rule and 0 otherwise.

$rule is rulename.

$string is arguments string.

dies if there is no command like $rule.

$validator->validateCommand($command)

Return 1 if there exists command like $command and 0 otherwise

$validator->hasCommand($command)

Return 1 if there exists command like $command and 0 otherwise

FUNCTIONS

Validator()

Return __PACKAGE__ to reduce class name :3

AUTHOR / COPYRIGHT / LICENSE

Copyright (c) 2013 Arseny Krasikov <nyaapa@cpan.org>.

This module is licensed under the same terms as Perl itself.