0
$\begingroup$

I can't get what is the operator-precedence grammar... I need to convert this grammar to the grammar of weak precedence but I can't get it even.
What does this notation mean A -> aXYb? What's a, X, Y, b? Can someone show a real sample of OPG (grammar + some built expression)? How many start states can it have?
I tried to read but got a nothing almost.

$\endgroup$
  • 1
    $\begingroup$ I suggest picking up a book or lecture notes on compiler design, such as the dragon book. All the basics should be covered there. Regarding the notation $A \to aXYb$, this is a production in a (presumably) context-free grammar, material which is usually learned in a course about formal languages. $\endgroup$ – Yuval Filmus Apr 8 '18 at 7:07
  • $\begingroup$ @YuvalFilmus, thank you for the link! I tried to read another book of Aho but I got a nothing, unfortunately... $\endgroup$ – Шах Apr 8 '18 at 17:51

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.