Hi, all,
When playing around with cl-ppcre 2.0.1, I've discovered this:
(cl-ppcre::parse-string "?") -> :QUESTION-MARK
I found this odd, since :QUESTION-MARK isn't part of the parse-tree
grammar in the docs. Two or more ("??", "???", etc.) also leave a
:QUESTION-MARK in the parse-tree. I took a quick look at the source
code, and it looks like :QUESTION-MARK is used by the lexer (with
other keywords like :CLOSE-PAREN), but that it seems to expect them to
be replaced by the time you end up with a parse-tree.
In comparison, if you try to use ")", like (cl-ppcre::parse-string
")"), it signals a condition in parse-string. I can't find any way to
get :CLOSE-PAREN in the output. It's a little weird that it can parse
"??" but then signals if you try to use it.
If I try to cl-ppcre:scan anything with one of these, I get a
ppcre-syntax-error, "Unknown token QUESTION-MARK in parse tree". I
don't know if this is a bug or not, and I don't think I'm going to run
into a situation where this matters, but there you go. :-)
cheers,
- Ken