Hi;

The Short Version: I have inherited some CL code which is a compiler,
the input grammar for which purports to include vanilla CL defmacro
capability.  The compiler was originally running in the CL-USER
package.  Because I'm gluing it together with lots of other stuff, I
moved it into its own package.

Although I never used the macro capability when the compiler was in
the CL-USER package, now, when I define a macro in the input grammar
language that uses comma-within-backquote, later, in the part of the
compiler that expands the macro (so as to reprocess the resulting
input language expression), CMUCL complains thus:

--- cut here ---

Warning: This function is undefined:
  behavior-language::backq-list*
Error in kernel:%coerce-to-function:  the function jm-package::backq-list* is 
undefined.
Error flushed ...

--- cut here ---


If I go in-package "COMMON-LISP" (which is "used" by my package
"jm-package") and export backq-list*, and then rerun the compiler,
then everything works as intended.

I would appreciate constructive suggestions (although I am sure that
many non-constructive yet highly entertaining suggestions will leap to
mind).

I am sure that somewhere out there, amongst all you Compiler Studs, is
Common Knowledge about how to apportion code and data amongst packages
when writing a CL-based compiler (this is my first such endeavor --
the CL-USER package has long been sufficient for me), and so as to
avoid name clashes, I currently have separate packages for:

(1) the symbols, macro names, etc. of the input grammar proper, and
resulting named symbols for data items in the input grammar,

(2) the compiler proper, and

(3) the McCLIM based GUI code.

Should I punt on separate packages for the (1) and (2)?  ("When in
doubt, rip it out?"  "Keep It Simple, er, Stupid?")

-jm

-- 
==== John Morrison
==== MAK Technologies Inc.
==== 185 Alewife Brook Parkway, Cambridge, MA 02138
==== http://www.mak.com/
==== vox:617-876-8085 x115
==== fax:617-876-9208
==== [EMAIL PROTECTED]






Reply via email to