4 ms·
One thing. Sometimes linear constructs can appear nested in the handling of the syntax. You want to avoid right recursion in an LR parser for list-like constr
by kazinator 11y ago
One thing.
Sometimes linear constructs can appear nested in the handling of the syntax.
You want to avoid right recursion in an LR parser for list-like constructs, especially if they can be reasonably expected to grow large. These constructs appear "flat" to the programmer, but the parser will push tokens onto the stack and not reduce anything until the end of the construct is reached.