Simple compound statement solver in lua