Blame doc/minilisp/README
|
Packit |
df99a1 |
|
|
Packit |
df99a1 |
MINIEXP/MINILISP
|
|
Packit |
df99a1 |
----------------
|
|
Packit |
df99a1 |
|
|
Packit |
df99a1 |
Files <miniexp.h> and <miniexp.cpp> in directory
|
|
Packit |
df99a1 |
<djvulibre-3.5/libdjvu/miniexp.h> implement the basic data
|
|
Packit |
df99a1 |
structure of a lisp interpreter: s-expressions.
|
|
Packit |
df99a1 |
|
|
Packit |
df99a1 |
S-expressions can be viewed as a simple and powerful
|
|
Packit |
df99a1 |
alternative to XML. They are used in DjVu to handle
|
|
Packit |
df99a1 |
annotations. Both the decoding api <ddjvuapi.h> and program
|
|
Packit |
df99a1 |
<djvused> use s-expressions to describe the hidden text
|
|
Packit |
df99a1 |
information and the navigation information (bookmarks.)
|
|
Packit |
df99a1 |
|
|
Packit |
df99a1 |
Comments in file <miniexp.h> describe which s-expressions
|
|
Packit |
df99a1 |
are supported, how they are represented in text files, and
|
|
Packit |
df99a1 |
which functions are available to handle them.
|
|
Packit |
df99a1 |
|
|
Packit |
df99a1 |
|
|
Packit |
df99a1 |
During the development of <miniexp.h> and <miniexp.cpp> it
|
|
Packit |
df99a1 |
appeared that the best way to test s-expressions was to make
|
|
Packit |
df99a1 |
the last step and program a complete lisp interpreter.
|
|
Packit |
df99a1 |
This also makes a perfect example of using <miniexp.h>.
|
|
Packit |
df99a1 |
|
|
Packit |
df99a1 |
The core interpreter is in file <minilisp.cpp>.
|
|
Packit |
df99a1 |
Startup definitions are in file <minilisp.in>.
|
|
Packit |
df99a1 |
Just type <make> to compile it.
|
|
Packit |
df99a1 |
|
|
Packit |
df99a1 |
Exercise: speed up the interpreter by
|
|
Packit |
df99a1 |
accelerating the function lookup().
|
|
Packit |
df99a1 |
|
|
Packit |
df99a1 |
- Leon Bottou,
|
|
Packit |
df99a1 |
September 2005
|
|
Packit |
df99a1 |
|