updated query parser and lexer for new handling of metrics