Khazern: An implementation of the loop macro

Description

This library provides a complete implementation of the standard loop macro.

Contrary to some other implementations of the loop macro, Khazern makes sure that the loop variable in a clause such as for i from a to b takes on values only in the closed interval between a and b. Other implementations of the loop macro will allow the loop variable (here i) to have the value b+1. With Khazern, it is therefore possible to add a reasonable-looking type declaration, as in for i of-type (integer a b) from a to b that will not be violated at run time.

Requirements

Depends on Acclimation. This library uses instances of standard classes to represent loop clauses, so CLOS is required.

Maintainers

Currently maintained by Tarn W. Burton.

Possible improvements

Clauses are parsed using a home-grown parsing technique that resembles parser combinators, but without the full backtracking capabilities. With this technique, it is hard to provide relevant errors when parsing fails. The use of some other parsing technique could be investigated.


robert.strandh@gmail.com