quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_pr.a #include <LanguageModelBNF.h> LanguageModelBNF(); RuleModel& getRuleModel(); boolean setRuleModel(const RuleModel& rm);
description:LanguageModelBNF lmbnf; Sof lm_file_in; Sof lm_file_out; lm_file_in.open(L"lm_bnf_in.sof", File::READ_ONLY, File::TEXT); lmbnf.read(lm_file_in); lm_file_out.open(L"lm_bnf_out.sof", File::WRITE_ONLY, File::TEXT); lmbnf.write(lm_file_out);
static const String CLASS_NAME;
static const String DEF_PARAM;
static const String PARAM_BNF;
static const long DEF_TAG;
static const long ERR = 100102;
static MemoryManager mgr_d;
RuleModel rm_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* msg_a) const;
LanguageModelBNF();
boolean assign(const LanguageModelBNF& arg_a);
boolean operator=(const LanguageModelBNF& arg_a);
boolean operator==(const LanguageModelBNF& arg_a);
boolean eq(const LanguageModelBNF& arg_a) const;
long sofSize() const;
boolean read(Sof& sof_a, const String& tag_a, SearchLevel& level_a);
boolean write(Sof& sof_a, long tag_a, const String& name_a) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean clear(Integral::CMODE ctype_a);
const String& className() const;
boolean setRuleModel(RuleModel& rm);
RuleModel getRuleModel();
boolean minimizeGraph();
boolean mergeRules(ProductionRuleSet& rules, long index1, long index2);
boolean isValidBNF(ProductionRule rule);
boolean isMergeType(ProductionRule rule);
boolean detectFalseLoop(String non_terminal1, String non_terminal2, ProductionRuleSet rules);
ProductionRuleSet getMergeTypeRules(String non_terminal, ProductionRuleSet rules);
Vector<SearchSymbol> findTerminals(ProductionRuleSet rules_a, String rule_name_a);