protected void buildActionGotoTable() {
		actions = new AssemblyParseActionGotoTable();

		// Copy the translations tables NT columns as GOTOs
		// Also, copy the T columns as SHIFTs
		table.forEach(new Consumer<TableEntry<Integer>>() {
			@Override
			public void accept(TableEntry<Integer> ent) {
				if (ent.getSym() instanceof AssemblyNonTerminal) {
					AssemblyNonTerminal nt = (AssemblyNonTerminal) ent.getSym();
					actions.putGoto(ent.getState(), nt, ent.getValue());
				}
				else if (ent.getSym() instanceof AssemblyTerminal) {
					AssemblyTerminal t = (AssemblyTerminal) ent.getSym();
					actions.putShift(ent.getState(), t, ent.getValue());
				}
				else {
					throw new AssertionError("INTERNAL: symbols must be T or NT");
				}
			}
		});

		// Merge rules from same general rule, ending in same state
		mergers =
			LazyMap.lazyMap(new LinkedHashMap<MergeKey, MergeValue>(), () -> new MergeValue());
		int i = -1;
		for (AssemblyExtendedProduction prod : extendedGrammar) {
			i++;
			MergeValue entry = mergers.get(new MergeKey(prod.getFinalState(), prod.getAncestor()));
			entry.merge(i, extff.getFollow(prod.getLHS()));
		}

		// Write merged stuff to table as REDUCEs
		for (Map.Entry<MergeKey, MergeValue> ent : mergers.entrySet()) {
			for (AssemblyTerminal t : ent.getValue().follow) {
				AssemblyProduction prod = ent.getKey().prod;
				if (!prod.getLHS().equals(grammar.getStart())) {
					actions.putReduce(ent.getKey().finalState, t, prod);
				}
			}
		}

		// Make $ accept on any state with a completed start item.
		nextState: for (i = 0; i < states.size(); i++) {
			AssemblyParseState state = states.get(i);
			for (AssemblyParseStateItem item : state.getKernel()) {
				if (item.completed() && item.getProduction().getLHS().getName().equals("$S")) {
					actions.putAccept(i);
					continue nextState;
				}
			}
		}
	}
Extend a production, using the given LR0 start state

@param prod the production to extend
@param start the starting LR0 state
@return the extended production, if the start state is valid for it
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/parse/AssemblyParser.java