I ran into a fragment of Stratego today that takes around 15 seconds to parse. I checked parsing speeds for larger Stratego files, but they all parse faster than a second, so there is something about the structure of this fragments that make it parse slow. A lot of ambiguities perhaps? Wondering if someone knows why it parses slow and if it could be fixed in the Stratego grammar.

It’s the following fragment:

  relation-match-custom(|ctx) : 
    ("<list-of-type:", l1, l2) -> <task-create-id(|ctx, [or22])> l2
    where 
      a11 := <new-task(|ctx)> Rewrite("proj0", l1);
      a12 := <new-task(|ctx)> Rewrite("proj1", l2); task-create-id(|ctx, [a11]);
      relmatch23 := <relation-create-match(|ctx); task-create-id(|ctx, [a12])> ("<type:", a11, a12);
      a21 := <new-task(|ctx)> Rewrite("proj2", l1);
      b21 := <new-task(|ctx)> Rewrite("proj3", l1); task-create-id(|ctx, [a21]);
      a22 := <new-task(|ctx)> Rewrite("proj4", l2); task-create-id(|ctx, [b21]);
      b22 := <new-task(|ctx)> Rewrite("proj5", l2); task-create-id(|ctx, [a22]);
      relmatch24 := <relation-create-match(|ctx); task-create-id(|ctx, [b22])> ("<type:", a21, a22);
      relmatch25 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch24])> ("<type:", b21, b22);
      or9 := <type-is(|ctx)> <task-create-choice(|ctx)> [relmatch23, relmatch25];
      a31 := <new-task(|ctx)> Rewrite("proj6", l1);
      b31 := <new-task(|ctx)> Rewrite("proj7", l1); task-create-id(|ctx, [a31]);
      c31 := <new-task(|ctx)> Rewrite("proj8", l1); task-create-id(|ctx, [b31]);
      a32 := <new-task(|ctx)> Rewrite("proj9", l2); task-create-id(|ctx, [c31]);
      b32 := <new-task(|ctx)> Rewrite("proj10", l2); task-create-id(|ctx, [a32]);
      c32 := <new-task(|ctx)> Rewrite("proj11", l2); task-create-id(|ctx, [b32]);
      relmatch26 := <relation-create-match(|ctx); task-create-id(|ctx, [c32])> ("<type:", a31, a32);
      relmatch27 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch26])> ("<type:", b31, b32);
      relmatch28 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch27])> ("<type:", c31, c32);
      or10 := <type-is(|ctx)> <task-create-choice(|ctx)> [or9, relmatch28];
      a41 := <new-task(|ctx)> Rewrite("proj12", l1);
      b41 := <new-task(|ctx)> Rewrite("proj13", l1); task-create-id(|ctx, [a41]);
      c41 := <new-task(|ctx)> Rewrite("proj14", l1); task-create-id(|ctx, [b41]);
      d41 := <new-task(|ctx)> Rewrite("proj15", l1); task-create-id(|ctx, [c41]);
      a42 := <new-task(|ctx)> Rewrite("proj16", l2); task-create-id(|ctx, [d41]);
      b42 := <new-task(|ctx)> Rewrite("proj17", l2); task-create-id(|ctx, [a42]);
      c42 := <new-task(|ctx)> Rewrite("proj18", l2); task-create-id(|ctx, [b42]);
      d42 := <new-task(|ctx)> Rewrite("proj19", l2); task-create-id(|ctx, [c42]);
      relmatch29 := <relation-create-match(|ctx); task-create-id(|ctx, [d42])> ("<type:", a41, a42);
      relmatch30 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch29])> ("<type:", b41, b42);
      relmatch31 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch30])> ("<type:", c41, c42);
      relmatch32 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch31])> ("<type:", d41, d42);
      or11 := <type-is(|ctx)> <task-create-choice(|ctx)> [or10, relmatch32];
      a51 := <new-task(|ctx)> Rewrite("proj20", l1);
      b51 := <new-task(|ctx)> Rewrite("proj21", l1); task-create-id(|ctx, [a51]);
      c51 := <new-task(|ctx)> Rewrite("proj22", l1); task-create-id(|ctx, [b51]);
      d51 := <new-task(|ctx)> Rewrite("proj23", l1); task-create-id(|ctx, [c51]);
      e51 := <new-task(|ctx)> Rewrite("proj24", l1); task-create-id(|ctx, [d51]);
      a52 := <new-task(|ctx)> Rewrite("proj25", l2); task-create-id(|ctx, [e51]);
      b52 := <new-task(|ctx)> Rewrite("proj26", l2); task-create-id(|ctx, [a52]);
      c52 := <new-task(|ctx)> Rewrite("proj27", l2); task-create-id(|ctx, [b52]);
      d52 := <new-task(|ctx)> Rewrite("proj28", l2); task-create-id(|ctx, [c52]);
      e52 := <new-task(|ctx)> Rewrite("proj29", l2); task-create-id(|ctx, [d52]);
      relmatch33 := <relation-create-match(|ctx); task-create-id(|ctx, [e52])> ("<type:", a51, a52);
      relmatch34 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch33])> ("<type:", b51, b52);
      relmatch35 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch34])> ("<type:", c51, c52);
      relmatch36 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch35])> ("<type:", d51, d52);
      relmatch37 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch36])> ("<type:", e51, e52);
      or12 := <type-is(|ctx)> <task-create-choice(|ctx)> [or11, relmatch37];
      a61 := <new-task(|ctx)> Rewrite("proj30", l1);
      b61 := <new-task(|ctx)> Rewrite("proj31", l1); task-create-id(|ctx, [a61]);
      c61 := <new-task(|ctx)> Rewrite("proj32", l1); task-create-id(|ctx, [b61]);
      d61 := <new-task(|ctx)> Rewrite("proj33", l1); task-create-id(|ctx, [c61]);
      e61 := <new-task(|ctx)> Rewrite("proj34", l1); task-create-id(|ctx, [d61]);
      f61 := <new-task(|ctx)> Rewrite("proj35", l1); task-create-id(|ctx, [e61]);
      a62 := <new-task(|ctx)> Rewrite("proj36", l2); task-create-id(|ctx, [f61]);
      b62 := <new-task(|ctx)> Rewrite("proj37", l2); task-create-id(|ctx, [a62]);
      c62 := <new-task(|ctx)> Rewrite("proj38", l2); task-create-id(|ctx, [b62]);
      d62 := <new-task(|ctx)> Rewrite("proj39", l2); task-create-id(|ctx, [c62]);
      e62 := <new-task(|ctx)> Rewrite("proj40", l2); task-create-id(|ctx, [d62]);
      f62 := <new-task(|ctx)> Rewrite("proj41", l2); task-create-id(|ctx, [e62]);
      relmatch38 := <relation-create-match(|ctx); task-create-id(|ctx, [f62])> ("<type:", a61, a62);
      relmatch39 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch38])> ("<type:", b61, b62);
      relmatch40 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch39])> ("<type:", c61, c62);
      relmatch41 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch40])> ("<type:", d61, d62);
      relmatch42 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch41])> ("<type:", e61, e62);
      relmatch43 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch42])> ("<type:", f61, f62);
      or13 := <type-is(|ctx)> <task-create-choice(|ctx)> [or12, relmatch43];
      a71 := <new-task(|ctx)> Rewrite("proj42", l1);
      b71 := <new-task(|ctx)> Rewrite("proj43", l1); task-create-id(|ctx, [a71]);
      c71 := <new-task(|ctx)> Rewrite("proj44", l1); task-create-id(|ctx, [b71]);
      d71 := <new-task(|ctx)> Rewrite("proj45", l1); task-create-id(|ctx, [c71]);
      e71 := <new-task(|ctx)> Rewrite("proj46", l1); task-create-id(|ctx, [d71]);
      f71 := <new-task(|ctx)> Rewrite("proj47", l1); task-create-id(|ctx, [e71]);
      g71 := <new-task(|ctx)> Rewrite("proj48", l1); task-create-id(|ctx, [f71]);
      a72 := <new-task(|ctx)> Rewrite("proj49", l2); task-create-id(|ctx, [g71]);
      b72 := <new-task(|ctx)> Rewrite("proj50", l2); task-create-id(|ctx, [a72]);
      c72 := <new-task(|ctx)> Rewrite("proj51", l2); task-create-id(|ctx, [b72]);
      d72 := <new-task(|ctx)> Rewrite("proj52", l2); task-create-id(|ctx, [c72]);
      e72 := <new-task(|ctx)> Rewrite("proj53", l2); task-create-id(|ctx, [d72]);
      f72 := <new-task(|ctx)> Rewrite("proj54", l2); task-create-id(|ctx, [e72]);
      g72 := <new-task(|ctx)> Rewrite("proj55", l2); task-create-id(|ctx, [f72]);
      relmatch44 := <relation-create-match(|ctx); task-create-id(|ctx, [g72])> ("<type:", a71, a72);
      relmatch45 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch44])> ("<type:", b71, b72);
      relmatch46 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch45])> ("<type:", c71, c72);
      relmatch47 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch46])> ("<type:", d71, d72);
      relmatch48 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch47])> ("<type:", e71, e72);
      relmatch49 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch48])> ("<type:", f71, f72);
      relmatch50 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch49])> ("<type:", g71, g72);
      or14 := <type-is(|ctx)> <task-create-choice(|ctx)> [or13, relmatch50];
      a81 := <new-task(|ctx)> Rewrite("proj56", l1);
      b81 := <new-task(|ctx)> Rewrite("proj57", l1); task-create-id(|ctx, [a81]);
      c81 := <new-task(|ctx)> Rewrite("proj58", l1); task-create-id(|ctx, [b81]);
      d81 := <new-task(|ctx)> Rewrite("proj59", l1); task-create-id(|ctx, [c81]);
      e81 := <new-task(|ctx)> Rewrite("proj60", l1); task-create-id(|ctx, [d81]);
      f81 := <new-task(|ctx)> Rewrite("proj61", l1); task-create-id(|ctx, [e81]);
      g81 := <new-task(|ctx)> Rewrite("proj62", l1); task-create-id(|ctx, [f81]);
      h81 := <new-task(|ctx)> Rewrite("proj63", l1); task-create-id(|ctx, [g81]);
      a82 := <new-task(|ctx)> Rewrite("proj64", l2); task-create-id(|ctx, [h81]);
      b82 := <new-task(|ctx)> Rewrite("proj65", l2); task-create-id(|ctx, [a82]);
      c82 := <new-task(|ctx)> Rewrite("proj66", l2); task-create-id(|ctx, [b82]);
      d82 := <new-task(|ctx)> Rewrite("proj67", l2); task-create-id(|ctx, [c82]);
      e82 := <new-task(|ctx)> Rewrite("proj68", l2); task-create-id(|ctx, [d82]);
      f82 := <new-task(|ctx)> Rewrite("proj69", l2); task-create-id(|ctx, [e82]);
      g82 := <new-task(|ctx)> Rewrite("proj70", l2); task-create-id(|ctx, [f82]);
      h82 := <new-task(|ctx)> Rewrite("proj71", l2); task-create-id(|ctx, [g82]);
      relmatch51 := <relation-create-match(|ctx); task-create-id(|ctx, [h82])> ("<type:", a81, a82);
      relmatch52 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch51])> ("<type:", b81, b82);
      relmatch53 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch52])> ("<type:", c81, c82);
      relmatch54 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch53])> ("<type:", d81, d82);
      relmatch55 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch54])> ("<type:", e81, e82);
      relmatch56 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch55])> ("<type:", f81, f82);
      relmatch57 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch56])> ("<type:", g81, g82);
      relmatch58 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch57])> ("<type:", h81, h82);
      or15 := <type-is(|ctx)> <task-create-choice(|ctx)> [or14, relmatch58];
      a91 := <new-task(|ctx)> Rewrite("proj72", l1);
      b91 := <new-task(|ctx)> Rewrite("proj73", l1); task-create-id(|ctx, [a91]);
      c91 := <new-task(|ctx)> Rewrite("proj74", l1); task-create-id(|ctx, [b91]);
      d91 := <new-task(|ctx)> Rewrite("proj75", l1); task-create-id(|ctx, [c91]);
      e91 := <new-task(|ctx)> Rewrite("proj76", l1); task-create-id(|ctx, [d91]);
      f91 := <new-task(|ctx)> Rewrite("proj77", l1); task-create-id(|ctx, [e91]);
      g91 := <new-task(|ctx)> Rewrite("proj78", l1); task-create-id(|ctx, [f91]);
      h91 := <new-task(|ctx)> Rewrite("proj79", l1); task-create-id(|ctx, [g91]);
      i91 := <new-task(|ctx)> Rewrite("proj80", l1); task-create-id(|ctx, [h91]);
      a92 := <new-task(|ctx)> Rewrite("proj81", l2); task-create-id(|ctx, [i91]);
      b92 := <new-task(|ctx)> Rewrite("proj82", l2); task-create-id(|ctx, [a92]);
      c92 := <new-task(|ctx)> Rewrite("proj83", l2); task-create-id(|ctx, [b92]);
      d92 := <new-task(|ctx)> Rewrite("proj84", l2); task-create-id(|ctx, [c92]);
      e92 := <new-task(|ctx)> Rewrite("proj85", l2); task-create-id(|ctx, [d92]);
      f92 := <new-task(|ctx)> Rewrite("proj86", l2); task-create-id(|ctx, [e92]);
      g92 := <new-task(|ctx)> Rewrite("proj87", l2); task-create-id(|ctx, [f92]);
      h92 := <new-task(|ctx)> Rewrite("proj88", l2); task-create-id(|ctx, [g92]);
      i92 := <new-task(|ctx)> Rewrite("proj89", l2); task-create-id(|ctx, [h92]);
      relmatch59 := <relation-create-match(|ctx); task-create-id(|ctx, [i92])> ("<type:", a91, a92);
      relmatch60 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch59])> ("<type:", b91, b92);
      relmatch61 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch60])> ("<type:", c91, c92);
      relmatch62 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch61])> ("<type:", d91, d92);
      relmatch63 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch62])> ("<type:", e91, e92);
      relmatch64 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch63])> ("<type:", f91, f92);
      relmatch65 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch64])> ("<type:", g91, g92);
      relmatch66 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch65])> ("<type:", h91, h92);
      relmatch67 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch66])> ("<type:", i91, i92);
      or16 := <type-is(|ctx)> <task-create-choice(|ctx)> [or15, relmatch67];
      a101 := <new-task(|ctx)> Rewrite("proj90", l1);
      b101 := <new-task(|ctx)> Rewrite("proj91", l1); task-create-id(|ctx, [a101]);
      c101 := <new-task(|ctx)> Rewrite("proj92", l1); task-create-id(|ctx, [b101]);
      d101 := <new-task(|ctx)> Rewrite("proj93", l1); task-create-id(|ctx, [c101]);
      e101 := <new-task(|ctx)> Rewrite("proj94", l1); task-create-id(|ctx, [d101]);
      f101 := <new-task(|ctx)> Rewrite("proj95", l1); task-create-id(|ctx, [e101]);
      g101 := <new-task(|ctx)> Rewrite("proj96", l1); task-create-id(|ctx, [f101]);
      h101 := <new-task(|ctx)> Rewrite("proj97", l1); task-create-id(|ctx, [g101]);
      i101 := <new-task(|ctx)> Rewrite("proj98", l1); task-create-id(|ctx, [h101]);
      j101 := <new-task(|ctx)> Rewrite("proj99", l1); task-create-id(|ctx, [i101]);
      a102 := <new-task(|ctx)> Rewrite("proj100", l2); task-create-id(|ctx, [j101]);
      b102 := <new-task(|ctx)> Rewrite("proj101", l2); task-create-id(|ctx, [a102]);
      c102 := <new-task(|ctx)> Rewrite("proj102", l2); task-create-id(|ctx, [b102]);
      d102 := <new-task(|ctx)> Rewrite("proj103", l2); task-create-id(|ctx, [c102]);
      e102 := <new-task(|ctx)> Rewrite("proj104", l2); task-create-id(|ctx, [d102]);
      f102 := <new-task(|ctx)> Rewrite("proj105", l2); task-create-id(|ctx, [e102]);
      g102 := <new-task(|ctx)> Rewrite("proj106", l2); task-create-id(|ctx, [f102]);
      h102 := <new-task(|ctx)> Rewrite("proj107", l2); task-create-id(|ctx, [g102]);
      i102 := <new-task(|ctx)> Rewrite("proj108", l2); task-create-id(|ctx, [h102]);
      j102 := <new-task(|ctx)> Rewrite("proj109", l2); task-create-id(|ctx, [i102]);
      relmatch68 := <relation-create-match(|ctx); task-create-id(|ctx, [j102])> ("<type:", a101, a102);
      relmatch69 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch68])> ("<type:", b101, b102);
      relmatch70 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch69])> ("<type:", c101, c102);
      relmatch71 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch70])> ("<type:", d101, d102);
      relmatch72 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch71])> ("<type:", e101, e102);
      relmatch73 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch72])> ("<type:", f101, f102);
      relmatch74 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch73])> ("<type:", g101, g102);
      relmatch75 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch74])> ("<type:", h101, h102);
      relmatch76 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch75])> ("<type:", i101, i102);
      relmatch77 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch76])> ("<type:", j101, j102);
      or17 := <type-is(|ctx)> <task-create-choice(|ctx)> [or16, relmatch77];
      a111 := <new-task(|ctx)> Rewrite("proj110", l1);
      b111 := <new-task(|ctx)> Rewrite("proj111", l1); task-create-id(|ctx, [a111]);
      c111 := <new-task(|ctx)> Rewrite("proj112", l1); task-create-id(|ctx, [b111]);
      d111 := <new-task(|ctx)> Rewrite("proj113", l1); task-create-id(|ctx, [c111]);
      e111 := <new-task(|ctx)> Rewrite("proj114", l1); task-create-id(|ctx, [d111]);
      f111 := <new-task(|ctx)> Rewrite("proj115", l1); task-create-id(|ctx, [e111]);
      g111 := <new-task(|ctx)> Rewrite("proj116", l1); task-create-id(|ctx, [f111]);
      h111 := <new-task(|ctx)> Rewrite("proj117", l1); task-create-id(|ctx, [g111]);
      i111 := <new-task(|ctx)> Rewrite("proj118", l1); task-create-id(|ctx, [h111]);
      j111 := <new-task(|ctx)> Rewrite("proj119", l1); task-create-id(|ctx, [i111]);
      k111 := <new-task(|ctx)> Rewrite("proj120", l1); task-create-id(|ctx, [j111]);
      a112 := <new-task(|ctx)> Rewrite("proj121", l2); task-create-id(|ctx, [k111]);
      b112 := <new-task(|ctx)> Rewrite("proj122", l2); task-create-id(|ctx, [a112]);
      c112 := <new-task(|ctx)> Rewrite("proj123", l2); task-create-id(|ctx, [b112]);
      d112 := <new-task(|ctx)> Rewrite("proj124", l2); task-create-id(|ctx, [c112]);
      e112 := <new-task(|ctx)> Rewrite("proj125", l2); task-create-id(|ctx, [d112]);
      f112 := <new-task(|ctx)> Rewrite("proj126", l2); task-create-id(|ctx, [e112]);
      g112 := <new-task(|ctx)> Rewrite("proj127", l2); task-create-id(|ctx, [f112]);
      h112 := <new-task(|ctx)> Rewrite("proj128", l2); task-create-id(|ctx, [g112]);
      i112 := <new-task(|ctx)> Rewrite("proj129", l2); task-create-id(|ctx, [h112]);
      j112 := <new-task(|ctx)> Rewrite("proj130", l2); task-create-id(|ctx, [i112]);
      k112 := <new-task(|ctx)> Rewrite("proj131", l2); task-create-id(|ctx, [j112]);
      relmatch78 := <relation-create-match(|ctx); task-create-id(|ctx, [k112])> ("<type:", a111, a112);
      relmatch79 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch78])> ("<type:", b111, b112);
      relmatch80 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch79])> ("<type:", c111, c112);
      relmatch81 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch80])> ("<type:", d111, d112);
      relmatch82 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch81])> ("<type:", e111, e112);
      relmatch83 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch82])> ("<type:", f111, f112);
      relmatch84 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch83])> ("<type:", g111, g112);
      relmatch85 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch84])> ("<type:", h111, h112);
      relmatch86 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch85])> ("<type:", i111, i112);
      relmatch87 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch86])> ("<type:", j111, j112);
      relmatch88 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch87])> ("<type:", k111, k112);
      or18 := <type-is(|ctx)> <task-create-choice(|ctx)> [or17, relmatch88];
      a121 := <new-task(|ctx)> Rewrite("proj132", l1);
      b121 := <new-task(|ctx)> Rewrite("proj133", l1); task-create-id(|ctx, [a121]);
      c121 := <new-task(|ctx)> Rewrite("proj134", l1); task-create-id(|ctx, [b121]);
      d121 := <new-task(|ctx)> Rewrite("proj135", l1); task-create-id(|ctx, [c121]);
      e121 := <new-task(|ctx)> Rewrite("proj136", l1); task-create-id(|ctx, [d121]);
      f121 := <new-task(|ctx)> Rewrite("proj137", l1); task-create-id(|ctx, [e121]);
      g121 := <new-task(|ctx)> Rewrite("proj138", l1); task-create-id(|ctx, [f121]);
      h121 := <new-task(|ctx)> Rewrite("proj139", l1); task-create-id(|ctx, [g121]);
      i121 := <new-task(|ctx)> Rewrite("proj140", l1); task-create-id(|ctx, [h121]);
      j121 := <new-task(|ctx)> Rewrite("proj141", l1); task-create-id(|ctx, [i121]);
      k121 := <new-task(|ctx)> Rewrite("proj142", l1); task-create-id(|ctx, [j121]);
      l121 := <new-task(|ctx)> Rewrite("proj143", l1); task-create-id(|ctx, [k121]);
      a122 := <new-task(|ctx)> Rewrite("proj144", l2); task-create-id(|ctx, [l121]);
      b122 := <new-task(|ctx)> Rewrite("proj145", l2); task-create-id(|ctx, [a122]);
      c122 := <new-task(|ctx)> Rewrite("proj146", l2); task-create-id(|ctx, [b122]);
      d122 := <new-task(|ctx)> Rewrite("proj147", l2); task-create-id(|ctx, [c122]);
      e122 := <new-task(|ctx)> Rewrite("proj148", l2); task-create-id(|ctx, [d122]);
      f122 := <new-task(|ctx)> Rewrite("proj149", l2); task-create-id(|ctx, [e122]);
      g122 := <new-task(|ctx)> Rewrite("proj150", l2); task-create-id(|ctx, [f122]);
      h122 := <new-task(|ctx)> Rewrite("proj151", l2); task-create-id(|ctx, [g122]);
      i122 := <new-task(|ctx)> Rewrite("proj152", l2); task-create-id(|ctx, [h122]);
      j122 := <new-task(|ctx)> Rewrite("proj153", l2); task-create-id(|ctx, [i122]);
      k122 := <new-task(|ctx)> Rewrite("proj154", l2); task-create-id(|ctx, [j122]);
      l122 := <new-task(|ctx)> Rewrite("proj155", l2); task-create-id(|ctx, [k122]);
      relmatch89 := <relation-create-match(|ctx); task-create-id(|ctx, [l122])> ("<type:", a121, a122);
      relmatch90 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch89])> ("<type:", b121, b122);
      relmatch91 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch90])> ("<type:", c121, c122);
      relmatch92 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch91])> ("<type:", d121, d122);
      relmatch93 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch92])> ("<type:", e121, e122);
      relmatch94 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch93])> ("<type:", f121, f122);
      relmatch95 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch94])> ("<type:", g121, g122);
      relmatch96 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch95])> ("<type:", h121, h122);
      relmatch97 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch96])> ("<type:", i121, i122);
      relmatch98 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch97])> ("<type:", j121, j122);
      relmatch99 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch98])> ("<type:", k121, k122);
      relmatch100 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch99])> ("<type:", l121, l122);
      or19 := <type-is(|ctx)> <task-create-choice(|ctx)> [or18, relmatch100];
      a131 := <new-task(|ctx)> Rewrite("proj156", l1);
      b131 := <new-task(|ctx)> Rewrite("proj157", l1); task-create-id(|ctx, [a131]);
      c131 := <new-task(|ctx)> Rewrite("proj158", l1); task-create-id(|ctx, [b131]);
      d131 := <new-task(|ctx)> Rewrite("proj159", l1); task-create-id(|ctx, [c131]);
      e131 := <new-task(|ctx)> Rewrite("proj160", l1); task-create-id(|ctx, [d131]);
      f131 := <new-task(|ctx)> Rewrite("proj161", l1); task-create-id(|ctx, [e131]);
      g131 := <new-task(|ctx)> Rewrite("proj162", l1); task-create-id(|ctx, [f131]);
      h131 := <new-task(|ctx)> Rewrite("proj163", l1); task-create-id(|ctx, [g131]);
      i131 := <new-task(|ctx)> Rewrite("proj164", l1); task-create-id(|ctx, [h131]);
      j131 := <new-task(|ctx)> Rewrite("proj165", l1); task-create-id(|ctx, [i131]);
      k131 := <new-task(|ctx)> Rewrite("proj166", l1); task-create-id(|ctx, [j131]);
      l131 := <new-task(|ctx)> Rewrite("proj167", l1); task-create-id(|ctx, [k131]);
      m131 := <new-task(|ctx)> Rewrite("proj168", l1); task-create-id(|ctx, [l131]);
      a132 := <new-task(|ctx)> Rewrite("proj169", l2); task-create-id(|ctx, [m131]);
      b132 := <new-task(|ctx)> Rewrite("proj170", l2); task-create-id(|ctx, [a132]);
      c132 := <new-task(|ctx)> Rewrite("proj171", l2); task-create-id(|ctx, [b132]);
      d132 := <new-task(|ctx)> Rewrite("proj172", l2); task-create-id(|ctx, [c132]);
      e132 := <new-task(|ctx)> Rewrite("proj173", l2); task-create-id(|ctx, [d132]);
      f132 := <new-task(|ctx)> Rewrite("proj174", l2); task-create-id(|ctx, [e132]);
      g132 := <new-task(|ctx)> Rewrite("proj175", l2); task-create-id(|ctx, [f132]);
      h132 := <new-task(|ctx)> Rewrite("proj176", l2); task-create-id(|ctx, [g132]);
      i132 := <new-task(|ctx)> Rewrite("proj177", l2); task-create-id(|ctx, [h132]);
      j132 := <new-task(|ctx)> Rewrite("proj178", l2); task-create-id(|ctx, [i132]);
      k132 := <new-task(|ctx)> Rewrite("proj179", l2); task-create-id(|ctx, [j132]);
      l132 := <new-task(|ctx)> Rewrite("proj180", l2); task-create-id(|ctx, [k132]);
      m132 := <new-task(|ctx)> Rewrite("proj181", l2); task-create-id(|ctx, [l132]);
      relmatch101 := <relation-create-match(|ctx); task-create-id(|ctx, [m132])> ("<type:", a131, a132);
      relmatch102 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch101])> ("<type:", b131, b132);
      relmatch103 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch102])> ("<type:", c131, c132);
      relmatch104 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch103])> ("<type:", d131, d132);
      relmatch105 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch104])> ("<type:", e131, e132);
      relmatch106 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch105])> ("<type:", f131, f132);
      relmatch107 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch106])> ("<type:", g131, g132);
      relmatch108 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch107])> ("<type:", h131, h132);
      relmatch109 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch108])> ("<type:", i131, i132);
      relmatch110 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch109])> ("<type:", j131, j132);
      relmatch111 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch110])> ("<type:", k131, k132);
      relmatch112 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch111])> ("<type:", l131, l132);
      relmatch113 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch112])> ("<type:", m131, m132);
      or20 := <type-is(|ctx)> <task-create-choice(|ctx)> [or19, relmatch113];
      a141 := <new-task(|ctx)> Rewrite("proj182", l1);
      b141 := <new-task(|ctx)> Rewrite("proj183", l1); task-create-id(|ctx, [a141]);
      c141 := <new-task(|ctx)> Rewrite("proj184", l1); task-create-id(|ctx, [b141]);
      d141 := <new-task(|ctx)> Rewrite("proj185", l1); task-create-id(|ctx, [c141]);
      e141 := <new-task(|ctx)> Rewrite("proj186", l1); task-create-id(|ctx, [d141]);
      f141 := <new-task(|ctx)> Rewrite("proj187", l1); task-create-id(|ctx, [e141]);
      g141 := <new-task(|ctx)> Rewrite("proj188", l1); task-create-id(|ctx, [f141]);
      h141 := <new-task(|ctx)> Rewrite("proj189", l1); task-create-id(|ctx, [g141]);
      i141 := <new-task(|ctx)> Rewrite("proj190", l1); task-create-id(|ctx, [h141]);
      j141 := <new-task(|ctx)> Rewrite("proj191", l1); task-create-id(|ctx, [i141]);
      k141 := <new-task(|ctx)> Rewrite("proj192", l1); task-create-id(|ctx, [j141]);
      l141 := <new-task(|ctx)> Rewrite("proj193", l1); task-create-id(|ctx, [k141]);
      m141 := <new-task(|ctx)> Rewrite("proj194", l1); task-create-id(|ctx, [l141]);
      n141 := <new-task(|ctx)> Rewrite("proj195", l1); task-create-id(|ctx, [m141]);
      a142 := <new-task(|ctx)> Rewrite("proj196", l2); task-create-id(|ctx, [n141]);
      b142 := <new-task(|ctx)> Rewrite("proj197", l2); task-create-id(|ctx, [a142]);
      c142 := <new-task(|ctx)> Rewrite("proj198", l2); task-create-id(|ctx, [b142]);
      d142 := <new-task(|ctx)> Rewrite("proj199", l2); task-create-id(|ctx, [c142]);
      e142 := <new-task(|ctx)> Rewrite("proj200", l2); task-create-id(|ctx, [d142]);
      f142 := <new-task(|ctx)> Rewrite("proj201", l2); task-create-id(|ctx, [e142]);
      g142 := <new-task(|ctx)> Rewrite("proj202", l2); task-create-id(|ctx, [f142]);
      h142 := <new-task(|ctx)> Rewrite("proj203", l2); task-create-id(|ctx, [g142]);
      i142 := <new-task(|ctx)> Rewrite("proj204", l2); task-create-id(|ctx, [h142]);
      j142 := <new-task(|ctx)> Rewrite("proj205", l2); task-create-id(|ctx, [i142]);
      k142 := <new-task(|ctx)> Rewrite("proj206", l2); task-create-id(|ctx, [j142]);
      l142 := <new-task(|ctx)> Rewrite("proj207", l2); task-create-id(|ctx, [k142]);
      m142 := <new-task(|ctx)> Rewrite("proj208", l2); task-create-id(|ctx, [l142]);
      n142 := <new-task(|ctx)> Rewrite("proj209", l2); task-create-id(|ctx, [m142]);
      relmatch114 := <relation-create-match(|ctx); task-create-id(|ctx, [n142])> ("<type:", a141, a142);
      relmatch115 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch114])> ("<type:", b141, b142);
      relmatch116 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch115])> ("<type:", c141, c142);
      relmatch117 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch116])> ("<type:", d141, d142);
      relmatch118 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch117])> ("<type:", e141, e142);
      relmatch119 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch118])> ("<type:", f141, f142);
      relmatch120 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch119])> ("<type:", g141, g142);
      relmatch121 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch120])> ("<type:", h141, h142);
      relmatch122 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch121])> ("<type:", i141, i142);
      relmatch123 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch122])> ("<type:", j141, j142);
      relmatch124 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch123])> ("<type:", k141, k142);
      relmatch125 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch124])> ("<type:", l141, l142);
      relmatch126 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch125])> ("<type:", m141, m142);
      relmatch127 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch126])> ("<type:", n141, n142);
      or21 := <type-is(|ctx)> <task-create-choice(|ctx)> [or20, relmatch127];
      a151 := <new-task(|ctx)> Rewrite("proj210", l1);
      b151 := <new-task(|ctx)> Rewrite("proj211", l1); task-create-id(|ctx, [a151]);
      c151 := <new-task(|ctx)> Rewrite("proj212", l1); task-create-id(|ctx, [b151]);
      d151 := <new-task(|ctx)> Rewrite("proj213", l1); task-create-id(|ctx, [c151]);
      e151 := <new-task(|ctx)> Rewrite("proj214", l1); task-create-id(|ctx, [d151]);
      f151 := <new-task(|ctx)> Rewrite("proj215", l1); task-create-id(|ctx, [e151]);
      g151 := <new-task(|ctx)> Rewrite("proj216", l1); task-create-id(|ctx, [f151]);
      h151 := <new-task(|ctx)> Rewrite("proj217", l1); task-create-id(|ctx, [g151]);
      i151 := <new-task(|ctx)> Rewrite("proj218", l1); task-create-id(|ctx, [h151]);
      j151 := <new-task(|ctx)> Rewrite("proj219", l1); task-create-id(|ctx, [i151]);
      k151 := <new-task(|ctx)> Rewrite("proj220", l1); task-create-id(|ctx, [j151]);
      l151 := <new-task(|ctx)> Rewrite("proj221", l1); task-create-id(|ctx, [k151]);
      m151 := <new-task(|ctx)> Rewrite("proj222", l1); task-create-id(|ctx, [l151]);
      n151 := <new-task(|ctx)> Rewrite("proj223", l1); task-create-id(|ctx, [m151]);
      o151 := <new-task(|ctx)> Rewrite("proj224", l1); task-create-id(|ctx, [n151]);
      a152 := <new-task(|ctx)> Rewrite("proj225", l2); task-create-id(|ctx, [o151]);
      b152 := <new-task(|ctx)> Rewrite("proj226", l2); task-create-id(|ctx, [a152]);
      c152 := <new-task(|ctx)> Rewrite("proj227", l2); task-create-id(|ctx, [b152]);
      d152 := <new-task(|ctx)> Rewrite("proj228", l2); task-create-id(|ctx, [c152]);
      e152 := <new-task(|ctx)> Rewrite("proj229", l2); task-create-id(|ctx, [d152]);
      f152 := <new-task(|ctx)> Rewrite("proj230", l2); task-create-id(|ctx, [e152]);
      g152 := <new-task(|ctx)> Rewrite("proj231", l2); task-create-id(|ctx, [f152]);
      h152 := <new-task(|ctx)> Rewrite("proj232", l2); task-create-id(|ctx, [g152]);
      i152 := <new-task(|ctx)> Rewrite("proj233", l2); task-create-id(|ctx, [h152]);
      j152 := <new-task(|ctx)> Rewrite("proj234", l2); task-create-id(|ctx, [i152]);
      k152 := <new-task(|ctx)> Rewrite("proj235", l2); task-create-id(|ctx, [j152]);
      l152 := <new-task(|ctx)> Rewrite("proj236", l2); task-create-id(|ctx, [k152]);
      m152 := <new-task(|ctx)> Rewrite("proj237", l2); task-create-id(|ctx, [l152]);
      n152 := <new-task(|ctx)> Rewrite("proj238", l2); task-create-id(|ctx, [m152]);
      o152 := <new-task(|ctx)> Rewrite("proj239", l2); task-create-id(|ctx, [n152]);
      relmatch128 := <relation-create-match(|ctx); task-create-id(|ctx, [o152])> ("<type:", a151, a152);
      relmatch129 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch128])> ("<type:", b151, b152);
      relmatch130 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch129])> ("<type:", c151, c152);
      relmatch131 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch130])> ("<type:", d151, d152);
      relmatch132 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch131])> ("<type:", e151, e152);
      relmatch133 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch132])> ("<type:", f151, f152);
      relmatch134 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch133])> ("<type:", g151, g152);
      relmatch135 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch134])> ("<type:", h151, h152);
      relmatch136 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch135])> ("<type:", i151, i152);
      relmatch137 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch136])> ("<type:", j151, j152);
      relmatch138 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch137])> ("<type:", k151, k152);
      relmatch139 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch138])> ("<type:", l151, l152);
      relmatch140 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch139])> ("<type:", m151, m152);
      relmatch141 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch140])> ("<type:", n151, n152);
      relmatch142 := <relation-create-match(|ctx); task-create-id(|ctx, [relmatch141])> ("<type:", o151, o152);
      or22 := <type-is(|ctx)> <task-create-choice(|ctx)> [or21, relmatch142]
Submitted by Gabriël Konat on 16 July 2015 at 02:24

On 16 July 2015 at 03:53 Guido Wachsmuth commented:

Wow, this is a masterpiece of code generation. Out of curiosity, can we see the source?


On 16 July 2015 at 19:07 Gabriël Konat commented:

It’s generated from a TS file in Green-Marl with some workarounds, ask Jeff if you want to see it. But this issue is about the slow parsing :)


On 16 July 2015 at 19:16 Gabriël Konat tagged parser

On 16 July 2015 at 19:16 Gabriël Konat tagged performance

On 16 July 2015 at 19:16 Gabriël Konat tagged stratego

Log in to post comments