minor cleanup
authorD Herring <dherring@at.tentpost.dot.com>
Mon, 2 Jan 2012 07:25:54 +0000 (02:25 -0500)
committerD Herring <dherring@at.tentpost.dot.com>
Mon, 2 Jan 2012 07:25:54 +0000 (02:25 -0500)
ISO-14977.lisp
parser.lisp

index 0b59785..2080ff4 100644 (file)
@@ -4,21 +4,21 @@
 ;; Goal:  Provide a frontend that auto-generates the parser from raw ISO 14977 EBNF text.
 ;; e.g. "rule = (* doc *) body ;" => `(defun ,rule (...) ",doc" ,body)
 
-(defpackage "ISO-14977"
+(defpackage #:iso-14977
   (:documentation "EBNF grammar, following ISO 14977:1996 section 8.1")
-  (:nicknames "EBNF")
-  (:use "COMMON-LISP" "EBNF-PARSER")
-  (:export "SYNTAX-PRINTING"
-           "SYNTAX-UNCOMMENTED"
-           "SYNTAX-ABSTRACT"
-           "SYNTAX"
-           "DEFGRAMMAR"
-           "STRING"
-           "START"
-           "END")
+  (:nicknames #:ebnf)
+  (:use #:common-lisp #:ebnf-parser)
+  (:export #:syntax-printing
+           #:syntax-uncommented
+           #:syntax-abstract
+           #:syntax
+           #:defgrammar
+           #:string
+           #:start
+           #:end)
   )
 
-(in-package "ISO-14977")
+(in-package #:iso-14977)
 
 ;; Cheat a bit; use built-in Lisp functions for a couple rules (for efficiency)
 (grammar-rule letter
index a049f37..1d73d80 100644 (file)
@@ -4,26 +4,26 @@
 ;; A simple top-down, backtracking parser
 ;; Modelled after EBNF notation
 
-(defpackage "EBNF-PARSER"
-  (:nicknames "PARSER")
-  (:use "COMMON-LISP")
-  (:export "GRAMMAR-CHAR"
-           "GRAMMAR-CHARTABLE"
-           "GRAMMAR-STRING"
-           "GRAMMAR-OPTIONAL"
-           "GRAMMAR-AND"
-           "GRAMMAR-OR"
-           "GRAMMAR-N"
-           "GRAMMAR-*"
-           "GRAMMAR-EXCEPTION"
-           "GRAMMAR-FUNC"
-           "GRAMMAR-RULE"
-           "START"
-           "END"
-           "STRING"
-           "*ENABLE-DEBUG*"))
-
-(in-package "EBNF-PARSER")
+(defpackage #:ebnf-parser
+  (:nicknames #:parser)
+  (:use #:common-lisp)
+  (:export #:grammar-char
+           #:grammar-chartable
+           #:grammar-string
+           #:grammar-optional
+           #:grammar-and
+           #:grammar-or
+           #:grammar-n
+           #:grammar-*
+           #:grammar-exception
+           #:grammar-func
+           #:grammar-rule
+           #:start
+           #:end
+           #:string
+           #:*enable-debug*))
+
+(in-package #:ebnf-parser)
 
 (defparameter *enable-debug* nil "compile debug statements into grammar rules")