Permalink
Browse files

We need to make user intern C symbol used in DEFATOM body.

  • Loading branch information...
Volkan YAZICI
Volkan YAZICI committed Sep 13, 2007
1 parent 7fd602c commit 1d9f454c170ac0ff899f206eaf4df0b68855276d
Showing with 15 additions and 15 deletions.
  1. +13 −13 atoms.lisp
  2. +2 −2 meta-sexp.lisp
View
@@ -28,43 +28,43 @@
(in-package :meta-sexp)
-(defatom ascii?
+(defatom ascii? (c)
(typep c 'standard-char))
-(defatom extended?
+(defatom extended? (c)
(typep c 'extended-char))
-(defatom alpha?
+(defatom alpha? (c)
(alpha-char-p c))
-(defatom alnum?
+(defatom alnum? (c)
(alphanumericp c))
-(defatom graphic?
+(defatom graphic? (c)
(graphic-char-p c))
-(defatom upper?
+(defatom upper? (c)
(upper-case-p c))
-(defatom lower?
+(defatom lower? (c)
(lower-case-p c))
-(defatom digit?
+(defatom digit? (c)
(digit-char-p c))
-(defatom bit?
+(defatom bit? (c)
(or (char= c #\0)
(char= c #\1)))
-(defatom space?
+(defatom space? (c)
(char= c #\space))
-(defatom newline?
+(defatom newline? (c)
(char= c #\newline))
-(defatom tab?
+(defatom tab? (c)
(char= c #\tab))
-(defatom white-space?
+(defatom white-space? (c)
(or (space? c)
(tab? c)))
View
@@ -349,10 +349,10 @@ print the value of the VAR."
;;; Atom, Rule & Renderer Definition Macros
-(defmacro defatom (name &body body)
+(defmacro defatom (name (c) &body body)
`(progn
(declaim (inline ,name))
- (defun ,name (c) (when c ,@body))
+ (defun ,name (,c) (when ,c ,@body))
(deftype ,name () `(satisfies ,',name))))
(defmacro defrule (name (&rest args) (&optional attachment) &body body)

0 comments on commit 1d9f454

Please sign in to comment.