<commit_before>(DEFPACKAGE "CHAR-SPEC")
(IN-PACKAGE "CHAR-SPEC")


;;; While in Metaslang characters are exactly those occupying decimal
;;; positions 0 to 255 in the ISO-8859-1 code table, the Common Lisp
;;; standard does not commit to that. So, Specware-generated code and the
;;; hand-written code in this file may not work as expected in Common Lisp
;;; implementation whose characters do not coincide with, or at least
;;; include, the Metaslang characters.


(defun ord (ch)
  (char-code ch))

(defun chr (n)
  (code-char n))

;;; lower-case-p, upper-case-p etc. only guaranteed for Standard ASCII (First 96 characters)
(defun isUpperCase (char)
  (declare (character char))
  (let ((ch-num (char-code char)))
    (or (< 64 ch-num 91)		; A-Z
	(< 191 ch-num 215)		; -
	(< 215 ch-num 224)		; -
	)))

(defun isLowerCase (char)
  (declare (character char))
  (let ((ch-num (char-code char)))
    (or (< 96 ch-num 123)		; a-z
	(< 223 ch-num 247)		; -
	(< 247 ch-num 256)		; -<commit_msg>Suppress defs for functions mentioned in SpecToLisp::SuppressGeneratedDefs<commit_after>(DEFPACKAGE "SPECTOLISP")
(DEFPACKAGE "CHAR-SPEC")
(IN-PACKAGE "CHAR-SPEC")

(defvar SpecToLisp::SuppressGeneratedDefs nil) ;; note: defvar does not redefine if var already has a value

(setq SpecToLisp::SuppressGeneratedDefs
      (append '("CHAR-SPEC::ord" 
		"CHAR-SPEC::chr" 
		"CHAR-SPEC::isUpperCase"
		"CHAR-SPEC::isLowerCase"
		"CHAR-SPEC::isAlpha"
		"CHAR-SPEC::isNum"
		"CHAR-SPEC::isAlphaNum"
		"CHAR-SPEC::isAscii"
		"CHAR-SPEC::toUpperCase"
		"CHAR-SPEC::toLowerCase")
	      SpecToLisp::SuppressGeneratedDefs))

;;; While in Metaslang characters are exactly those occupying decimal
;;; positions 0 to 255 in the ISO-8859-1 code table, the Common Lisp
;;; standard does not commit to that. So, Specware-generated code and the
;;; hand-written code in this file may not work as expected in Common Lisp
;;; implementation whose characters do not coincide with, or at least
;;; include, the Metaslang characters.


(defun ord (ch)
  (char-code ch))

(defun chr (n)
  (code-char n))

;;; lower-case-p, upper-case-p etc. only guaranteed for Standard ASCII (First 96 characters)
(defun isUpperCase (char)
  (declare (character char))
  (let ((ch-num (char-code char)))
    (or (< 64 ch-num 91)		; A-Z
	(< 191 ch-num 215)		; -
	(< 215 ch-num 224)		; -
	)))

(defun isLowerCase (char)
  (declare (character char))
  (let ((ch-num (char-code char)))
    (or (< 96 ch-num 123)		; a-z
	(< 223 ch-num 247)		; -
	(< 247 ch-num 256)		; -
{'fraction_non_alphanumeric': 0.1408674890569041, 'fraction_numerical': 0.03501790688420215, 'mean_word_length': 3.8346153846153848, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4809190', 'n_tokens_mistral': 1011, 'n_tokens_neox': 880, 'n_words': 288}