public void addProduction(AssemblyNonTerminal lhs, AssemblySentential<AssemblyNonTerminal> rhs,
			DisjointPattern pattern, Constructor cons, List<Integer> indices) {
		AssemblyProduction prod = newProduction(lhs, rhs);
		addProduction(prod);
		Map<Constructor, AssemblyConstructorSemantic> map =
			semanticsByProduction.computeIfAbsent(prod, p -> new TreeMap<>());
		AssemblyConstructorSemantic sem =
			map.computeIfAbsent(cons, c -> new AssemblyConstructorSemantic(factory, cons, indices));
		if (!indices.equals(sem.getOperandIndices())) {
			throw new IllegalStateException(
				"Productions of the same constructor must have same operand indices");
		}
		semanticsByConstructor.put(cons, sem);

		sem.addPattern(pattern);
	}
Add a production associated with a SLEIGH constructor semantic

@param lhs the left-hand side
@param rhs the right-hand side
@param pattern the pattern associated with the constructor
@param cons the SLEIGH constructor
@param indices the indices of RHS non-terminals that represent an operand in the constructor
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/grammars/AssemblyGrammar.java