protected static CycSymbol getCycSymbol(GenerationMode mode) {
    switch (mode) {
      case Text:
        return TEXT;
      case HTML:
        return NLFormat.HTML;
    }
    throw new UnsupportedOperationException("Can't turn " + mode + " into a CycSymbol.");
  }