'Create a new context-free grammar, from the given start state
and set of ``Production``s.
:param start: The start symbol
:type start: Nonterminal
:param productions: The list of productions that defines the grammar
:type productions: list(Production)
:param calculate_leftcorners: False if we don\'t want to calculate the
leftcorner relation. In that case, some optimized chart parsers won\'t work.
:type calculate_leftcorners: bool'

def __init__(self, start, productions, calculate_leftcorners=True):

    if (not is_nonterminal(start)):
        raise TypeError((u'start    should    be    a    Nonterminal    object,    not    a    %s' % type(start).__name__))
    self._start = start
    self._productions = productions
    self._categories = set((prod.lhs() for prod in productions))
    self._calculate_indexes()
    self._calculate_grammar_forms()
    if calculate_leftcorners:
        self._calculate_leftcorners()
