class MapsTokenScanner {

    Map<String, String> scanMap() {
        Map<String, String> map = new HashMap<>();
        skipWhiteSpace();
        while (hasNext()) {
            if (peek() == ',') {
                next();
                break;
            }
            map.put(scanKey(), scanValue());
            skipWhiteSpace();
        }
        return map;
    }

    public  MapsTokenScanner(String input);

}