[README + irregex guile module clinton@unknownlamer.org**20100328200215 Ignore-this: 2df888939af152d9871fb8a37ad79c79 ] addfile ./README hunk ./README 1 +-*- outline -*- + +* There Be Dragons Here + +This is a very incomplete port of some scsh functionality for Guile +1.9.x/2.0. I have intentionally not maintained full scsh +compatibility--it may, however, be a future goal. + +* Implementation Goals + +** scsh functionality + +*** Process Notation + +Looks easy, most of it is implemented in syntax-rules. + +*** SRE + +irregex-guile.scm (instructions within) + +Patch sent to irregex author to +define a guile module. + +*** scsh awk loop + +This will be difficult to do well. A naive rewrite based on the docs +using syntax-case will probably be best initially. The awk +implementation in scsh does a number of hairy optimizations and is +written in an explicit-renaming macro system and so any conversion +will require quite a bit of effort. + +*** tty/pty interface + +This has slightly more features that the Guile tty/pty interfaces +AFAICT (I've only looked at the docs so far). Will need to be a fresh +implementation (no sense in porting the scheme48/scsh C interfaces) +and probably belongs in Guile itself. addfile ./irregex-guile.scm hunk ./irregex-guile.scm 1 - +;;; Install irregex-guile.scm to $GUILE_SITE_DIR/rx/irregex.scm +;;; and irregex.scm to $GUILE_SITE_DIR/rx/source/irregex.scm + +(define-module (rx irregex) + #:export (irregex string->irregex sre->irregex string->sre + maybe-string->sre irregex? irregex-match-data? + irregex-new-matches irregex-reset-matches! irregex-search + irregex-search/matches irregex-match + irregex-search/chunked irregex-match/chunked + make-irregex-chunker irregex-match-substring + irregex-match-subchunk irregex-match-start-source + irregex-match-start-index irregex-match-end-source + irregex-match-end-index irregex-match-num-submatches + irregex-fold irregex-replace irregex-replace/all + irregex-dfa irregex-dfa/search irregex-dfa/extract + irregex-nfa irregex-flags irregex-lengths irregex-names + irregex-num-submatches)) + +(load-from-path "rx/source/irregex.scm")