code: private boolean isAllNumeric(TokenStream stream) {
      List<Token> tokens = ((NattyTokenSource) stream.getTokenSource()).getTokens();
      for(Token token:tokens) {
        try {
          Integer.parseInt(token.getText());
        } catch(NumberFormatException e) {
          return false;
        }
      }
      return true;
    }
docs: Determines if a token stream contains only numeric tokens
  @param stream
  @return true if all tokens in the given stream can be parsed as an integer