MNR2KHIOEYQXJ72DODRL44JUB7YY44UFSEECASKNMTAEJ2ZMKI3AC
3HPUUCKCF5KC257LSRJWNUT7HXOWZP5ZKEUU3BGSQQTQSOVX5CGQC
GG2553RBUKMCWIAD3EWJV7C2QH2BIS5V2E3BDTFSTYRHAPXGBF7QC
ZTZOO2OQ2DXRG3MI4RQVNWRHALXQ6BCIOWTTYPP2URQF5EWSNTOAC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC
3VHUIIATPOF7FXB7NTL5MESCV5BCQACII2D7QZ4UIUCBX3CWXMMAC
6K5PFF6XBFTM6CXUVVFIH4CQMCMPHTND3ICDMRMNOME5BUBF27NQC
NQM25OZVXXUTUBIIWE2QPHC22JMJB7YRIDKS2XTMQLJLCMLTM5SAC
PLKNHYZ4KXWWKC2DHXCI4WVO23I7VMEVYT5H2J6JDE4S3D3CHDJQC
JOPVPUSAMMU6RFVDQR4NJC4GNNUFB7GPKVH7OS5FKCYS5QZ53VLQC
K5UKK5UVQBJN5Q27LLMJ7YQKENNHZOARPJQCJQOXQ4KFMKLINELQC
GPJ2T6KIOWUI6YL7SR6NWVFQQ5B3KIUFAKYQ22VB72HKQR2377BAC
end
function starts_with(s, prefix)
if #s < #prefix then
return false
end
for i=1,#prefix do
if s:sub(i,i) ~= prefix:sub(i,i) then
return false
end
end
return true
end
function ends_with(s, suffix)
if #s < #suffix then
return false
end
for i=0,#suffix-1 do
if s:sub(#s-i,#s-i) ~= suffix:sub(#suffix-i,#suffix-i) then
return false
end
end
return true
end
if edge.suffix and ends_with(frag, edge.suffix) then
Current_state = edge.target
break
end
end
if edge.prefix and starts_with(frag, edge.prefix) then
Current_state = edge.target
break
end
end
end
function switch_color_based_on_suffix(frag)
if Next_state[Current_state] == nil then
return
end
frag = rtrim(frag)
for _,edge in pairs(Next_state[Current_state]) do