Changeset trunk,11 for trunk/parse3.lisp
- Timestamp:
- 06/18/2007 07:51:03 PM (19 years ago)
- revision id:
- svn-v3-trunk0:2948df59-2b31-0410-8e06-c40c0b09d5b6:trunk:11
- File:
-
- 1 edited
-
trunk/parse3.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/parse3.lisp
r10 r11 4 4 ,@body)) 5 5 6 (defmacro if-matche r-parser (input parser (next match)6 (defmacro if-matches-parser (input parser (next match) 7 7 &body (&optional (then t) else)) 8 8 (declare (symbol parser next match)) … … 66 66 `(if-matches ,input ,head (,head-next ,head-match) 67 67 (if-matches-sequence ,head-next ,tail (,next ,tail-match) 68 (let ((,match (cons ,head-match (list ,tail-match))))68 (let ((,match (cons ,head-match ,tail-match))) 69 69 ,then) 70 70 ,else) 71 71 ,else)) 72 `(if-matches ,input ,head (,next ,match) ,then ,else)))) 72 (with-gensyms (tail-match) 73 `(if-matches ,input ,head (,next ,tail-match) 74 (let ((,match (list ,tail-match))) 75 ,then) 76 ,else))))) 73 77 74 78 (defmacro if-matches-eqcount (input count rule (next match) … … 149 153 (defmacro if-matches (input rule (next match) &body (&optional (then t) else)) 150 154 (etypecase rule 151 (symbol `(if-matche r-parser ,input ,rule (,next ,match) ,then ,else))155 (symbol `(if-matches-parser ,input ,rule (,next ,match) ,then ,else)) 152 156 (character `(if-matches-char ,input ,rule (,next ,match) ,then ,else)) 153 157 (string `(if-matches-string ,input ,rule (,next ,match) ,then ,else))
Note: See TracChangeset
for help on using the changeset viewer.
