Can FINALLY interact with objects! Woohoo!
[mudsync.git] / mudsync / parser.scm
index 305f43d2ca49e6f7d080f0766a181f1e8de34a04..e9c4096c1b3a298cb1ce1683e366d4eda8b1d2f9 100644 (file)
   (sre->irregex
    `(: (? (: ,preposition (+ space)))  ; possibly a preposition (ignored)
        (? (: ,article (+ space)))     ; possibly an article (ignored)
-       (=> direct-obj (* any)))))  ; direct object (kept)
+       (=> direct-obj (+ any)))))  ; direct object (kept)
 
 (define (cmatch-direct-obj phrase)
   (match-to-kwargs direct-irx phrase))
 
 (define (cmatch-empty phrase)
-  (if (equal? (string-trim phrase) ")")
+  (if (equal? (string-trim phrase) "")
       '()
       #f))
 
 (define (cmatch-direct-obj-greedy phrase)
   ;; Turns out this uses the same semantics as splitting verb/rest
-  (match (split-verb-and-rest string)
+  (match (split-verb-and-rest phrase)
     ((direct-obj . rest)
      (list #:direct-obj direct-obj
            #:rest rest))