reorganization of inference rules; fix lexer so it gives correct utf8 column number positions