This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CL-USER> (regex::scanner-source-from-parse-tree (regex::parse-regex "a*|bcd")) | |
(LAMBDA (STRING REGEX::START REGEX::END) | |
(LET ((REGEX::INDEX REGEX::START)) | |
(BLOCK NIL | |
(TAGBODY | |
(GO REGEX::START) | |
REGEX::START | |
(UNLESS (= REGEX::INDEX REGEX::END) | |
(CASE (CHAR STRING REGEX::INDEX) ((#\a) (INCF REGEX::INDEX) (GO 0)))) | |
(GO 1) | |
1 | |
(RETURN NIL) | |
0 | |
(GO 2) | |
2 | |
(UNLESS (= REGEX::INDEX REGEX::END) | |
(CASE (CHAR STRING REGEX::INDEX) | |
((#\d) (INCF REGEX::INDEX) (GO REGEX::SUCCESS)))) | |
(GO 3) | |
3 | |
(UNLESS (= REGEX::INDEX REGEX::END) | |
(CASE (CHAR STRING REGEX::INDEX) | |
((#\b) (INCF REGEX::INDEX) (GO 0)) | |
((#\c) (INCF REGEX::INDEX) (GO 0)))) | |
(GO 1) | |
REGEX::SUCCESS | |
(RETURN REGEX::INDEX))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment