lexer/parser for math expressions