Why a flat token stream isn't enough
The lexer gives the parser a sequence like INT(1) PLUS INT(2) STAR INT(3). That sequence is ambiguous: does * bind tighter than +? The grammar must say so. Parsing recovers nesting — the hierarchy that tells you 1 + (2 * 3), not (1 + 2) * 3.
The right tool is a context-free grammar (CFG). CFGs are strictly more powerful than regular expressions: they can describe balanced parentheses and recursive structure, things no finite automaton can match. Every mainstream programming language is defined by a CFG (possibly with a few context-sensitive patches bolted on).
The output of parsing is a tree, not a flat structure. Getting from tokens to that tree is the parser's only job.
