scymtym / esrap

Common Lisp packrat parser
https://scymtym.github.io/esrap/
78 stars 12 forks source link

& not properly exported? #6

Closed TsarFox closed 4 years ago

TsarFox commented 4 years ago

Hey,

So the following works:

(in-package :esrap)
(parse '(and (& #\a) #\a) "a")

And so does

(esrap:parse '(and (esrap::& #\a) #\a) "a")

But this does not:

(esrap:parse '(and (& #\a) #\a) "a")

Fails with a "The function COMMON-LISP-USER::& is undefined." This is different behavior than, say + or *.

My apologies if I'm misunderstanding how Esrap is supposed to work.

scymtym commented 4 years ago

Fails with a "The function COMMON-LISP-USER::& is undefined." This is different behavior than, say + or *.

There are multiple things to unpack:

You should be able to refer to the Esrap operator as esrap:&. Using esrap::& (i.e. two colons) should not be necessary since the symbol is exported from the esrap package.

TsarFox commented 4 years ago

I see, thanks for the explanation!