(defsubst wisent-ISVALID-TOKEN (x)
"Return non-nil if X is a character or an allowed symbol."
- (or (wisent-char-p x)
+ (or (characterp x)
(wisent-ISVALID-VAR x)))
(defun wisent-push-token (symbol &optional nocheck)
(cond
((or (memq item token-list) (memq item var-list)))
;; Create new literal character token
- ((wisent-char-p item) (wisent-push-token item t))
+ ((characterp item) (wisent-push-token item t))
((error "Symbol `%s' is used, but is not defined as a token and has no rules"
item))))
(setq rhl (1+ rhl)
;;;; Runtime stuff
;;;; -------------
-;;; Compatibility
-(eval-and-compile
- (if (fboundp 'char-valid-p)
- (defalias 'wisent-char-p 'char-valid-p)
- (defalias 'wisent-char-p 'char-or-char-int-p)))
+(define-obsolete-function-alias 'wisent-char-p
+ #'characterp "28.1")
;;; Printed representation of terminals and nonterminals
(defconst wisent-escape-sequence-strings
(defsubst wisent-item-to-string (item)
"Return a printed representation of ITEM.
ITEM can be a nonterminal or terminal symbol, or a character literal."
- (if (wisent-char-p item)
+ (if (characterp item)
(or (cdr (assq item wisent-escape-sequence-strings))
(format "'%c'" item))
(symbol-name item)))