<!--#set var="isip_enrgydow_title" value="ISIP Software Documentation" -->
<?php include("/data/isip/www/templates/documentation/header/header.html"); ?>

<!--#set var="isip_page_title" value="LanguageModel" -->
<?php include("/data/isip/www/templates/documentation/body/index_class.html"); ?>
<?php include("/data/isip/www/templates/documentation/body/bar.html"); ?>

<a name="name">
<b>
name:
<a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/LanguageModelBNF.h">LanguageModelBNF</a>
</b>

<br><br>

<a name="synopsis">
<b>synopsis:</b>
<br><br>

<blockquote>
<pre>
g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_pr.a

#include &lt;LanguageModelBNF.h&gt;

LanguageModelBNF();
RuleModel& getRuleModel();
boolean setRuleModel(const RuleModel& rm);

</pre>
</blockquote>

<a name="quick_start">
<b>quick start:</b>
<br><br>

<blockquote>
<pre>
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);
</pre>
</blockquote>

<a name="description"> 
<b>description:</b>
<br><br>

LanguageModelBNF represents a LanguageModel in Backus-Naur Format (BNF).  
Currently this class is used as a container class for the BNF representation
of grammars.  BNF is used as an intermediate format when converting between
certain formats.  The BNF representation of a grammar is usually derived
from the Augmented Backus-Naur Format (ABNF) which is represented by the
class 

<a href="../LanguageModelBNF/">LanguageModelABNF</a>.

<br><br>

<a name="dependencies"></a>
<b>dependencies:</b>
<br><br>

<ul>
  <li> <a href="../LanguageModelBase/">LanguageModelBase</a>
</ul>

<a name="constants">
<b>public constants:</b>
<br><br>

<ul>
  <li> define the class name:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_00.cc&constant=CLASS_NAME">static const String CLASS_NAME;</a></pre>
       
  <li> define i/o related constants:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_00.cc&constant=DEF_PARAM">static const String DEF_PARAM;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_00.cc&constant=DEF_PARAM">static const String PARAM_BNF;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_00.cc&constant=DEF_TAG">static const long DEF_TAG;</a></pre>

</ul>

<a name="error">
<b>error codes:</b>
<br><br>

<ul>
  <li> error code indicating LanguageModelBNF class general error:

       <pre><a href="/perl/ifc_document.pl?err=00100102">static const long ERR = 100102;</a></pre>
</ul>

<a name="protected">
<b>protected data:</b>
<br><br>

<ul>

  <li> declare the memory manager:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_00.cc&static=mgr_d">static MemoryManager mgr_d;</a></pre>  

  <li> declare the RuleModel which contains the BNF prductionRules:

       <pre>RuleModel rm_d;</pre>  

</ul>

<a name="public">
<b>required public methods:</b>
<br><br>

<ul>
  <li> static methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/LanguageModelBNF.h&method=name">static const String& name();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_02.cc&method=diagnose">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>

  <li> debug methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_01.cc&method=debug">boolean debug(const unichar* msg_a) const;</a></pre>

  <li> constructor:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_00.cc&method=default+constructor">LanguageModelBNF();</a></pre>

  <li> assign methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_00.cc&method=assign&instance=0">boolean assign(const LanguageModelBNF& arg_a);</a></pre>

  <li> operator methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_01.cc&method=operator=">boolean operator=(const LanguageModelBNF& arg_a);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_01.cc&method=operator==">boolean operator==(const LanguageModelBNF& arg_a);</a></pre>
  <li> equality methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_00.cc&method=eq&instance=0">boolean eq(const LanguageModelBNF& arg_a) const;</a></pre>
       
  <li> i/o methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_04.cc&method=sofSize">long sofSize() const;</a></pre>     
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_03.cc&method=read">boolean read(Sof& sof_a, const String& tag_a, SearchLevel& level_a);</a></pre>     
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_04.cc&method=write">boolean write(Sof& sof_a, long tag_a, const String& name_a) const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_04.cc&method=readData">boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_04.cc&method=writeData">boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;</a></pre>

  <li> memory management methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_00.cc&method=clear">boolean clear(Integral::CMODE ctype_a);</a></pre>
</ul>

<a name="specific">
<b>class-specific public methods:</b>
<br><br>

<ul>

  <li> declare class-specific public methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/LanguageModelBNF.h&method=className">const String& className() const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/LanguageModelBNF.h&method=setRuleModel&instance=0">boolean setRuleModel(RuleModel& rm);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/LanguageModelBNF.h&method=getRuleModel&instance=0">RuleModel getRuleModel();</a></pre>

</ul>

<a name="other">
<b>other methods:</b>
<br><br>
<ul>
  <li> other methods:
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_07.cc&method=minimizeGraph()">boolean minimizeGraph();</a></pre>
</ul>

<a name="private">
<b>private methods:</b>
<br><br>
<ul>
  <li> declare class-specific public methods:
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_07.cc&method=mergeRules">boolean mergeRules(ProductionRuleSet& rules, long index1, long index2);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_07.cc&method=isValidBNF">boolean isValidBNF(ProductionRule rule);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_07.cc&method=isMergeType">boolean isMergeType(ProductionRule rule);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_07.cc&method=detectFalseLoop">boolean detectFalseLoop(String non_terminal1, String non_terminal2, ProductionRuleSet rules);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_07.cc&method=getMergeTypeRules">ProductionRuleSet getMergeTypeRules(String non_terminal, ProductionRuleSet rules);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/LanguageModelBNF/lmbnf_07.cc&method=findTerminals">Vector&lt;SearchSymbol&gt; findTerminals(ProductionRuleSet rules_a, String rule_name_a);</a></pre>
 </ul>

<!--#include virtual="/hse/ies/templates/documentation/footer/footer.html" -->
