What is ‘Push Approach’ and ‘Pull Approach’ to parsing?

Basically, a push is when the parser says to some handler, “I have a foo, do something with it.” A pull is when the handler says to the parser, “give me the next foo.”

Push:

if (myChar == '(')
    handler.handleOpenParen(); // push the open paren to the handler

Pull:

Token token = parser.next(); // pull the next token from the parser

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)