DictionarySerializer.create(in, new EntryInserter() {
public void insert(Entry entry) throws InvalidFormatException {
String operationString = entry.getAttributes().getValue("operation");
StringList word = entry.getTokens();
if (word.size() != 1)
throw new InvalidFormatException("Each entry must have exactly one token! "+word);
// parse operation
Operation operation = Operation.parse(operationString);
if (operation == null)
throw new InvalidFormatException("Unknown operation type: " + operationString);
operationTable.put(word.getToken(0), operation);
}});
}