Common Lisp lexer can't recognize ::symbol-name

Issue #811 resolved
Eitan Mosenkis
created an issue

Because the 'symbol' regexp defined on line 736 of is expecting a complete symbol, it fails to recognize symbols that start ::, :#, and :. (those listed in the 'constituent' variable). Based on testing in SBCL, all three are understood by the Lisp parser as symbols.

Comments (5)

  1. Eitan Mosenkis reporter

    Sorry for the delay. The notification email accidentally got miscategorized and archived. A trivial example is (with the output when I typed them into sbcl):

    (keywordp ::junk)
    (symbol-name ::junk)
    (symbol-name :#junk)
    (symbol-name #.junk)

    These last two symbols fail to be recognized because there is no special case for symbols beginning with : - if you omit the colon, sbcl well likewise raise an error, but with the colon they are valid. The first case, with two colons, is a weird, but valid use of keywords. All symbols in the keyword package are automatically exported, making :kw, which is really a shortcut for keyword:kw, valid. However, it can be accessed without expecting it to be exported, as keyword::kw, and therefore as ::kw.

    The Common Lisp lexer needs to be updated to properly lex these weird keywords.

  2. Log in to comment