Class FSM2MealyParserIO<I,O>
- java.lang.Object
-
- net.automatalib.serialization.fsm.parser.AbstractFSMParser<I>
-
- net.automatalib.serialization.fsm.parser.AbstractFSM2MealyParser<I,O>
-
- net.automatalib.serialization.fsm.parser.FSM2MealyParserIO<I,O>
-
- Type Parameters:
I
- the input typeO
- the output type
- All Implemented Interfaces:
ModelDeserializer<CompactMealy<I,O>>
public final class FSM2MealyParserIO<I,O> extends AbstractFSM2MealyParser<I,O>
Parse a Mealy machine from an FSM source, with straightforward edge semantics.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.automatalib.serialization.fsm.parser.AbstractFSMParser
AbstractFSMParser.Part
-
-
Field Summary
-
Fields inherited from class net.automatalib.serialization.fsm.parser.AbstractFSMParser
EXPECT_CHAR, EXPECT_IDENTIFIER, EXPECT_NUMBER, EXPECT_STRING, NO_SUCH_STATE, NON_DETERMINISM_DETECTED, targetInputs
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkTransitions(StreamTokenizer streamTokenizer)
Perform some actions after all transitions have been parsed.static <E> FSM2MealyParserIO<E,E>
getParser(@Nullable Collection<? extends E> targetInputs, Function<String,E> edgeParser)
static <I,O>
FSM2MealyParserIO<I,O>getParser(@Nullable Collection<? extends I> targetInputs, Function<String,I> inputParser, Function<String,O> outputParser)
static <E> FSM2MealyParserIO<E,E>
getParser(Function<String,E> edgeParser)
static <I,O>
FSM2MealyParserIO<I,O>getParser(Function<String,I> inputParser, Function<String,O> outputParser)
protected void
parseTransition(StreamTokenizer streamTokenizer)
Parse a transition.-
Methods inherited from class net.automatalib.serialization.fsm.parser.AbstractFSM2MealyParser
checkDataDefinitions, checkStateVectors, getOutputParser, getStates, getTransitions, parseDataDefinition, parseMealy, parseStateVector, readModel
-
Methods inherited from class net.automatalib.serialization.fsm.parser.AbstractFSMParser
getInputParser, getInputs, getPartLineNumber, getStreamTokenizer, parse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.serialization.ModelDeserializer
readModel, readModel, readModel
-
-
-
-
Method Detail
-
parseTransition
protected void parseTransition(StreamTokenizer streamTokenizer) throws IOException
Parse a transition.- Specified by:
parseTransition
in classAbstractFSMParser<I>
- Parameters:
streamTokenizer
- tokenizer containing the input- Throws:
FSMFormatException
- when the transition is illegal.IOException
- seeStreamTokenizer.nextToken()
.
-
checkTransitions
protected void checkTransitions(StreamTokenizer streamTokenizer)
Description copied from class:AbstractFSMParser
Perform some actions after all transitions have been parsed.- Specified by:
checkTransitions
in classAbstractFSMParser<I>
- Parameters:
streamTokenizer
- tokenizer containing the input
-
getParser
public static <I,O> FSM2MealyParserIO<I,O> getParser(@Nullable Collection<? extends I> targetInputs, Function<String,I> inputParser, Function<String,O> outputParser)
-
getParser
public static <I,O> FSM2MealyParserIO<I,O> getParser(Function<String,I> inputParser, Function<String,O> outputParser)
-
getParser
public static <E> FSM2MealyParserIO<E,E> getParser(@Nullable Collection<? extends E> targetInputs, Function<String,E> edgeParser)
-
getParser
public static <E> FSM2MealyParserIO<E,E> getParser(Function<String,E> edgeParser)
-
-