
Parse::RandGen::Grammar - Module for defining a language/protocol grammar

The purpose of this module is to build a grammar description that can then be used to build:
(1) a parser using Parse::RecDescent
(2) a stimulus generator that creates valid (and interesting invalid) tests of the grammar.
Be aware of the greediness of the underlying parsing mechanism (RecDescent). See Parse::RandGen::Production for examples on how greediness can affect errors in grammars.

Creates a new grammar. The grammar name is the only required argument.
Return the name of the grammar.
Access an existing Rule object by name. Returns undef if the Rule is not found.
Define a Rule if not already defined and return a reference to the Rule.
Returns a dump of the Grammar object in Parse::RecDescent grammar format.

Parse::RandGen::Rule and Parse::RandGen::Production

Jeff Dutton