Beispiel #1
0
 /** Get the next Token. */
 public static final Token getNextToken() {
   if (token.next != null) token = token.next;
   else token = token.next = token_source.getNextToken();
   jj_ntk = -1;
   jj_gen++;
   return token;
 }
Beispiel #2
0
 /** Get the specific Token. */
 public static 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;
 }
Beispiel #3
0
 /** Reinitialise. */
 public static void ReInit(java.io.Reader stream) {
   jj_input_stream.ReInit(stream, 1, 1);
   token_source.ReInit(jj_input_stream);
   token = new Token();
   jj_ntk = -1;
   jj_gen = 0;
   for (int i = 0; i < 6; i++) jj_la1[i] = -1;
 }
Beispiel #4
0
 /** Reinitialise. */
 public static void ReInit(java.io.InputStream stream, String encoding) {
   try {
     jj_input_stream.ReInit(stream, encoding, 1, 1);
   } catch (java.io.UnsupportedEncodingException e) {
     throw new RuntimeException(e);
   }
   token_source.ReInit(jj_input_stream);
   token = new Token();
   jj_ntk = -1;
   jj_gen = 0;
   for (int i = 0; i < 6; i++) jj_la1[i] = -1;
 }
Beispiel #5
0
 private static Token jj_consume_token(int kind) throws ParseException {
   Token oldToken;
   if ((oldToken = token).next != null) token = token.next;
   else token = token.next = token_source.getNextToken();
   jj_ntk = -1;
   if (token.kind == kind) {
     jj_gen++;
     return token;
   }
   token = oldToken;
   jj_kind = kind;
   throw generateParseException();
 }
Beispiel #6
0
 private static int jj_ntk() {
   if ((jj_nt = token.next) == null)
     return (jj_ntk = (token.next = token_source.getNextToken()).kind);
   else return (jj_ntk = jj_nt.kind);
 }