public class BottomUpTreeAutomatonInputCodec extends InputCodec<TreeAutomaton>
TOP(q1,q2) -> q0 <35133>where TOP is the terminal symbol, and q0, q1, q2 are states. Each rule may optionally be followed by a weight in angle brackets. If no weight is specified, the codec assumes a rule weight of 1.
The final states of the automaton are listed before the first rule, i.e.:
q0 q1
The comment character is #; everything following a # symbol on the same line is ignored by the codec.
Note that the codec is currently limited in that one can write symbols like " and < in the original file format. But the codec will only accept symbols that start and end with " and have no " in between (and analogously for ').
Constructor and Description |
---|
BottomUpTreeAutomatonInputCodec() |
Modifier and Type | Method and Description |
---|---|
TreeAutomaton |
read(InputStream is)
Reads an object from an input stream.
|
addOptions, getAllInputCodecs, getInputCodecByExtension, getInputCodecByName, getInputCodecByNameOrExtension, getInputCodecs, getMetadata, getOption, hasTrueOption, main, read, setOption, setProgressListener
public TreeAutomaton read(InputStream is) throws CodecParseException, IOException
InputCodec
read
in class InputCodec<TreeAutomaton>
CodecParseException
- if an error occurred while decoding
the input stream into an objectIOException
- if an error occurred while reading
data from the input streamCopyright © 2017. All rights reserved.