!752 sclass Token { int originalIndex; S t; new L pointers; *() {} *(int *originalIndex, S *t) {} } sclass Ptr { int from, to; // token indices *() {} *(int *from, int *to) {} public S toString() { ret from + " -> " + to + " (" + quote(get(tok, from)) + "/" + quote(get(tok, to)) + ")"; } } static L tok; static new L tokens; static new L pointers; static new HashMap stringDefs; p { S text = [[ consider the string "abc" what is the string's length? ]]; tok = nlTok3(text); printStructure(codeTokens(tok)); for (int i = 1; i < l(tok); i += 2) tokens.add(new Token(i, tok.get(i))); for (int i : jfindAll(tok, "the string ")) { S s = get(tok, i+4); if (isProperlyQuoted(s)) print("String found: " + s); stringDefs.put(i+2, unquote(s)); } for (int pointers.add(new Ptr( indexOfOccurrence(tok, "string", 1), indexOfOccurrence(tok, "string", 0))); printAll(pointers); }