report syntax errors and bracket mismatches