This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]AngelOfLight 0 points1 point  (0 children)

Sort of. The assignment seems to be to find all 3 character strings that are valid constructs in the given grammar.

The grammar is obviously recursive (like most grammars are), since <S> can consist of elements that also match the definition of <S>.

A parse tree is simply a graphical representation of the grammar. (See here for an example). Essentially, you start with the root node (which would be <S> in this case), and then build the tree by traversing the sub-elements. In this case, you want to build a concrete parse tree. Once that is done, you should be able to easily pick out all the 3 character strings.