All Manuals > LispWorks® User Guide and Reference Manual > 35 The DSPEC Package

name-only-form-parser Function

Summary

A pre-defined form parser.

Package

dspec

Signature

name-only-form-parser definer-name getter => dspec

Arguments
definer-name
A top level defining form.
getter
The subform getter function.
Values
dspec
A dspec.
Description

The function name-only-form-parser is a predefined form parser for use with define-form-parser. The parser consumes one subform by calling getter and returns it. definer-name is ignored.

name-only-form-parser can be used for function definitions where the function name is an abbreviation for the full dspec. It is the predefined parser for defun, defmacro and defgeneric forms.

You can define it to be the parser for your defining forms. using define-form-parser.

Examples
(defmacro my-definer (name &body body)
  `(defun ,name (x)
     ,@body))
 
(dspec:define-form-parser 
    (my-definer (:parser 
                 dspec:name-only-form-parser)))
See also

define-form-parser


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:33