Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tidy up packages.lisp. (Lot's of redundant exported symbols are

removed.)
  • Loading branch information...
commit b0c5286e8c46c7b73a29321e6b72dcb6fd4ee877 1 parent 42fc638
Volkan YAZICI authored
Showing with 11 additions and 10 deletions.
  1. +3 −3 meta-sexp.lisp
  2. +7 −6 packages.lisp
  3. +1 −1  specials.lisp
View
6 meta-sexp.lisp
@@ -107,8 +107,8 @@
;;; Grammar Compiler
(defmacro define-transformation (key (ctx forms) &body body)
- "Shortcut to register new transformer to *TRANSFORMATION-RULES* table."
- `(setf (gethash ,key *transformation-rules*)
+ "Shortcut to register new transformer to *TRANSFORMATIONS* table."
+ `(setf (gethash ,key *transformations*)
#'(lambda (,ctx ,forms)
(declare (ignorable ,ctx ,forms))
,@body)))
@@ -121,7 +121,7 @@
;; In META scope.
(cond
((and (consp form) (keywordp (car form)))
- (let ((transformer (gethash (car form) *transformation-rules*)))
+ (let ((transformer (gethash (car form) *transformations*)))
(if (null transformer)
(transform-grammar ctx form nil)
(funcall transformer ctx (cdr form)))))
View
13 packages.lisp
@@ -31,12 +31,16 @@
(defpackage :meta-sexp
(:documentation "LL(1) parser generator in META using s-expressions.")
(:use :cl)
- (:export :defatom
+ (:export :*transformations*
+ :define-transformation
+ :*atom-normalizer*
+ :transform-grammar
+ :defatom
:defrule
:defrenderer
- :parser-context
- :parser-context-error
:create-parser-context
+ :meta
+ ;; Accumulators.
:make-char-accum
:char-accum-push
:reset-char-accum
@@ -45,9 +49,6 @@
:list-accum-push
:reset-list-accum
:empty-list-accum-p
- :compile-grammar
- :grammar-error
- :meta
;; Builtin Type-Checkers
:alnum?
:alpha?
View
2  specials.lisp
@@ -28,7 +28,7 @@
(in-package :meta-sexp)
-(defvar *transformation-rules* (make-hash-table :test 'eq)
+(defvar *transformations* (make-hash-table :test 'eq)
"Transformation rules to compile meta-sexp grammar.")
(defvar *atom-normalizer* #'char-upcase
Please sign in to comment.
Something went wrong with that request. Please try again.