3 ms·
GP calls it a tokenizer (aka lexer) so presumably it doesn't match parens, it just returns a flat array of tokens.
by NoThisIsMe 4y ago
GP calls it a tokenizer (aka lexer) so presumably it doesn't match parens, it just returns a flat array of tokens.
- xscott 4y agoThat's disappointing. I don't have any stats, but I imagine 90% of beginners writing an interpreter (much less a compiler) start a lexer and parser and quit before getting to the good stuff. Skipping the tedium until you've got "hello world" and "factorial working" makes sense to me. You can always go fix the syntax later.
- morelisp 4y agoIf you don't include the parser, "factorial working" is going to be the same evaluating just about any scripting language. You don't see half the value in Lisp's syntax until you're writing the parser.