# AZ102: An expression that doesn't parse

Permissions, rules and invariants are expressions: names joined by `or`, `and` and `not`, in parentheses where needed, `relation.permission` to follow a relation, and SQL conditions in `{ }` on the row's own columns. The message says what was unexpected, or what is missing: a `)`, a closing `}`, or the rest of the expression. Where `and` and `or` meet, parentheses say which goes first: `a or b and c` reads two ways, so it is refused with the parentheses to add, `a or (b and c)`. A condition in `{ }` is never empty, there or in a type's or a link table's `where`, a `shared if` or a caveat: left empty, it would read as no condition at all.

Reported when the policy is compiled: `rowstile check`, the editor, `rowstile dev`.

## The mistake

```authz
app role app_user
type user = app.users
type folder = app.folders
  owner : user = owner_id
  can view = owner or
```

```
line 5: expression ends too early [AZ102]
```

## Fixed

```authz
app role app_user
type user = app.users
type folder = app.folders
  owner : user = owner_id
  can view = owner or {is_public}
```
