marf.nlp.Parsing.GrammarCompiler
Class ProbabilisticGrammarCompiler

java.lang.Object
  |
  +--marf.Storage.StorageManager
        |
        +--marf.nlp.Parsing.GrammarCompiler.GrammarCompiler
              |
              +--marf.nlp.Parsing.GrammarCompiler.ProbabilisticGrammarCompiler
All Implemented Interfaces:
IStorageManager, java.io.Serializable

public class ProbabilisticGrammarCompiler
extends GrammarCompiler

Probabilistic Grammar Compiler. TODO: document and refactor. $Id: ProbabilisticGrammarCompiler.java,v 1.14 2005/08/13 23:09:39 susan_fan Exp $

Since:
0.3.0
Version:
$Revision: 1.14 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class marf.nlp.Parsing.GrammarCompiler.GrammarCompiler
GrammarFileName, oGrammar, oGrammarAnalyzer, oGrammarElement, oRule, oToken, oTransitionTable
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.Storage.IStorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS
 
Constructor Summary
ProbabilisticGrammarCompiler(java.lang.String pstrGrammarFilename)
           
 
Method Summary
protected  void addNextRHS()
           
 void compileGrammar()
          Compiles grammar.
protected  void createEpsilonToken()
           
protected  void createGrammarAnalyzer()
           
protected  void createRule()
           
static java.lang.String getMARFSourceCodeRevision()
          Retrieves class' revision.
 
Methods inherited from class marf.nlp.Parsing.GrammarCompiler.GrammarCompiler
addIDToken, addTerminalToken, checkUndefinedNonTerminals, createEOFTerminal, createNextNonTerminal, getBusted, getGrammar, getGrammarElement, getGrammarFileName, getNextRHSToken, getTransitionTable, loadTT, outputStats, parseGrammar, serialize
 
Methods inherited from class marf.Storage.StorageManager
backSynchronizeObject, dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, restore, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProbabilisticGrammarCompiler

public ProbabilisticGrammarCompiler(java.lang.String pstrGrammarFilename)
Method Detail

createGrammarAnalyzer

protected void createGrammarAnalyzer()
Overrides:
createGrammarAnalyzer in class GrammarCompiler

compileGrammar

public void compileGrammar()
Description copied from class: GrammarCompiler
Compiles grammar. Compilation consitis of parsing source grammar file, creating rules, Terminals, Non-Terminals; then computes first and follow sets, and fills in a TransitionTable data structure.

Overrides:
compileGrammar in class GrammarCompiler

createEpsilonToken

protected void createEpsilonToken()
Overrides:
createEpsilonToken in class GrammarCompiler

createRule

protected void createRule()
Overrides:
createRule in class GrammarCompiler

addNextRHS

protected void addNextRHS()
Overrides:
addNextRHS in class GrammarCompiler

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Retrieves class' revision.

Returns:
revision string