|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmarf.nlp.Parsing.GenericLexicalAnalyzer
marf.nlp.Parsing.GrammarCompiler.GrammarAnalyzer
marf.nlp.Parsing.GrammarCompiler.ProbabilisticGrammarAnalyzer
Pobabilistic Grammar Analyzer -- an lexical analyzer designed for probabilistic grammars out of a stream of characters.
$Id: ProbabilisticGrammarAnalyzer.java,v 1.15 2006/01/19 04:13:17 mokhov Exp $
Field Summary |
Fields inherited from class marf.nlp.Parsing.GrammarCompiler.GrammarAnalyzer |
DEFAULT_ERROR_LOG_FILE, DEFAULT_GRAMMAR_FILE, DEFAULT_SCAN_LOG_FILE, oTokenType |
Fields inherited from class marf.nlp.Parsing.GenericLexicalAnalyzer |
bErrorsPresent, DEFAULT_ERROR_FILE, DEFAULT_OUTPUT_FILE, oFileReader, oLexicalErrors, oStreamTokenizer, oSymTab, oToken, oTokenList, strErrorLogFilename, strOutputFilename, strSourceFilename |
Constructor Summary | |
ProbabilisticGrammarAnalyzer(java.lang.String pstrGrammarFilename)
Constructs probabilistic grammar analyzer from a given grammar file. |
Method Summary | |
protected void |
createNextToken()
Creates an instance of the next token in the grammar token stream given integer token type. |
protected void |
createProbabilityToken()
Creates a propabilistic token type as a part of the grammar. |
protected void |
createWordToken()
Creates word tokens for keywords, identifiers, non-terminals and dictionary words. |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
boolean |
init()
Initializes this grammar analyzer and sets the stream tokenizer to regonize numerical values specially and don't fold anything to lowercase. |
Methods inherited from class marf.nlp.Parsing.GrammarCompiler.GrammarAnalyzer |
addToTokenList, createEOFToken, createOrdinaryToken, getLexicalGrammarErrors, getNextToken, serialize |
Methods inherited from class marf.nlp.Parsing.GenericLexicalAnalyzer |
createToken, getErrorLogFilename, getErrorsPresent, getLexicalErrors, getOutputFilename, getSourceFilename, getSymTab, getTokenList, scan, setErrorLogFilename, setOutputFilename, setSourceFilename |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProbabilisticGrammarAnalyzer(java.lang.String pstrGrammarFilename)
pstrGrammarFilename
- the filename of a probabilistic grammarMethod Detail |
public boolean init()
init
in class GrammarAnalyzer
true
if parent's initialization was successfulGenericLexicalAnalyzer.init()
protected void createProbabilityToken()
protected void createNextToken() throws LexicalError
createNextToken
in class GrammarAnalyzer
LexicalError
- if there was an error reading off the tokenGrammarAnalyzer.createNextToken()
protected void createWordToken()
createWordToken
in class GrammarAnalyzer
GrammarAnalyzer.createWordToken()
public static java.lang.String getMARFSourceCodeRevision()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |