Gate2017 ss Q43

  • Option : C
  • Explanation :
    The rule for removal of left recursion is
    A →Aα |β will be
    A →β A’
    A’ → αA’|ϵ
    The given grammar is:
    E → E – T | T; in this α is “– T” and β is T
    T →T + F | F, In this α is “+ F” and β is F
    F → (E) | id
    Hence after removal of the left recursion:
    E → TX
    X → - TX|ϵ
    T → FY
    Y → +FY|ϵ
    F → (E) | id
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *