CONCRETE SYNTAX

To be entirely honest, we've already specified a bit of the concrete syntax (the symbols for strings and the abstraction delimeters), so all we have to do is define the rules for parenthesization in accordance with a scheme for precedence. We'll also define a shorthand for dealing with abstractions.

1. Function application associates to the left. So,


	E1 E2 E3 E4

		should be considered

	(((E1 E2) E3) E4)
You may always explicity enter parenthesis to either reinforce the default precedence or force a different ordering. So, while the above expression could also (legally) be parenthesized ((E1 E2) (E3 E4)), it would have a different precedence and meaning.

2. Lambda abstraction associates to the right (as far as possible).


	\V.E1 E2 E3 .... En

		should be considered

	\V.(E1 E2 E3 .... En)

3. Multiple lambda abstractions may be abbreviated by removing the extra occurences of the lambda symbol, like this:

	\V1 .(\V2 .(\V3. E))

		can be notated

	\V1 V2 V3.E

Note that either version is acceptable (but the latter is shorter, which us lazy computer scientist just love).

1. \x. E1 \y. E2 E3 E4 is properly (in accordance with the rules of precedence) parenthesized by which of the following expressions:

a) \x. (E1 \y. ((E2 E3) E4))
b) \x. (E1 \y. (E2 (E3 E4)))
c) \x. (E1 (\y. E2) (E3 E4))
d) \x. (E1 (\y. E2)) (E3 E4)

BACK
NEXT