docs: private int readSingleValue()
      {
          if (ivPos < ivString.length() && ivString.charAt(ivPos) == '*')
          {
              ivPos++;
              return ENCODED_WILD_CARD;
          }
  
          int begin = scanToken();
          String[] namedValues = ivAttr.getNamedValues();
          int result = namedValues == null ? -1 : findNamedValue(begin, namedValues, ivAttr.getMin());
  
          if (result == -1)
          {
              try
              {
                  result = Integer.valueOf(ivString.substring(begin, ivPos));
              } catch (NumberFormatException ex)
              {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "parse failed", ex);
  
                  error(ScheduleExpressionParserException.Error.VALUE); // F7437591.codRev, F743-506
              }
  
              if (ivAttr == Attribute.DAY_OF_MONTH && result >= -7 && result <= -1)
              {
                  result = ENCODED_NTH_LAST_DAY_OF_MONTH + -result;
              }
              else if (result < ivAttr.getMin() || result > ivAttr.getMax())
              {
                  error(ScheduleExpressionParserException.Error.VALUE_RANGE); // F743-506
              }
          }
          // The named values for dayOfMonth are "1st", "2nd", etc, and "Last".
          // Next, we need to search for a day of the week.
          else if (ivAttr == Attribute.DAY_OF_MONTH)
          {
              // findNamedValue will have added ivAttr.getMin, which we don't want.
              int weekOfMonth = result - ivAttr.getMin();
  
              // Since "Last" might not be followed by a day of the week, we need to
              // peek at the next atom.  Primitively implement this by saving and
              // restoring the position in the parse string.
              skipWhitespace();
              int savedPos = ivPos;
              int dayOfWeek = findNamedValue(scanToken(), DAYS_OF_WEEK, 0);
  
              if (dayOfWeek == -1)
              {
                  if (weekOfMonth != LAST_WEEK_OF_MONTH)
                  {
                      error(ScheduleExpressionParserException.Error.MISSING_DAY_OF_WEEK); // F743-506
                  }
  
                  // We parsed "Last x" hoping that x would be a day of the week, but
                  // it wasn't.  Restore the position within the parse string.
                  ivPos = savedPos;
  
                  result = ENCODED_NTH_LAST_DAY_OF_MONTH;
              }
              else
              {
                  result = ENCODED_NTH_DAY_OF_WEEK_IN_MONTH + (weekOfMonth * 7) + dayOfWeek;
              }
          }
  
          return result;
      }