match a Lua string, comment, or expression by loose parsing in pure Lua