Beispiel #1
0
 @Override
 public String toString() {
   final StringBuilder sb = new StringBuilder(COPY + ' ');
   for (final Let t : copies)
     sb.append(t.var).append(' ').append(ASSIGN).append(' ').append(t.expr).append(' ');
   return sb.append(MODIFY + ' ' + expr[0] + ' ' + RETURN + ' ' + expr[1]).toString();
 }
Beispiel #2
0
 @Override
 public String toString() {
   final StringBuilder sb = new StringBuilder();
   final boolean str = query instanceof AStr;
   if (!str) sb.append("{ ");
   sb.append(query);
   if (!str) sb.append(" }");
   switch (mode) {
     case ALL:
       sb.append(' ' + ALL);
       break;
     case ALL_WORDS:
       sb.append(' ' + ALL + ' ' + WORDS);
       break;
     case ANY_WORD:
       sb.append(' ' + ANY + ' ' + WORD);
       break;
     case PHRASE:
       sb.append(' ' + PHRASE);
       break;
     default:
   }
   if (occ != null) sb.append(OCCURS + ' ' + occ[0] + ' ' + TO + ' ' + occ[1] + ' ' + TIMES);
   if (ftt != null) sb.append(ftt.opt);
   return sb.toString();
 }
Beispiel #3
0
 @Override
 public String toString() {
   final StringBuilder sb = new StringBuilder();
   final int pl = post.length;
   for (int p = 0; p < pl; p++) {
     sb.append(LET).append(" (: post-group :) ").append(post[p]);
     sb.append(' ').append(ASSIGN).append(' ').append(preExpr[p]).append(' ');
   }
   sb.append(GROUP).append(' ').append(BY);
   final int sl = specs.length;
   for (int s = 0; s < sl; s++) sb.append(s == 0 ? " " : SEP).append(specs[s]);
   return sb.toString();
 }
Beispiel #4
0
 @Override
 public String toString() {
   final StringBuilder sb = new StringBuilder("try { " + expr + " }");
   for (final Catch c : catches) sb.append(' ').append(c);
   return sb.toString();
 }
Beispiel #5
0
 /**
  * Prints the array with the specified separator.
  *
  * @param sep separator
  * @return string representation
  */
 final String toString(final Object sep) {
   final StringBuilder sb = new StringBuilder();
   final int es = exprs.length;
   for (int e = 0; e < es; e++) sb.append(e == 0 ? "" : sep.toString()).append(exprs[e]);
   return sb.toString();
 }