private static TokenSpec findMaximalIdCharSeq(String line,int pos){
  int left=pos;
  int rt=pos;
  left=pos;
  while (Character.isLetterOrDigit(line.charAt(left - 1)) || line.charAt(left - 1) == '_') {
    left--;
  }
  while (Character.isLetterOrDigit(line.charAt(rt)) || line.charAt(rt) == '_') {
    rt++;
  }
  if (left == rt) {
    return null;
  }
 else {
    return new TokenSpec(line.substring(left,rt),left,rt);
  }
}

private static TokenSpec findMaximalIdCharSeq ( String line , int pos ) { int left = pos ; int rt = pos ; left = pos ; while ( Character . isLetterOrDigit ( line . charAt ( left - 1 ) ) || line . charAt ( left - 1 ) == '_' ) { left -- ; } while ( Character . isLetterOrDigit ( line . charAt ( rt ) ) || line . charAt ( rt ) == '_' ) { rt ++ ; } if ( left == rt ) { return null ; } else { return new TokenSpec ( line . substring ( left , rt ) , left , rt ) ; } }
returns the tokenspec of the largest token containing digits , letters , and " _ " characters containing position pos . returns null if that would be an empty token .
