public String toString() {
   StringBuilder result = new StringBuilder();
   if (finalTokenName != null) result.append("! ");
   if (actions.size() == 1)
     result.append(
         actions.keySet().toArray()[0].toString() + actions.values().toArray()[0].toString());
   if (actions.size() > 1) {
     result.append(" ( ");
     for (Map.Entry<Rule, LexerNode> action : actions.entrySet()) {
       if (result.length() != 3) {
         result.append(" || ");
       }
       result.append(action.getKey().toString());
       result.append(action.getValue().toString());
     }
     result.append(" ) ");
   }
   return result.toString();
 }
 private String collectionJoin(Collection<String> collection, char c) {
   StringBuilder ongoingParsingArgs = new StringBuilder();
   for (String token : collection) {
     ongoingParsingArgs.append(token);
     ongoingParsingArgs.append(c);
   }
   if (ongoingParsing.size() > 0) {
     ongoingParsingArgs.deleteCharAt(ongoingParsingArgs.length() - 1);
   }
   return ongoingParsingArgs.toString();
 }