|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--antlr.TreeParser
|
+--wugle.expression.logic.PropositionalLogicTreeWalker
Evaluates a propositional logic tree.
A PropositionalLogicTreeWalker evaluates a tree
conforming to the given propositional logic grammar.
| Field Summary | |
static java.lang.String[] |
_tokenNames
|
| Fields inherited from class antlr.TreeParser |
_retTree, astFactory, ASTNULL, inputState, returnAST, tokenNames, traceDepth |
| Fields inherited from interface wugle.expression.logic.PropositionalLogicLexerTokenTypes |
AND, EOF, FALSE, IFF, IMPLIES, LITERAL, LITERAL_LETTER, LPAREN, NOT, NULL_TREE_LOOKAHEAD, OR, RPAREN, TRUE, WHITESPACE, XOR |
| Constructor Summary | |
PropositionalLogicTreeWalker()
|
|
| Method Summary | |
Expression |
expression(antlr.collections.AST _t)
Evaluates expression rules. |
static void |
main(java.lang.String[] args)
Reads a sentence in propositional logic from a file. |
| Methods inherited from class antlr.TreeParser |
getAST, getASTFactory, getTokenName, getTokenNames, match, match, matchNot, panic, reportError, reportError, reportWarning, setASTFactory, setASTNodeClass, setASTNodeType, traceIn, traceIndent, traceOut |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String[] _tokenNames
| Constructor Detail |
public PropositionalLogicTreeWalker()
| Method Detail |
public static void main(java.lang.String[] args)
throws antlr.RecognitionException,
java.io.FileNotFoundException,
antlr.TokenStreamException
args - the command parameters. There is only one at the moment,
args[ 0 ] which defines the input file name.
antlr.RecognitionException - occurs when an input sentence is
not parseable, i.e. not conforming to the given grammar.
java.io.FileNotFoundException - if the file name of the input file
refers to an unknown resource.
antlr.TokenStreamException - if the input file cannot be tokenized
according to the given grammar. This could be an illegal or
unexpected character, for example.
public final Expression expression(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||