diff --git a/routes/route.py b/routes/route.py index 0cab18c..7b49324 100644 --- a/routes/route.py +++ b/routes/route.py @@ -29,3 +29,1433 @@ async def put_wordlist(id: str, wordlist: Wordlist): @router.delete("/{id}") async def delete_wordlist(id: str): collection_name.find_one_and_delete({"_id": ObjectId(id)}) + + +@router.get("/word/check") +async def check_word(word: str): + return (isAccepted(word.lower())) + + +def start(c): + if (c == 'a'): + dfa = 1 + elif (c == 'b'): + dfa = 2 + elif (c == 'c'): + dfa = 3 + elif (c == 'e'): + dfa = 4 + elif (c == 'f'): + dfa = 5 + elif (c == 'i'): + dfa = 6 + elif (c == 'k'): + dfa = 7 + elif (c == 'l'): + dfa = 8 + elif (c == 'm'): + dfa = 9 + elif (c == 'n'): + dfa = 10 + elif (c == 'r'): + dfa = 11 + elif (c == 't'): + dfa = 12 + elif (c == 'u'): + dfa = 13 + elif (c == 'w'): + dfa = 14 + elif (c == 'd'): + dfa = 49 + else: + dfa = -1 + return dfa + + +def state1(c): + if (c == 'r'): + dfa = 15 + else: + dfa = -1 + return dfa + + +def state2(c): + if (c == 'a'): + dfa = 29 + else: + dfa = -1 + return dfa + + +def state3(c): + if (c == 'h'): + dfa = 38 + elif (c == 'o'): + dfa = 44 + else: + dfa = -1 + return dfa + + +def state4(c): + if (c == 'n'): + dfa = 59 + else: + dfa = -1 + return dfa + + +def state5(c): + if (c == 'a'): + dfa = 69 + elif (c == 'r'): + dfa = 79 + else: + dfa = -1 + return dfa + + +def state6(c): + if (c == 'n'): + dfa = 88 + else: + dfa = -1 + return dfa + + +def state7(c): + if (c == 'i'): + dfa = 92 + else: + dfa = -1 + return dfa + + +def state8(c): + if (c == 'e'): + dfa = 98 + elif (c == 'i'): + dfa = 106 + else: + dfa = -1 + return dfa + + +def state9(c): + if (c == 'o'): + dfa = 112 + elif (c == 'i'): + dfa = 114 + else: + dfa = -1 + return dfa + + +def state10(c): + if (c == 'u'): + dfa = 120 + else: + dfa = -1 + return dfa + + +def state11(c): + if (c == 'e'): + dfa = 125 + else: + dfa = -1 + return dfa + + +def state12(c): + if (c == 'o'): + dfa = 130 + else: + dfa = -1 + return dfa + + +def state13(c): + if (c == 'n'): + dfa = 134 + else: + dfa = -1 + return dfa + + +def state14(c): + if (c == 'e'): + dfa = 140 + else: + dfa = -1 + return dfa + + +def state15(c): + if (c == 'c'): + dfa = 20 + elif (c == 'd'): + dfa = 16 + else: + dfa = -1 + return dfa + + +def state16(c): + if (c == 'u'): + dfa = 17 + else: + dfa = -1 + return dfa + + +def state17(c): + if (c == 'i'): + dfa = 18 + else: + dfa = -1 + return dfa + + +def state18(c): + if (c == 'n'): + dfa = 19 + else: + dfa = -1 + return dfa + + +def state19(c): + if (c == 'o'): + dfa = -2 + else: + dfa = -1 + return dfa + + +def state20(c): + if (c == 'h'): + dfa = 21 + else: + dfa = -1 + return dfa + + +def state21(c): + if (c == 'i'): + dfa = 22 + else: + dfa = -1 + return dfa + + +def state22(c): + if (c == 't'): + dfa = 23 + else: + dfa = -1 + return dfa + + +def state23(c): + if (c == 'e'): + dfa = 24 + else: + dfa = -1 + return dfa + + +def state24(c): + if (c == 'c'): + dfa = 25 + else: + dfa = -1 + return dfa + + +def state25(c): + if (c == 't'): + dfa = 26 + else: + dfa = -1 + return dfa + + +def state26(c): + if (c == 'u'): + dfa = 27 + else: + dfa = -1 + return dfa + + +def state27(c): + if (c == 'r'): + dfa = 28 + else: + dfa = -1 + return dfa + + +def state28(c): + if (c == 'e'): + dfa = -2 + else: + dfa = -1 + return dfa + + +def state29(c): + if (c == 't'): + dfa = 30 + else: + dfa = -1 + return dfa + + +def state30(c): + if (c == 't'): + dfa = 31 + else: + dfa = -1 + return dfa + + +def state31(c): + if (c == 'l'): + dfa = 32 + else: + dfa = -1 + return dfa + + +def state32(c): + if (c == 'e'): + dfa = 33 + else: + dfa = -1 + return dfa + + +def state33(c): + if (c == 'f'): + dfa = 34 + else: + dfa = -1 + return dfa + + +def state34(c): + if (c == 'i'): + dfa = 35 + else: + dfa = -1 + return dfa + + +def state35(c): + if (c == 'e'): + dfa = 36 + else: + dfa = -1 + return dfa + + +def state36(c): + if (c == 'l'): + dfa = 37 + else: + dfa = -1 + return dfa + + +def state37(c): + if (c == 'd'): + dfa = -2 + else: + dfa = -1 + return dfa + + +def state38(c): + if (c == 'a'): + dfa = 39 + else: + dfa = -1 + return dfa + +def state39(c): + if (c == 'l'): + dfa = 40 + else: + dfa = -1 + return dfa + +def state40(c): + if (c == 'l'): + dfa = 41 + else: + dfa = -1 + return dfa + +def state41(c): + if (c == 'e'): + dfa = 42 + else: + dfa = -1 + return dfa + +def state42(c): + if (c == 'n'): + dfa = 43 + else: + dfa = -1 + return dfa + +def state43(c): + if (c == 'g'): + dfa = 28 + else: + dfa = -1 + return dfa + +def state44(c): + if (c == 'n'): + dfa = 45 + else: + dfa = -1 + return dfa + +def state45(c): + if (c == 'c'): + dfa = 46 + else: + dfa = -1 + return dfa + +def state46(c): + if (c == 'e'): + dfa = 47 + else: + dfa = -1 + return dfa + +def state47(c): + if (c == 'r'): + dfa = 48 + else: + dfa = -1 + return dfa + +def state48(c): + if (c == 't'): + dfa = -2 + else: + dfa = -1 + return dfa + +def state49(c): + if (c == 'i'): + dfa = 50 + elif( c == 'e'): + dfa = 54 + else: + dfa = -1 + return dfa + +def state50(c): + if (c == 's'): + dfa = 51 + else: + dfa = -1 + return dfa + +def state51(c): + if (c == 'b'): + dfa = 52 + else: + dfa = -1 + return dfa + +def state52(c): + if (c == 'a'): + dfa = 53 + else: + dfa = -1 + return dfa + +def state53(c): + if (c == 'n'): + dfa = 37 + else: + dfa = -1 + return dfa + +def state54(c): + if (c == 'a'): + dfa = 55 + else: + dfa = -1 + return dfa + +def state55(c): + if (c == 'd'): + dfa = 56 + else: + dfa = -1 + return dfa + +def state56(c): + if (c == 'l'): + dfa = 57 + else: + dfa = -1 + return dfa + +def state57(c): + if (c == 'i'): + dfa = 58 + else: + dfa = -1 + return dfa + +def state58(c): + if (c == 'n'): + dfa = 28 + else: + dfa = -1 + return dfa + +def state59(c): + if (c == 't'): + dfa = 60 + else: + dfa = -1 + return dfa + +def state60(c): + if (c == 'e'): + dfa = 61 + else: + dfa = -1 + return dfa + +def state61(c): + if (c == 'r'): + dfa = 62 + else: + dfa = -1 + return dfa + +def state62(c): + if (c == 't'): + dfa = 63 + else: + dfa = -1 + return dfa + +def state63(c): + if (c == 'a'): + dfa = 64 + else: + dfa = -1 + return dfa + +def state64(c): + if (c == 'i'): + dfa = 65 + else: + dfa = -1 + return dfa + +def state65(c): + if (c == 'n'): + dfa = 66 + else: + dfa = -1 + return dfa + +def state66(c): + if (c == 'm'): + dfa = 67 + else: + dfa = -1 + return dfa + +def state67(c): + if (c == 'e'): + dfa = 68 + else: + dfa = -1 + return dfa + +def state68(c): + if (c == 'n'): + dfa = 48 + else: + dfa = -1 + return dfa + +def state69(c): + if (c == 'c'): + dfa = 70 + elif(c == 'n'): + dfa = 75 + else: + dfa = -1 + return dfa + +def state70(c): + if (c == 'e'): + dfa = 71 + else: + dfa = -1 + return dfa + +def state71(c): + if (c == 'b'): + dfa = 72 + else: + dfa = -1 + return dfa + +def state72(c): + if (c == 'o'): + dfa = 73 + else: + dfa = -1 + return dfa + +def state73(c): + if (c == 'o'): + dfa = 74 + else: + dfa = -1 + return dfa + +def state74(c): + if (c == 'k'): + dfa = -2 + else: + dfa = -1 + return dfa + +def state75(c): + if (c == 't'): + dfa = 76 + else: + dfa = -1 + return dfa + +def state76(c): + if (c == 'a'): + dfa = 77 + else: + dfa = -1 + return dfa + +def state77(c): + if (c == 's'): + dfa = 78 + else: + dfa = -1 + return dfa + +def state78(c): + if (c == 'y'): + dfa = -2 + else: + dfa = -1 + return dfa + +def state79(c): + if (c == 'e'): + dfa = 80 + else: + dfa = -1 + return dfa + +def state80(c): + if (c == 'n'): + dfa = 81 + else: + dfa = -1 + return dfa + +def state81(c): + if (c == 'c'): + dfa = 82 + else: + dfa = -1 + return dfa + +def state82(c): + if (c == 'h'): + dfa = 83 + else: + dfa = -1 + return dfa + +def state83(c): + if (c == 'f'): + dfa = 84 + else: + dfa = -1 + return dfa + +def state84(c): + if (c == 'r'): + dfa = 85 + else: + dfa = -1 + return dfa + +def state85(c): + if (c == 'i'): + dfa = 86 + else: + dfa = -1 + return dfa + +def state86(c): + if (c == 'e'): + dfa = 87 + else: + dfa = -1 + return dfa + +def state87(c): + if (c == 's'): + dfa = -2 + else: + dfa = -1 + return dfa + +def state88(c): + if (c == 'v'): + dfa = 89 + else: + dfa = -1 + return dfa + +def state89(c): + if (c == 'e'): + dfa = 90 + else: + dfa = -1 + return dfa + +def state90(c): + if (c == 's'): + dfa = 91 + else: + dfa = -1 + return dfa + +def state91(c): + if (c == 't'): + dfa = 66 + else: + dfa = -1 + return dfa + +def state92(c): + if (c == 'n'): + dfa = 93 + else: + dfa = -1 + return dfa + +def state93(c): + if (c == 'g'): + dfa = 94 + else: + dfa = -1 + return dfa + +def state94(c): + if (c == 'k'): + dfa = 95 + else: + dfa = -1 + return dfa + +def state95(c): + if (c == 'o'): + dfa = 96 + else: + dfa = -1 + return dfa + +def state96(c): + if (c == 'n'): + dfa = 97 + else: + dfa = -1 + return dfa + +def state97(c): + if (c == 'g'): + dfa = -2 + else: + dfa = -1 + return dfa + +def state98(c): + if (c == 'a'): + dfa = 99 + else: + dfa = -1 + return dfa + +def state99(c): + if (c == 'd'): + dfa = 100 + else: + dfa = -1 + return dfa + +def state100(c): + if (c == 'e'): + dfa = 101 + else: + dfa = -1 + return dfa + +def state101(c): + if (c == 'r'): + dfa = 102 + else: + dfa = -1 + return dfa + +def state102(c): + if (c == 's'): + dfa = 103 + else: + dfa = -1 + return dfa + +def state103(c): + if (c == 'h'): + dfa = 104 + else: + dfa = -1 + return dfa + +def state104(c): + if (c == 'i'): + dfa = 105 + else: + dfa = -1 + return dfa + +def state105(c): + if (c == 'p'): + dfa = -2 + else: + dfa = -1 + return dfa + +def state106(c): + if (c == 'p'): + dfa = 107 + else: + dfa = -1 + return dfa + +def state107(c): + if (c == 's'): + dfa = 108 + else: + dfa = -1 + return dfa + +def state108(c): + if (c == 't'): + dfa = 109 + else: + dfa = -1 + return dfa + +def state109(c): + if (c == 'i'): + dfa = 110 + else: + dfa = -1 + return dfa + +def state110(c): + if (c == 'c'): + dfa = 111 + else: + dfa = -1 + return dfa + +def state111(c): + if (c == 'k'): + dfa = -2 + else: + dfa = -1 + return dfa + +def state112(c): + if (c == 'n'): + dfa = 113 + else: + dfa = -1 + return dfa + +def state113(c): + if (c == 'e'): + dfa = 78 + else: + dfa = -1 + return dfa + +def state114(c): + if (c == 'c'): + dfa = 115 + else: + dfa = -1 + return dfa + +def state115(c): + if (c == 'r'): + dfa = 116 + else: + dfa = -1 + return dfa + +def state116(c): + if (c == 'o'): + dfa = 117 + else: + dfa = -1 + return dfa + +def state117(c): + if (c == 'w'): + dfa = 118 + else: + dfa = -1 + return dfa + +def state118(c): + if (c == 'a'): + dfa = 119 + else: + dfa = -1 + return dfa + +def state119(c): + if (c == 'v'): + dfa = 28 + else: + dfa = -1 + return dfa + +def state120(c): + if (c == 'c'): + dfa = 121 + else: + dfa = -1 + return dfa + +def state121(c): + if (c == 'l'): + dfa = 122 + else: + dfa = -1 + return dfa + +def state122(c): + if (c == 'e'): + dfa = 123 + else: + dfa = -1 + return dfa + +def state123(c): + if (c == 'a'): + dfa = 124 + else: + dfa = -1 + return dfa + +def state124(c): + if (c == 'r'): + dfa = -2 + else: + dfa = -1 + return dfa + +def state125(c): + if (c == 'm'): + dfa = 126 + else: + dfa = -1 + return dfa + +def state126(c): + if (c == 'e'): + dfa = 127 + else: + dfa = -1 + return dfa + +def state127(c): + if (c == 'm'): + dfa = 128 + else: + dfa = -1 + return dfa + +def state128(c): + if (c == 'b'): + dfa = 129 + else: + dfa = -1 + return dfa + +def state129(c): + if (c == 'e'): + dfa = 124 + else: + dfa = -1 + return dfa + +def state130(c): + if (c == 'r'): + dfa = 131 + else: + dfa = -1 + return dfa + +def state131(c): + if (c == 'n'): + dfa = 132 + else: + dfa = -1 + return dfa + +def state132(c): + if (c == 'a'): + dfa = 133 + else: + dfa = -1 + return dfa + +def state133(c): + if (c == 'd'): + dfa = 19 + else: + dfa = -1 + return dfa + +def state134(c): + if (c == 'd'): + dfa = 135 + else: + dfa = -1 + return dfa + +def state135(c): + if (c == 'e'): + dfa = 136 + else: + dfa = -1 + return dfa + +def state136(c): + if (c == 'r'): + dfa = 137 + else: + dfa = -1 + return dfa + +def state137(c): + if (c == 's'): + dfa = 138 + else: + dfa = -1 + return dfa + +def state138(c): + if (c == 't'): + dfa = 139 + else: + dfa = -1 + return dfa + +def state139(c): + if (c == 'a'): + dfa = 53 + else: + dfa = -1 + return dfa + +def state140(c): + if (c == 'r'): + dfa = 141 + else: + dfa = -1 + return dfa + +def state141(c): + if (c == 'e'): + dfa = 142 + else: + dfa = -1 + return dfa + +def state142(c): + if (c == 'w'): + dfa = 143 + else: + dfa = -1 + return dfa + +def state143(c): + if (c == 'o'): + dfa = 144 + else: + dfa = -1 + return dfa + +def state144(c): + if (c == 'l'): + dfa = 145 + else: + dfa = -1 + return dfa + +def state145(c): + if (c == 'f'): + dfa = -2 + else: + dfa = -1 + return dfa + +def final(c): # final state + if (c.isalpha()): + return True + else: + return False + + + +def isAccepted(String): + + # store length of Stringing + l = len(String)+1 + + # dfa tells the number associated + # with the present dfa = state + dfa = 0 + for i in range(l): + if (dfa == 0): + dfa = start(String[i]) + + elif (dfa == 1): + dfa = state1(String[i]) + + elif (dfa == 2): + dfa = state2(String[i]) + + elif (dfa == 3): + dfa = state3(String[i]) + + elif (dfa == 4): + dfa = state4(String[i]) + elif (dfa == 5): + dfa = state5(String[i]) + elif (dfa == 6): + dfa = state6(String[i]) + elif (dfa == 7): + dfa = state7(String[i]) + elif (dfa == 8): + dfa = state8(String[i]) + elif (dfa == 9): + dfa = state9(String[i]) + elif (dfa == 10): + dfa = state10(String[i]) + elif (dfa == 11): + dfa = state11(String[i]) + elif (dfa == 12): + dfa = state12(String[i]) + elif (dfa == 13): + dfa = state13(String[i]) + elif (dfa == 14): + dfa = state14(String[i]) + elif (dfa == 15): + dfa = state15(String[i]) + elif (dfa == 16): + dfa = state16(String[i]) + elif (dfa == 17): + dfa = state17(String[i]) + elif (dfa == 18): + dfa = state18(String[i]) + elif (dfa == 19): + dfa = state19(String[i]) + elif (dfa == 20): + dfa = state20(String[i]) + elif (dfa == 21): + dfa = state21(String[i]) + elif (dfa == 22): + dfa = state22(String[i]) + elif (dfa == 23): + dfa = state23(String[i]) + elif (dfa == 24): + dfa = state24(String[i]) + elif (dfa == 25): + dfa = state25(String[i]) + elif (dfa == 26): + dfa = state26(String[i]) + elif (dfa == 27): + dfa = state27(String[i]) + elif (dfa == 28): + dfa = state28(String[i]) + elif (dfa == 29): + dfa = state29(String[i]) + elif (dfa == 30): + dfa = state30(String[i]) + elif (dfa == 31): + dfa = state31(String[i]) + elif (dfa == 32): + dfa = state32(String[i]) + elif (dfa == 33): + dfa = state33(String[i]) + elif (dfa == 34): + dfa = state34(String[i]) + elif (dfa == 35): + dfa = state35(String[i]) + elif (dfa == 36): + dfa = state36(String[i]) + elif (dfa == 37): + dfa = state37(String[i]) + elif (dfa == 38): + dfa = state38(String[i]) + elif (dfa == 39): + dfa = state39(String[i]) + elif (dfa == 40): + dfa = state40(String[i]) + elif (dfa == 41): + dfa = state41(String[i]) + elif (dfa == 42): + dfa = state42(String[i]) + elif (dfa == 43): + dfa = state43(String[i]) + elif (dfa == 44): + dfa = state44(String[i]) + elif (dfa == 45): + dfa = state45(String[i]) + elif (dfa == 46): + dfa = state46(String[i]) + elif (dfa == 47): + dfa = state47(String[i]) + elif (dfa == 48): + dfa = state48(String[i]) + elif (dfa == 49): + dfa = state49(String[i]) + elif (dfa == 50): + dfa = state50(String[i]) + elif (dfa == 51): + dfa = state51(String[i]) + elif (dfa == 52): + dfa = state52(String[i]) + elif (dfa == 53): + dfa = state53(String[i]) + elif (dfa == 54): + dfa = state54(String[i]) + elif (dfa == 55): + dfa = state55(String[i]) + elif (dfa == 56): + dfa = state56(String[i]) + elif (dfa == 57): + dfa = state57(String[i]) + elif (dfa == 58): + dfa = state58(String[i]) + elif (dfa == 59): + dfa = state59(String[i]) + elif (dfa == 60): + dfa = state60(String[i]) + elif (dfa == 61): + dfa = state61(String[i]) + elif (dfa == 62): + dfa = state62(String[i]) + elif (dfa == 63): + dfa = state63(String[i]) + elif (dfa == 64): + dfa = state64(String[i]) + elif (dfa == 65): + dfa = state65(String[i]) + elif (dfa == 66): + dfa = state66(String[i]) + elif (dfa == 67): + dfa = state67(String[i]) + elif (dfa == 68): + dfa = state68(String[i]) + elif (dfa == 69): + dfa = state69(String[i]) + elif (dfa == 70): + dfa = state70(String[i]) + elif (dfa == 71): + dfa = state71(String[i]) + elif (dfa == 72): + dfa = state72(String[i]) + elif (dfa == 73): + dfa = state73(String[i]) + elif (dfa == 74): + dfa = state74(String[i]) + elif (dfa == 75): + dfa = state75(String[i]) + elif (dfa == 76): + dfa = state76(String[i]) + elif (dfa == 77): + dfa = state77(String[i]) + elif (dfa == 78): + dfa = state78(String[i]) + elif (dfa == 79): + dfa = state79(String[i]) + elif (dfa == 80): + dfa = state80(String[i]) + elif (dfa == 81): + dfa = state81(String[i]) + elif (dfa == 82): + dfa = state82(String[i]) + elif (dfa == 83): + dfa = state83(String[i]) + elif (dfa == 84): + dfa = state84(String[i]) + elif (dfa == 85): + dfa = state85(String[i]) + elif (dfa == 86): + dfa = state86(String[i]) + elif (dfa == 87): + dfa = state87(String[i]) + elif (dfa == 88): + dfa = state88(String[i]) + elif (dfa == 89): + dfa = state89(String[i]) + elif (dfa == 90): + dfa = state90(String[i]) + elif (dfa == 91): + dfa = state91(String[i]) + elif (dfa == 92): + dfa = state92(String[i]) + elif (dfa == 93): + dfa = state93(String[i]) + elif (dfa == 94): + dfa = state94(String[i]) + elif (dfa == 95): + dfa = state95(String[i]) + elif (dfa == 96): + dfa = state96(String[i]) + elif (dfa == 97): + dfa = state97(String[i]) + elif (dfa == 98): + dfa = state98(String[i]) + elif (dfa == 99): + dfa = state99(String[i]) + elif (dfa == 100): + dfa = state100(String[i]) + elif (dfa == 101): + dfa = state101(String[i]) + elif (dfa == 102): + dfa = state102(String[i]) + elif (dfa == 103): + dfa = state103(String[i]) + elif (dfa == 104): + dfa = state104(String[i]) + elif (dfa == 105): + dfa = state105(String[i]) + elif (dfa == 106): + dfa = state106(String[i]) + elif (dfa == 107): + dfa = state107(String[i]) + elif (dfa == 108): + dfa = state108(String[i]) + elif (dfa == 109): + dfa = state109(String[i]) + elif (dfa == 110): + dfa = state110(String[i]) + elif (dfa == 111): + dfa = state111(String[i]) + elif (dfa == 112): + dfa = state112(String[i]) + elif (dfa == 113): + dfa = state113(String[i]) + elif (dfa == 114): + dfa = state114(String[i]) + elif (dfa == 115): + dfa = state115(String[i]) + elif (dfa == 116): + dfa = state116(String[i]) + elif (dfa == 117): + dfa = state117(String[i]) + elif (dfa == 118): + dfa = state118(String[i]) + elif (dfa == 119): + dfa = state119(String[i]) + elif (dfa == 120): + dfa = state120(String[i]) + elif (dfa == 121): + dfa = state121(String[i]) + elif (dfa == 122): + dfa = state122(String[i]) + elif (dfa == 123): + dfa = state123(String[i]) + elif (dfa == 124): + dfa = state124(String[i]) + elif (dfa == 125): + dfa = state125(String[i]) + elif (dfa == 126): + dfa = state126(String[i]) + elif (dfa == 127): + dfa = state127(String[i]) + elif (dfa == 128): + dfa = state128(String[i]) + elif (dfa == 129): + dfa = state129(String[i]) + elif (dfa == 130): + dfa = state130(String[i]) + elif (dfa == 131): + dfa = state131(String[i]) + elif (dfa == 132): + dfa = state132(String[i]) + elif (dfa == 133): + dfa = state133(String[i]) + elif (dfa == 134): + dfa = state134(String[i]) + elif (dfa == 135): + dfa = state135(String[i]) + elif (dfa == 136): + dfa = state136(String[i]) + elif (dfa == 137): + dfa = state137(String[i]) + elif (dfa == 138): + dfa = state138(String[i]) + elif (dfa == 139): + dfa = state139(String[i]) + elif (dfa == 140): + dfa = state140(String[i]) + elif (dfa == 141): + dfa = state141(String[i]) + elif (dfa == 142): + dfa = state142(String[i]) + elif (dfa == 143): + dfa = state143(String[i]) + elif (dfa == 144): + dfa = state144(String[i]) + elif (dfa == 145): + dfa = state145(String[i]) + elif(dfa == -2): + if(l == i+1): + return True + else: + return False + else: + return False +