|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjdrew.oo.util.POSLParser
public class POSLParser
Title: OO jDREW
This class serves as a wrapper for the parser that is generated from the POSLParser-Java.g ANTLR grammar. The classes for the ANTLR generated parser are part of the jdrew.oo.util.parsing package. The methods in this class take the appropriate reader (StringReader, FileReader), then a lexcographical analyzer is created on that reader; once this is done a jdrew.oo.util.parsing.POSLParser object is created on the lexer and the appropriate parsing routine is invoked.Description: Reasoning Engine for the Semantic Web - Supporting OO RuleML 0.88
Copyright: Copyright (c) 2005
| Constructor Summary | |
|---|---|
POSLParser()
|
|
| Method Summary | |
|---|---|
java.util.Iterator |
iterator()
Returns an interator over the clauses that are stored in the parsers internal buffer; the buffer is not automatically cleared after a call to iterator(). |
void |
parseDCFile(java.lang.String filename)
This method is used to parse a group of clauses stored in a local file. |
DefiniteClause |
parseDefiniteClause(java.lang.String clause)
This method is used to parse a single definite clause, stored in a String. |
void |
parseDefiniteClauses(java.lang.String clauses)
This method is used to parse a group of clauses, stored in a String. |
void |
parseInputStream(java.io.InputStream is)
This method is used to parse a group of clauses read from an InputStream (keyboard, socket, etc.). |
DefiniteClause |
parseQueryString(java.lang.String query)
This method is used to parse a query - stored in a String. |
DefiniteClause |
parseQueryStringT(java.lang.String query)
|
void |
reset()
Clears the parsers internal clause buffer. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public POSLParser()
| Method Detail |
|---|
public java.util.Iterator iterator()
public void reset()
public DefiniteClause parseDefiniteClause(java.lang.String clause)
throws antlr.RecognitionException,
antlr.TokenStreamException
clause - String A string containing the clause to be parsed. If the
string contains multiple clauses only the first clause will be parsed.
antlr.RecognitionException
antlr.TokenStreamException
public DefiniteClause parseQueryString(java.lang.String query)
throws antlr.RecognitionException,
antlr.TokenStreamException
query - String A string containing the query to be parsed. If the
string contains multiple queries only the first query will be parsed.
antlr.RecognitionException
antlr.TokenStreamException
public DefiniteClause parseQueryStringT(java.lang.String query)
throws antlr.RecognitionException,
antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public void parseDefiniteClauses(java.lang.String clauses)
throws antlr.RecognitionException,
antlr.TokenStreamException
clauses - String A string containing one or more clauses.
antlr.RecognitionException
antlr.TokenStreamException
public void parseDCFile(java.lang.String filename)
throws java.io.FileNotFoundException,
antlr.RecognitionException,
antlr.TokenStreamException
filename - String A string containing the complete path to the file.
java.io.FileNotFoundException
antlr.RecognitionException
antlr.TokenStreamException
public void parseInputStream(java.io.InputStream is)
throws antlr.RecognitionException,
antlr.TokenStreamException
is - InputStream The input stream to read clauses from.
antlr.RecognitionException
antlr.TokenStreamException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||