3 ms·
> Or, to ask it differently: can a lexer which ignores an entire class of legal characters (whitespace) ever be context free? Absolutely. Any CFG can be made t
by nightcracker 7y ago
> Or, to ask it differently: can a lexer which ignores an entire class of legal characters (whitespace) ever be context free?
Absolutely. Any CFG can be made to ignore whitespace by dumping the nonterminal W between each symbol in each rule, and letting W -> W ' ' | W '\n' | ''.
- jMyles 7y agoRight - that was the point I was (perhaps awkwardly) making by posing the question that way.