Consider the grammar:
Bexpr -> Bexpr OR Bterm | Bterm
Bterm -> Bterm AND Bfactor | Bfactor
Bfactor -> NOT Bfactor | ( Bexpr ) | TRUE | FALSE
* Construct a parse tree for NOT ( TRUE OR FALSE )
Design grammars for the following languages:
Strings of 0's and 1's with an equal number of 0's and 1's
Strings of 0's and 1's of the form xx', where x' is the reverse string
of x (ie. if x=001, then xx'=001100)
Design an unambiguous grammar that generates all regular expressions over
the symbols a and b. Note that you are generating patterns such
as a | b *, not just strings of a's and b's.