Let's use the following input language to the
closest pair algorithm:
Grammar:
ClosestPairInput = "(" <pairs> List(Pair) ")".
Pair = "(" <x> float <y> float ")".
Example:
( (1.3 1.7) (5.6 7.89) (6.0 8.889) (1.1 1.2))
We also need to agree on the output language:
Grammar:
ShortestPair = "shortest" "pair" Pair.
Example:
shortest pair (1.1 1.2)