@classmethod
def nonterminals(cls):
    """
        Return all non-terminal symbols
        """
    result = set()
    for prod in cls.productions():
        result.add(prod.name)
        for symbol in prod.right:
            if symbol not in cls.tokenTypes():
                result.add(symbol)
    return result
