de.saar.chorus.domgraph.codec.mrs
Class MrsPrologInputCodec

Object
  extended by InputCodec
      extended by MrsPrologInputCodec
All Implemented Interfaces:
MrsPrologInputCodecConstants

public class MrsPrologInputCodec
extends InputCodec
implements MrsPrologInputCodecConstants


Field Summary
 Token jj_nt
           
 Token token
           
 MrsPrologInputCodecTokenManager token_source
           
 
Fields inherited from interface MrsPrologInputCodecConstants
ATTRVAL, COMMENT, DEFAULT, EOF, HANDLE, HCONS, OTHER, PSOA, QEQ, REL, SYMBOL, tokenImage, VARIABLE
 
Constructor Summary
MrsPrologInputCodec(InputStream stream)
           
MrsPrologInputCodec(InputStream stream, String encoding)
           
MrsPrologInputCodec(MrsPrologInputCodecTokenManager tm)
           
MrsPrologInputCodec(Normalisation normalisation)
           
MrsPrologInputCodec(Reader stream)
           
 
Method Summary
 void Attribute(Map<String,String> attrs)
           
 void Attributes(Map<String,String> attrs)
           
 void decode(Reader inputStream, DomGraph graph, NodeLabels labels)
          Reads an USR representation from a Reader.
 void disable_tracing()
           
 void enable_tracing()
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 String Handle()
           
 void Input()
           
 String Other()
           
 void Qeq()
           
 void QeqList()
           
 void ReInit(InputStream stream)
           
 void ReInit(InputStream stream, String encoding)
           
 void ReInit(MrsPrologInputCodecTokenManager tm)
           
 void ReInit(Reader stream)
           
 void Rel()
           
 void RelList()
           
 String Symbol()
           
 String Value()
           
 String Variable()
           
 
Methods inherited from class InputCodec
getReaderForSpecification
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public MrsPrologInputCodecTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt
Constructor Detail

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)
Method Detail

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 read
graph - the dominance graph into which the USR is converted
labels - 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()