Yes, it appears I have a bit over-interpreted the question. Parsers for "generic" indentation-meaningful languages (not OCaml) have been discussed there. In particular, Andreas Rossberg has a working lexer in the layoutLexer.ml file of http://www.mpi-sws.org/~rossberg/hocaml-0.12.tgz