|
programming | |
![]() | ||
![]() interests stuff people this site |
|
![]() Here's some of the software I wrote: genmlGenerate a HTML (or related) document from a Scheme-like document.Example: The output HTML would be a not so nicely indented version of:(document "This is the document title" (multi-column "This appears in the left column" "This appears in the right column"))
Download genml.scm bit-fiddle.scmIf your Scheme implementation does not have bit-wise (and, or and not) operations, you can use the ones from this library. Be aware that these are slow as molasses and if you need to fiddle with your bits more often than once a day (or so), then please go and get a Scheme implementation which supports this natively.Download bit-fiddle.scm gnfa2regexp.elThis is some Emacs Lisp code to convert a Generalized Nondeterministic Finite Automaton (GNFA) into a regular expression. Actually, this is not exactly true. Currently the input automaton must be deterministic and have only one accepting state, but since the transitions from one state to another can be labelled with arbitrary regular expressions, this is not such a big deal.Example:
The automaton `my-gnfa' above recognizes balanced parentheses
up to four levels deep, after a (defun. You can feed the
regular expression generated by `gnfa-to-regexp' into regular
Emacs regular expressions, or, by changing
`regexp-group-left', `regexp-group-right',
`regexp-kleene-star', `regexp-union' appropriately,
you can also use them in your Perl scripts.
Download gnfa2regexp.el parenface.elCreates a new face for parentheses in Emacs, so that you can set the color of them to make them out more (or leass) easily. This is not written by me, but it is based on some code I posted to comp.lang.scheme on 2000-08-20. Dave Pearson <davep@davep.org> made it what it is.If you think Lisp has too much parens, try setting their color to your background color in your Emacs. (This was the original idea behind this code. I think the idea was from Erik Naggum, but I'm not sure.) Download parenface.el |