!7 p-autorestart { new Matches m; for (S s : printIterate(mL("Things that should be"))) { temp tempIndent(); //if "... should always be ..." //printIndent("I'm asking: Are \*$1*/ \*$2*/?"); // Find question S q = lookupNL(mechMap("Should => Question"), s); if (q == null) continue with print("No question found"); print(q); // Find code S code = lookupNL(mechMap("Question => Iteration"), q); if (code == null) continue with print("No code found"); print(code); // Parse Forall L tok = javaTok(code); int i = tok_forall(tok, m); if (i < 0) continue with print("No forall found"); print("For each " + $1 + ": " + $2); L tok2 = javaTok($1); S var = assertIdentifier(lastToken(tok2)); S entity = trim(dropLastToken(tok2)); S entityList = lookupNL("Entity => List that lists all instances", entity); if (entityList == null) continue with print("No entity list found"); print("Have " + n2(mL(entityList), "entity", "entities") + "!"); } }