Naive, expensive, way:

Start with the root.

Apply productions systematically, to generate all possible strings (of auxiliary & terminal symbols).

When a string of all terminals is generated, check whether == the given string.

 

Strings Generated:

 S (root)

 A

( )

 a

 b

 c

(S)

(A)

(a)

(b)

(c)

(SS)         )(

(AS)

(aS)

(bS)

  :

(a(b))       ?(a(b)()?

 

To Next Slide To Previous Slide To Contents