(self, grammar)
Initializer.

        Creates an attribute for each grammar symbol (nonterminal),
        whose value is the symbol's type (an int >= 256).
Initializer.
Initializer .
def __init__(self, grammar):
        """Initializer.

        Creates an attribute for each grammar symbol (nonterminal),
        whose value is the symbol's type (an int >= 256).
        """
        for name, symbol in grammar.symbol2number.items():
            setattr(self, name, symbol)
def __init__ ( self , grammar ) : for name , symbol in grammar . symbol2number . items ( ) : setattr ( self , name , symbol )