I looked at ml.lex and I think I understsand the bug in ml.lex. The problem is that {ws} matches the empty string, hence the lexer switches to from the <S> state to the <F> state. Then in the <F> state only the final rule works. The rule on page 4 says you must have at least 1 `formatting characters' to go into this state. Just to be concrete, the input causing the bad message is "abc\5xyz"