Convert a string into a list of tokens.
(s)
| 62 | return read_from_tokens(tokenize(program)) |
| 63 | |
| 64 | def tokenize(s): |
| 65 | "Convert a string into a list of tokens." |
| 66 | return s.replace('(',' ( ').replace(')',' ) ').split() |
| 67 | |
| 68 | def read_from_tokens(tokens): |
| 69 | "Read an expression from a sequence of tokens." |