}
private void buildFlagMap(org.jnode.shell.syntax.Syntax syntax,
HashMap<String, TreeSet<String>> res) {
if (syntax instanceof OptionSyntax) {
OptionSyntax os = (OptionSyntax) syntax;
String key = os.getArgName();
TreeSet<String> options = res.get(key);
if (options == null) {
options = new TreeSet<String>();
res.put(key, options);
}
String shortOptName = os.getShortOptName();
if (shortOptName != null) {
options.add(shortOptName);
}
String longOptName = os.getLongOptName();
if (longOptName != null) {
options.add(longOptName);
}
} else {
for (org.jnode.shell.syntax.Syntax child : syntax.getChildren()) {