code: public static int encodePosition(int line, int col) {
          if (line < 1)
              throw new IllegalArgumentException("line must be greater than 0");
          if (col < 1)
              throw new IllegalArgumentException("column must be greater than 0");
  
          if (line > MAXLINE || col > MAXCOLUMN) {
              return NOPOS;
          }
          return (line << LINESHIFT) + col;
      }
docs: Encode line and column numbers in an integer as:
  {@code line-number << LINESHIFT + column-number }.
  {@link Position#NOPOS} represents an undefined position.
  
  @param  line  number of line (first is 1)
  @param  col   number of character on line (first is 1)
  @return       an encoded position or {@link Position#NOPOS}
  if the line or column number is too big to
  represent in the encoded format
  @throws IllegalArgumentException if line or col is less than 1