Lexer and parser: first revision. Seem to be OK, but they need to be extensively tested