|
|
|
|
|
by munificent
4059 days ago
|
|
Yes, as long as you include punctuation in your definition of "word". I like to think of it like this: A lexer takes a sequence of characters and produces a sequence of tokens. List in, list out. It just chunks runs of characters together. A parser takes in a sequence of tokens and produces a tree. It produces a nested data structure from a flat input. |
|