|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The required interface for all parsers. All parsers should implement this interface to facilitate pluggability. While a parser must implement the entire interface, it can opt to throw an UnimplementedFeature exception if it does not support parsing of a particular nonterminal. Minimally, a parser should support the Unit nonterminal.
UnimplementedFeatureException
Method Summary | |
java.lang.Class |
getUnitClass()
Returns a Class object that indicates what class the parseUnit() method will return. |
void |
initializeParser(java.io.Reader reader,
KnowledgeBase kBase,
TranslationContext tContext)
Initializes the parser to parse the specified character reader. |
Actor |
parseActor()
Attempts to parse an actor from the input stream. |
java.util.Vector |
parseCGStream()
Attempts to parse a CGStream from the input stream. |
Concept |
parseConcept()
Attempts to parse a concept from the input stream. |
Graph |
parseGraph()
Attempts to parse a graph from the input stream. |
Graph |
parseOutermostContext()
Attempts to parse a graph which is treated as the outermost context for purposes for scoping. |
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. |
Method Detail |
public void initializeParser(java.io.Reader reader, KnowledgeBase kBase, TranslationContext tContext) throws 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.ParserException
- if an error occurs while initializing
the parser.public java.lang.Class getUnitClass()
parseUnit()
public java.lang.Object parseUnit() throws ParserException
ParserException
- if an error occurs while parsing.public Graph parseOutermostContext() throws ParserException
ParserException
- if an error occurs while parsing.UnimplementedFeatureException
- if this parser does not support this
parsing method.public java.util.Vector parseCGStream() throws ParserException
ParserException
- if an error occurs while parsing.UnimplementedFeatureException
- if this parser does not support this
parsing method.public Graph parseGraph() throws ParserException
ParserException
- if an error occurs while parsing.UnimplementedFeatureException
- if this parser does not support this
parsing method.public Concept parseConcept() throws ParserException
ParserException
- if an error occurs while parsing.UnimplementedFeatureException
- if this parser does not support this
parsing method.public Relation parseRelation() throws ParserException
ParserException
- if an error occurs while parsing.UnimplementedFeatureException
- if this parser does not support this
parsing method.public Actor parseActor() throws ParserException
ParserException
- if an error occurs while parsing.UnimplementedFeatureException
- if this parser does not support this
parsing method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |