public int getValue() {
    if (andOrTerm2.getOp().equals("and")) {
      if (equalityTerm.getValue() != 0 && andOrTerm2.getValue() != 0)
        return 1;
      else
        return 0;
    }
    else if (andOrTerm2.getOp().equals("or")) {
      if (equalityTerm.getValue() != 0 || andOrTerm2.getValue() != 0)
        return 1;
      else
        return 0;
    }
    else
      return equalityTerm.getValue();
  }