public void decode(Decoder decoder, SleighLanguage sleigh) throws DecoderException {
		int el = decoder.openElement(ELEM_CONSTRUCTOR);
		SymbolTable symtab = sleigh.getSymbolTable();

		int myId = (int) decoder.readUnsignedInteger(ATTRIB_PARENT);
		parent = (SubtableSymbol) symtab.findSymbol(myId);
		firstwhitespace = (int) decoder.readSignedInteger(ATTRIB_FIRST);
		minimumlength = (int) decoder.readSignedInteger(ATTRIB_LENGTH);
		int srcLine = (int) decoder.readSignedInteger(ATTRIB_SOURCE);
		lineno = (int) decoder.readSignedInteger(ATTRIB_LINE);
		sourceFile = sleigh.getSourceFileIndexer().getFileName(srcLine);

		ArrayList<Object> oplist = new ArrayList<>();
		ArrayList<Object> piecelist = new ArrayList<>();
		ArrayList<Object> coplist = new ArrayList<>();
		int subel = decoder.peekElement();
		while (subel != 0) {
			if (subel == ELEM_OPER.id()) {
				decoder.openElement();
				myId = (int) decoder.readUnsignedInteger(ATTRIB_ID);
				oplist.add(symtab.findSymbol(myId));
				decoder.closeElementSkipping(subel);
			}
			else if (subel == ELEM_PRINT.id()) {
				decoder.openElement();
				piecelist.add(decoder.readString(ATTRIB_PIECE));
				decoder.closeElementSkipping(subel);
			}
			else if (subel == ELEM_OPPRINT.id()) {
				decoder.openElement();
				myId = (int) decoder.readSignedInteger(ATTRIB_ID);
				String operstring = "\n";
				char ind = (char) ('A' + myId);
				operstring += ind;
				piecelist.add(operstring);
				decoder.closeElementSkipping(subel);
			}
			else if (subel == ELEM_CONTEXT_OP.id()) {
				ContextOp c_op = new ContextOp();
				c_op.decode(decoder, sleigh);
				coplist.add(c_op);
			}
			else if (subel == ELEM_COMMIT.id()) {
				ContextCommit c_op = new ContextCommit();
				c_op.decode(decoder, sleigh);
				coplist.add(c_op);
			}
			else {
				ConstructTpl curtempl = new ConstructTpl();
				int sectionid = curtempl.decode(decoder);
				if (sectionid < 0) {
					if (templ != null) {
						throw new DecoderException("Duplicate main template section");
					}
					templ = curtempl;
				}
				else {
					if (namedtempl == null) {
						namedtempl = new ArrayList<>();
					}
					while (namedtempl.size() <= sectionid) {
						namedtempl.add(null);
					}
					if (namedtempl.get(sectionid) != null) {
						throw new DecoderException("Duplicate named template section");
					}
					namedtempl.set(sectionid, curtempl);
				}
			}
			subel = decoder.peekElement();
		}
		operands = new OperandSymbol[oplist.size()];
		separators = new String[operands.length + 1];
		oplist.toArray(operands);
		printpiece = new String[piecelist.size()];
		piecelist.toArray(printpiece);
		context = new ContextChange[coplist.size()];
		coplist.toArray(context);
		if ((printpiece.length == 1) && (printpiece[0].length() >= 2) &&
			(printpiece[0].charAt(0) == '\n')) {
			flowthruindex = printpiece[0].charAt(1) - 'A';
		}
		else {
			flowthruindex = -1;
		}
		decoder.closeElement(el);
	}
Retrieve a named p-code template section
@param secnum is the id of the section to return
@return the named section (or null)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/sleigh/Constructor.java