Lisp HUG Maillist Archive

Defparser questions

Hello all,
The docs for Defparser, (the User Guide)
state that

(defparser my-parser .. grammar .. )

defines the two functions:

(defun my-parser (lexer &optional

                          (symbol-to-string #'identity))    ...)

and
(defun my-parser-grammar () ..)

However, I don't seem to have the function
my-parser-grammar available after the parser
is generated. Is this something that was disabled
in some version, and the docs weren't changed?
I'm on LWM445, Mac OS X 10.4.2.

Also, it seems that defparser is using some printing
where is perhaps ought to examine the symbol name.
If *print-case* is set to :downcase or :capitalize, the
macro expands differently.

E.g.

(setf *print-case* :capitalize)

(parsergen:defparser foo-parser ...)

defines all the functions with forms like
(defun |Foo-Parser-ACTION23| ())

I don't know as those functions would be useful by themselves,
but nonetheless, it would be hard to predict what functions were
defined if one didn't know the value that *print-case* had at
the time of parser creation. The main parser function always
seems to defined with the expected name, however.



--
=====================
Joshua Taylor
tayloj@rpi.edu


Re: Defparser questions

Unable to parse email body. Email id is 4646

Updated at: 2020-12-10 08:50 UTC