0

The following grammar has left recursion

  E -> E + T|T
  T -> T * F|F
  F -> F*|a | b

How to remove it? Is there any general procedure for it?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Shadow
  • 1
  • http://www.csd.uwo.ca/~moreno//CS447/Lectures/Syntax.html/node8.html – Sunil B N Oct 21 '16 at 09:34
  • thanks but the idea of removing left recursion i understand it. the problem is with this particular questions especially the last line "F->F*|a|b" . i want help on that – Shadow Oct 21 '16 at 09:39
  • If you understand the idea of removing left recursion, then what is your question? I mean, if you understand, you would know the general procedure. youtube has plenty of examples. – Jerry Oct 21 '16 at 11:59
  • i faced challenges on this expression F -> F* |a |b. thats where i need help removing the left recursion. @Jerry – Shadow Oct 21 '16 at 17:12
  • @Sunil B N I Kindly ask you to remove the left recursion on the above problem showing the steps involved. – Shadow Oct 23 '16 at 08:52

0 Answers0