name: ProductionRule

synopsis:

 
g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_mmedia.a

#include <ProductionRule.h>

ProductionRuleTokenType::TYPE getType();
String getValue();
Float getWeight();
quick start:

ProductionRule prdrl;
prdrl.setRuleName(L"A");

prdrl.append(ProductionRuleTokenType::NONTERMINAL, L"a");
prdrl.append(ProductionRuleTokenType::KLEENE_STAR);
description:

The purpose of the ProductionRule class is to provide a uniform method for representing ABNF and BNF production rules in the LanguageModel classes and to form the basis of the RuleModel typedef that serves as a common grammar format.

Each ProductionRule is stored as a right-hand side (RHS) and a left-hand side (LHS). The RHS is stored as a String, and the LHS is stored as a DoubleLinkedList< Triple >. The first field of each entry in the LHS is the token type. The second field of each entry is the token value (typically the name of a terminal or nonterminal). The final field of each entry is used for the storage of weights (on concatenation, alternation, and kleene operators).

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

class-specific protected methods:

examples:

notes: