Move chkptr() helper to the first user (lexer.l)