This Grammar:



I think we can't because basically there is no relation between terminals? like no relation between a and b! or am i missing something? and the language of this grammar has only 2 members !

can we using Operator precedence parsing with this grammar?


1 Answer 1


It's an operator grammar since no right-hand side has two consecutive non-terminals. So we then attempt to construct the precedence relations:

$$b \gtrdot b \\ b \doteq a \\ a \doteq b \\ a \doteq a $$

There is no multiple entry, so an operator precedence parser is possible.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.