code: public List<Expression<E>> tokenize(String input)
      throws TokenizeLogicException {
          List<Expression<E>> tokens = new ArrayList<Expression<E>>();
  
          int i = 0;
          while (i < input.length()) {
              String substring = input.substring(i);
              char firstChar = substring.charAt(0);
  
              if (firstChar == ' ') {
                  i += 1;
                  continue;
              }
              else if (firstChar == '(') {
                  tokens.add(new Paren.L<E>());
                  i += 1;
              } else if (firstChar == ')') {
                  tokens.add(new Paren.R<E>());
                  i += 1;
              } else if (firstChar == '!') {
                  tokens.add(new Op.Mon.Not<E>());
                  i += 1;
              } else if (firstChar == '&') {
                  tokens.add(new Op.Bin.And<E>());
                  i += 1;
              } else if (firstChar == '|') {
                  tokens.add(new Op.Bin.Or<E>());
                  i += 1;
              } else {
                  // parse out the token
                  String token = this.readToken(substring);
  
                  tokens.add(factory(token));
                  i += token.length();
              }
          }
  
          return tokens;
      }
docs: *
  Convert an infix string logic representation to an infix list of tokens.
  @param input an infix string logic representation.
  @param factory a delegate that converts a string representation of an
  argument into a token object.  @return
  
  @throws TokenizeLogicException