projects
/
mudsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add br to scrubl
[mudsync.git]
/
mudsync
/
parser.scm
diff --git
a/mudsync/parser.scm
b/mudsync/parser.scm
index 3d84195206cce90e0923c7fb40420691d3574f5a..034b22f3f2f04dc8f5e2bc609658241e5b9fbd43 100644
(file)
--- a/
mudsync/parser.scm
+++ b/
mudsync/parser.scm
@@
-61,11
+61,12
@@
;; definite and indefinite, but not partitive articles
(define article '(or "the" "a" "an"))
;; definite and indefinite, but not partitive articles
(define article '(or "the" "a" "an"))
-(define preposition '(or "with" "in" "on" "out of" "at"))
+(define preposition '(or "with" "in" "on" "out of" "at" "as" "to"
+ "about"))
(define indirect-irx
(sre->irregex
(define indirect-irx
(sre->irregex
- `(: (? (: ,preposition (+ space))) ; possibly a preposition
(ignored)
+ `(: (? (: ,preposition (+ space))) ; possibly a preposition
(? (: ,article (+ space))) ; possibly an article (ignored)
(=> direct-obj (* any)) ; direct object (kept)
(+ space)
(? (: ,article (+ space))) ; possibly an article (ignored)
(=> direct-obj (* any)) ; direct object (kept)
(+ space)
@@
-93,14
+94,14
@@
(define (cmatch-direct-obj-greedy phrase)
;; Turns out this uses the same semantics as splitting verb/rest
(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))
(#f #f)))
(define (cmatch-greedy phrase)
((direct-obj . rest)
(list #:direct-obj direct-obj
#:rest rest))
(#f #f)))
(define (cmatch-greedy phrase)
- `(
(line . ,phrase)
))
+ `(
#:phrase ,phrase
))
;; (define say-example "say I really need to get going.")
;; (define attack-sword-example "hit goblin with sword")
;; (define say-example "say I really need to get going.")
;; (define attack-sword-example "hit goblin with sword")