Added general-grammar-symbol? predicate

This commit is contained in:
waldemar%netscape.com 1999-06-03 20:50:21 +00:00
Родитель 6f01466cb1
Коммит 1282a45ed9
2 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -331,6 +331,10 @@
;;; A general-grammar-symbol is either a terminal or a general-nonterminal. ;;; A general-grammar-symbol is either a terminal or a general-nonterminal.
(deftype general-grammar-symbol () '(or terminal general-nonterminal)) (deftype general-grammar-symbol () '(or terminal general-nonterminal))
; Return true if x is a general-grammar-symbol. x can be any object.
(defun general-grammar-symbol? (x)
(or (terminal? x) (general-nonterminal? x)))
; Return true if the two grammar symbols are the same symbol. ; Return true if the two grammar symbols are the same symbol.
(declaim (inline grammar-symbol-=)) (declaim (inline grammar-symbol-=))

Просмотреть файл

@ -331,6 +331,10 @@
;;; A general-grammar-symbol is either a terminal or a general-nonterminal. ;;; A general-grammar-symbol is either a terminal or a general-nonterminal.
(deftype general-grammar-symbol () '(or terminal general-nonterminal)) (deftype general-grammar-symbol () '(or terminal general-nonterminal))
; Return true if x is a general-grammar-symbol. x can be any object.
(defun general-grammar-symbol? (x)
(or (terminal? x) (general-nonterminal? x)))
; Return true if the two grammar symbols are the same symbol. ; Return true if the two grammar symbols are the same symbol.
(declaim (inline grammar-symbol-=)) (declaim (inline grammar-symbol-=))