Re: About common-lisp:print-actions
On Wed, 2007-06-27 at 23:15 +0800, Chun Tian (binghe) wrote:
> Hi, LispWorks
>
> Recently, when I use a LALR parser package called Zebu, I found this:
>
> ZEBU 14 > (compile-slr-grammar "ex1.zb")
>
> Reading grammar from ex1.zb
>
> Error: Using package ZEBU results in a name conflict for this symbol:
> LISPWORKS:PRINT-ACTIONS.
> 1 (continue) Unintern the conflicting symbol from its home package.
> 2 Shadow the conflicting symbols.
> 3 Shadowing-import the conflicting symbol already visible in
> COMMON-LISP-USER.
> 4 Shadowing-import the conflicting symbol from ZEBU.
> 5 Skip using ZEBU by COMMON-LISP-USER.
> 6 (abort) Return to level 0.
> 7 Return to top loop level 0.
I haven't attempted to duplicate this myself but it appears that ZEBU is
attempting to intern symbols in the COMMON-LISP-USER package (rather
than the COMMON-LISP package).
While not a bug, it is not recommended practise (I'd go as far as to
call it poor form) and I'd suggest either contacting the author and
requesting him to intern symbols into a different package (the current
binding of *package* for example) or changing the offending code
yourself.
> I found the symbol LISPWORKS:PRINT-ACTIONS is external in COMMON-LISP.
It doesn't appear to be (external in CL or CL-USER), it is an inherited
symbol.
> If someone define the same symbol, a name conflict will happen. Is this
> a trivial bug? Since I think the COMMON-LISP package should have any
> external symbol which doesn't appear in Common Lisp Standard.
Yes, there is a restriction on what external symbols the COMMON-LISP
package may have, but, there are no restrictions on internal-symbols,
nor the packages it may have on it's package-use-list which means that
conflicts like this can still occur in conforming programs running on
conforming implementations.
Cheers,
Sean.
--
....Please don't assume Lisp is only useful for Animation and Graphics,
AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor
applications, Expert Systems, Finance, Intelligent Agents, Knowledge
Management, Mechanical CAD, Modeling and Simulation, Natural Language,
Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web
Authoring just because these are the only things they happened to list.
Kent Pitman.