Updated lexer and bracematcher