001 /* 002 * Cobertura - http://cobertura.sourceforge.net/ 003 * 004 * This file was taken from JavaNCSS 005 * >6413 if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; 6414 return false; 6415 } 6416 6417 6418 /** Get the next Token. */ 6419 final public Token getNextToken() { 6420 if (token.next != null) token = token.next; 6421 else token = token.next = token_source.getNextToken(); 6422 jj_ntk = -1; 6423 return token; 6424 } 6425 6426 /** Get the specific Token. */ 6427 final public Token getToken(int index) { 6428 Token t = jj_lookingAhead ? jj_scanpos : token; 6429 for (int i = 0; i < index; i++) { 6430 if (t.next != null) t = t.next; 6431 else t = t.next = token_source.getNextToken(); 6432 } 6433 return t; 6434 } 6435 6436 private int jj_ntk() { 6437 if ((jj_nt=token.next) == null) 6438 return (jj_ntk = (token.next=token_source.getNextToken()).kind); 6439 else 6440 return (jj_ntk = jj_nt.kind); 6441 } 6442 6443 /** Generate ParseException. */ 6444 public ParseException generateParseException() { 6445 Token errortok = token.next; 6446 int line = errortok.beginLine, column = errortok.beginColumn; 6447 String mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image; 6448 return new ParseException("Parse error at line " + line + ", column " + column + ". Encountered: " + mess); 6449 } 6450 6451 /** Enable tracing. */ 6452 final public void enable_tracing() { 6453 } 6454 6455 /** Disable tracing. */ 6456 final public void disable_tracing() { 6457 } 6458 6459 }