|
|||||||||
| 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. |
void |
reset()
Clears the parsers internal clause buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, 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 RecognitionException,
TokenStreamException
clause - String A string containing the clause to be parsed. If the
string contains multiple clauses only the first clause will be parsed.
RecognitionException
TokenStreamException
public DefiniteClause parseQueryString(java.lang.String query)
throws RecognitionException,
TokenStreamException
query - String A string containing the query to be parsed. If the
string contains multiple queries only the first query will be parsed.
RecognitionException
TokenStreamException
public void parseDefiniteClauses(java.lang.String clauses)
throws RecognitionException,
TokenStreamException
clauses - String A string containing one or more clauses.
RecognitionException
TokenStreamException
public void parseDCFile(java.lang.String filename)
throws java.io.FileNotFoundException,
RecognitionException,
TokenStreamException
filename - String A string containing the complete path to the file.
java.io.FileNotFoundException
RecognitionException
TokenStreamException
public void parseInputStream(java.io.InputStream is)
throws RecognitionException,
TokenStreamException
is - InputStream The input stream to read clauses from.
RecognitionException
TokenStreamException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||