private Term getDiscreteTerm() {
      final Token token = popValue();
      if (isListOpenBracket(token)) {
         return parseList();
      } else if (isPredicateOpenBracket(token)) {
         return getTermInBrackets();
      } else {
         switch (token.type) {
            case ATOM:
            case QUOTED_ATOM:
            case SYMBOL:
               return getAtomOrStructure(token.value);
            case INTEGER:
               return toIntegerNumber(token.value);
            case FLOAT:
               return toDecimalFraction(token.value);
            case VARIABLE:
               return getVariable(token.value);
            case ANONYMOUS_VARIABLE:
               return getAnonymousVariable(token.value);
            default:
               throw new IllegalArgumentException();
         }
      }
   }