зеркало из https://github.com/mozilla/pjs.git
Added general-grammar-symbol? predicate
This commit is contained in:
Родитель
6f01466cb1
Коммит
1282a45ed9
|
@ -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-=))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче