Given the rule:
expr := 'if' expr 'then' expr 'else' expr
An expression may start with a sequence 'if if if if ...' of arbitrary length (and will contain that same number of 'then' and 'else' keywords, although not as a sequence).