001/* ConfParserLegacy.java */
002/* Generated By:JavaCC: Do not edit this line. ConfParserLegacy.java */
003package org.dllearner.confparser;
004
005import org.dllearner.cli.ConfFileOption;
006import org.dllearner.core.ComponentInitException;
007import org.dllearner.parser.KBParser;
008
009import java.io.*;
010import java.util.*;
011
012public class ConfParserLegacy extends AbstractConfParser implements ConfParserLegacyConstants {
013
014        public static ConfParser parseFile(File filename) throws FileNotFoundException, ParseException,
015                        UnsupportedEncodingException {
016                ConfParserLegacy parser = new ConfParserLegacy(new InputStreamReader(new FileInputStream(filename), "UTF-8"));
017                try {
018                        parser.init();
019                } catch (ComponentInitException e) {
020                        throw (ParseException) e.getCause();
021                }
022                return parser;
023        }
024
025        public void init() throws ComponentInitException {
026                try {
027                        this.Start();
028                } catch (ParseException e) {
029                        throw new ComponentInitException(e);
030                }
031                postProcess();
032                
033                initialized = true;
034        }
035
036  final public void Start() throws ParseException {ConfFileOption confOption;
037    label_1:
038    while (true) {
039      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
040      case ID:{
041        ;
042        break;
043        }
044      default:
045        jj_la1[0] = jj_gen;
046        break label_1;
047      }
048      confOption = ConfOption();
049addConfOption(confOption);
050    }
051    jj_consume_token(0);
052  }
053
054  final public ConfFileOption ConfOption() throws ParseException {boolean containsSubOption=false;
055        String value="", value1="", value2="", tmp="", tmp2="";
056        Set<String> values = new HashSet<String>();
057        Map<String,String> tuples = new HashMap<String,String>();
058        Map<String,Double> tuplesD = new HashMap<String,Double>();
059
060        ConfFileOption option = new ConfFileOption();
061        boolean isBeanRef = false;
062        boolean isBeanCollection = false;
063        String beanName;
064        String propertyName = "";
065        String propertyValue = "";
066        Class<?> propertyType;
067        Object val = null;
068        Double d;
069    beanName = Id();
070    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
071    case COMMAND_END:{
072      jj_consume_token(COMMAND_END);
073      propertyName = Id();
074containsSubOption=true;
075      break;
076      }
077    default:
078      jj_la1[1] = jj_gen;
079      ;
080    }
081    jj_consume_token(13);
082    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
083    case ID:{
084      // two strings separated by a double colon
085               // LOOKAHEAD(2) value1=Id() ":" value2=Id() { useColon = true; }
086               // simple string
087                      propertyValue = Id();
088if(propertyValue.equals("true") || propertyValue.equals("false")) {
089                   val = Boolean.valueOf(propertyValue); propertyType = Boolean.class;
090                } else {
091                        val = propertyValue; propertyType = String.class; isBeanRef =  true;
092                }
093      break;
094      }
095    case STRING:{
096      propertyValue = String();
097val = propertyValue; propertyType = String.class;
098      break;
099      }
100    case NUMBER:{
101      val = Integer();
102propertyValue = val.toString(); propertyType = Integer.class;
103      break;
104      }
105    case DOUBLE:{
106      val = Double();
107propertyValue = val.toString(); propertyType = Double.class;
108      break;
109      }
110    default:
111      jj_la1[2] = jj_gen;
112      if (jj_2_5(2147483647)) {
113        jj_consume_token(14);
114        jj_consume_token(15);
115val = new HashSet(); propertyType = Set.class; propertyValue = "{}";
116      } else if (jj_2_6(4)) {
117        jj_consume_token(14);
118        label_2:
119        while (true) {
120          if (jj_2_1(2)) {
121            ;
122          } else {
123            break label_2;
124          }
125          tmp = String();
126values.add(tmp); propertyValue += "\"" + tmp + "\", ";
127          jj_consume_token(16);
128        }
129        tmp = String();
130values.add(tmp); propertyValue += "\"" + tmp + "\"";
131        jj_consume_token(15);
132propertyType = Set.class; propertyValue = "{"+ propertyValue + "}";; val = values;
133      } else {
134        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
135        case 17:{
136          jj_consume_token(17);
137val = new HashSet(); propertyType = Set.class; propertyValue = "-"; isBeanCollection = true;
138          break;
139          }
140        case 14:{
141          jj_consume_token(14);
142          label_3:
143          while (true) {
144            if (jj_2_2(4)) {
145              ;
146            } else {
147              break label_3;
148            }
149            tmp = Id();
150values.add(tmp); propertyValue += tmp + ", ";
151            jj_consume_token(16);
152          }
153          tmp = Id();
154values.add(tmp); propertyValue += tmp;
155          jj_consume_token(15);
156val = values; propertyType = Set.class; propertyValue = "{"+ propertyValue + "}"; isBeanCollection = true;
157          break;
158          }
159        default:
160          jj_la1[3] = jj_gen;
161          if (jj_2_7(2147483647)) {
162            jj_consume_token(18);
163            jj_consume_token(19);
164val = new LinkedList(); propertyType = List.class; propertyValue = "[]";
165          } else if (jj_2_8(2147483647)) {
166            jj_consume_token(18);
167            label_4:
168            while (true) {
169              if (jj_2_3(6)) {
170                ;
171              } else {
172                break label_4;
173              }
174              jj_consume_token(20);
175              tmp = String();
176              jj_consume_token(16);
177              tmp2 = String();
178              jj_consume_token(21);
179tuples.put(tmp,tmp2); propertyValue += "(\""+ tmp + "\",\"" + tmp2 + "\"), ";
180              jj_consume_token(16);
181            }
182            jj_consume_token(20);
183            tmp = String();
184            jj_consume_token(16);
185            tmp2 = String();
186            jj_consume_token(21);
187tuples.put(tmp,tmp2); propertyValue += "(\""+ tmp + "\",\"" + tmp2 + "\")";
188            jj_consume_token(19);
189val = tuples; propertyType = List.class; propertyValue = "["+ propertyValue + "]";
190          } else {
191            switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
192            case 18:{
193              jj_consume_token(18);
194              label_5:
195              while (true) {
196                if (jj_2_4(6)) {
197                  ;
198                } else {
199                  break label_5;
200                }
201                jj_consume_token(20);
202                tmp = String();
203                jj_consume_token(16);
204                d = Double();
205                jj_consume_token(21);
206tuplesD.put(tmp,d); propertyValue += "(\""+ tmp + "\",\"" + d.toString() + "\"), ";
207                jj_consume_token(16);
208              }
209              jj_consume_token(20);
210              tmp = String();
211              jj_consume_token(16);
212              d = Double();
213              jj_consume_token(21);
214tuplesD.put(tmp,d); propertyValue += "(\""+ tmp + "\",\"" + d.toString() + "\")";
215              jj_consume_token(19);
216val = tuplesD; propertyType = List.class; propertyValue = "["+ propertyValue + "]";
217              break;
218              }
219            default:
220              jj_la1[4] = jj_gen;
221              jj_consume_token(-1);
222              throw new ParseException();
223            }
224          }
225        }
226      }
227    }
228option.setBeanRef(isBeanRef);
229        option.setBeanReferenceCollection(isBeanCollection);
230        option.setBeanName(beanName);
231        if(containsSubOption) {
232                option.setPropertyName(propertyName);
233        }
234        option.setPropertyType(propertyType);
235        option.setPropertyValue(propertyValue);
236        option.setValueObject(val);
237        {if ("" != null) return option;}
238    throw new Error("Missing return statement in function");
239  }
240
241  final public String Individual() throws ParseException {String name;
242    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
243    case ID:{
244      name = Id();
245      break;
246      }
247    case STRING:{
248      name = String();
249      break;
250      }
251    default:
252      jj_la1[5] = jj_gen;
253      jj_consume_token(-1);
254      throw new ParseException();
255    }
256{if ("" != null) return KBParser.getInternalURI(name);}
257    throw new Error("Missing return statement in function");
258  }
259
260  final public String ComplexId() throws ParseException {Token t1,t2;
261    if (jj_2_9(2)) {
262      t1 = jj_consume_token(ID);
263      jj_consume_token(22);
264      t2 = jj_consume_token(ID);
265{if ("" != null) return t1.image + ":" + t2.image;}
266    } else {
267      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
268      case ID:{
269        t1 = jj_consume_token(ID);
270{if ("" != null) return t1.image;}
271        break;
272        }
273      default:
274        jj_la1[6] = jj_gen;
275        jj_consume_token(-1);
276        throw new ParseException();
277      }
278    }
279    throw new Error("Missing return statement in function");
280  }
281
282  final public String Id() throws ParseException {Token t;
283    t = jj_consume_token(ID);
284{if ("" != null) return t.image;}
285    throw new Error("Missing return statement in function");
286  }
287
288  final public Double Double() throws ParseException {Token t;
289    t = jj_consume_token(DOUBLE);
290{if ("" != null) return new Double(t.image);}
291    throw new Error("Missing return statement in function");
292  }
293
294  final public Integer Integer() throws ParseException {Token t;
295    t = jj_consume_token(NUMBER);
296{if ("" != null) return new Integer(t.image);}
297    throw new Error("Missing return statement in function");
298  }
299
300  final public String String() throws ParseException {Token t;
301  String s;
302    t = jj_consume_token(STRING);
303// enclosing "" are removed
304    s = t.image;
305    s = s.substring(1, s.length() - 1);
306    try {
307      s = java.net.URLDecoder.decode(s,"UTF-8");
308    } catch (UnsupportedEncodingException e) {
309    } catch (IllegalArgumentException e) {
310    }
311    {if ("" != null) return s;}
312    throw new Error("Missing return statement in function");
313  }
314
315  private boolean jj_2_1(int xla)
316 {
317    jj_la = xla; jj_lastpos = jj_scanpos = token;
318    try { return !jj_3_1(); }
319    catch(LookaheadSuccess ls) { return true; }
320    finally { jj_save(0, xla); }
321  }
322
323  private boolean jj_2_2(int xla)
324 {
325    jj_la = xla; jj_lastpos = jj_scanpos = token;
326    try { return !jj_3_2(); }
327    catch(LookaheadSuccess ls) { return true; }
328    finally { jj_save(1, xla); }
329  }
330
331  private boolean jj_2_3(int xla)
332 {
333    jj_la = xla; jj_lastpos = jj_scanpos = token;
334    try { return !jj_3_3(); }
335    catch(LookaheadSuccess ls) { return true; }
336    finally { jj_save(2, xla); }
337  }
338
339  private boolean jj_2_4(int xla)
340 {
341    jj_la = xla; jj_lastpos = jj_scanpos = token;
342    try { return !jj_3_4(); }
343    catch(LookaheadSuccess ls) { return true; }
344    finally { jj_save(3, xla); }
345  }
346
347  private boolean jj_2_5(int xla)
348 {
349    jj_la = xla; jj_lastpos = jj_scanpos = token;
350    try { return !jj_3_5(); }
351    catch(LookaheadSuccess ls) { return true; }
352    finally { jj_save(4, xla); }
353  }
354
355  private boolean jj_2_6(int xla)
356 {
357    jj_la = xla; jj_lastpos = jj_scanpos = token;
358    try { return !jj_3_6(); }
359    catch(LookaheadSuccess ls) { return true; }
360    finally { jj_save(5, xla); }
361  }
362
363  private boolean jj_2_7(int xla)
364 {
365    jj_la = xla; jj_lastpos = jj_scanpos = token;
366    try { return !jj_3_7(); }
367    catch(LookaheadSuccess ls) { return true; }
368    finally { jj_save(6, xla); }
369  }
370
371  private boolean jj_2_8(int xla)
372 {
373    jj_la = xla; jj_lastpos = jj_scanpos = token;
374    try { return !jj_3_8(); }
375    catch(LookaheadSuccess ls) { return true; }
376    finally { jj_save(7, xla); }
377  }
378
379  private boolean jj_2_9(int xla)
380 {
381    jj_la = xla; jj_lastpos = jj_scanpos = token;
382    try { return !jj_3_9(); }
383    catch(LookaheadSuccess ls) { return true; }
384    finally { jj_save(8, xla); }
385  }
386
387  private boolean jj_3_2()
388 {
389    if (jj_3R_7()) return true;
390    if (jj_scan_token(16)) return true;
391    return false;
392  }
393
394  private boolean jj_3_5()
395 {
396    if (jj_scan_token(14)) return true;
397    if (jj_scan_token(15)) return true;
398    return false;
399  }
400
401  private boolean jj_3_9()
402 {
403    if (jj_scan_token(ID)) return true;
404    if (jj_scan_token(22)) return true;
405    return false;
406  }
407
408  private boolean jj_3R_8()
409 {
410    if (jj_scan_token(DOUBLE)) return true;
411    return false;
412  }
413
414  private boolean jj_3R_6()
415 {
416    if (jj_scan_token(STRING)) return true;
417    return false;
418  }
419
420  private boolean jj_3_4()
421 {
422    if (jj_scan_token(20)) return true;
423    if (jj_3R_6()) return true;
424    if (jj_scan_token(16)) return true;
425    if (jj_3R_8()) return true;
426    if (jj_scan_token(21)) return true;
427    if (jj_scan_token(16)) return true;
428    return false;
429  }
430
431  private boolean jj_3_8()
432 {
433    if (jj_scan_token(18)) return true;
434    if (jj_scan_token(20)) return true;
435    if (jj_3R_6()) return true;
436    if (jj_scan_token(16)) return true;
437    if (jj_3R_6()) return true;
438    return false;
439  }
440
441  private boolean jj_3_6()
442 {
443    if (jj_scan_token(14)) return true;
444    Token xsp;
445    while (true) {
446      xsp = jj_scanpos;
447      if (jj_3_1()) { jj_scanpos = xsp; break; }
448    }
449    if (jj_3R_6()) return true;
450    if (jj_scan_token(15)) return true;
451    return false;
452  }
453
454  private boolean jj_3_1()
455 {
456    if (jj_3R_6()) return true;
457    if (jj_scan_token(16)) return true;
458    return false;
459  }
460
461  private boolean jj_3_7()
462 {
463    if (jj_scan_token(18)) return true;
464    if (jj_scan_token(19)) return true;
465    return false;
466  }
467
468  private boolean jj_3_3()
469 {
470    if (jj_scan_token(20)) return true;
471    if (jj_3R_6()) return true;
472    if (jj_scan_token(16)) return true;
473    if (jj_3R_6()) return true;
474    if (jj_scan_token(21)) return true;
475    if (jj_scan_token(16)) return true;
476    return false;
477  }
478
479  private boolean jj_3R_7()
480 {
481    if (jj_scan_token(ID)) return true;
482    return false;
483  }
484
485  /** Generated Token Manager. */
486  public ConfParserLegacyTokenManager token_source;
487  SimpleCharStream jj_input_stream;
488  /** Current token. */
489  public Token token;
490  /** Next token. */
491  public Token jj_nt;
492  private int jj_ntk;
493  private Token jj_scanpos, jj_lastpos;
494  private int jj_la;
495  private int jj_gen;
496  final private int[] jj_la1 = new int[7];
497  static private int[] jj_la1_0;
498  static {
499      jj_la1_init_0();
500   }
501   private static void jj_la1_init_0() {
502      jj_la1_0 = new int[] {0x200,0x100,0x1e00,0x24000,0x40000,0x1200,0x200,};
503   }
504  final private JJCalls[] jj_2_rtns = new JJCalls[9];
505  private boolean jj_rescan = false;
506  private int jj_gc = 0;
507
508  /** Constructor with InputStream. */
509  public ConfParserLegacy(java.io.InputStream stream) {
510     this(stream, null);
511  }
512  /** Constructor with InputStream and supplied encoding */
513  public ConfParserLegacy(java.io.InputStream stream, String encoding) {
514    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
515    token_source = new ConfParserLegacyTokenManager(jj_input_stream);
516    token = new Token();
517    jj_ntk = -1;
518    jj_gen = 0;
519    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
520    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
521  }
522
523  /** Reinitialise. */
524  public void ReInit(java.io.InputStream stream) {
525     ReInit(stream, null);
526  }
527  /** Reinitialise. */
528  public void ReInit(java.io.InputStream stream, String encoding) {
529    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
530    token_source.ReInit(jj_input_stream);
531    token = new Token();
532    jj_ntk = -1;
533    jj_gen = 0;
534    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
535    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
536  }
537
538  /** Constructor. */
539  public ConfParserLegacy(java.io.Reader stream) {
540    jj_input_stream = new SimpleCharStream(stream, 1, 1);
541    token_source = new ConfParserLegacyTokenManager(jj_input_stream);
542    token = new Token();
543    jj_ntk = -1;
544    jj_gen = 0;
545    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
546    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
547  }
548
549  /** Reinitialise. */
550  public void ReInit(java.io.Reader stream) {
551    jj_input_stream.ReInit(stream, 1, 1);
552    token_source.ReInit(jj_input_stream);
553    token = new Token();
554    jj_ntk = -1;
555    jj_gen = 0;
556    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
557    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
558  }
559
560  /** Constructor with generated Token Manager. */
561  public ConfParserLegacy(ConfParserLegacyTokenManager tm) {
562    token_source = tm;
563    token = new Token();
564    jj_ntk = -1;
565    jj_gen = 0;
566    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
567    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
568  }
569
570  /** Reinitialise. */
571  public void ReInit(ConfParserLegacyTokenManager tm) {
572    token_source = tm;
573    token = new Token();
574    jj_ntk = -1;
575    jj_gen = 0;
576    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
577    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
578  }
579
580  private Token jj_consume_token(int kind) throws ParseException {
581    Token oldToken;
582    if ((oldToken = token).next != null) token = token.next;
583    else token = token.next = token_source.getNextToken();
584    jj_ntk = -1;
585    if (token.kind == kind) {
586      jj_gen++;
587      if (++jj_gc > 100) {
588        jj_gc = 0;
589        for (int i = 0; i < jj_2_rtns.length; i++) {
590          JJCalls c = jj_2_rtns[i];
591          while (c != null) {
592            if (c.gen < jj_gen) c.first = null;
593            c = c.next;
594          }
595        }
596      }
597      return token;
598    }
599    token = oldToken;
600    jj_kind = kind;
601    throw generateParseException();
602  }
603
604  @SuppressWarnings("serial")
605  static private final class LookaheadSuccess extends java.lang.Error { }
606  final private LookaheadSuccess jj_ls = new LookaheadSuccess();
607  private boolean jj_scan_token(int kind) {
608    if (jj_scanpos == jj_lastpos) {
609      jj_la--;
610      if (jj_scanpos.next == null) {
611        jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
612      } else {
613        jj_lastpos = jj_scanpos = jj_scanpos.next;
614      }
615    } else {
616      jj_scanpos = jj_scanpos.next;
617    }
618    if (jj_rescan) {
619      int i = 0; Token tok = token;
620      while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
621      if (tok != null) jj_add_error_token(kind, i);
622    }
623    if (jj_scanpos.kind != kind) return true;
624    if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
625    return false;
626  }
627
628
629/** Get the next Token. */
630  final public Token getNextToken() {
631    if (token.next != null) token = token.next;
632    else token = token.next = token_source.getNextToken();
633    jj_ntk = -1;
634    jj_gen++;
635    return token;
636  }
637
638/** Get the specific Token. */
639  final public Token getToken(int index) {
640    Token t = token;
641    for (int i = 0; i < index; i++) {
642      if (t.next != null) t = t.next;
643      else t = t.next = token_source.getNextToken();
644    }
645    return t;
646  }
647
648  private int jj_ntk_f() {
649    if ((jj_nt=token.next) == null)
650      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
651    else
652      return (jj_ntk = jj_nt.kind);
653  }
654
655  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
656  private int[] jj_expentry;
657  private int jj_kind = -1;
658  private int[] jj_lasttokens = new int[100];
659  private int jj_endpos;
660
661  private void jj_add_error_token(int kind, int pos) {
662    if (pos >= 100) return;
663    if (pos == jj_endpos + 1) {
664      jj_lasttokens[jj_endpos++] = kind;
665    } else if (jj_endpos != 0) {
666      jj_expentry = new int[jj_endpos];
667      for (int i = 0; i < jj_endpos; i++) {
668        jj_expentry[i] = jj_lasttokens[i];
669      }
670      jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {
671        int[] oldentry = (int[])(it.next());
672        if (oldentry.length == jj_expentry.length) {
673          for (int i = 0; i < jj_expentry.length; i++) {
674            if (oldentry[i] != jj_expentry[i]) {
675              continue jj_entries_loop;
676            }
677          }
678          jj_expentries.add(jj_expentry);
679          break jj_entries_loop;
680        }
681      }
682      if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
683    }
684  }
685
686  /** Generate ParseException. */
687  public ParseException generateParseException() {
688    jj_expentries.clear();
689    boolean[] la1tokens = new boolean[23];
690    if (jj_kind >= 0) {
691      la1tokens[jj_kind] = true;
692      jj_kind = -1;
693    }
694    for (int i = 0; i < 7; i++) {
695      if (jj_la1[i] == jj_gen) {
696        for (int j = 0; j < 32; j++) {
697          if ((jj_la1_0[i] & (1<<j)) != 0) {
698            la1tokens[j] = true;
699          }
700        }
701      }
702    }
703    for (int i = 0; i < 23; i++) {
704      if (la1tokens[i]) {
705        jj_expentry = new int[1];
706        jj_expentry[0] = i;
707        jj_expentries.add(jj_expentry);
708      }
709    }
710    jj_endpos = 0;
711    jj_rescan_token();
712    jj_add_error_token(0, 0);
713    int[][] exptokseq = new int[jj_expentries.size()][];
714    for (int i = 0; i < jj_expentries.size(); i++) {
715      exptokseq[i] = jj_expentries.get(i);
716    }
717    return new ParseException(token, exptokseq, tokenImage);
718  }
719
720  /** Enable tracing. */
721  final public void enable_tracing() {
722  }
723
724  /** Disable tracing. */
725  final public void disable_tracing() {
726  }
727
728  private void jj_rescan_token() {
729    jj_rescan = true;
730    for (int i = 0; i < 9; i++) {
731    try {
732      JJCalls p = jj_2_rtns[i];
733      do {
734        if (p.gen > jj_gen) {
735          jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
736          switch (i) {
737            case 0: jj_3_1(); break;
738            case 1: jj_3_2(); break;
739            case 2: jj_3_3(); break;
740            case 3: jj_3_4(); break;
741            case 4: jj_3_5(); break;
742            case 5: jj_3_6(); break;
743            case 6: jj_3_7(); break;
744            case 7: jj_3_8(); break;
745            case 8: jj_3_9(); break;
746          }
747        }
748        p = p.next;
749      } while (p != null);
750      } catch(LookaheadSuccess ls) { }
751    }
752    jj_rescan = false;
753  }
754
755  private void jj_save(int index, int xla) {
756    JJCalls p = jj_2_rtns[index];
757    while (p.gen > jj_gen) {
758      if (p.next == null) { p = p.next = new JJCalls(); break; }
759      p = p.next;
760    }
761    p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
762  }
763
764  static final class JJCalls {
765    int gen;
766    Token first;
767    int arg;
768    JJCalls next;
769  }
770
771}