Permalink
Browse files

- DEFATOMs are moved to a separate file. (atoms.lisp)

- Builtin DEFRULEs are removed. (rm rules.lisp)

- New ATTACHMENT slot introduced to PARSER-CONTEXT class and
  CREATE-PARSER-CONTEXT, DEFRULE functions altered respectively.

- DEFRENDERER macro is introduced.
  • Loading branch information...
Volkan YAZICI
Volkan YAZICI committed Jul 15, 2007
1 parent fdd2d82 commit 32d25651cd8dd28315db1335fe8c76b90a0b6707
Showing with 70 additions and 0 deletions.
  1. +70 −0 atoms.lisp
View
@@ -0,0 +1,70 @@
+;;; Copyright (c) 2007, Volkan YAZICI <yazicivo@ttnet.net.tr>
+;;; All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;; - Redistributions of source code must retain the above copyright
+;;; notice, this list of conditions and the following disclaimer.
+;;; - Redistributions in binary form must reproduce the above
+;;; copyright notice, this list of conditions and the following
+;;; disclaimer in the documentation and/or other materials provided
+;;; with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+;;; CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+;;; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+;;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+;;; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+;;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+;;; TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+;;; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+;;; ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+;;; TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+;;; THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+;;; SUCH DAMAGE.
+
+(in-package :meta-sexp)
+
+(defatom ascii?
+ (typep c 'standard-char))
+
+(defatom extended?
+ (typep c 'extended-char))
+
+(defatom alpha?
+ (alpha-char-p c))
+
+(defatom alnum?
+ (alphanumericp c))
+
+(defatom graphic?
+ (graphic-char-p c))
+
+(defatom upper?
+ (upper-case-p c))
+
+(defatom lower?
+ (lower-case-p c))
+
+(defatom digit?
+ (digit-char-p c))
+
+(defatom bit?
+ (or (char= c #\0)
+ (char= c #\1)))
+
+(defatom space?
+ (char= c #\space))
+
+(defatom newline?
+ (char= c #\newline))
+
+(defatom tab?
+ (char= c #\tab))
+
+(defatom white-space?
+ (or (space? c)
+ (tab? c)))

0 comments on commit 32d2565

Please sign in to comment.