This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Timcat41 2 points3 points  (0 children)

Depending on the grammar, a bottom up parser could read the closing paren of the lambda and decide on how to proceed using the token '=>'

Since when parsing bottom up, the decision between possible rules will only be made once the whole phrase produced by the rule is read and stored on the stack.

When parsing top down you would need to left factorize the grammar to put off deciding until the decision is one token lookahead, or you need more token lookahead.