# Sieve of Eratosthenes: simple example of Miller DSL as programming language.
begin {
	@n = 100;
}
end {
	for (int i = 0; i <= @n; i += 1) {
		@s[i] = true;
	}
	@s[0] = false;
	@s[1] = false;
	for (int i = 2; i <= @n; i += 1) {
		for (int j = i+i; j <= @n; j += i) {
			@s[j] = false;
		}
	}
	for (int i = 0; i <= @n; i += 1) {
		if (@s[i]) {
			print i;
		}
	}
}
