wrote lexer and parser for hashes