Create EpsilonRemovedRule. This rule will skip symbol at the `index`.
    :param rule: Original rule.
    :param index: Index of symbol that is rewritable to epsilon.
    :param backtrack: Dictionary where key is nonterminal and value is rule which is next to generate epsilon.
    :return: EpsilonRemovedRule class without symbol rewritable to epsilon.

def _create_rule(rule, index, backtrack):
    # type: (Rule, int, Dict[Type[Nonterminal], Type[Rule]]) -> Type[EpsilonRemovedRule]
    """
    Create EpsilonRemovedRule. This rule will skip symbol at the `index`.
    :param rule: Original rule.
    :param index: Index of symbol that is rewritable to epsilon.
    :param backtrack: Dictionary where key is nonterminal and value is rule which is next to generate epsilon.
    :return: EpsilonRemovedRule class without symbol rewritable to epsilon.
    """
    # remove old rules from the dictionary
    old_dict = rule.__dict__.copy()
    if 'rules' in old_dict: del old_dict['rules']
    if 'rule' in old_dict: del old_dict['rule']
    if 'left' in old_dict: del old_dict['left']
    if 'right' in old_dict: del old_dict['right']
    if 'fromSymbol' in old_dict: del old_dict['fromSymbol']
    if 'toSymbol' in old_dict: del old_dict['toSymbol']
    # create type
    created = type('NoEps[' + rule.__name__ + ']',
                   (EpsilonRemovedRule,),
                   old_dict)  # type: Type[EpsilonRemovedRule]
    # add from_rule and index
    created.from_rule = rule
    created.replace_index = index
    created.backtrack = backtrack
    # attach rule
    created.fromSymbol = rule.fromSymbol
    created.right = [rule.right[i] for i in range(len(rule.right)) if i != index]
    # ff the right side is empty
    if len(created.right) == 0:
        created.right = [EPSILON]
    return created