Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 1.89 KB

INSTALL.adoc

File metadata and controls

63 lines (42 loc) · 1.89 KB

Installation instructions

The easiest way to use the pregexp code is to simply load the file pregexp.scm into your Scheme.

If you use Common Lisp, load pregexp.lisp.

Alternatively, if your Scheme dialect is either PLT Scheme, Gauche, Guile, or Scsh, you can exploit your dialect’s module facility. A module-ized pregexp has two advantages:

  • It makes the interface to the pregexp code cleaner, as the module hides implementation details and avoids polluting the global namespace.

  • Portions of the pregexp code are rewritten to take advantage of the dialect’s extensions.

Use the scmxlate package to configure pregexp for these dialects. scmxlate is available from https://github.com/ds26gte/scmxlate.

Start Scheme in the pregexp directory, and load the file scmxlate/scmxlate.scm, using the correct relative or full pathname. You will be asked your Scheme dialect’s name: answer plt, gauche, guile, or scsh as appropriate.

PLT

For PLT, the generated file is pregexp.ss, which can be loaded using the require syntax. If you place pregexp.ss in a standard PLT library location, you can load it with

(require (lib "pregexp.ss"))

without worrying about its pathname.

Gauche

For Gauche, the generated file is gauchelib/pregexp.scm. If you place it in one of the directories in *load-path*, you can do

(use pregexp)

without worrying about its pathname.

Guile

For Guile, the generated file is ice-9/pregexp.scm (i.e., the file pregexp.scm in the subdirectory ice-9). If you place pregexp.scm in an ice-9 subdirectory in your %load-path, you can load it with

(use-modules (ice-9 pregexp))

Scsh

For Scsh, the generated file is scsh/pregexp.scm. Move it to an appropriate library location. To load the pregexp module in Scsh, you need to do the following (with the correct pathname for pregexp.scm).

,config ,load pregexp.scm
,open pregexp