Parsing brackets and functions