def Test_Reg(Grammar): Right_linear = Check_Grammar.isRightLinear(Grammar) if Right_linear[0] == True: Grammar.linear = 1 return True else: Left_Linear = Check_Grammar.isLeftLinear(Grammar) if Left_Linear[0] == True: Grammar.linear = -1 return True return False
def Test_ContextFree(Grammar): return Check_Grammar.isContextFree(Grammar)