package yokohama.unit.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class GenSym {
    private final Map<String, Integer> map = new HashMap<>();

    public GenSym() {}

    public GenSym(List<String> reserved) {
        for (String sym : reserved) {
            generate(sym);
        }
    }

    public Sym generate(String prefix) {
        int index = map.compute(prefix, (k, v) -> v == null ? 1 : v + 1);
        return index == 1 ? Sym.of(prefix) : Sym.of(prefix + index);
    }
}

@@ -52,31 +52,8 @@
 ap;%0A
-import java.util.List;%0A
 impo
@@ -184,133 +184,8 @@
 %7B%7D%0A%0A
-    public GenSym(List%3CString%3E reserved) %7B%0A        for (String sym : reserved) %7B%0A            generate(sym);%0A        %7D%0A    %7D%0A%0A
     

Remove unused constructor