|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cgp.translators.CGIFParser
Field Summary | |
private AntlrCGIFLexer |
lexer
|
private AntlrCGIFParser |
parser
|
private java.lang.String |
path
|
private java.io.DataInputStream |
stream
|
private static boolean |
treeOn
|
Constructor Summary | |
CGIFParser()
|
Method Summary | |
private java.lang.String |
createExMsg(java.lang.String prefix,
java.lang.Exception e)
Creates a message for a parser exception given another exception. |
AntlrCGIFParser |
getParser()
Return the parser object. |
java.lang.String |
getParseTree()
Returns a parse tree, if available, as a string. |
java.lang.Class |
getUnitClass()
Returns a Class object that indicates what class the parseUnit() method will return. |
void |
initializeParser(java.io.File f,
notio.KnowledgeBase kBase,
notio.TranslationContext tContext)
Initializes the parser to parse the specified character reader. |
void |
initializeParser(java.io.Reader reader,
notio.KnowledgeBase kBase,
notio.TranslationContext tContext)
Initializes the parser to parse the specified character reader. |
void |
initializeParser(java.lang.String s,
notio.KnowledgeBase kBase,
notio.TranslationContext tContext)
Initializes the parser to parse the specified character reader. |
notio.Actor |
parseActor()
Attempts to parse an actor from the input stream. |
notio.Concept |
parseConcept()
Attempts to parse a concept from the input stream. |
notio.Graph |
parseGraph()
Attempts to parse a graph from the input stream. |
notio.Graph[] |
parseGraphStream()
Attempts to parse a graph stream from the input. |
notio.Graph |
parseOutermostContext()
Attempts to parse a graph which is treated as the outermost context for purposes for scoping. |
notio.Relation |
parseRelation()
Attempts to parse a relation from the input stream. |
java.lang.Object |
parseUnit()
Attempts to parse the default unit from the input stream. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static boolean treeOn
private java.lang.String path
private java.io.DataInputStream stream
private AntlrCGIFLexer lexer
private AntlrCGIFParser parser
Constructor Detail |
public CGIFParser()
Method Detail |
public void initializeParser(java.io.File f, notio.KnowledgeBase kBase, notio.TranslationContext tContext) throws notio.ParserException
f
- the file whose contents are to be parsed.kBase
- the knowledge base to be used while parsing.tContext
- the translation context to be used while parsing.public void initializeParser(java.lang.String s, notio.KnowledgeBase kBase, notio.TranslationContext tContext) throws notio.ParserException
s
- the string whose contents are to be parsed.kBase
- the knowledge base to be used while parsing.tContext
- the translation context to be used while parsing.public void initializeParser(java.io.Reader reader, notio.KnowledgeBase kBase, notio.TranslationContext tContext) throws notio.ParserException
reader
- the reader whose contents are to be parsed.kBase
- the knowledge base to be used while parsing.tContext
- the translation context to be used while parsing.public java.lang.Class getUnitClass()
Parser.parseUnit()
public java.lang.Object parseUnit() throws notio.ParserException
public notio.Graph parseOutermostContext() throws notio.ParserException
public notio.Graph[] parseGraphStream() throws notio.ParserException
public notio.Graph parseGraph() throws notio.ParserException
public notio.Concept parseConcept() throws notio.ParserException
public notio.Relation parseRelation() throws notio.ParserException
public notio.Actor parseActor() throws notio.ParserException
public java.lang.String getParseTree()
private java.lang.String createExMsg(java.lang.String prefix, java.lang.Exception e)
prefix
- some preamble text.e
- the exceptionpublic AntlrCGIFParser getParser()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |