Design grammar and implement a top-down/ bottom-top translator that represent a boolean calculator using python.