Changeset trunk,30 for trunk/matching.lisp
- Timestamp:
- 11/26/2007 07:01:44 PM (19 years ago)
- revision id:
- svn-v3-trunk0:2948df59-2b31-0410-8e06-c40c0b09d5b6:trunk:32
- File:
-
- 1 edited
-
trunk/matching.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/matching.lisp
r25 r30 235 235 (destructuring-bind (head . tail) rule 236 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)))))) 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) 242 ,then 243 ,else)) 244 ({} (destructuring-bind (mincount maxcount subrule) tail 245 `(if-matches-count ,input ,mincount ,maxcount ,subrule 246 (,next ,match) ,then ,else))) 247 (* (destructuring-bind (sub) tail 248 `(if-matches-count ,input 0 nil ,sub (,next ,match) 249 ,then ,else))) 250 (? (destructuring-bind (sub) tail 251 `(if-matches-count ,input 0 1 ,sub (,next ,match) 252 ,then ,else))) 253 (+ (destructuring-bind (sub) tail 254 `(if-matches-count ,input 1 nil ,sub (,next ,match) 255 ,then ,else))) 256 (& (destructuring-bind (sub) tail 257 `(if-matches-required ,input ,sub (,next ,match) 258 ,then ,else))) 259 (! (destructuring-bind (sub) tail 260 `(if-matches-forbidden ,input ,sub (,next ,match) 261 ,then ,else))) 262 (= (destructuring-bind (sub) tail 263 `(if-matches-only ,input ,sub (,next ,match) 264 ,then 265 ,else))) 266 (t `(if-matches-sequence ,input ,rule (,next ,match) 267 ,then ,else))) 268 `(if-matches-sequence ,input ,rule (,next ,match) ,then ,else))))))
Note: See TracChangeset
for help on using the changeset viewer.
