de.saar.chorus.domgraph.codec.mrs
Class MrsPrologInputCodec
Object
InputCodec
MrsPrologInputCodec
- All Implemented Interfaces:
- MrsPrologInputCodecConstants
public class MrsPrologInputCodec
- extends InputCodec
- implements MrsPrologInputCodecConstants
Fields inherited from interface MrsPrologInputCodecConstants |
ATTRVAL, COMMENT, DEFAULT, EOF, HANDLE, HCONS, OTHER, PSOA, QEQ, REL, SYMBOL, tokenImage, VARIABLE |
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
token_source
public MrsPrologInputCodecTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
MrsPrologInputCodec
public MrsPrologInputCodec(Normalisation normalisation)
MrsPrologInputCodec
public MrsPrologInputCodec(InputStream stream)
MrsPrologInputCodec
public MrsPrologInputCodec(InputStream stream,
String encoding)
MrsPrologInputCodec
public MrsPrologInputCodec(Reader stream)
MrsPrologInputCodec
public MrsPrologInputCodec(MrsPrologInputCodecTokenManager tm)
decode
public void decode(Reader inputStream,
DomGraph graph,
NodeLabels labels)
throws IOException,
ParserException,
MalformedDomgraphException
- Description copied from class:
InputCodec
- Reads an USR representation from a
Reader
. This method
converts the USR into an equivalent labelled dominance graph and
stores this graph in a DomGraph
and the labels in
a NodeLabels
object. You must implement this
method in every concrete input codec.
The graph and labels objects passed to this method need not be
empty; it is the responsibility of this method to clear them first.
- Specified by:
decode
in class InputCodec
- Parameters:
inputStream
- the reader from which the USR is readgraph
- the dominance graph into which the USR is convertedlabels
- the node labels of the labelled dominance graph
- Throws:
IOException
- if an I/O error occurred while reading from reader
ParserException
- if a syntactic error occurred while parsing the USR
MalformedDomgraphException
- if a semantic error occurred, i.e. the USR
cannot be converted into a dominance graph
Input
public final void Input()
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
RelList
public final void RelList()
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
Rel
public final void Rel()
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
Attributes
public final void Attributes(Map<String,String> attrs)
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
Attribute
public final void Attribute(Map<String,String> attrs)
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
Value
public final String Value()
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
QeqList
public final void QeqList()
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
Qeq
public final void Qeq()
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
Handle
public final String Handle()
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
Variable
public final String Variable()
throws ParseException,
MalformedDomgraphException
- Throws:
ParseException
MalformedDomgraphException
Other
public final String Other()
throws ParseException
- Throws:
ParseException
Symbol
public final String Symbol()
throws ParseException
- Throws:
ParseException
ReInit
public void ReInit(InputStream stream)
ReInit
public void ReInit(InputStream stream,
String encoding)
ReInit
public void ReInit(Reader stream)
ReInit
public void ReInit(MrsPrologInputCodecTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()