/* Example: ---------- 1. ERROR in /home/stefan/JavaX-Caches/Temp/1642773472353/UserCode_1642773470538.java (at line 26) xg.fillRect(10, 10, 10, 10); ^^ xg cannot be resolved ---------- */ sclass ECJError { } static L parseECJOutputForErrors(S text) { LS lines = lines(text); for i over lines: { if (startsWith(lines.get(i), "---")) { S line = get(lines, i+1); print(line); LS groups = regexpFirstGroups("^\\d+\\. ERROR in (.*?) \\(at line (\\d+)\\)$", line); if (groups != null) { print(groups); S codeLine = get(lines, i+2); S markLine = get(lines, i+3); } } } null; }