Модуль:LK

Матеріал з Вікіпедії — вільної енциклопедії.
Перейти до навігації Перейти до пошуку
{{i}} Документація модуля[створити]
return {
	color = function(pole)
		if string.match(pole.args[1], "^vBS2+") then return "" end
		if string.match(pole.args[1], "^xvKRZu$") then return "exv" end
		if string.match(pole.args[1], "^vxSTR.eABZgl$") then return "ev" end
		if string.match(pole.args[1], "^vL") then return "vL" end
		if string.match(pole.args[1], "^v%-L") then return "vL" end
		if string.match(pole.args[1], "^v.*xe.ex") then return "exv" end
		if string.match(pole.args[1], "^v.*%-ex") then return "xv" end
		if string.match(pole.args[1], "^v") then return "v" end
		if string.match(pole.args[1], "^ev") then return "ev" end
		if string.match(pole.args[1], "^e?xvSTRg[lr]$") then return "ex" end
		if string.match(pole.args[1], "^xv") then return "xv" end
		if string.match(pole.args[1], "^exv") then return "exv" end
		if string.match(pole.args[1], "^exL") then return "exL" end
		if string.match(pole.args[1], "^uL") then return "uL" end
		if string.match(pole.args[1], "^ut.*xe$") then return "uext" end
		if string.match(pole.args[1], "^ut") then return "ut" end
		if string.match(pole.args[1], "^L") then return "L" end
		if string.match(pole.args[1], "^ext") then return "ext" end
		if string.match(pole.args[1], "^tex") then return "ext" end
		if string.match(pole.args[1], "^t") then return "t" end
		if string.match(pole.args[1], "^mtex") then return "ext" end
		if string.match(pole.args[1], "^mt") then return "t" end
		if string.match(pole.args[1], "^ex") then return "ex" end
		if string.match(pole.args[1], "^uexL") then return "uexL" end
		if string.match(pole.args[1], "^uext") then return "uext" end
		if string.match(pole.args[1], "^uex") then return "uex" end
		if string.match(pole.args[1], "^u") then return "u" end
		if string.match(pole.args[1], "^x") then return "ex" end
		if string.match(pole.args[1], "^ENDExe") then return "ex" end
		if string.match(pole.args[1], "^KBHF.*xe") then return "ex" end
		if string.match(pole.args[1], "xe$") then return "ex" end
		return ""
	end,

	rodzaj = function(pole)
		text = pole.args[1]

		if string.match(text, "q$") then return "" end
		if string.match(text, "^vxSTR.eABZgl$") then return "STR" end

		text = string.gsub(text, "^v", "")
		text = string.gsub(text, "^x", "")
		text = string.gsub(text, "^ex", "")
		text = string.gsub(text, "^ut", "")
		text = string.gsub(text, "^u", "")
		text = string.gsub(text, "^e", "")
		text = string.gsub(text, "^L", "")
		text = string.gsub(text, "^t", "")

		if string.match(text, "^$") then return "" end
		if string.match(text, "^CONTr") then return "" end
		if string.match(text, "^CONTl") then return "" end
		if string.match(text, "^CONTf") then return "" end
		if string.match(text, "^CONT%d") then return "" end
		if string.match(text, "^WASSER") then return "" end
		if string.match(text, "^MROAD") then return "" end
		if string.match(text, "^ÜW") then return "" end -- to trzeba bdzie rozszerzyć
		if string.match(text, "BSTl$") then return "" end
		if string.match(text, "BSTr$") then return "" end
		if string.match(text, "^STR.f") then return "" end
		if string.match(text, "^STR.g") then return "STR" end
		if string.match(text, "^STR%+%d$") then return "STR" end
		if string.match(text, "^STR%+c%d$") then return "STR" end
		if string.match(text, "^%-.*STR") then return "-STR" end
		if string.match(text, "^STR%-e?ABZg") then return "STR" end  
		if string.match(text, "^STR%-e?.ST") then return "STR" end  
		if string.match(text, "^STR%-") then return "STR-" end  
		if string.match(text, "^STR.") then return "" end -- to jesta jakaś kombinacja
		if string.match(text, "^KHSTe$") then return "" end
		if string.match(text, "^KBHFe$") then return "" end
		if string.match(text, "KBST[elr]$") then return "" end

		if string.match(text, "^ELCe$") then return "" end
		if string.match(text, "^ELC.$") then return "ELC" end
		if string.match(text, "^ELC$") then return "ELC" end
		if string.match(text, "^BL$") then return "ELC" end

		if string.match(text, "^HUB") then return "" end
		
		if string.match(text, "^BAHN$") then return "" end
		if string.match(text, "^MBAHN") then return "" end
		if string.match(text, "^TRAM") then return "" end
		
		if string.match(text, "ABZql$") then return "" end
		if string.match(text, "ABZqr$") then return "" end
		if string.match(text, "ABZq%+%d$") then return "" end
		if string.match(text, "KDSTx[lr]$") then return "" end
		if string.match(text, "KDST[^ax]$") then return "" end
		
		return "STR"
	end,
}