name: LanguageModelABNF


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

#include <LanguageModelABNF.h>

boolean read(Sof& sof, long tag, const String& cname = CLASS_NAME);
quick start:

Sof sof;"lm_abnf_obj.sof", File::READ_ONLY);

LanguageModelABNF lmabnf;, 0);


The LanguageModelABNF is a class that reads in ABNF grammars and gives out a set of Producitons in BNF form. In ABNF there are certain meta symbols that are used, that make sit difficult to be converted into IHD (ISIP Hierarchial Di-Graph).
HierarchicalDigraph BNF uses recursion unlike ABNF which uses iteration. This makes it easy to convert BNF Productions into IHD. The implementation of the LanguageModelABNF is such that one methos auto matically calls other methods. convertABNFGrammars method, first look for ALTERNATION in the input Production. If it exists, it passes the Production together with the position of ALTERNATION and the nesting epth till that point. removeAlternation method removes the OR symbol in the input Production and passes it to removeKleenePlus, which in turn calls removeKleeneStar and this continues. In case there is not ALTERNATION in the input Produciton, it is passes directly to removeKleenePlus method. By the end of the conversion process, we have a set of productions which are free of the meta symbols.


public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

class-specific protected methods: