refactor lexer/parser for brack open/close notation