Project

General

Profile

« Previous | Next » 

Revision 29517

implemented copy function that mimics the identify transform

View differences:

FtScript.java
455 455
    }
456 456
  }
457 457

  
458
  final public void copy(Rules r) throws ParseException {
459
                              /*@bgen(jjtree) MyCopy */
460
  ASTMyCopy jjtn000 = new ASTMyCopy(JJTMYCOPY);
461
  boolean jjtc000 = true;
462
  jjtree.openNodeScope(jjtn000);
463
    try {
464
       jjtn000.setRule(r);
465
      jj_consume_token(COPY);
466
      jj_consume_token(LPAREN);
467
                                                  String templateMatchExpression; String applyTemplateSelectExpression; String copySelectExpression;
468
      templateMatchExpression = quotedString();
469
      jj_consume_token(COMMA);
470
      applyTemplateSelectExpression = quotedString();
471
      jj_consume_token(COMMA);
472
      copySelectExpression = quotedString();
473
      jj_consume_token(RPAREN);
474
                                                  jjtree.closeNodeScope(jjtn000, true);
475
                                                  jjtc000 = false;
476
                                           jjtn000.copy(templateMatchExpression, applyTemplateSelectExpression, copySelectExpression);
477
    } catch (Throwable jjte000) {
478
    if (jjtc000) {
479
      jjtree.clearNodeScope(jjtn000);
480
      jjtc000 = false;
481
    } else {
482
      jjtree.popNode();
483
    }
484
    if (jjte000 instanceof RuntimeException) {
485
      {if (true) throw (RuntimeException)jjte000;}
486
    }
487
    if (jjte000 instanceof ParseException) {
488
      {if (true) throw (ParseException)jjte000;}
489
    }
490
    {if (true) throw (Error)jjte000;}
491
    } finally {
492
    if (jjtc000) {
493
      jjtree.closeNodeScope(jjtn000, true);
494
    }
495
    }
496
  }
497

  
458 498
  final public void op(Rules r) throws ParseException {
459 499
                          /*@bgen(jjtree) MyOp */
460 500
                          ASTMyOp jjtn000 = new ASTMyOp(JJTMYOP);
......
733 773
      case SET:
734 774
        set(r);
735 775
        break;
776
      case COPY:
777
        copy(r);
778
        break;
736 779
      case EMPTY:
737 780
        empty(r);
738 781
        break;
......
901 944
    finally { jj_save(0, xla); }
902 945
  }
903 946

  
904
  private boolean jj_3_1() {
905
    if (jj_3R_8()) return true;
906
    return false;
907
  }
908

  
909 947
  private boolean jj_3R_14() {
910 948
    if (jj_scan_token(JOBCONST)) return true;
911 949
    return false;
......
929 967
    return false;
930 968
  }
931 969

  
970
  private boolean jj_3_1() {
971
    if (jj_3R_8()) return true;
972
    return false;
973
  }
974

  
932 975
  private boolean jj_3R_12() {
933 976
    if (jj_scan_token(QUOTED_STRING)) return true;
934 977
    return false;
......
980 1023
      jj_la1_init_2();
981 1024
   }
982 1025
   private static void jj_la1_init_0() {
983
      jj_la1_0 = new int[] {0x0,0x0,0x0,0x0,0x10000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8307c000,0x4000000,0x0,0xa387c000,0x200,0x80000,0x400000,0x14000800,0x14000800,0x300000,};
1026
      jj_la1_0 = new int[] {0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x607c000,0x8000000,0x0,0x470fc000,0x200,0x100000,0x800000,0x28000800,0x28000800,0x600000,};
984 1027
   }
985 1028
   private static void jj_la1_init_1() {
986
      jj_la1_1 = new int[] {0x2d00000,0x40d00000,0x40d00000,0x20,0x0,0xd00000,0x18000000,0x2d00000,0x20,0x20,0x2100000,0x20,0x2100000,0x1,0x0,0x40300000,0x1,0x0,0x0,0x0,0x40300000,0x40300000,0x0,};
1029
      jj_la1_1 = new int[] {0xb400000,0x3400000,0x3400000,0x40,0x0,0x3400000,0x60000000,0xb400000,0x40,0x40,0x8400000,0x40,0x8400000,0x3,0x0,0xc00000,0x3,0x0,0x0,0x0,0xc00000,0xc00000,0x0,};
987 1030
   }
988 1031
   private static void jj_la1_init_2() {
989
      jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
1032
      jj_la1_2 = new int[] {0x0,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x1,0x1,0x0,};
990 1033
   }
991 1034
  final private JJCalls[] jj_2_rtns = new JJCalls[1];
992 1035
  private boolean jj_rescan = false;
......
1175 1218
  /** Generate ParseException. */
1176 1219
  public ParseException generateParseException() {
1177 1220
    jj_expentries.clear();
1178
    boolean[] la1tokens = new boolean[67];
1221
    boolean[] la1tokens = new boolean[69];
1179 1222
    if (jj_kind >= 0) {
1180 1223
      la1tokens[jj_kind] = true;
1181 1224
      jj_kind = -1;
......
1195 1238
        }
1196 1239
      }
1197 1240
    }
1198
    for (int i = 0; i < 67; i++) {
1241
    for (int i = 0; i < 69; i++) {
1199 1242
      if (la1tokens[i]) {
1200 1243
        jj_expentry = new int[1];
1201 1244
        jj_expentry[0] = i;

Also available in: Unified diff