コード例 #1
0
 private void jj_save(int index, int xla) {
   JJCalls p = jj_2_rtns[index];
   while (p.gen > jj_gen) {
     if (p.next == null) {
       p = p.next = new JJCalls();
       break;
     }
     p = p.next;
   }
   p.gen = jj_gen + xla - jj_la;
   p.first = token;
   p.arg = xla;
 }
コード例 #2
0
 private Token jj_consume_token(int kind) throws ParseException {
   Token oldToken = token;
   if ((token = jj_nt).next != null) jj_nt = jj_nt.next;
   else jj_nt = jj_nt.next = token_source.getNextToken();
   if (token.kind == kind) {
     jj_gen++;
     if (++jj_gc > 100) {
       jj_gc = 0;
       for (int i = 0; i < jj_2_rtns.length; i++) {
         JJCalls c = jj_2_rtns[i];
         while (c != null) {
           if (c.gen < jj_gen) c.first = null;
           c = c.next;
         }
       }
     }
     return token;
   }
   jj_nt = token;
   token = oldToken;
   jj_kind = kind;
   throw generateParseException();
 }