quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_mmedia.a #include <ProductionRule.h> ProductionRuleTokenType::TYPE getType(); String getValue(); Float getWeight();
description:ProductionRule prdrl; prdrl.setRuleName(L"A"); prdrl.append(ProductionRuleTokenType::NONTERMINAL, L"a"); prdrl.append(ProductionRuleTokenType::KLEENE_STAR);
static const String ProductionRule::CLASS_NAME = L"ProductionRule";
enum TYPE {NORMAL=0, START, DEF_TYPE = NORMAL};
static const String ProductionRule::TYPE_MAP(L"NORMAL, START");
static const String ProductionRule::DEF_PARAM = L"";
static const long ProductionRule::DEF_TAG = 0;
static const String ProductionRule::PARAM_RULE_NAME = L"rule_name";
static const String ProductionRule::RULE_NAME_BASE = L"R";
static const String ProductionRule::START_RULE_NAME = L"RS";
static const String ProductionRule::TERM_RULE_NAME= L"RT";
static const String ProductionRule::DEF_RULE_NAME= L"";
static const String ProductionRule::PARAM_RULE = L"rule";
String rule_name_d;
String rule_type_d;
DoubleLinkedList< Triple< ProductionRuleTokenType, String, Float> > rule_d;
DebugLevel debug_level_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean setDebug(Integral::DEBUG debug_level);
boolean debug(const unichar* msg) const;
ProductionRule();
boolean read(Sof& sof, long tag, const String& cname = CLASS_NAME);
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean write(Sof& sof, long tag, const String& cname = CLASS_NAME) const;
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
long sofSize() const;
boolean assign(const ProductionRule& prdrl_a);
ProductionRule& operator=(const ProductionRule& prdrl_a);
boolean eq(const ProductionRule& prdrl_a) const;
ProductionRule& operator==(const ProductionRule& prdrl_a);
boolean clear(Integral::CMODE ctype);
boolean gotoFirst();
boolean gotoNext();
boolean gotoPrev();
boolean gotoPosition(long position);
boolean removeCurr();
ProductionRuleTokenType::TYPE getType();
String getValue();
Float getWeight();
boolean insert(const ProductionRuleTokenType::TYPE& type_a, const String& value_a=L"", Float weight_a=0);
boolean append(const ProductionRuleTokenType::TYPE& type_a, const String& value_a, Float weight_a);
boolean append(const ProductionRuleTokenType::TYPE& type_a, const String& value_a=L"");
String getRuleName();
String getRule();
TYPE getRuleType();
boolean setRuleName(const String& rule_name_a);
boolean setDebug(Integral::DEBUG level);
boolean setRuleType(TYPE type);
String convertToString(Triple< ProductionRuleTokenType, String, Float >& item_a);
// declare the ProductionRule // ProductionRule prdrl; // set the name // prdrl.setRuleName(L"A"); // construct the RHS // prdrl.append(ProductionRuleTokenType::OPEN_PAREN); prdrl.append(ProductionRuleTokenType::TERMINAL, L"a"); prdrl.append(ProductionRuleTokenType::CONCATENATION); prdrl.append(ProductionRuleTokenType::NON_TERMINAL, L"B"); prdrl.append(ProductionRuleTokenType::CONCATENATION); prdrl.append(ProductionRuleTokenType::KLEENE_PLUS); // output the string representation of the rule // Console::put(prdrl.getRule());