Message from discussion Using lisp code in emacs inside a C program
Received: by 10.224.138.142 with SMTP id a14mr9713357qau.4.1351134830185;
Wed, 24 Oct 2012 20:13:50 -0700 (PDT)
Received: by 10.236.126.227 with SMTP id b63mr902884yhi.0.1351134830159; Wed,
24 Oct 2012 20:13:50 -0700 (PDT)
Date: Wed, 24 Oct 2012 20:13:50 -0700 (PDT)
Injection-Info: g4g2000yqk.googlegroups.com; posting-host=126.96.36.199; posting-account=HZMwaQgAAABuThfluRZ4FM7A69xRFwOt
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0,gzip(gfe)
Subject: Using lisp code in emacs inside a C program
Injection-Date: Thu, 25 Oct 2012 03:13:50 +0000
Content-Type: text/plain; charset=ISO-8859-1
I wrote a humble file parsing/structure-searching program in emacs
lisp. Essentially a collection of elisp functions called by a main
function. I may need the function to grow and to maintain it. I think
its easiest in the elisp in which I started the project.
I want to convert it to an executable or a form that runs without the
need for emacs. Hence, I want to be able to take whatever lisp
interpreter code from emacs and link to it or incorporate inside my C
The main functions from the emacs that my program uses are essentially
regexp and non-greedy wildcards, ie "*?" and multiline searches.
I dont know if any of the standard regexp library in C or C++ supports
such extended regexp. Even sed does not support it and I avoid perl.
lisp if you are able to give me enough ideas on this matter. I would
be even willing to put together a small lisp interpreter in C with
your help and then bootstrap it using Lisp etc and then dump the
binary image after it has computed rest of the higher lisp definitions
in primitive lisp and link it to my code in elisp.
There is really no gui facility that it uses. I am sure many of you
have done this kind of thing as I keep on hearing but have to go
through all the steps myself.