Determine if arithmetic expression is in language described by grammar -


we have following grammar arithmetic questions:

e → e + t | e – t | t

t → t * f | t / f | f

f → ( e ) | | b

i'm trying determine whether (a+b)(a-b) in language described grammar.

i able see (a+b)*(a-b) in language mean (a+b)(a-b) in language? lack of asterisk throwing me off. preceding exercises have asterisks multiplication.

so mean (a+b)(a-b) in language?

no

because. able produce (a+b)(a-b) 4 non-terminals combination ie tt, tf, ft, ff , these 4 combinations can not produced given grammar.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -