defmac | A macro to define lambda-like macros inline | Function As A Service library
kandi X-RAY | defmac Summary
kandi X-RAY | defmac Summary
A macro to define lambda-like macros inline.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of defmac
defmac Key Features
defmac Examples and Code Snippets
Community Discussions
Trending Discussions on defmac
QUESTION
I'm reviving an old LISP program from the early 1980s. (It's the Nelson-Oppen simplifier, an early proof system. This version was part of the Ford Pascal-F Verifier, and was running in Franz LISP in 1982.) Here's the entire program:
https://github.com/John-Nagle/pasv/tree/master/src/CPC4
I'm converting the code to run under clisp on Linux, and need some advice. Most of the problems are with macros. Here's today's question.
DEFSMAC and DEFMAC
More old Stanford AI Lab macros, to make macro definition easier before defmacro became part of the language. The macros, and their documentation, is here:
https://github.com/John-Nagle/pasv/blob/master/src/CPC4/defmac.l
These are macros which generate more macros.
...ANSWER
Answered 2017-Jan-19 at 02:25Use eval-when
to define functions in the compiler environment, so they can be used during macro expansion.
QUESTION
I'm reviving an old LISP program from the early 1980s. (It's the Nelson-Oppen simplifier, an early proof system. This version was part of the Ford Pascal-F Verifier, and was running in Franz LISP in 1982.) Here's the entire program:
https://github.com/John-Nagle/pasv/tree/master/src/CPC4
I'm converting the code to run under clisp on Linux, and need some advice. Most of the problems are with macros.
HUNKSHELLHunkshell was a 1970s Stanford SAIL hack to support records with named fields in LISP. I think I've converted this OK; it seems to work.
https://github.com/John-Nagle/pasv/blob/master/src/CPC4/hunkshell.l
The original macro generated more macros as record update functions.
I'm generating defun
s. Is there any reason to generate macros?
By the way, look at what I wrote for "CONCAT". Is there a better way to do that?
DEFMACMore old SAIL macros, to make macro definition easier before defmacro
became part of the language.
https://github.com/John-Nagle/pasv/blob/master/src/CPC4/defmac.l
I've been struggling with "defunobj". Here's my CL version, partly converted:
...ANSWER
Answered 2017-Jan-12 at 17:18Essentially correct, but indentation is broken (like everywhere else - I suggest Emacs to fix it).
Also, you don't need the values
there.
I suggest defparameter
instead
of setq
. Generally speaking, before setting a variable (with, e.g., setq
) one should establish it (with, e.g., let
or defvar
).
fdefinition
is what
you are looking for instead of getd
.
I also don't think you are using backquote right:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install defmac
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page