added Pattern.toflexgram()