protected AssemblySymbol getSymbolFor(Constructor cons, OperandSymbol opsym) {
		TripleSymbol defsym = opsym.getDefiningSymbol();
		// If the symbol has no defining symbol, that means the name is only valid in the local
		// scope. We must keep them unique.
		String name;
		if (defsym == null) {
			name = cons.getParent().getName() + ":" + opsym.getName();
		}
		else {
			name = opsym.getName();
		}
		AssemblySymbol built = builtSymbols.get(name);
		if (built != null) {
			return built;
		}
		if (defsym == null) {
			HandleTpl htpl = getHandleTpl(cons, opsym);
			built = htpl == null ? new AssemblyNumericTerminal(name, 0, null)
					: new AssemblyNumericTerminal(name, htpl.getSize(), htpl.getAddressSpace());
		}
		else if (defsym instanceof SubtableSymbol) {
			built = new AssemblyNonTerminal(name);
		}
		else if (defsym instanceof VarnodeListSymbol vnListSym) {
			built = new AssemblyStringMapTerminal(name, invVarnodeList(vnListSym));
		}
		else if (defsym instanceof VarnodeSymbol vnSym) {
			built = new AssemblyStringTerminal(name, vnSym);
			// Does this need to consume an operand? It seems not.
		}
		else if (defsym instanceof ValueMapSymbol vnMapSym) {
			built = new AssemblyNumericMapTerminal(name, invValueMap(vnMapSym));
		}
		else if (defsym instanceof NameSymbol nameSym) {
			built = new AssemblyStringMapTerminal(name, invNameSymbol(nameSym));
		}
		else {
			throw new RuntimeException("Unknown symbol for " + name + ": " + defsym);
		}
		builtSymbols.put(name, built);
		return built;
	}
Convert the given operand symbol to an {@link AssemblySymbol}

<p>
For subtables, this results in a non-terminal, for all others, the result in a terminal.

@param cons the constructor to which the operand belongs
@param opsym the operand symbol to convert
@return the converted assembly grammar symbol
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/AbstractSleighAssemblerBuilder.java