Exemple #1
0
 public void ReInit(CharStream stream) {
   token_source.ReInit(stream);
   token = new Token();
   token.next = jj_nt = token_source.getNextToken();
   jj_gen = 0;
   for (int i = 0; i < 4; i++) jj_la1[i] = -1;
 }
Exemple #2
0
 public void ReInit(ManifestParserTokenManager tm) {
   token_source = tm;
   token = new Token();
   token.next = jj_nt = token_source.getNextToken();
   jj_gen = 0;
   for (int i = 0; i < 4; i++) jj_la1[i] = -1;
 }
Exemple #3
0
 public ManifestParser(CharStream stream) {
   token_source = new ManifestParserTokenManager(stream);
   token = new Token();
   token.next = jj_nt = token_source.getNextToken();
   jj_gen = 0;
   for (int i = 0; i < 4; i++) jj_la1[i] = -1;
 }
Exemple #4
0
 public final Token getToken(int index) {
   Token t = token;
   for (int i = 0; i < index; i++) {
     if (t.next != null) t = t.next;
     else t = t.next = token_source.getNextToken();
   }
   return t;
 }
Exemple #5
0
 private final 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++;
     return token;
   }
   jj_nt = token;
   token = oldToken;
   jj_kind = kind;
   throw generateParseException();
 }
Exemple #6
0
 public final Token getNextToken() {
   if ((token = jj_nt).next != null) jj_nt = jj_nt.next;
   else jj_nt = jj_nt.next = token_source.getNextToken();
   jj_gen++;
   return token;
 }