La documentació d'ús d'aquest mòdul es pot crear a Mòdul:ca-verb/dir/ús

-- Formes irregulars del verb dir i derivats.
local export = {}

function export.make_irregulars(forma, zona)
	local radical = forma.inf:gsub("ir$", "")
	
	forma.part[1]["m-s"] = radical .. "it"
	forma.part[1]["f-s"] = radical .. "ita"
	forma.part[1]["m-p"] = radical .. "its"
	forma.part[1]["f-p"] = radical .. "ites"
	
	if zona.bal then
		forma["pres-ind"][2] = {}
		forma["pres-ind"][2][4] = radical .. "eim"
		forma["pres-ind"][2][5] = radical .. "eis"
		forma["pres-ind"][2]["nota"] = "bal"
	end
	
	forma["imperf-ind"][1][1] = radical .. "eia"
	forma["imperf-ind"][1][2] = radical .. "eies"
	forma["imperf-ind"][1][3] = radical .. "eia"
	forma["imperf-ind"][1][4] = radical .. "èiem"
	forma["imperf-ind"][1][5] = radical .. "èieu"
	forma["imperf-ind"][1][6] = radical .. "eien"
	if zona.val then
		forma["imperf-ind"][2] = {}
		forma["imperf-ind"][2][4] = radical .. "éiem"
		forma["imperf-ind"][2][5] = radical .. "éieu"
		forma["imperf-ind"][2]["nota"] = "val"
	end
	
	forma["fut"][1][1] = radical .. "iré"
	forma["fut"][1][2] = radical .. "iràs"
	forma["fut"][1][3] = radical .. "irà"
	forma["fut"][1][4] = radical .. "irem"
	forma["fut"][1][5] = radical .. "ireu"
	forma["fut"][1][6] = radical .. "iran"

	forma["cond"][1][1] = radical .. "iria"
	forma["cond"][1][2] = radical .. "iries"
	forma["cond"][1][3] = radical .. "iria"
	forma["cond"][1][4] = radical .. "iríem"
	forma["cond"][1][5] = radical .. "iríeu"
	forma["cond"][1][6] = radical .. "irien"
	
	forma["imp"][1][2] = radical .. "igues"
	forma["imp"][1][5] = radical .. "igueu"

	fila = #forma.imp + 1
	if zona.bal then
		forma["imp"][fila] = {}
		forma["imp"][fila][5] = radical .. "igau"
		forma["imp"][fila]["nota"] = "bal"
		fila = fila + 1
	end
	
	if zona.val then
		forma["imp"][fila] = {}
		forma["imp"][fila][2] = radical .. "is"
		forma["imp"][fila]["nota"] = "val"
	end

	forma["no-imperf-ind"] = {}
	forma["no-imperf-ind"][1] = {}
	forma["no-imperf-ind"][1][1] = radical .. "ia"
	forma["no-imperf-ind"][1][2] = radical .. "ies"
	forma["no-imperf-ind"][1][3] = radical .. "ia"
	forma["no-imperf-ind"][1][4] = radical .. "íem"
	forma["no-imperf-ind"][1][5] = radical .. "íeu"
	forma["no-imperf-ind"][1][6] = radical .. "ien"
	
	fila = 2
	if zona.nocc then
		forma["no-imperf-ind"][fila] = {}
		forma["no-imperf-ind"][fila][1] = radical .. "iva"
		forma["no-imperf-ind"][fila][2] = radical .. "ives"
		forma["no-imperf-ind"][fila][3] = radical .. "iva"
		forma["no-imperf-ind"][fila][4] = radical .. "ívam"
		forma["no-imperf-ind"][fila][5] = radical .. "ívau"
		forma["no-imperf-ind"][fila][6] = radical .. "iven"
		forma["no-imperf-ind"][fila]["nota"] = "n-occ"
		fila = fila + 1
	end
	
	if zona.nocc or zona.alg then
		forma["no-imperf-ind"][fila] = {}
		forma["no-imperf-ind"][fila][1] = radical .. "ieva"
		forma["no-imperf-ind"][fila][2] = radical .. "ieves"
		forma["no-imperf-ind"][fila][3] = radical .. "ieva"
		forma["no-imperf-ind"][fila][4] = radical .. "iévem"
		forma["no-imperf-ind"][fila][5] = radical .. "iéveu"
		forma["no-imperf-ind"][fila][6] = radical .. "ieven"
		forma["no-imperf-ind"][fila]["nota"] = (zona.nocc and "n-occ" .. (zona.alg and ", " or "") or "") .. (zona.alg and "alg" or "")
	end
	
	if zona.alg then
		forma["no-fut"] = {}
		forma["no-fut"][1] = {}
		forma["no-fut"][1][1] = radical .. "iuré"
		forma["no-fut"][1][2] = radical .. "iuràs"
		forma["no-fut"][1][3] = radical .. "iurà"
		forma["no-fut"][1][4] = radical .. "iurem"
		forma["no-fut"][1][5] = radical .. "iureu"
		forma["no-fut"][1][6] = radical .. "iuran"
		forma["no-fut"][1]["nota"] = "alg"
		
		forma["no-fut"][2] = {}
		forma["no-fut"][2][1] = radical .. "igueré"
		forma["no-fut"][2][2] = radical .. "igueràs"
		forma["no-fut"][2][3] = radical .. "iguerà"
		forma["no-fut"][2][4] = radical .. "iguerem"
		forma["no-fut"][2][5] = radical .. "iguereu"
		forma["no-fut"][2][6] = radical .. "igueran"
		forma["no-fut"][2]["nota"] = "alg"
		
		forma["no-cond"][2] = {}
		forma["no-cond"][2][1] = radical .. "igueriva"
		forma["no-cond"][2][2] = radical .. "iguerives"
		forma["no-cond"][2][3] = radical .. "igueriva"
		forma["no-cond"][2][4] = radical .. "iguerívem"
		forma["no-cond"][2][5] = radical .. "igueríveu"
		forma["no-cond"][2][6] = radical .. "igueriven"
		forma["no-cond"][2]["nota"] = "alg"
	end
	
	if zona.centr and forma["no-imperf-subj"] then
		for i = 2, #forma["no-imperf-subj"] do
			local trasllada = forma["no-imperf-subj"][i]
			forma["no-imperf-subj"][i-1] = trasllada
			forma["no-imperf-subj"][i] = nil
		end
	end

	if zona.val then
		forma.nota = "L'imperatiu «" .. radical .. "is» s'usa en parlars valencians pronominalment."
	end
	
	return forma
end

return export