If something like the following is an MLLex action, then it gets confused and complains of a syntax error "(" => (print "("; lex()); The version of MLlex from SML/NJ that I also have installed on my system doesn't have this problem. Michael.