Changeset 110


Ignore:
Timestamp:
10/13/05 18:22:38 (19 years ago)
Author:
lisppaste
Message:

For bmastenbrook: Steel Bazooka Common Lisp!

Location:
trunk/example
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/example/cliki-bot.asd

    r100 r110  
    2929                 (:file "eliza-rules"
    3030                        :depends-on ("mp2eliza"))
     31                 (:file "steel-bazooka")
    3132                 (:file "cliki"
    32                         :depends-on ("mp2eliza"))))
     33                        :depends-on ("mp2eliza" "steel-bazooka"))))
  • TabularUnified trunk/example/cliki.lisp

    r105 r110  
    676676                     (and str
    677677                          (lookup-advice (elt str 0))))
     678                   (let ((str (nth-value 1 (scan-to-strings "^(?i)what\\s+does\\s+([a-zA-Z]+)\\s+(mean|stand\\s+for)$" first-pass))))
     679                     (and str
     680                          (let ((letters (elt str 0)))
     681                            (if (and (> (length letters) 2)
     682                                     (string-equal (subseq letters (- (length letters) 2)) "cl"))
     683                                (steel-bazooka:steel-whatever :letters (string-downcase (subseq letters 0 (- (length letters) 2))))
     684                                (steel-bazooka:steel-whatever :letters (string-downcase letters) :suffix nil)))))
    678685                   (let ((str (nth-value 1 (scan-to-strings "^(?i)shorten\\s+(\\w+://.+\\S)\\s*$" term-with-question))))
    679686                     (and str
Note: See TracChangeset for help on using the changeset viewer.