!747 m { static S question = "Is port 80 open?"; p { if (args.length != 0) question = join(" ", args); L tok = parse(question); //print(structure(tok)); print("Q: " + question); S[] match = match2(parse("is port * open"), tok); if (match != null) { int port = parseInt(match[0]); print("I'll check port " + port + "..."); boolean answer = isPortOpen(port); print("A: " + (answer ? "Yes, it is open!" : "No, it is not open.")); } else print("Unknown question: " + join(tok)); } static L parse(S s) { return tokensToLowerCase(dropPunctuation(javaTokPlusPeriod(s))); } }