rewrote lexer in APL, issue #69