This is the definition of a handle:

1.A “handle” of a string is a substring that matches the RHS of a production.


2.Whose reduction to the non-terminal (on the LHS of the production) represents one step along the reverse of a rightmost derivation toward reducing to the start symbol.

I don't understand the second condition, it's confusing. Can someone clarify it please. Thank you/

  • $\begingroup$ Could you give more context? Where did you find this definition? The term "handle" is used in many different ways. $\endgroup$ – David Richerby Jul 25 '18 at 12:11
  • 1
    $\begingroup$ Is this helpful? cs.stackexchange.com/questions/7587/what-are-handles-in-parsing $\endgroup$ – Yuval Filmus Jul 25 '18 at 12:27
  • $\begingroup$ @YuvalFilmus I read that page before, didn't find it helpful. $\endgroup$ – John Sall Jul 25 '18 at 19:27
  • $\begingroup$ @DavidRicherby of course, the handle mentioned here is the one used in LR parsers. If there's a string that matches the RHS of a production rule then we call that string a handle. $\endgroup$ – John Sall Jul 25 '18 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.