ubc.cs.JLog.Parser
Class pParseStream
java.lang.Object
ubc.cs.JLog.Parser.pParseStream
public class pParseStream
- extends Object
The main parsing class that converts packets into their correspoding prolog terms.
Used to process user queries, and consult a database. Directly or indirectly uses
the pPreTokenizeStream, pTokenizeStream, and
pPreParseStream.
- Version:
- %I%, %G%
- Author:
- Glendon Holst
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parser
protected ubc.cs.JLog.Parser.pPreParseStream parser
database
protected jKnowledgeBase database
pParseStream
public pParseStream(String s,
jKnowledgeBase kb,
pPredicateRegistry pr,
pOperatorRegistry or)
pParseStream
public pParseStream(Reader r,
jKnowledgeBase kb,
pPredicateRegistry pr,
pOperatorRegistry or)
parseQuery
public jPredicateTerms parseQuery()
- Parse the source stream as a query, producing a term representation.
- Returns:
- The
jPredicateTerms instance representing the parsed query string.
parseQuery
public jPredicateTerms parseQuery(Hashtable assignments)
- Parse the source stream as a query, producing a term representation.
- Parameters:
assignments - A Hashtable representing variable names as keys,
and their corresponding jTerm value. The keys must
String types, and be valid variable names. Values must be
jTerm objects (or sub-classes)
- Returns:
- The
jPredicateTerms instance representing the parsed query string.
parseTerm
public jTerm parseTerm()
parseSource
public void parseSource()
query
protected void query(jPredicateTerms q)
Copyright © 2011. All Rights Reserved.