Changeset trunk,25 for trunk/matching.lisp
- Timestamp:
- 06/25/2007 07:37:09 PM (19 years ago)
- revision id:
- svn-v3-trunk0:2948df59-2b31-0410-8e06-c40c0b09d5b6:trunk:27
- File:
-
- 1 edited
-
trunk/matching.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/matching.lisp
r24 r25 234 234 (list 235 235 (destructuring-bind (head . tail) rule 236 (symcase head 237 (^ (destructuring-bind (regex) tail 238 `(if-matches-regex ,input ,regex (,next ,match) ,then ,else))) 239 (/ `(if-matches-choice ,input ,tail (,next ,match) ,then ,else)) 240 ({} (destructuring-bind (mincount maxcount subrule) tail 241 `(if-matches-count ,input ,mincount ,maxcount ,subrule 242 (,next ,match) ,then ,else))) 243 (* (destructuring-bind (sub) tail 244 `(if-matches-count ,input 0 nil ,sub (,next ,match) 245 ,then ,else))) 246 (? (destructuring-bind (sub) tail 247 `(if-matches-count ,input 0 1 ,sub (,next ,match) ,then ,else))) 248 (+ (destructuring-bind (sub) tail 249 `(if-matches-count ,input 1 nil ,sub (,next ,match) 250 ,then ,else))) 251 (& (destructuring-bind (sub) tail 252 `(if-matches-required ,input ,sub (,next ,match) ,then ,else))) 253 (! (destructuring-bind (sub) tail 254 `(if-matches-forbidden ,input ,sub (,next ,match) ,then ,else))) 255 (= (destructuring-bind (sub) tail 256 `(if-matches-only ,input ,sub (,next ,match) ,then ,else))) 257 (t `(if-matches-sequence ,input ,rule (,next ,match) 258 ,then ,else))))))) 236 (if (symbolp head) 237 (symcase head 238 (^ (destructuring-bind (regex) tail 239 `(if-matches-regex ,input ,regex (,next ,match) 240 ,then ,else))) 241 (/ `(if-matches-choice ,input ,tail (,next ,match) ,then ,else)) 242 ({} (destructuring-bind (mincount maxcount subrule) tail 243 `(if-matches-count ,input ,mincount ,maxcount ,subrule 244 (,next ,match) ,then ,else))) 245 (* (destructuring-bind (sub) tail 246 `(if-matches-count ,input 0 nil ,sub (,next ,match) 247 ,then ,else))) 248 (? (destructuring-bind (sub) tail 249 `(if-matches-count ,input 0 1 ,sub (,next ,match) 250 ,then ,else))) 251 (+ (destructuring-bind (sub) tail 252 `(if-matches-count ,input 1 nil ,sub (,next ,match) 253 ,then ,else))) 254 (& (destructuring-bind (sub) tail 255 `(if-matches-required ,input ,sub (,next ,match) 256 ,then ,else))) 257 (! (destructuring-bind (sub) tail 258 `(if-matches-forbidden ,input ,sub (,next ,match) 259 ,then ,else))) 260 (= (destructuring-bind (sub) tail 261 `(if-matches-only ,input ,sub (,next ,match) ,then ,else))) 262 (t `(if-matches-sequence ,input ,rule (,next ,match) 263 ,then ,else))) 264 `(if-matches-sequence ,input ,rule (,next ,match) ,then ,else))))))
Note: See TracChangeset
for help on using the changeset viewer.
